@noy-db/hub 0.2.0-pre.7 → 0.2.0-pre.9

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 (235) hide show
  1. package/dist/aggregate/index.cjs.map +1 -1
  2. package/dist/aggregate/index.js +2 -2
  3. package/dist/attestation/index.cjs.map +1 -1
  4. package/dist/attestation/index.d.cts +2 -2
  5. package/dist/attestation/index.d.ts +2 -2
  6. package/dist/attestation/index.js +5 -5
  7. package/dist/blobs/index.cjs.map +1 -1
  8. package/dist/blobs/index.d.cts +3 -3
  9. package/dist/blobs/index.d.ts +3 -3
  10. package/dist/blobs/index.js +4 -4
  11. package/dist/bundle/index.cjs +255 -15
  12. package/dist/bundle/index.cjs.map +1 -1
  13. package/dist/bundle/index.d.cts +4 -4
  14. package/dist/bundle/index.d.ts +4 -4
  15. package/dist/bundle/index.js +8 -8
  16. package/dist/{chunk-AYRTGXF3.js → chunk-22DWZL57.js} +62 -26
  17. package/dist/chunk-22DWZL57.js.map +1 -0
  18. package/dist/{chunk-4EOVWJL6.js → chunk-2GLDA55J.js} +2 -2
  19. package/dist/{chunk-CBHPW77B.js → chunk-2WUSG3IT.js} +2 -2
  20. package/dist/{chunk-WBUG3324.js → chunk-3BFJOWSU.js} +2 -2
  21. package/dist/{chunk-7IH5FDXD.js → chunk-3YPCK6JX.js} +5 -5
  22. package/dist/{chunk-SYOSRZN4.js → chunk-53XBRIRT.js} +4 -4
  23. package/dist/{chunk-UPBZ7NVY.js → chunk-5T22KDPN.js} +4 -4
  24. package/dist/{chunk-KK44CQ5B.js → chunk-5XHKQ56N.js} +2 -2
  25. package/dist/{chunk-3O5FNO5O.js → chunk-6CME4UEK.js} +259 -50
  26. package/dist/chunk-6CME4UEK.js.map +1 -0
  27. package/dist/chunk-6STK5TQP.js +139 -0
  28. package/dist/chunk-6STK5TQP.js.map +1 -0
  29. package/dist/{chunk-REQJJIPP.js → chunk-B6PB7JLN.js} +23 -1
  30. package/dist/{chunk-REQJJIPP.js.map → chunk-B6PB7JLN.js.map} +1 -1
  31. package/dist/{chunk-2TXMTYWZ.js → chunk-BVRYKATC.js} +3 -3
  32. package/dist/{chunk-6ILPGZXZ.js → chunk-DE6GKS6G.js} +2 -2
  33. package/dist/{chunk-TS4FQPDD.js → chunk-DFMLEQZB.js} +2 -2
  34. package/dist/{chunk-3XCXUJTM.js → chunk-DJHHA6XH.js} +2 -2
  35. package/dist/{chunk-LSY46G55.js → chunk-DL3HWOQ5.js} +3 -3
  36. package/dist/{chunk-6MXGU2PW.js → chunk-DO7C2TOG.js} +2 -2
  37. package/dist/{chunk-N4CDTRDH.js → chunk-DONMZAD2.js} +3 -3
  38. package/dist/{chunk-HNC55FLJ.js → chunk-F3GDRNUT.js} +3 -3
  39. package/dist/{chunk-VZOZ3DBN.js → chunk-H2X3ISXG.js} +3 -3
  40. package/dist/{chunk-XZCBBZLS.js → chunk-HNRHLRDC.js} +2 -2
  41. package/dist/{chunk-22ESLVUM.js → chunk-I5FOWO4J.js} +2 -2
  42. package/dist/{chunk-O3JCRQT3.js → chunk-JWRVQKRZ.js} +3 -3
  43. package/dist/{chunk-CSHY53CZ.js → chunk-K3DK3NU5.js} +2 -2
  44. package/dist/{chunk-BNUCCUES.js → chunk-ML236QKC.js} +2 -2
  45. package/dist/{chunk-GZIDTXC4.js → chunk-NONAAENK.js} +2 -2
  46. package/dist/{chunk-JZDA2SRB.js → chunk-O3VZPBZG.js} +4 -4
  47. package/dist/{chunk-PJKGXUMG.js → chunk-OQ6PIGHA.js} +2 -2
  48. package/dist/{chunk-QYO6I7KK.js → chunk-PE2FR4J3.js} +3 -3
  49. package/dist/{chunk-YAMTXW77.js → chunk-PP6W64Y3.js} +2 -2
  50. package/dist/{chunk-HNFXKQD7.js → chunk-PX35GA7L.js} +4 -4
  51. package/dist/{chunk-OXCFFRF3.js → chunk-QEILDE6R.js} +2 -2
  52. package/dist/{chunk-4YVVF6JN.js → chunk-QODLLGQ7.js} +4 -4
  53. package/dist/{chunk-ASFE2X62.js → chunk-RAZ4OVLL.js} +2 -2
  54. package/dist/{chunk-WM5GFORS.js → chunk-SYMWGEET.js} +2 -2
  55. package/dist/{chunk-SLJQIBT7.js → chunk-T7JEBOGN.js} +2 -2
  56. package/dist/{chunk-OA6HE2RW.js → chunk-TFBP23BX.js} +3 -3
  57. package/dist/{chunk-GI6S5ZF2.js → chunk-U26HQ6KJ.js} +2 -2
  58. package/dist/{chunk-WMKCAN4H.js → chunk-VTKGMEPP.js} +2 -2
  59. package/dist/{chunk-BRZFN354.js → chunk-WPLVTJ5D.js} +3 -3
  60. package/dist/{chunk-DCP4L4SH.js → chunk-XJFLDA7A.js} +2 -2
  61. package/dist/{chunk-BE5ZALMB.js → chunk-ZYWZWG6G.js} +4 -4
  62. package/dist/consent/index.cjs.map +1 -1
  63. package/dist/consent/index.d.cts +3 -3
  64. package/dist/consent/index.d.ts +3 -3
  65. package/dist/consent/index.js +3 -3
  66. package/dist/{crypto-TRZ5BJMY.js → crypto-HTZ4FJOP.js} +3 -3
  67. package/dist/{delegation-TLZTK2XW.js → delegation-RI54P6I5.js} +5 -5
  68. package/dist/derivations/index.cjs.map +1 -1
  69. package/dist/derivations/index.d.cts +4 -4
  70. package/dist/derivations/index.d.ts +4 -4
  71. package/dist/derivations/index.js +4 -4
  72. package/dist/{dev-unlock-ClAEZQC4.d.ts → dev-unlock-B4kDxep_.d.ts} +1 -1
  73. package/dist/{dev-unlock-L3z34v0J.d.cts → dev-unlock-BIoEFbwm.d.cts} +1 -1
  74. package/dist/executor-5PNY7LGW.js +8 -0
  75. package/dist/executor-B4QIYGZX.js +8 -0
  76. package/dist/executor-BWXXDQ7K.js +11 -0
  77. package/dist/guards/index.cjs.map +1 -1
  78. package/dist/guards/index.d.cts +4 -4
  79. package/dist/guards/index.d.ts +4 -4
  80. package/dist/guards/index.js +3 -3
  81. package/dist/{hash-M6-JI3Yu.d.cts → hash-DdpVypUp.d.cts} +1 -1
  82. package/dist/{hash-B3lV6lw3.d.ts → hash-HJqD14vS.d.ts} +1 -1
  83. package/dist/history/index.cjs.map +1 -1
  84. package/dist/history/index.d.cts +4 -4
  85. package/dist/history/index.d.ts +4 -4
  86. package/dist/history/index.js +4 -4
  87. package/dist/i18n/index.cjs +217 -22
  88. package/dist/i18n/index.cjs.map +1 -1
  89. package/dist/i18n/index.d.cts +3 -3
  90. package/dist/i18n/index.d.ts +3 -3
  91. package/dist/i18n/index.js +15 -4
  92. package/dist/i18n/index.js.map +1 -1
  93. package/dist/{index-vB43MAt4.d.cts → index-4fBVt8j9.d.cts} +21 -1
  94. package/dist/{index-CmWQyC4e.d.ts → index-D8I_pyJD.d.ts} +21 -1
  95. package/dist/index.cjs +439 -33
  96. package/dist/index.cjs.map +1 -1
  97. package/dist/index.d.cts +11 -11
  98. package/dist/index.d.ts +11 -11
  99. package/dist/index.js +48 -38
  100. package/dist/index.js.map +1 -1
  101. package/dist/indexing/index.cjs.map +1 -1
  102. package/dist/indexing/index.js +2 -2
  103. package/dist/issue-VGDPP4B5.js +12 -0
  104. package/dist/{ledger-SQVVE2DR.js → ledger-TMRZYNVJ.js} +4 -4
  105. package/dist/materialized-views/index.cjs.map +1 -1
  106. package/dist/materialized-views/index.d.cts +5 -5
  107. package/dist/materialized-views/index.d.ts +5 -5
  108. package/dist/materialized-views/index.js +6 -6
  109. package/dist/noydb-G725ZSZG.js +34 -0
  110. package/dist/overlay-views/index.cjs.map +1 -1
  111. package/dist/overlay-views/index.d.cts +4 -4
  112. package/dist/overlay-views/index.d.ts +4 -4
  113. package/dist/overlay-views/index.js +4 -4
  114. package/dist/periods/index.cjs.map +1 -1
  115. package/dist/periods/index.d.cts +3 -3
  116. package/dist/periods/index.d.ts +3 -3
  117. package/dist/periods/index.js +4 -4
  118. package/dist/{public-envelope-BXPXMN3U.js → public-envelope-BW6OXORV.js} +3 -3
  119. package/dist/query/index.cjs.map +1 -1
  120. package/dist/query/index.d.cts +1 -1
  121. package/dist/query/index.d.ts +1 -1
  122. package/dist/query/index.js +3 -3
  123. package/dist/registry-3QP3YKQS.js +8 -0
  124. package/dist/{registry-4R4IURUM.js → registry-OJIOSBV6.js} +3 -3
  125. package/dist/registry-USRVT6YF.js +8 -0
  126. package/dist/{revoke-Y7UDOXGH.js → revoke-JCC7N56X.js} +5 -5
  127. package/dist/session/index.cjs.map +1 -1
  128. package/dist/session/index.d.cts +4 -4
  129. package/dist/session/index.d.ts +4 -4
  130. package/dist/session/index.js +3 -3
  131. package/dist/shadow/index.cjs.map +1 -1
  132. package/dist/shadow/index.d.cts +3 -3
  133. package/dist/shadow/index.d.ts +3 -3
  134. package/dist/shadow/index.js +2 -2
  135. package/dist/{signer-UD2ZSVDJ.js → signer-72QAUSVW.js} +4 -4
  136. package/dist/snapshots/index.cjs +37 -3
  137. package/dist/snapshots/index.cjs.map +1 -1
  138. package/dist/snapshots/index.d.cts +13 -6
  139. package/dist/snapshots/index.d.ts +13 -6
  140. package/dist/snapshots/index.js +40 -6
  141. package/dist/snapshots/index.js.map +1 -1
  142. package/dist/{stale-F4V5E7ZK.js → stale-6ZDBTQT7.js} +2 -2
  143. package/dist/store/index.cjs.map +1 -1
  144. package/dist/store/index.d.cts +3 -3
  145. package/dist/store/index.d.ts +3 -3
  146. package/dist/store/index.js +2 -2
  147. package/dist/sync/index.cjs.map +1 -1
  148. package/dist/sync/index.d.cts +2 -2
  149. package/dist/sync/index.d.ts +2 -2
  150. package/dist/sync/index.js +3 -3
  151. package/dist/team/index.cjs.map +1 -1
  152. package/dist/team/index.d.cts +3 -3
  153. package/dist/team/index.d.ts +3 -3
  154. package/dist/team/index.js +7 -7
  155. package/dist/tx/index.cjs.map +1 -1
  156. package/dist/tx/index.d.cts +3 -3
  157. package/dist/tx/index.d.ts +3 -3
  158. package/dist/tx/index.js +3 -3
  159. package/dist/{types-DT7cXRHq.d.ts → types-Df28QFKb.d.ts} +216 -5
  160. package/dist/{types-r-y7TIqj.d.cts → types-DyXYr8rE.d.cts} +216 -5
  161. package/dist/{ulid-Dt55yn4s.d.ts → ulid-CJ8RzRrm.d.ts} +1 -1
  162. package/dist/{ulid-BkW3mLlz.d.cts → ulid-Drr7ykr6.d.cts} +1 -1
  163. package/dist/util/index.cjs.map +1 -1
  164. package/dist/util/index.js +1 -1
  165. package/dist/{with-derivation-D_Ids_H6.d.ts → with-derivation-DFnFByiQ.d.ts} +1 -1
  166. package/dist/{with-derivation-DB63Po2m.d.cts → with-derivation-DU3Sjazm.d.cts} +1 -1
  167. package/dist/{with-guard-BHThLppa.d.cts → with-guard-ByyxmEe7.d.cts} +1 -1
  168. package/dist/{with-guard-BJwdc0s6.d.ts → with-guard-qube6BMI.d.ts} +1 -1
  169. package/dist/{with-materialized-view-D-CRVSDX.d.ts → with-materialized-view-BLkQxoQN.d.ts} +1 -1
  170. package/dist/{with-materialized-view-BJmJ-FrO.d.cts → with-materialized-view-BmEToIR1.d.cts} +1 -1
  171. package/dist/{with-overlayed-view-zePNtUSq.d.cts → with-overlayed-view-BMsQQbWm.d.cts} +1 -1
  172. package/dist/{with-overlayed-view-CNf6GbDG.d.ts → with-overlayed-view-CRsSEwHR.d.ts} +1 -1
  173. package/package.json +5 -4
  174. package/dist/chunk-3O5FNO5O.js.map +0 -1
  175. package/dist/chunk-AYRTGXF3.js.map +0 -1
  176. package/dist/executor-HAVRTQN4.js +0 -11
  177. package/dist/executor-V3DKOADS.js +0 -8
  178. package/dist/executor-XO4M4243.js +0 -8
  179. package/dist/issue-EJKUQ6FA.js +0 -12
  180. package/dist/noydb-MK4UQ626.js +0 -34
  181. package/dist/registry-GPBLCHG7.js +0 -8
  182. package/dist/registry-ZON5HNIV.js +0 -8
  183. /package/dist/{chunk-4EOVWJL6.js.map → chunk-2GLDA55J.js.map} +0 -0
  184. /package/dist/{chunk-CBHPW77B.js.map → chunk-2WUSG3IT.js.map} +0 -0
  185. /package/dist/{chunk-WBUG3324.js.map → chunk-3BFJOWSU.js.map} +0 -0
  186. /package/dist/{chunk-7IH5FDXD.js.map → chunk-3YPCK6JX.js.map} +0 -0
  187. /package/dist/{chunk-SYOSRZN4.js.map → chunk-53XBRIRT.js.map} +0 -0
  188. /package/dist/{chunk-UPBZ7NVY.js.map → chunk-5T22KDPN.js.map} +0 -0
  189. /package/dist/{chunk-KK44CQ5B.js.map → chunk-5XHKQ56N.js.map} +0 -0
  190. /package/dist/{chunk-2TXMTYWZ.js.map → chunk-BVRYKATC.js.map} +0 -0
  191. /package/dist/{chunk-6ILPGZXZ.js.map → chunk-DE6GKS6G.js.map} +0 -0
  192. /package/dist/{chunk-TS4FQPDD.js.map → chunk-DFMLEQZB.js.map} +0 -0
  193. /package/dist/{chunk-3XCXUJTM.js.map → chunk-DJHHA6XH.js.map} +0 -0
  194. /package/dist/{chunk-LSY46G55.js.map → chunk-DL3HWOQ5.js.map} +0 -0
  195. /package/dist/{chunk-6MXGU2PW.js.map → chunk-DO7C2TOG.js.map} +0 -0
  196. /package/dist/{chunk-N4CDTRDH.js.map → chunk-DONMZAD2.js.map} +0 -0
  197. /package/dist/{chunk-HNC55FLJ.js.map → chunk-F3GDRNUT.js.map} +0 -0
  198. /package/dist/{chunk-VZOZ3DBN.js.map → chunk-H2X3ISXG.js.map} +0 -0
  199. /package/dist/{chunk-XZCBBZLS.js.map → chunk-HNRHLRDC.js.map} +0 -0
  200. /package/dist/{chunk-22ESLVUM.js.map → chunk-I5FOWO4J.js.map} +0 -0
  201. /package/dist/{chunk-O3JCRQT3.js.map → chunk-JWRVQKRZ.js.map} +0 -0
  202. /package/dist/{chunk-CSHY53CZ.js.map → chunk-K3DK3NU5.js.map} +0 -0
  203. /package/dist/{chunk-BNUCCUES.js.map → chunk-ML236QKC.js.map} +0 -0
  204. /package/dist/{chunk-GZIDTXC4.js.map → chunk-NONAAENK.js.map} +0 -0
  205. /package/dist/{chunk-JZDA2SRB.js.map → chunk-O3VZPBZG.js.map} +0 -0
  206. /package/dist/{chunk-PJKGXUMG.js.map → chunk-OQ6PIGHA.js.map} +0 -0
  207. /package/dist/{chunk-QYO6I7KK.js.map → chunk-PE2FR4J3.js.map} +0 -0
  208. /package/dist/{chunk-YAMTXW77.js.map → chunk-PP6W64Y3.js.map} +0 -0
  209. /package/dist/{chunk-HNFXKQD7.js.map → chunk-PX35GA7L.js.map} +0 -0
  210. /package/dist/{chunk-OXCFFRF3.js.map → chunk-QEILDE6R.js.map} +0 -0
  211. /package/dist/{chunk-4YVVF6JN.js.map → chunk-QODLLGQ7.js.map} +0 -0
  212. /package/dist/{chunk-ASFE2X62.js.map → chunk-RAZ4OVLL.js.map} +0 -0
  213. /package/dist/{chunk-WM5GFORS.js.map → chunk-SYMWGEET.js.map} +0 -0
  214. /package/dist/{chunk-SLJQIBT7.js.map → chunk-T7JEBOGN.js.map} +0 -0
  215. /package/dist/{chunk-OA6HE2RW.js.map → chunk-TFBP23BX.js.map} +0 -0
  216. /package/dist/{chunk-GI6S5ZF2.js.map → chunk-U26HQ6KJ.js.map} +0 -0
  217. /package/dist/{chunk-WMKCAN4H.js.map → chunk-VTKGMEPP.js.map} +0 -0
  218. /package/dist/{chunk-BRZFN354.js.map → chunk-WPLVTJ5D.js.map} +0 -0
  219. /package/dist/{chunk-DCP4L4SH.js.map → chunk-XJFLDA7A.js.map} +0 -0
  220. /package/dist/{chunk-BE5ZALMB.js.map → chunk-ZYWZWG6G.js.map} +0 -0
  221. /package/dist/{crypto-TRZ5BJMY.js.map → crypto-HTZ4FJOP.js.map} +0 -0
  222. /package/dist/{delegation-TLZTK2XW.js.map → delegation-RI54P6I5.js.map} +0 -0
  223. /package/dist/{executor-HAVRTQN4.js.map → executor-5PNY7LGW.js.map} +0 -0
  224. /package/dist/{executor-V3DKOADS.js.map → executor-B4QIYGZX.js.map} +0 -0
  225. /package/dist/{executor-XO4M4243.js.map → executor-BWXXDQ7K.js.map} +0 -0
  226. /package/dist/{issue-EJKUQ6FA.js.map → issue-VGDPP4B5.js.map} +0 -0
  227. /package/dist/{ledger-SQVVE2DR.js.map → ledger-TMRZYNVJ.js.map} +0 -0
  228. /package/dist/{noydb-MK4UQ626.js.map → noydb-G725ZSZG.js.map} +0 -0
  229. /package/dist/{public-envelope-BXPXMN3U.js.map → public-envelope-BW6OXORV.js.map} +0 -0
  230. /package/dist/{registry-4R4IURUM.js.map → registry-3QP3YKQS.js.map} +0 -0
  231. /package/dist/{registry-GPBLCHG7.js.map → registry-OJIOSBV6.js.map} +0 -0
  232. /package/dist/{registry-ZON5HNIV.js.map → registry-USRVT6YF.js.map} +0 -0
  233. /package/dist/{revoke-Y7UDOXGH.js.map → revoke-JCC7N56X.js.map} +0 -0
  234. /package/dist/{signer-UD2ZSVDJ.js.map → signer-72QAUSVW.js.map} +0 -0
  235. /package/dist/{stale-F4V5E7ZK.js.map → stale-6ZDBTQT7.js.map} +0 -0
package/dist/index.d.cts CHANGED
@@ -1,20 +1,20 @@
1
- import { aU as NoydbStore, bu as UserEnvelope, bg as PublicEnvelope, bv as GateName, bw as GatePolicy, bx as VaultPolicy, by as ActiveTier, bz as FactorProof, bA as SchemaUpdateStrategy, bB as TransformFn, bC as PersistedSchemaEnvelope, bD as UpdateDecision, bE as DirectoryConfig, bF as UserVisibility, aS as UnlockedKeyring, bl as Vault, a$ as DiffEntry } from './types-r-y7TIqj.cjs';
2
- export { bG as AccessibleVault, bH as AffectedDocument, aY as AppendInput, aE as ArrayOutputSpec, q as BLOB_CHUNKS_COLLECTION, t as BLOB_COLLECTION, w as BLOB_INDEX_COLLECTION, x as BLOB_SLOTS_PREFIX, y as BLOB_VERSIONS_PREFIX, bI as BUNDLE_STORE_POLICY, E as BlobObject, F as BlobPutOptions, G as BlobResponseOptions, H as BlobSet, bJ as BuiltInGateName, bi as BundleRecipient, a0 as CONSENT_AUDIT_COLLECTION, bK as CacheOptions, bL as CacheStats, bM as ChangeEvent, aZ as ChangeType, a9 as ClosePeriodOptions, aN as Collection, bN as CollectionChangeEvent, bO as CollectionConflictResolver, bP as CollectionDescriptor, aq as CollectionFrame, a_ as CollectionInstant, bQ as CollectionStats, bR as Conflict, bS as ConflictPolicy, bT as ConflictStrategy, a1 as ConsentAuditEntry, a2 as ConsentAuditFilter, a3 as ConsentContext, a4 as ConsentOp, bU as CrossTierAccessEvent, N as DEFAULT_CHUNK_SIZE, bV as DEFAULT_PUBLIC_ENVELOPE_SCHEMA, bW as DELEGATIONS_COLLECTION, D as DICT_COLLECTION_PREFIX, bX as DeepPartial, bY as DeepPartialOrNull, bZ as DelegationToken, b_ as DeleteManyResult, b$ as DerivationDescriptor, aC as DerivationStrategy, aG as DerivationStrategyHandle, aH as DerivedFromMeta, a as DictEntry, b as DictKeyDescriptor, c as DictionaryHandle, d as DictionaryOptions, c0 as DirtyEntry, c1 as DryRunResult, c2 as DumpSchemaOptions, c3 as ELEVATION_AUDIT_COLLECTION, c4 as ElevatedHandle, aW as EncryptedEnvelope, c5 as EnrollAuthenticatorOptions, c6 as EnrollAuthenticatorWrappingDEKsOptions, c7 as EnrollAuthenticatorWrappingKEKOptions, c8 as EnrollRecoveryResult, c9 as ExportCapability, ca as ExportChunk, cb as ExportFormat, cc as ExportStreamOptions, cd as FactorKind, ce as FactorProofBundle, cf as FactorRequirement, cg as FenceDoc, ch as FenceState, ci as FieldChange, cj as FieldDescriptor, ck as FieldSource, cl as GhostRecord, cm as GrantOptions, ak as GuardChange, al as GuardContext, aj as GuardStrategy, an as GuardStrategyHandle, cn as GuardViolation, co as HistoryConfig, cp as HistoryEntry, aV as HistoryOptions, e as I18nTextDescriptor, f as I18nTextOptions, cq as INDEXED_STORE_POLICY, cr as ImportCapability, cs as InferOutput, ct as InternalCollectionStats, cu as IssueDelegationOptions, cv as IssueMagicLinkGrantOptions, b0 as JsonPatch, b1 as JsonPatchOp, cw as KeyringAuthenticator, cx as KeyringAuthenticatorWrappingDEKs, cy as KeyringAuthenticatorWrappingKEK, cz as KeyringFile, b2 as LedgerEntry, b3 as LedgerStore, cA as ListAccessibleVaultsOptions, cB as ListPageResult, cC as ListUsersOptions, cD as LiveUserEnvelope, cE as LocaleReadOptions, cF as Lru, cG as LruOptions, cH as LruStats, cI as MAGIC_LINK_CONTENT_INFO_PREFIX, cJ as MAGIC_LINK_GRANTS_COLLECTION, cK as MAGIC_LINK_KEK_INFO_PREFIX, cL as MagicLinkGrantPayload, cM as MagicLinkGrantRecord, br as MaterializedFromMeta, cN as MaterializedViewDescriptor, bs as MaterializedViewOutput, aK as MaterializedViewStrategy, aL as MaterializedViewStrategyHandle, cO as MemoryRecipientSealer, cP as MemorySealingKeyProvider, cQ as NOYDB_BACKUP_VERSION, cR as NOYDB_FORMAT_VERSION, cS as NOYDB_KEYRING_VERSION, cT as NOYDB_SYNC_VERSION, cU as Noydb, as as NoydbBundleStore, cV as NoydbEventMap, cW as NoydbOptions, aa as OpenPeriodOptions, aI as OutputSpec, cX as OverlayViewDescriptor, aM as OverlayedViewStrategy, aP as OverlayedViewStrategyHandle, ab as PERIODS_COLLECTION, cY as PUBLIC_ENVELOPE_FIELDS, cZ as PaperRecoveryDoc, c_ as PaperRecoveryEntry, c$ as PassphrasePolicy, d0 as PassphraseValidationResult, ac as PeriodRecord, d1 as Permission, d2 as Permissions, d3 as PersistedSchemaKind, d4 as PlaintextTranslatorContext, d5 as PlaintextTranslatorFn, P as PolicyEnforcer, d6 as PresenceHandle, d7 as PresencePeer, aX as PruneOptions, d8 as PublicEnvelopeField, d9 as PublicEnvelopeSchema, da as PublicEnvelopeText, db as PullMode, dc as PullOptions, dd as PullPolicy, de as PullResult, df as PushMode, dg as PushOptions, dh as PushPolicy, di as PushResult, dj as PutManyItemOptions, dk as PutManyOptions, dl as PutManyResult, dm as QueryAcrossOptions, dn as QueryAcrossResult, dp as QuickUnlockState, dq as QuickUnlockStore, dr as ReAuthOperation, bk as RecipientHint, bj as RecipientSealer, aJ as RecordOutputSpec, ds as RecoverPassphraseInput, dt as RecoverPassphraseResult, du as RecoverUserOptions, dv as RecoveryProof, dw as ResolvedPublicEnvelopeSchema, at as RetentionPolicy, dx as RevokeOptions, aR as Role, dy as RotatePassphraseInput, dz as RotateRecoveryOptions, dA as RotateRecoveryResult, dB as SEALED_PASSPHRASE_RECORD_ID, dC as SchemaDelta, dD as SchemaIntrospection, dE as SealedEnvelope, dF as SealedPassphrase, bh as SealingKeyProvider, dG as SessionPolicy, dH as SetPublicEnvelopeInput, dI as ShamirRecoveryDoc, dJ as ShamirRecoveryEntry, bn as ShamirRecoveryProvider, W as SlotInfo, X as SlotRecord, dK as SlotRewrapCeremony, dL as SlotRewrapContext, av as SnapshotMeta, dM as StandardSchemaV1, dN as StandardSchemaV1Issue, dO as StandardSchemaV1SyncResult, dP as StoreAuth, dQ as StoreAuthKind, dR as StoreCapabilities, dS as SyncEngine, dT as SyncMetadata, dU as SyncPolicy, dV as SyncScheduler, dW as SyncSchedulerStatus, dX as SyncStatus, dY as SyncTarget, dZ as SyncTargetRole, d_ as SyncTransaction, d$ as SyncTransactionResult, e0 as TabChannel, e1 as TabCoordinationOptions, e2 as TabLockManager, e3 as TabPresence, e4 as TabRole, e5 as TierMode, e6 as TranslatorAuditEntry, ay as TxCollection, az as TxContext, e7 as TxOp, aA as TxVault, e8 as USER_ENVELOPE_COLLECTION, e9 as USER_ENVELOPE_MAX_BYTES, bt as UnionSource, ea as Unsubscribe, eb as UpdateAuthenticatorOptions, ec as UpdateContext, ed as UpdateUserOptions, ee as UserApi, ef as UserEnvelopeCheckGate, eg as UserEnvelopeOversizedError, eh as UserEnvelopePresented, ei as UserInfo, ej as VaultBackup, b4 as VaultEngine, ar as VaultFrame, b5 as VaultInstant, ek as VaultPolicyOnDisk, el as VaultSchemaSnapshot, em as VaultSnapshot, b6 as VerifyResult, Y as VersionRecord, en as WarningRules, eo as WeakPassphraseError, ep as WeakPassphraseReason, eq as WrappedDeksBlob, er as WriteConflict, es as WriteEvent, et as WriteHook, eu as WriteQueue, g as applyI18nLocale, b7 as applyPatch, ev as assertStrongPassphrase, ew as buildRecipientKeyringFile, ex as burnPaperRecoveryEntry, b8 as canonicalJson, b9 as computePatch, o as createEnforcer, ey as createNoydb, ez as createStore, eA as deriveMagicLinkContentKey, h as dictCollectionName, i as dictKey, ba as diff, eB as enrollAuthenticator, eC as estimateEntropy, eD as evaluateExportCapability, eE as evaluateImportCapability, eF as findAuthenticator, bb as formatDiff, eG as hasExportCapability, eH as hasImportCapability, eI as hasRecoveryEnrolled, bc as hashEntry, k as i18nText, l as isDictCollectionName, m as isDictKeyDescriptor, n 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, bd as paddedIndex, be as parseIndex, eZ as parseSealedEnvelope, e_ as readMagicLinkGrantRecord, e$ as recoverUser, f0 as removeAuthenticator, r as resolveI18nText, f1 as resolvePublicEnvelopeSchema, f2 as revokeDelegation, f3 as revokeMagicLinkGrant, aB as runTransaction, f4 as savePaperRecoveryEntries, f5 as saveSealedPassphrase, f6 as saveShamirRecoveryEntries, bf as sha256Hex, f7 as unwrapDeksFromBlob, f8 as unwrapDeksFromPaperEntry, f9 as unwrapDeksFromShamirEntry, fa as unwrapMagicLinkGrant, v as validateI18nTextValue, fb as validatePassphrase, fc as validatePublicEnvelopeInput, fd as validateSchemaInput, fe as validateSchemaOutput, p as validateSessionPolicy, ff as writeMagicLinkGrant } from './types-r-y7TIqj.cjs';
1
+ import { b3 as NoydbStore, bF as UserEnvelope, br as PublicEnvelope, bG as GateName, bH as GatePolicy, bI as VaultPolicy, bJ as ActiveTier, bK as FactorProof, bL as SchemaUpdateStrategy, bM as TransformFn, bN as PersistedSchemaEnvelope, bO as UpdateDecision, bP as DirectoryConfig, bQ as UserVisibility, b1 as UnlockedKeyring, bw as Vault, ba as DiffEntry } from './types-DyXYr8rE.cjs';
2
+ export { bR as AccessibleVault, bS as AffectedDocument, b7 as AppendInput, aP as ArrayOutputSpec, z as BLOB_CHUNKS_COLLECTION, A as BLOB_COLLECTION, E as BLOB_INDEX_COLLECTION, F as BLOB_SLOTS_PREFIX, G as BLOB_VERSIONS_PREFIX, bT as BUNDLE_STORE_POLICY, M as BlobObject, N as BlobPutOptions, Q as BlobResponseOptions, T as BlobSet, bU as BuiltInGateName, bt as BundleRecipient, a9 as CONSENT_AUDIT_COLLECTION, bV as CacheOptions, bW as CacheStats, bX as ChangeEvent, b8 as ChangeType, ai as ClosePeriodOptions, aY as Collection, bY as CollectionChangeEvent, bZ as CollectionConflictResolver, b_ as CollectionDescriptor, az as CollectionFrame, b9 as CollectionInstant, b$ as CollectionStats, c0 as Conflict, c1 as ConflictPolicy, c2 as ConflictStrategy, aa as ConsentAuditEntry, ab as ConsentAuditFilter, ac as ConsentContext, ad as ConsentOp, c3 as CrossTierAccessEvent, Y as DEFAULT_CHUNK_SIZE, c4 as DEFAULT_PUBLIC_ENVELOPE_SCHEMA, c5 as DELEGATIONS_COLLECTION, D as DICT_COLLECTION_PREFIX, c6 as DeepPartial, c7 as DeepPartialOrNull, c8 as DelegationToken, c9 as DeleteManyResult, ca as DerivationDescriptor, aN as DerivationStrategy, aR as DerivationStrategyHandle, aS as DerivedFromMeta, a as DictEntry, b as DictKeyDescriptor, c as DictionaryHandle, d as DictionaryOptions, cb as DirtyEntry, cc as DryRunResult, cd as DumpSchemaOptions, ce as ELEVATION_AUDIT_COLLECTION, cf as ElevatedHandle, b5 as EncryptedEnvelope, cg as EnrollAuthenticatorOptions, ch as EnrollAuthenticatorWrappingDEKsOptions, ci as EnrollAuthenticatorWrappingKEKOptions, cj as EnrollRecoveryResult, ck as ExportCapability, cl as ExportChunk, cm as ExportFormat, cn as ExportStreamOptions, co as FactorKind, cp as FactorProofBundle, cq as FactorRequirement, cr as FenceDoc, cs as FenceState, ct as FieldChange, cu as FieldDescriptor, cv as FieldSource, cw as GhostRecord, cx as GrantOptions, at as GuardChange, au as GuardContext, as as GuardStrategy, aw as GuardStrategyHandle, cy as GuardViolation, cz as HistoryConfig, cA as HistoryEntry, b4 as HistoryOptions, e as I18nMap, f as I18nTextDescriptor, g as I18nTextOptions, cB as INDEXED_STORE_POLICY, cC as ImportCapability, cD as InferOutput, cE as InternalCollectionStats, cF as IssueDelegationOptions, cG as IssueMagicLinkGrantOptions, bb as JsonPatch, bc as JsonPatchOp, cH as KeyringAuthenticator, cI as KeyringAuthenticatorWrappingDEKs, cJ as KeyringAuthenticatorWrappingKEK, cK as KeyringFile, L as Layer, bd as LedgerEntry, be 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, bC as MaterializedFromMeta, cY as MaterializedViewDescriptor, bD as MaterializedViewOutput, aV as MaterializedViewStrategy, aW as MaterializedViewStrategyHandle, cZ as MemoryRecipientSealer, c_ as MemorySealingKeyProvider, c$ as NOYDB_BACKUP_VERSION, d0 as NOYDB_FORMAT_VERSION, d1 as NOYDB_KEYRING_VERSION, d2 as NOYDB_SYNC_VERSION, d3 as Noydb, aB as NoydbBundleStore, d4 as NoydbEventMap, d5 as NoydbOptions, O as OnMissing, h as OnMissingPolicy, aj as OpenPeriodOptions, aT as OutputSpec, d6 as OverlayViewDescriptor, aX as OverlayedViewStrategy, a_ as OverlayedViewStrategyHandle, ak as PERIODS_COLLECTION, d7 as PUBLIC_ENVELOPE_FIELDS, d8 as PaperRecoveryDoc, d9 as PaperRecoveryEntry, da as PassphrasePolicy, db as PassphraseValidationResult, al as PeriodRecord, dc as Permission, dd as Permissions, de as PersistedSchemaKind, df as PlaintextTranslatorContext, dg as PlaintextTranslatorFn, P as PolicyEnforcer, dh as PresenceHandle, di as PresencePeer, b6 as PruneOptions, dj as PublicEnvelopeField, dk as PublicEnvelopeSchema, dl as PublicEnvelopeText, dm as PullMode, dn as PullOptions, dp as PullPolicy, dq as PullResult, dr as PushMode, ds as PushOptions, dt as PushPolicy, du as PushResult, dv as PutManyItemOptions, dw as PutManyOptions, dx as PutManyResult, dy as QueryAcrossOptions, dz as QueryAcrossResult, dA as QuickUnlockState, dB as QuickUnlockStore, dC as ReAuthOperation, bv as RecipientHint, bu as RecipientSealer, aU as RecordOutputSpec, dD as RecoverPassphraseInput, dE as RecoverPassphraseResult, dF as RecoverUserOptions, dG as RecoveryProof, R as ResolveI18nOptions, dH as ResolvedPublicEnvelopeSchema, aC as RetentionPolicy, dI as RevokeOptions, b0 as Role, dJ as RotatePassphraseInput, dK as RotateRecoveryOptions, dL as RotateRecoveryResult, dM as SEALED_PASSPHRASE_RECORD_ID, dN as SchemaDelta, dO as SchemaIntrospection, S as ScriptWarning, dP as SealedEnvelope, dQ as SealedPassphrase, bs as SealingKeyProvider, dR as SessionPolicy, dS as SetPublicEnvelopeInput, dT as ShamirRecoveryDoc, dU as ShamirRecoveryEntry, by as ShamirRecoveryProvider, a3 as SlotInfo, a4 as SlotRecord, dV as SlotRewrapCeremony, dW as SlotRewrapContext, aF as SnapshotMeta, dX as StandardSchemaV1, dY as StandardSchemaV1Issue, dZ as StandardSchemaV1SyncResult, d_ as StoreAuth, d$ as StoreAuthKind, e0 as StoreCapabilities, e1 as SyncEngine, e2 as SyncMetadata, e3 as SyncPolicy, e4 as SyncScheduler, e5 as SyncSchedulerStatus, e6 as SyncStatus, e7 as SyncTarget, e8 as SyncTargetRole, e9 as SyncTransaction, ea as SyncTransactionResult, eb as TabChannel, ec as TabCoordinationOptions, ed as TabLockManager, ee as TabPresence, ef as TabRole, eg as TierMode, eh as TranslatorAuditEntry, aJ as TxCollection, aK as TxContext, ei as TxOp, aL as TxVault, ej as USER_ENVELOPE_COLLECTION, ek as USER_ENVELOPE_MAX_BYTES, bE as UnionSource, el as Unsubscribe, em as UpdateAuthenticatorOptions, en as UpdateContext, eo as UpdateUserOptions, ep as UserApi, eq as UserEnvelopeCheckGate, er as UserEnvelopeOversizedError, es as UserEnvelopePresented, et as UserInfo, eu as VaultBackup, bf as VaultEngine, aA as VaultFrame, bg as VaultInstant, ev as VaultPolicyOnDisk, ew as VaultSchemaSnapshot, ex as VaultSnapshot, bh as VerifyResult, a5 as VersionRecord, ey as WarningRules, ez as WeakPassphraseError, eA as WeakPassphraseReason, eB as WrappedDeksBlob, eC as WriteConflict, eD as WriteEvent, eE as WriteHook, eF as WriteQueue, i as applyI18nLocale, bi as applyPatch, eG as assertStrongPassphrase, eH as buildRecipientKeyringFile, eI as burnPaperRecoveryEntry, bj as canonicalJson, bk as computePatch, x as createEnforcer, eJ as createNoydb, eK as createStore, eL as deriveMagicLinkContentKey, j as dictCollectionName, k as dictKey, bl as diff, l as enforceScript, eM as enrollAuthenticator, eN as estimateEntropy, eO as evaluateExportCapability, eP as evaluateImportCapability, eQ as findAuthenticator, bm as formatDiff, eR as hasExportCapability, eS as hasImportCapability, eT as hasRecoveryEnrolled, bn as hashEntry, n as i18nText, o as inferScripts, p as isDictCollectionName, q as isDictKeyDescriptor, r as isI18nTextDescriptor, eU as isMagicLinkGrantExpired, eV as isPublicEnvelope, eW as issueDelegation, eX as keyringRecoverPassphrase, eY as keyringRotatePassphrase, eZ as listMagicLinkGrants, e_ as listUsers, e$ as listUsersWithEnvelopes, f0 as loadActiveDelegations, f1 as loadPaperRecoveryEntries, f2 as loadSealedPassphrase, f3 as loadShamirRecoveryEntries, f4 as magicLinkGrantRecordId, f5 as mintPaperRecoveryEntry, f6 as mintShamirRecoveryEntry, f7 as mintWrappedDeksBlob, bo as paddedIndex, bp as parseIndex, f8 as parseSealedEnvelope, f9 as readMagicLinkGrantRecord, fa as recoverUser, fb as removeAuthenticator, s as resolveI18nText, t as resolvePolicy, fc as resolvePublicEnvelopeSchema, fd as revokeDelegation, fe as revokeMagicLinkGrant, aM as runTransaction, ff as savePaperRecoveryEntries, fg as saveSealedPassphrase, fh as saveShamirRecoveryEntries, bq as sha256Hex, fi as unwrapDeksFromBlob, fj as unwrapDeksFromPaperEntry, fk as unwrapDeksFromShamirEntry, fl as unwrapMagicLinkGrant, v as validateI18nTextValue, fm as validatePassphrase, fn as validatePublicEnvelopeInput, fo as validateSchemaInput, fp as validateSchemaOutput, y as validateSessionPolicy, fq as writeMagicLinkGrant } from './types-DyXYr8rE.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-vB43MAt4.cjs';
6
- export { y as AlreadyElevatedError, A as AmendmentForbiddenError, n as AttestationError, B as BackupCorruptedError, p as BackupLedgerError, q as BundleIntegrityError, r as BundleSealMismatchError, s as BundleVersionConflictError, C as ConflictError, z as CrossJoinSourceUnknownError, E as CrossJoinTooLargeError, G as DEFAULT_CROSS_JOIN_MAX_ROWS, H as DEFAULT_JOIN_MAX_ROWS, J as DanglingReferenceError, K as DecryptionError, U as DelegationTargetMissingError, f as DerivationCapExceededError, g as DerivationCycleError, h as DerivationDepthError, i as DerivationOutputShapeError, j as DerivationOutputUnknownError, D as DictKeyInUseError, a as DictKeyMissingError, V as DirectoryDisabledError, W as ElevationExpiredError, X as ExportCapabilityError, F as FieldFrozenError, Y as FilenameSanitizationError, Z as GroupCardinalityError, _ as ImportCapabilityError, $ as IndexRequiredError, a0 as IndexWriteFailureError, a1 as InvalidKeyError, I as InvariantError, a2 as JoinContext, a3 as JoinLeg, a4 as JoinStrategy, a5 as JoinTooLargeError, a6 as JoinableSource, a7 as KeyringCorruptError, a8 as KeyringExpiredError, a9 as LedgerContentionError, aa as LiveQuery, ab as LiveUpstream, L as LocaleNotSpecifiedError, u as MaterializedViewConfigError, v as MaterializedViewCycleError, w as MaterializedViewSourceUnknownError, x as MaterializedViewTooLargeError, ac as MigrationRequiredError, M as MissingTranslationError, ad as NetworkError, ae as NoAccessError, af as NonAdditiveSchemaChangeError, ag as NotFoundError, ah as OrderBy, O as OverlayBaseIsVirtualError, k as OverlayCollectionUnavailableError, l as OverlayIdMismatchError, m as OverlayNameCollisionError, ai as PathEscapeError, aj as PeriodClosedError, ak as PermissionDeniedError, al as PrivilegeEscalationError, Q as Query, am as QueryPlan, an as QuerySource, ao as QuiesceTimeoutError, ap as ReadOnlyAtInstantError, aq as ReadOnlyError, ar as ReadOnlyFrameError, d as RecordLockedError, as as RefDescriptor, at as RefIntegrityError, au as RefMode, av as RefRegistry, aw as RefScopeError, ax as RefViolation, R as ReservedCollectionNameError, ay as ScanBuilder, az as ScanPageProvider, aA as SchemaFenceError, aB as SchemaLockedError, aC as SchemaUpdateError, aD as SchemaValidationError, S as SessionExpiredError, b as SessionNotFoundError, c as SessionPolicyError, e as SnapshotNotFoundError, aE as StoreCapabilityError, aF as TamperedError, aG as TierDemoteDeniedError, aH as TierNotGrantedError, T as TranslatorNotConfiguredError, aI as ValidationError, aJ as applyJoins, aK as buildLiveQuery, aL as executePlan, aM as ref, aN as resetJoinWarnings } from './index-vB43MAt4.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-BkW3mLlz.cjs';
5
+ import { N as NoydbError } from './index-4fBVt8j9.cjs';
6
+ export { z as AlreadyElevatedError, A as AmendmentForbiddenError, o as AttestationError, B as BackupCorruptedError, q as BackupLedgerError, r as BundleIntegrityError, s as BundleSealMismatchError, t as BundleVersionConflictError, C as ConflictError, E as CrossJoinSourceUnknownError, G as CrossJoinTooLargeError, H as DEFAULT_CROSS_JOIN_MAX_ROWS, J as DEFAULT_JOIN_MAX_ROWS, K as DanglingReferenceError, U as DecryptionError, V as DelegationTargetMissingError, g as DerivationCapExceededError, h as DerivationCycleError, i as DerivationDepthError, j as DerivationOutputShapeError, k as DerivationOutputUnknownError, D as DictKeyInUseError, a as DictKeyMissingError, W as DirectoryDisabledError, X as ElevationExpiredError, Y as ExportCapabilityError, F as FieldFrozenError, Z as FilenameSanitizationError, _ as GroupCardinalityError, $ as ImportCapabilityError, a0 as IndexRequiredError, a1 as IndexWriteFailureError, a2 as InvalidKeyError, I as InvariantError, a3 as JoinContext, a4 as JoinLeg, a5 as JoinStrategy, a6 as JoinTooLargeError, a7 as JoinableSource, a8 as KeyringCorruptError, a9 as KeyringExpiredError, aa as LedgerContentionError, ab as LiveQuery, ac as LiveUpstream, L as LocaleNotSpecifiedError, v as MaterializedViewConfigError, w as MaterializedViewCycleError, x as MaterializedViewSourceUnknownError, y as MaterializedViewTooLargeError, ad as MigrationRequiredError, M as MissingTranslationError, ae as NetworkError, af as NoAccessError, ag as NonAdditiveSchemaChangeError, ah as NotFoundError, ai as OrderBy, O as OverlayBaseIsVirtualError, l as OverlayCollectionUnavailableError, m as OverlayIdMismatchError, n as OverlayNameCollisionError, aj as PathEscapeError, ak as PeriodClosedError, al as PermissionDeniedError, am as PrivilegeEscalationError, Q as Query, an as QueryPlan, ao as QuerySource, ap as QuiesceTimeoutError, aq as ReadOnlyAtInstantError, ar as ReadOnlyError, as as ReadOnlyFrameError, e as RecordLockedError, at as RefDescriptor, au as RefIntegrityError, av as RefMode, aw as RefRegistry, ax as RefScopeError, ay as RefViolation, R as ReservedCollectionNameError, az as ScanBuilder, aA as ScanPageProvider, aB as SchemaFenceError, aC as SchemaLockedError, aD as SchemaUpdateError, aE as SchemaValidationError, S as ScriptViolationError, b as SessionExpiredError, c as SessionNotFoundError, d as SessionPolicyError, f as SnapshotNotFoundError, aF as StoreCapabilityError, aG as TamperedError, aH as TierDemoteDeniedError, aI as TierNotGrantedError, T as TranslatorNotConfiguredError, aJ as ValidationError, aK as applyJoins, aL as buildLiveQuery, aM as executePlan, aN as ref, aO as resetJoinWarnings } from './index-4fBVt8j9.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-Drr7ykr6.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-BHThLppa.cjs';
10
- export { w as withDerivation } from './with-derivation-DB63Po2m.cjs';
11
- export { w as withMaterializedView } from './with-materialized-view-BJmJ-FrO.cjs';
9
+ export { w as withGuard } from './with-guard-ByyxmEe7.cjs';
10
+ export { w as withDerivation } from './with-derivation-DU3Sjazm.cjs';
11
+ export { w as withMaterializedView } from './with-materialized-view-BmEToIR1.cjs';
12
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-BSAGEyu5.cjs';
13
- export { w as withOverlayedView } from './with-overlayed-view-zePNtUSq.cjs';
13
+ export { w as withOverlayedView } from './with-overlayed-view-BMsQQbWm.cjs';
14
14
  export { SYNC_CREDENTIALS_COLLECTION, SyncCredential, credentialStatus, deleteCredential, getCredential, listCredentials, putCredential } from './team/index.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-L3z34v0J.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-BIoEFbwm.cjs';
16
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-M6-JI3Yu.cjs';
17
+ export { L as LEDGER_COLLECTION, a as LEDGER_DELTAS_COLLECTION, e as envelopePayloadHash } from './hash-DdpVypUp.cjs';
18
18
  import './lazy-builder-wY4pMCEe.cjs';
19
19
  import '@noy-db/attestation';
20
20
 
package/dist/index.d.ts CHANGED
@@ -1,20 +1,20 @@
1
- import { aU as NoydbStore, bu as UserEnvelope, bg as PublicEnvelope, bv as GateName, bw as GatePolicy, bx as VaultPolicy, by as ActiveTier, bz as FactorProof, bA as SchemaUpdateStrategy, bB as TransformFn, bC as PersistedSchemaEnvelope, bD as UpdateDecision, bE as DirectoryConfig, bF as UserVisibility, aS as UnlockedKeyring, bl as Vault, a$ as DiffEntry } from './types-DT7cXRHq.js';
2
- export { bG as AccessibleVault, bH as AffectedDocument, aY as AppendInput, aE as ArrayOutputSpec, q as BLOB_CHUNKS_COLLECTION, t as BLOB_COLLECTION, w as BLOB_INDEX_COLLECTION, x as BLOB_SLOTS_PREFIX, y as BLOB_VERSIONS_PREFIX, bI as BUNDLE_STORE_POLICY, E as BlobObject, F as BlobPutOptions, G as BlobResponseOptions, H as BlobSet, bJ as BuiltInGateName, bi as BundleRecipient, a0 as CONSENT_AUDIT_COLLECTION, bK as CacheOptions, bL as CacheStats, bM as ChangeEvent, aZ as ChangeType, a9 as ClosePeriodOptions, aN as Collection, bN as CollectionChangeEvent, bO as CollectionConflictResolver, bP as CollectionDescriptor, aq as CollectionFrame, a_ as CollectionInstant, bQ as CollectionStats, bR as Conflict, bS as ConflictPolicy, bT as ConflictStrategy, a1 as ConsentAuditEntry, a2 as ConsentAuditFilter, a3 as ConsentContext, a4 as ConsentOp, bU as CrossTierAccessEvent, N as DEFAULT_CHUNK_SIZE, bV as DEFAULT_PUBLIC_ENVELOPE_SCHEMA, bW as DELEGATIONS_COLLECTION, D as DICT_COLLECTION_PREFIX, bX as DeepPartial, bY as DeepPartialOrNull, bZ as DelegationToken, b_ as DeleteManyResult, b$ as DerivationDescriptor, aC as DerivationStrategy, aG as DerivationStrategyHandle, aH as DerivedFromMeta, a as DictEntry, b as DictKeyDescriptor, c as DictionaryHandle, d as DictionaryOptions, c0 as DirtyEntry, c1 as DryRunResult, c2 as DumpSchemaOptions, c3 as ELEVATION_AUDIT_COLLECTION, c4 as ElevatedHandle, aW as EncryptedEnvelope, c5 as EnrollAuthenticatorOptions, c6 as EnrollAuthenticatorWrappingDEKsOptions, c7 as EnrollAuthenticatorWrappingKEKOptions, c8 as EnrollRecoveryResult, c9 as ExportCapability, ca as ExportChunk, cb as ExportFormat, cc as ExportStreamOptions, cd as FactorKind, ce as FactorProofBundle, cf as FactorRequirement, cg as FenceDoc, ch as FenceState, ci as FieldChange, cj as FieldDescriptor, ck as FieldSource, cl as GhostRecord, cm as GrantOptions, ak as GuardChange, al as GuardContext, aj as GuardStrategy, an as GuardStrategyHandle, cn as GuardViolation, co as HistoryConfig, cp as HistoryEntry, aV as HistoryOptions, e as I18nTextDescriptor, f as I18nTextOptions, cq as INDEXED_STORE_POLICY, cr as ImportCapability, cs as InferOutput, ct as InternalCollectionStats, cu as IssueDelegationOptions, cv as IssueMagicLinkGrantOptions, b0 as JsonPatch, b1 as JsonPatchOp, cw as KeyringAuthenticator, cx as KeyringAuthenticatorWrappingDEKs, cy as KeyringAuthenticatorWrappingKEK, cz as KeyringFile, b2 as LedgerEntry, b3 as LedgerStore, cA as ListAccessibleVaultsOptions, cB as ListPageResult, cC as ListUsersOptions, cD as LiveUserEnvelope, cE as LocaleReadOptions, cF as Lru, cG as LruOptions, cH as LruStats, cI as MAGIC_LINK_CONTENT_INFO_PREFIX, cJ as MAGIC_LINK_GRANTS_COLLECTION, cK as MAGIC_LINK_KEK_INFO_PREFIX, cL as MagicLinkGrantPayload, cM as MagicLinkGrantRecord, br as MaterializedFromMeta, cN as MaterializedViewDescriptor, bs as MaterializedViewOutput, aK as MaterializedViewStrategy, aL as MaterializedViewStrategyHandle, cO as MemoryRecipientSealer, cP as MemorySealingKeyProvider, cQ as NOYDB_BACKUP_VERSION, cR as NOYDB_FORMAT_VERSION, cS as NOYDB_KEYRING_VERSION, cT as NOYDB_SYNC_VERSION, cU as Noydb, as as NoydbBundleStore, cV as NoydbEventMap, cW as NoydbOptions, aa as OpenPeriodOptions, aI as OutputSpec, cX as OverlayViewDescriptor, aM as OverlayedViewStrategy, aP as OverlayedViewStrategyHandle, ab as PERIODS_COLLECTION, cY as PUBLIC_ENVELOPE_FIELDS, cZ as PaperRecoveryDoc, c_ as PaperRecoveryEntry, c$ as PassphrasePolicy, d0 as PassphraseValidationResult, ac as PeriodRecord, d1 as Permission, d2 as Permissions, d3 as PersistedSchemaKind, d4 as PlaintextTranslatorContext, d5 as PlaintextTranslatorFn, P as PolicyEnforcer, d6 as PresenceHandle, d7 as PresencePeer, aX as PruneOptions, d8 as PublicEnvelopeField, d9 as PublicEnvelopeSchema, da as PublicEnvelopeText, db as PullMode, dc as PullOptions, dd as PullPolicy, de as PullResult, df as PushMode, dg as PushOptions, dh as PushPolicy, di as PushResult, dj as PutManyItemOptions, dk as PutManyOptions, dl as PutManyResult, dm as QueryAcrossOptions, dn as QueryAcrossResult, dp as QuickUnlockState, dq as QuickUnlockStore, dr as ReAuthOperation, bk as RecipientHint, bj as RecipientSealer, aJ as RecordOutputSpec, ds as RecoverPassphraseInput, dt as RecoverPassphraseResult, du as RecoverUserOptions, dv as RecoveryProof, dw as ResolvedPublicEnvelopeSchema, at as RetentionPolicy, dx as RevokeOptions, aR as Role, dy as RotatePassphraseInput, dz as RotateRecoveryOptions, dA as RotateRecoveryResult, dB as SEALED_PASSPHRASE_RECORD_ID, dC as SchemaDelta, dD as SchemaIntrospection, dE as SealedEnvelope, dF as SealedPassphrase, bh as SealingKeyProvider, dG as SessionPolicy, dH as SetPublicEnvelopeInput, dI as ShamirRecoveryDoc, dJ as ShamirRecoveryEntry, bn as ShamirRecoveryProvider, W as SlotInfo, X as SlotRecord, dK as SlotRewrapCeremony, dL as SlotRewrapContext, av as SnapshotMeta, dM as StandardSchemaV1, dN as StandardSchemaV1Issue, dO as StandardSchemaV1SyncResult, dP as StoreAuth, dQ as StoreAuthKind, dR as StoreCapabilities, dS as SyncEngine, dT as SyncMetadata, dU as SyncPolicy, dV as SyncScheduler, dW as SyncSchedulerStatus, dX as SyncStatus, dY as SyncTarget, dZ as SyncTargetRole, d_ as SyncTransaction, d$ as SyncTransactionResult, e0 as TabChannel, e1 as TabCoordinationOptions, e2 as TabLockManager, e3 as TabPresence, e4 as TabRole, e5 as TierMode, e6 as TranslatorAuditEntry, ay as TxCollection, az as TxContext, e7 as TxOp, aA as TxVault, e8 as USER_ENVELOPE_COLLECTION, e9 as USER_ENVELOPE_MAX_BYTES, bt as UnionSource, ea as Unsubscribe, eb as UpdateAuthenticatorOptions, ec as UpdateContext, ed as UpdateUserOptions, ee as UserApi, ef as UserEnvelopeCheckGate, eg as UserEnvelopeOversizedError, eh as UserEnvelopePresented, ei as UserInfo, ej as VaultBackup, b4 as VaultEngine, ar as VaultFrame, b5 as VaultInstant, ek as VaultPolicyOnDisk, el as VaultSchemaSnapshot, em as VaultSnapshot, b6 as VerifyResult, Y as VersionRecord, en as WarningRules, eo as WeakPassphraseError, ep as WeakPassphraseReason, eq as WrappedDeksBlob, er as WriteConflict, es as WriteEvent, et as WriteHook, eu as WriteQueue, g as applyI18nLocale, b7 as applyPatch, ev as assertStrongPassphrase, ew as buildRecipientKeyringFile, ex as burnPaperRecoveryEntry, b8 as canonicalJson, b9 as computePatch, o as createEnforcer, ey as createNoydb, ez as createStore, eA as deriveMagicLinkContentKey, h as dictCollectionName, i as dictKey, ba as diff, eB as enrollAuthenticator, eC as estimateEntropy, eD as evaluateExportCapability, eE as evaluateImportCapability, eF as findAuthenticator, bb as formatDiff, eG as hasExportCapability, eH as hasImportCapability, eI as hasRecoveryEnrolled, bc as hashEntry, k as i18nText, l as isDictCollectionName, m as isDictKeyDescriptor, n 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, bd as paddedIndex, be as parseIndex, eZ as parseSealedEnvelope, e_ as readMagicLinkGrantRecord, e$ as recoverUser, f0 as removeAuthenticator, r as resolveI18nText, f1 as resolvePublicEnvelopeSchema, f2 as revokeDelegation, f3 as revokeMagicLinkGrant, aB as runTransaction, f4 as savePaperRecoveryEntries, f5 as saveSealedPassphrase, f6 as saveShamirRecoveryEntries, bf as sha256Hex, f7 as unwrapDeksFromBlob, f8 as unwrapDeksFromPaperEntry, f9 as unwrapDeksFromShamirEntry, fa as unwrapMagicLinkGrant, v as validateI18nTextValue, fb as validatePassphrase, fc as validatePublicEnvelopeInput, fd as validateSchemaInput, fe as validateSchemaOutput, p as validateSessionPolicy, ff as writeMagicLinkGrant } from './types-DT7cXRHq.js';
1
+ import { b3 as NoydbStore, bF as UserEnvelope, br as PublicEnvelope, bG as GateName, bH as GatePolicy, bI as VaultPolicy, bJ as ActiveTier, bK as FactorProof, bL as SchemaUpdateStrategy, bM as TransformFn, bN as PersistedSchemaEnvelope, bO as UpdateDecision, bP as DirectoryConfig, bQ as UserVisibility, b1 as UnlockedKeyring, bw as Vault, ba as DiffEntry } from './types-Df28QFKb.js';
2
+ export { bR as AccessibleVault, bS as AffectedDocument, b7 as AppendInput, aP as ArrayOutputSpec, z as BLOB_CHUNKS_COLLECTION, A as BLOB_COLLECTION, E as BLOB_INDEX_COLLECTION, F as BLOB_SLOTS_PREFIX, G as BLOB_VERSIONS_PREFIX, bT as BUNDLE_STORE_POLICY, M as BlobObject, N as BlobPutOptions, Q as BlobResponseOptions, T as BlobSet, bU as BuiltInGateName, bt as BundleRecipient, a9 as CONSENT_AUDIT_COLLECTION, bV as CacheOptions, bW as CacheStats, bX as ChangeEvent, b8 as ChangeType, ai as ClosePeriodOptions, aY as Collection, bY as CollectionChangeEvent, bZ as CollectionConflictResolver, b_ as CollectionDescriptor, az as CollectionFrame, b9 as CollectionInstant, b$ as CollectionStats, c0 as Conflict, c1 as ConflictPolicy, c2 as ConflictStrategy, aa as ConsentAuditEntry, ab as ConsentAuditFilter, ac as ConsentContext, ad as ConsentOp, c3 as CrossTierAccessEvent, Y as DEFAULT_CHUNK_SIZE, c4 as DEFAULT_PUBLIC_ENVELOPE_SCHEMA, c5 as DELEGATIONS_COLLECTION, D as DICT_COLLECTION_PREFIX, c6 as DeepPartial, c7 as DeepPartialOrNull, c8 as DelegationToken, c9 as DeleteManyResult, ca as DerivationDescriptor, aN as DerivationStrategy, aR as DerivationStrategyHandle, aS as DerivedFromMeta, a as DictEntry, b as DictKeyDescriptor, c as DictionaryHandle, d as DictionaryOptions, cb as DirtyEntry, cc as DryRunResult, cd as DumpSchemaOptions, ce as ELEVATION_AUDIT_COLLECTION, cf as ElevatedHandle, b5 as EncryptedEnvelope, cg as EnrollAuthenticatorOptions, ch as EnrollAuthenticatorWrappingDEKsOptions, ci as EnrollAuthenticatorWrappingKEKOptions, cj as EnrollRecoveryResult, ck as ExportCapability, cl as ExportChunk, cm as ExportFormat, cn as ExportStreamOptions, co as FactorKind, cp as FactorProofBundle, cq as FactorRequirement, cr as FenceDoc, cs as FenceState, ct as FieldChange, cu as FieldDescriptor, cv as FieldSource, cw as GhostRecord, cx as GrantOptions, at as GuardChange, au as GuardContext, as as GuardStrategy, aw as GuardStrategyHandle, cy as GuardViolation, cz as HistoryConfig, cA as HistoryEntry, b4 as HistoryOptions, e as I18nMap, f as I18nTextDescriptor, g as I18nTextOptions, cB as INDEXED_STORE_POLICY, cC as ImportCapability, cD as InferOutput, cE as InternalCollectionStats, cF as IssueDelegationOptions, cG as IssueMagicLinkGrantOptions, bb as JsonPatch, bc as JsonPatchOp, cH as KeyringAuthenticator, cI as KeyringAuthenticatorWrappingDEKs, cJ as KeyringAuthenticatorWrappingKEK, cK as KeyringFile, L as Layer, bd as LedgerEntry, be 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, bC as MaterializedFromMeta, cY as MaterializedViewDescriptor, bD as MaterializedViewOutput, aV as MaterializedViewStrategy, aW as MaterializedViewStrategyHandle, cZ as MemoryRecipientSealer, c_ as MemorySealingKeyProvider, c$ as NOYDB_BACKUP_VERSION, d0 as NOYDB_FORMAT_VERSION, d1 as NOYDB_KEYRING_VERSION, d2 as NOYDB_SYNC_VERSION, d3 as Noydb, aB as NoydbBundleStore, d4 as NoydbEventMap, d5 as NoydbOptions, O as OnMissing, h as OnMissingPolicy, aj as OpenPeriodOptions, aT as OutputSpec, d6 as OverlayViewDescriptor, aX as OverlayedViewStrategy, a_ as OverlayedViewStrategyHandle, ak as PERIODS_COLLECTION, d7 as PUBLIC_ENVELOPE_FIELDS, d8 as PaperRecoveryDoc, d9 as PaperRecoveryEntry, da as PassphrasePolicy, db as PassphraseValidationResult, al as PeriodRecord, dc as Permission, dd as Permissions, de as PersistedSchemaKind, df as PlaintextTranslatorContext, dg as PlaintextTranslatorFn, P as PolicyEnforcer, dh as PresenceHandle, di as PresencePeer, b6 as PruneOptions, dj as PublicEnvelopeField, dk as PublicEnvelopeSchema, dl as PublicEnvelopeText, dm as PullMode, dn as PullOptions, dp as PullPolicy, dq as PullResult, dr as PushMode, ds as PushOptions, dt as PushPolicy, du as PushResult, dv as PutManyItemOptions, dw as PutManyOptions, dx as PutManyResult, dy as QueryAcrossOptions, dz as QueryAcrossResult, dA as QuickUnlockState, dB as QuickUnlockStore, dC as ReAuthOperation, bv as RecipientHint, bu as RecipientSealer, aU as RecordOutputSpec, dD as RecoverPassphraseInput, dE as RecoverPassphraseResult, dF as RecoverUserOptions, dG as RecoveryProof, R as ResolveI18nOptions, dH as ResolvedPublicEnvelopeSchema, aC as RetentionPolicy, dI as RevokeOptions, b0 as Role, dJ as RotatePassphraseInput, dK as RotateRecoveryOptions, dL as RotateRecoveryResult, dM as SEALED_PASSPHRASE_RECORD_ID, dN as SchemaDelta, dO as SchemaIntrospection, S as ScriptWarning, dP as SealedEnvelope, dQ as SealedPassphrase, bs as SealingKeyProvider, dR as SessionPolicy, dS as SetPublicEnvelopeInput, dT as ShamirRecoveryDoc, dU as ShamirRecoveryEntry, by as ShamirRecoveryProvider, a3 as SlotInfo, a4 as SlotRecord, dV as SlotRewrapCeremony, dW as SlotRewrapContext, aF as SnapshotMeta, dX as StandardSchemaV1, dY as StandardSchemaV1Issue, dZ as StandardSchemaV1SyncResult, d_ as StoreAuth, d$ as StoreAuthKind, e0 as StoreCapabilities, e1 as SyncEngine, e2 as SyncMetadata, e3 as SyncPolicy, e4 as SyncScheduler, e5 as SyncSchedulerStatus, e6 as SyncStatus, e7 as SyncTarget, e8 as SyncTargetRole, e9 as SyncTransaction, ea as SyncTransactionResult, eb as TabChannel, ec as TabCoordinationOptions, ed as TabLockManager, ee as TabPresence, ef as TabRole, eg as TierMode, eh as TranslatorAuditEntry, aJ as TxCollection, aK as TxContext, ei as TxOp, aL as TxVault, ej as USER_ENVELOPE_COLLECTION, ek as USER_ENVELOPE_MAX_BYTES, bE as UnionSource, el as Unsubscribe, em as UpdateAuthenticatorOptions, en as UpdateContext, eo as UpdateUserOptions, ep as UserApi, eq as UserEnvelopeCheckGate, er as UserEnvelopeOversizedError, es as UserEnvelopePresented, et as UserInfo, eu as VaultBackup, bf as VaultEngine, aA as VaultFrame, bg as VaultInstant, ev as VaultPolicyOnDisk, ew as VaultSchemaSnapshot, ex as VaultSnapshot, bh as VerifyResult, a5 as VersionRecord, ey as WarningRules, ez as WeakPassphraseError, eA as WeakPassphraseReason, eB as WrappedDeksBlob, eC as WriteConflict, eD as WriteEvent, eE as WriteHook, eF as WriteQueue, i as applyI18nLocale, bi as applyPatch, eG as assertStrongPassphrase, eH as buildRecipientKeyringFile, eI as burnPaperRecoveryEntry, bj as canonicalJson, bk as computePatch, x as createEnforcer, eJ as createNoydb, eK as createStore, eL as deriveMagicLinkContentKey, j as dictCollectionName, k as dictKey, bl as diff, l as enforceScript, eM as enrollAuthenticator, eN as estimateEntropy, eO as evaluateExportCapability, eP as evaluateImportCapability, eQ as findAuthenticator, bm as formatDiff, eR as hasExportCapability, eS as hasImportCapability, eT as hasRecoveryEnrolled, bn as hashEntry, n as i18nText, o as inferScripts, p as isDictCollectionName, q as isDictKeyDescriptor, r as isI18nTextDescriptor, eU as isMagicLinkGrantExpired, eV as isPublicEnvelope, eW as issueDelegation, eX as keyringRecoverPassphrase, eY as keyringRotatePassphrase, eZ as listMagicLinkGrants, e_ as listUsers, e$ as listUsersWithEnvelopes, f0 as loadActiveDelegations, f1 as loadPaperRecoveryEntries, f2 as loadSealedPassphrase, f3 as loadShamirRecoveryEntries, f4 as magicLinkGrantRecordId, f5 as mintPaperRecoveryEntry, f6 as mintShamirRecoveryEntry, f7 as mintWrappedDeksBlob, bo as paddedIndex, bp as parseIndex, f8 as parseSealedEnvelope, f9 as readMagicLinkGrantRecord, fa as recoverUser, fb as removeAuthenticator, s as resolveI18nText, t as resolvePolicy, fc as resolvePublicEnvelopeSchema, fd as revokeDelegation, fe as revokeMagicLinkGrant, aM as runTransaction, ff as savePaperRecoveryEntries, fg as saveSealedPassphrase, fh as saveShamirRecoveryEntries, bq as sha256Hex, fi as unwrapDeksFromBlob, fj as unwrapDeksFromPaperEntry, fk as unwrapDeksFromShamirEntry, fl as unwrapMagicLinkGrant, v as validateI18nTextValue, fm as validatePassphrase, fn as validatePublicEnvelopeInput, fo as validateSchemaInput, fp as validateSchemaOutput, y as validateSessionPolicy, fq as writeMagicLinkGrant } from './types-Df28QFKb.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-CmWQyC4e.js';
6
- export { y as AlreadyElevatedError, A as AmendmentForbiddenError, n as AttestationError, B as BackupCorruptedError, p as BackupLedgerError, q as BundleIntegrityError, r as BundleSealMismatchError, s as BundleVersionConflictError, C as ConflictError, z as CrossJoinSourceUnknownError, E as CrossJoinTooLargeError, G as DEFAULT_CROSS_JOIN_MAX_ROWS, H as DEFAULT_JOIN_MAX_ROWS, J as DanglingReferenceError, K as DecryptionError, U as DelegationTargetMissingError, f as DerivationCapExceededError, g as DerivationCycleError, h as DerivationDepthError, i as DerivationOutputShapeError, j as DerivationOutputUnknownError, D as DictKeyInUseError, a as DictKeyMissingError, V as DirectoryDisabledError, W as ElevationExpiredError, X as ExportCapabilityError, F as FieldFrozenError, Y as FilenameSanitizationError, Z as GroupCardinalityError, _ as ImportCapabilityError, $ as IndexRequiredError, a0 as IndexWriteFailureError, a1 as InvalidKeyError, I as InvariantError, a2 as JoinContext, a3 as JoinLeg, a4 as JoinStrategy, a5 as JoinTooLargeError, a6 as JoinableSource, a7 as KeyringCorruptError, a8 as KeyringExpiredError, a9 as LedgerContentionError, aa as LiveQuery, ab as LiveUpstream, L as LocaleNotSpecifiedError, u as MaterializedViewConfigError, v as MaterializedViewCycleError, w as MaterializedViewSourceUnknownError, x as MaterializedViewTooLargeError, ac as MigrationRequiredError, M as MissingTranslationError, ad as NetworkError, ae as NoAccessError, af as NonAdditiveSchemaChangeError, ag as NotFoundError, ah as OrderBy, O as OverlayBaseIsVirtualError, k as OverlayCollectionUnavailableError, l as OverlayIdMismatchError, m as OverlayNameCollisionError, ai as PathEscapeError, aj as PeriodClosedError, ak as PermissionDeniedError, al as PrivilegeEscalationError, Q as Query, am as QueryPlan, an as QuerySource, ao as QuiesceTimeoutError, ap as ReadOnlyAtInstantError, aq as ReadOnlyError, ar as ReadOnlyFrameError, d as RecordLockedError, as as RefDescriptor, at as RefIntegrityError, au as RefMode, av as RefRegistry, aw as RefScopeError, ax as RefViolation, R as ReservedCollectionNameError, ay as ScanBuilder, az as ScanPageProvider, aA as SchemaFenceError, aB as SchemaLockedError, aC as SchemaUpdateError, aD as SchemaValidationError, S as SessionExpiredError, b as SessionNotFoundError, c as SessionPolicyError, e as SnapshotNotFoundError, aE as StoreCapabilityError, aF as TamperedError, aG as TierDemoteDeniedError, aH as TierNotGrantedError, T as TranslatorNotConfiguredError, aI as ValidationError, aJ as applyJoins, aK as buildLiveQuery, aL as executePlan, aM as ref, aN as resetJoinWarnings } from './index-CmWQyC4e.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-Dt55yn4s.js';
5
+ import { N as NoydbError } from './index-D8I_pyJD.js';
6
+ export { z as AlreadyElevatedError, A as AmendmentForbiddenError, o as AttestationError, B as BackupCorruptedError, q as BackupLedgerError, r as BundleIntegrityError, s as BundleSealMismatchError, t as BundleVersionConflictError, C as ConflictError, E as CrossJoinSourceUnknownError, G as CrossJoinTooLargeError, H as DEFAULT_CROSS_JOIN_MAX_ROWS, J as DEFAULT_JOIN_MAX_ROWS, K as DanglingReferenceError, U as DecryptionError, V as DelegationTargetMissingError, g as DerivationCapExceededError, h as DerivationCycleError, i as DerivationDepthError, j as DerivationOutputShapeError, k as DerivationOutputUnknownError, D as DictKeyInUseError, a as DictKeyMissingError, W as DirectoryDisabledError, X as ElevationExpiredError, Y as ExportCapabilityError, F as FieldFrozenError, Z as FilenameSanitizationError, _ as GroupCardinalityError, $ as ImportCapabilityError, a0 as IndexRequiredError, a1 as IndexWriteFailureError, a2 as InvalidKeyError, I as InvariantError, a3 as JoinContext, a4 as JoinLeg, a5 as JoinStrategy, a6 as JoinTooLargeError, a7 as JoinableSource, a8 as KeyringCorruptError, a9 as KeyringExpiredError, aa as LedgerContentionError, ab as LiveQuery, ac as LiveUpstream, L as LocaleNotSpecifiedError, v as MaterializedViewConfigError, w as MaterializedViewCycleError, x as MaterializedViewSourceUnknownError, y as MaterializedViewTooLargeError, ad as MigrationRequiredError, M as MissingTranslationError, ae as NetworkError, af as NoAccessError, ag as NonAdditiveSchemaChangeError, ah as NotFoundError, ai as OrderBy, O as OverlayBaseIsVirtualError, l as OverlayCollectionUnavailableError, m as OverlayIdMismatchError, n as OverlayNameCollisionError, aj as PathEscapeError, ak as PeriodClosedError, al as PermissionDeniedError, am as PrivilegeEscalationError, Q as Query, an as QueryPlan, ao as QuerySource, ap as QuiesceTimeoutError, aq as ReadOnlyAtInstantError, ar as ReadOnlyError, as as ReadOnlyFrameError, e as RecordLockedError, at as RefDescriptor, au as RefIntegrityError, av as RefMode, aw as RefRegistry, ax as RefScopeError, ay as RefViolation, R as ReservedCollectionNameError, az as ScanBuilder, aA as ScanPageProvider, aB as SchemaFenceError, aC as SchemaLockedError, aD as SchemaUpdateError, aE as SchemaValidationError, S as ScriptViolationError, b as SessionExpiredError, c as SessionNotFoundError, d as SessionPolicyError, f as SnapshotNotFoundError, aF as StoreCapabilityError, aG as TamperedError, aH as TierDemoteDeniedError, aI as TierNotGrantedError, T as TranslatorNotConfiguredError, aJ as ValidationError, aK as applyJoins, aL as buildLiveQuery, aM as executePlan, aN as ref, aO as resetJoinWarnings } from './index-D8I_pyJD.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-CJ8RzRrm.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-BJwdc0s6.js';
10
- export { w as withDerivation } from './with-derivation-D_Ids_H6.js';
11
- export { w as withMaterializedView } from './with-materialized-view-D-CRVSDX.js';
9
+ export { w as withGuard } from './with-guard-qube6BMI.js';
10
+ export { w as withDerivation } from './with-derivation-DFnFByiQ.js';
11
+ export { w as withMaterializedView } from './with-materialized-view-BLkQxoQN.js';
12
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-BSAGEyu5.js';
13
- export { w as withOverlayedView } from './with-overlayed-view-CNf6GbDG.js';
13
+ export { w as withOverlayedView } from './with-overlayed-view-CRsSEwHR.js';
14
14
  export { SYNC_CREDENTIALS_COLLECTION, SyncCredential, credentialStatus, deleteCredential, getCredential, listCredentials, putCredential } from './team/index.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-ClAEZQC4.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-B4kDxep_.js';
16
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-B3lV6lw3.js';
17
+ export { L as LEDGER_COLLECTION, a as LEDGER_DELTAS_COLLECTION, e as envelopePayloadHash } from './hash-HJqD14vS.js';
18
18
  import './lazy-builder-7tIpFyWN.js';
19
19
  import '@noy-db/attestation';
20
20
 
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  issueDelegation,
4
4
  loadActiveDelegations,
5
5
  revokeDelegation
6
- } from "./chunk-UPBZ7NVY.js";
6
+ } from "./chunk-5T22KDPN.js";
7
7
  import {
8
8
  Collection,
9
9
  DEFAULT_FRESHNESS_MS,
@@ -39,7 +39,7 @@ import {
39
39
  saveVaultPolicy,
40
40
  validateSchemaInput,
41
41
  validateSchemaOutput
42
- } from "./chunk-3O5FNO5O.js";
42
+ } from "./chunk-6CME4UEK.js";
43
43
  import {
44
44
  DEFAULT_PUBLIC_ENVELOPE_SCHEMA,
45
45
  PUBLIC_ENVELOPE_FIELDS,
@@ -50,24 +50,24 @@ import {
50
50
  TxContext,
51
51
  TxVault,
52
52
  runTransaction
53
- } from "./chunk-OA6HE2RW.js";
53
+ } from "./chunk-TFBP23BX.js";
54
54
  import {
55
55
  withDerivation
56
- } from "./chunk-ASFE2X62.js";
57
- import "./chunk-6ILPGZXZ.js";
58
- import "./chunk-6MXGU2PW.js";
56
+ } from "./chunk-RAZ4OVLL.js";
57
+ import "./chunk-DE6GKS6G.js";
58
+ import "./chunk-DO7C2TOG.js";
59
59
  import {
60
60
  withMaterializedView
61
- } from "./chunk-CSHY53CZ.js";
62
- import "./chunk-XZCBBZLS.js";
63
- import "./chunk-JZDA2SRB.js";
64
- import "./chunk-SLJQIBT7.js";
61
+ } from "./chunk-K3DK3NU5.js";
62
+ import "./chunk-HNRHLRDC.js";
63
+ import "./chunk-O3VZPBZG.js";
64
+ import "./chunk-T7JEBOGN.js";
65
65
  import {
66
66
  withOverlayedView
67
- } from "./chunk-WM5GFORS.js";
68
- import "./chunk-WMKCAN4H.js";
69
- import "./chunk-3XCXUJTM.js";
70
- import "./chunk-CBHPW77B.js";
67
+ } from "./chunk-SYMWGEET.js";
68
+ import "./chunk-VTKGMEPP.js";
69
+ import "./chunk-DJHHA6XH.js";
70
+ import "./chunk-2WUSG3IT.js";
71
71
  import {
72
72
  mergeCrdtStates,
73
73
  resolveCrdtSnapshot
@@ -82,7 +82,7 @@ import {
82
82
  parseSealedEnvelope,
83
83
  savePersistedSchema,
84
84
  saveSealedPassphrase
85
- } from "./chunk-22ESLVUM.js";
85
+ } from "./chunk-I5FOWO4J.js";
86
86
  import {
87
87
  NOYDB_BUNDLE_FORMAT_VERSION,
88
88
  NOYDB_BUNDLE_MAGIC,
@@ -93,7 +93,7 @@ import {
93
93
  readNoydbBundlePublicEnvelope,
94
94
  resetBrotliSupportCache,
95
95
  writeNoydbBundle
96
- } from "./chunk-2TXMTYWZ.js";
96
+ } from "./chunk-BVRYKATC.js";
97
97
  import {
98
98
  PUBLIC_ENVELOPE_RECORD_ID,
99
99
  isPublicEnvelope,
@@ -101,24 +101,28 @@ import {
101
101
  readPublicEnvelope,
102
102
  savePublicEnvelope,
103
103
  validatePublicEnvelopeInput
104
- } from "./chunk-BNUCCUES.js";
104
+ } from "./chunk-ML236QKC.js";
105
105
  import {
106
106
  CONSENT_AUDIT_COLLECTION
107
- } from "./chunk-DCP4L4SH.js";
107
+ } from "./chunk-XJFLDA7A.js";
108
108
  import {
109
109
  PERIODS_COLLECTION
110
- } from "./chunk-O3JCRQT3.js";
110
+ } from "./chunk-JWRVQKRZ.js";
111
111
  import "./chunk-UF3BUNQZ.js";
112
112
  import {
113
113
  withGuard
114
- } from "./chunk-PJKGXUMG.js";
114
+ } from "./chunk-OQ6PIGHA.js";
115
115
  import "./chunk-A3JMGXPG.js";
116
116
  import "./chunk-UMLVJTYV.js";
117
- import "./chunk-GZIDTXC4.js";
117
+ import "./chunk-NONAAENK.js";
118
118
  import {
119
119
  CollectionFrame,
120
120
  VaultFrame
121
- } from "./chunk-TS4FQPDD.js";
121
+ } from "./chunk-DFMLEQZB.js";
122
+ import {
123
+ enforceScript,
124
+ inferScripts
125
+ } from "./chunk-6STK5TQP.js";
122
126
  import {
123
127
  DICT_COLLECTION_PREFIX,
124
128
  DictionaryHandle,
@@ -130,8 +134,9 @@ import {
130
134
  isDictKeyDescriptor,
131
135
  isI18nTextDescriptor,
132
136
  resolveI18nText,
137
+ resolvePolicy,
133
138
  validateI18nTextValue
134
- } from "./chunk-AYRTGXF3.js";
139
+ } from "./chunk-22DWZL57.js";
135
140
  import {
136
141
  createBundleStore,
137
142
  routeStore,
@@ -143,7 +148,7 @@ import {
143
148
  withRetry,
144
149
  wrapBundleStore,
145
150
  wrapStore
146
- } from "./chunk-OXCFFRF3.js";
151
+ } from "./chunk-QEILDE6R.js";
147
152
  import {
148
153
  SYNC_CREDENTIALS_COLLECTION,
149
154
  credentialStatus,
@@ -151,7 +156,7 @@ import {
151
156
  getCredential,
152
157
  listCredentials,
153
158
  putCredential
154
- } from "./chunk-BE5ZALMB.js";
159
+ } from "./chunk-ZYWZWG6G.js";
155
160
  import {
156
161
  MAGIC_LINK_CONTENT_INFO_PREFIX,
157
162
  MAGIC_LINK_GRANTS_COLLECTION,
@@ -186,17 +191,17 @@ import {
186
191
  unwrapDeksFromShamirEntry,
187
192
  unwrapMagicLinkGrant,
188
193
  writeMagicLinkGrant
189
- } from "./chunk-7IH5FDXD.js";
194
+ } from "./chunk-3YPCK6JX.js";
190
195
  import {
191
196
  assertTierAccess,
192
197
  dekKey,
193
198
  effectiveClearance
194
- } from "./chunk-GI6S5ZF2.js";
199
+ } from "./chunk-U26HQ6KJ.js";
195
200
  import {
196
201
  PresenceHandle,
197
202
  SyncEngine,
198
203
  SyncTransaction
199
- } from "./chunk-BRZFN354.js";
204
+ } from "./chunk-WPLVTJ5D.js";
200
205
  import {
201
206
  DIRECTORY_RECORD_ID,
202
207
  USER_ENVELOPE_COLLECTION,
@@ -224,7 +229,7 @@ import {
224
229
  saveUserEnvelope,
225
230
  validatePassphrase,
226
231
  visibilityRecordId
227
- } from "./chunk-N4CDTRDH.js";
232
+ } from "./chunk-DONMZAD2.js";
228
233
  import {
229
234
  BUNDLE_STORE_POLICY,
230
235
  INDEXED_STORE_POLICY,
@@ -244,7 +249,7 @@ import {
244
249
  revokeAllSessions,
245
250
  revokeSession,
246
251
  validateSessionPolicy
247
- } from "./chunk-VZOZ3DBN.js";
252
+ } from "./chunk-H2X3ISXG.js";
248
253
  import {
249
254
  generateULID,
250
255
  isULID
@@ -254,14 +259,14 @@ import {
254
259
  VaultInstant,
255
260
  diff,
256
261
  formatDiff
257
- } from "./chunk-HNC55FLJ.js";
262
+ } from "./chunk-F3GDRNUT.js";
258
263
  import {
259
264
  LEDGER_COLLECTION,
260
265
  LEDGER_DELTAS_COLLECTION,
261
266
  LedgerStore,
262
267
  applyPatch,
263
268
  computePatch
264
- } from "./chunk-QYO6I7KK.js";
269
+ } from "./chunk-PE2FR4J3.js";
265
270
  import {
266
271
  canonicalJson,
267
272
  envelopePayloadHash,
@@ -279,7 +284,7 @@ import {
279
284
  buildLiveQuery,
280
285
  executePlan,
281
286
  resetJoinWarnings
282
- } from "./chunk-4EOVWJL6.js";
287
+ } from "./chunk-2GLDA55J.js";
283
288
  import {
284
289
  CollectionIndexes
285
290
  } from "./chunk-OIF6LZUR.js";
@@ -299,7 +304,7 @@ import {
299
304
  GroupedQueryN,
300
305
  groupAndReduce,
301
306
  reduceRecords
302
- } from "./chunk-KK44CQ5B.js";
307
+ } from "./chunk-5XHKQ56N.js";
303
308
  import {
304
309
  evaluateClause,
305
310
  evaluateFieldClause,
@@ -316,8 +321,8 @@ import {
316
321
  detectMagic,
317
322
  detectMimeType,
318
323
  isPreCompressed
319
- } from "./chunk-4YVVF6JN.js";
320
- import "./chunk-WBUG3324.js";
324
+ } from "./chunk-QODLLGQ7.js";
325
+ import "./chunk-3BFJOWSU.js";
321
326
  import {
322
327
  NOYDB_BACKUP_VERSION,
323
328
  NOYDB_FORMAT_VERSION,
@@ -333,7 +338,7 @@ import {
333
338
  derivePresenceKey,
334
339
  encryptBytes,
335
340
  encryptDeterministic
336
- } from "./chunk-YAMTXW77.js";
341
+ } from "./chunk-PP6W64Y3.js";
337
342
  import {
338
343
  AlreadyElevatedError,
339
344
  AmendmentForbiddenError,
@@ -401,6 +406,7 @@ import {
401
406
  SchemaLockedError,
402
407
  SchemaUpdateError,
403
408
  SchemaValidationError,
409
+ ScriptViolationError,
404
410
  SessionExpiredError,
405
411
  SessionNotFoundError,
406
412
  SessionPolicyError,
@@ -411,7 +417,7 @@ import {
411
417
  TierNotGrantedError,
412
418
  TranslatorNotConfiguredError,
413
419
  ValidationError
414
- } from "./chunk-REQJJIPP.js";
420
+ } from "./chunk-B6PB7JLN.js";
415
421
 
416
422
  // src/schema-update/strategies.ts
417
423
  function blindUpdate() {
@@ -751,6 +757,7 @@ export {
751
757
  SchemaLockedError,
752
758
  SchemaUpdateError,
753
759
  SchemaValidationError,
760
+ ScriptViolationError,
754
761
  SessionExpiredError,
755
762
  SessionNotFoundError,
756
763
  SessionPolicyError,
@@ -826,6 +833,7 @@ export {
826
833
  enableDevUnlock,
827
834
  encryptBytes,
828
835
  encryptDeterministic,
836
+ enforceScript,
829
837
  enrollAuthenticator,
830
838
  envelopePayloadHash,
831
839
  estimateEntropy,
@@ -846,6 +854,7 @@ export {
846
854
  hasRecoveryEnrolled,
847
855
  hashEntry,
848
856
  i18nText,
857
+ inferScripts,
849
858
  isDevUnlockActive,
850
859
  isDictCollectionName,
851
860
  isDictKeyDescriptor,
@@ -906,6 +915,7 @@ export {
906
915
  resetJoinWarnings,
907
916
  resolveCrdtSnapshot,
908
917
  resolveI18nText,
918
+ resolvePolicy,
909
919
  resolveSchema as resolvePublicEnvelopeSchema,
910
920
  resolveSession,
911
921
  revokeAllSessions,
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/schema-update/strategies.ts","../src/schema-update/cutover.ts","../src/vault-diff.ts"],"sourcesContent":["/** Bundled light update strategies. */\nimport { NonAdditiveSchemaChangeError, SchemaLockedError } from '../errors.js'\nimport type { SchemaUpdateStrategy, SchemaDelta } from './types.js'\n\n/** Allow any schema change. Explicit blind / back-compat. */\nexport function blindUpdate(): SchemaUpdateStrategy {\n return { name: 'blindUpdate', onSchemaDelta: () => ({ action: 'allow' }) }\n}\n\n/** Allow additive changes; reject non-additive ones. The safety backstop. */\nexport function additiveOnly(): SchemaUpdateStrategy {\n return {\n name: 'additiveOnly',\n onSchemaDelta(delta: SchemaDelta) {\n if (delta.kind === 'non-additive') {\n return {\n action: 'reject' as const,\n error: new NonAdditiveSchemaChangeError(\n `Non-additive schema change to \"${delta.collection}\" ` +\n `(added: [${delta.added.join(', ')}], removed: [${delta.removed.join(', ')}], ` +\n `changed: [${delta.changed.map(c => c.field).join(', ')}]). ` +\n `Register a coordinatedCutover() strategy to migrate, or revert the change.`,\n ),\n }\n }\n return { action: 'allow' as const }\n },\n }\n}\n\n/**\n * Reject schema changes. With `fields`, reject only when one of those\n * fields is added/removed/changed; otherwise reject any non-`none` delta.\n */\nexport function lockSchema(opts?: { readonly fields?: readonly string[] }): SchemaUpdateStrategy {\n const fields = opts?.fields\n return {\n name: 'lockSchema',\n onSchemaDelta(delta: SchemaDelta) {\n if (delta.kind === 'none') return { action: 'allow' as const }\n const touched = fields\n ? [...delta.added, ...delta.removed, ...delta.changed.map(c => c.field)].filter(f => fields.includes(f))\n : ['<any>']\n if (touched.length === 0) return { action: 'allow' as const }\n return {\n action: 'reject' as const,\n error: new SchemaLockedError(\n `Schema for \"${delta.collection}\" is locked` +\n (fields ? ` on fields [${fields.join(', ')}] (touched: [${touched.join(', ')}])` : '') +\n `; the change was refused.`,\n ),\n }\n },\n }\n}\n","/** The coordinatedCutover update strategy (single-step — no from/to). */\nimport type { SchemaUpdateStrategy, SchemaDelta, TransformFn } from './types.js'\n\nexport function coordinatedCutover(opts: { readonly transform: TransformFn }): SchemaUpdateStrategy {\n return {\n name: 'coordinatedCutover',\n onSchemaDelta(delta: SchemaDelta) {\n if (delta.kind === 'non-additive') {\n return { action: 'cutover' as const, transform: opts.transform }\n }\n return { action: 'allow' as const }\n },\n }\n}\n","/**\n * Vault-level diff orchestrator.\n *\n * Compares a live `Vault`'s plaintext state against a candidate state\n * (another vault, a plain `{ collection: records[] }` map, or a vault\n * dump JSON) and returns a structured `VaultDiff` plan listing the\n * records that would be added, modified, or deleted to bring the live\n * vault into the candidate's shape.\n *\n * Builds on two existing record-level helpers:\n *\n * 1. `diff(a, b)` from `./history/diff.ts` — emits dot-pathed\n * `DiffEntry[]` with `type: 'added' | 'removed' | 'changed'` for\n * each changed field of two records. Used here for the\n * `fieldDiffs` of every `modified` entry, and (with empty result)\n * as the default deep-equal check.\n *\n * 2. `Vault.exportStream()` from `./vault.ts` — the canonical\n * decrypt-and-stream-records iterator. Used to walk both sides\n * when the candidate is itself a `Vault`. ACL-scoped: collections\n * the caller can't read silently drop out, the same way every\n * other plaintext-emitting export pipeline filters them.\n *\n * The new orchestration is the **vault-level** enumeration: bucket\n * each record id into added (only in candidate), deleted (only in\n * vault), or modified (in both with field changes); leave the\n * field-level granularity to the existing `diff()`.\n *\n * Use cases:\n *\n * - Import preview (`@noy-db/as-*` `fromString` returns a plan\n * whose body is a `VaultDiff`).\n * - Backup verification (\"does this `.noydb` bundle from yesterday\n * match the current vault?\").\n * - Two-vault reconciliation (\"what's different between Office A\n * and Office B before we sync?\").\n * - Test assertions (golden-file testing with one-liner\n * `expect(plan.summary).toEqual(...)`).\n *\n * @module\n */\n\nimport type { Vault } from './vault.js'\nimport { diff as fieldDiff, type DiffEntry as FieldDiffEntry } from './history/diff.js'\n\n// ─── Public types ──────────────────────────────────────────────────────\n\n/** Per-record entry shape — added and deleted records carry only the record value. */\nexport interface VaultDiffEntry<T = unknown> {\n readonly collection: string\n readonly id: string\n readonly record: T\n}\n\n/** Modified records carry both halves of the diff plus the field-level breakdown. */\nexport interface VaultDiffModifiedEntry<T = unknown> extends VaultDiffEntry<T> {\n /** The record as it stands in the live vault. */\n readonly before: T\n /** Top-level keys whose values differ between `before` and `record`. */\n readonly fieldsChanged: readonly string[]\n /**\n * Field-level diff entries from `diff(before, record)`. Reuses the\n * existing per-record diff helper so consumers can render git-style\n * `path: from → to` rows without re-walking the records.\n */\n readonly fieldDiffs: readonly FieldDiffEntry[]\n}\n\nexport interface VaultDiff<T = unknown> {\n readonly added: readonly VaultDiffEntry<T>[]\n readonly modified: readonly VaultDiffModifiedEntry<T>[]\n readonly deleted: readonly VaultDiffEntry<T>[]\n /** Only populated when `options.includeUnchanged: true`. */\n readonly unchanged: readonly VaultDiffEntry<T>[] | undefined\n readonly summary: {\n readonly add: number\n readonly modify: number\n readonly delete: number\n readonly total: number\n }\n /**\n * Format the diff as a human-readable string.\n *\n * - `'count'` — one line, just the numbers (`12 added · 3 modified · 0 deleted`)\n * - `'one-line'` — count plus a single overview line\n * - `'full'` — count + one row per added/modified/deleted record (default)\n */\n format(opts?: { detail?: 'count' | 'one-line' | 'full' }): string\n}\n\nexport interface DiffOptions {\n /** Restrict the diff to a subset of collections. */\n readonly collections?: readonly string[]\n /** Field on each record that carries its id. Defaults to `'id'`. */\n readonly idKey?: string\n /** Override the default deep-equal check for \"modified vs unchanged\". */\n readonly compareFn?: (a: unknown, b: unknown) => boolean\n /** If true, include unchanged records in the diff (off by default to save memory). */\n readonly includeUnchanged?: boolean\n}\n\n/**\n * Candidate state to diff the vault against:\n *\n * - A `Vault` instance — both sides are walked via `exportStream()`.\n * - A `Record<collection, records[]>` map — same shape `as-json.toObject()`\n * produces. Useful for diffing parsed file content against the live vault.\n * - A `VaultDump` (output of `vault.dump()`) — a JSON string carrying the\n * full vault state. Parsed and reduced to the map shape above.\n */\nexport type DiffCandidate<T = unknown> =\n | Vault\n | Record<string, readonly T[]>\n | string\n\n// ─── Implementation ────────────────────────────────────────────────────\n\n/**\n * Compute the diff between a live vault and a candidate state.\n *\n * Returns a fully buffered `VaultDiff` — no streaming. Memory cost is\n * O(n + m) in the row count of vault + candidate. For documented\n * 1K-50K-record vaults this is fine; a streaming variant lands as a\n * follow-up if a > 100K-record consumer arrives.\n */\nexport async function diffVault<T = unknown>(\n vault: Vault,\n candidate: DiffCandidate<T>,\n options: DiffOptions = {},\n): Promise<VaultDiff<T>> {\n const idKey = options.idKey ?? 'id'\n const filter = options.collections ? new Set(options.collections) : null\n const compareFn =\n options.compareFn ?? ((a: unknown, b: unknown) => fieldDiff(a, b).length === 0)\n\n // Side A — walk the live vault via exportStream(). Each chunk arrives\n // already decrypted and ACL-scoped, so collections the caller can't\n // read silently drop out. exportStream's records are typed `unknown[]`\n // — diffVault is the type-erasure boundary; the caller asserts the\n // record shape via the function's `<T>` generic.\n const live = new Map<string, Map<string, T>>()\n for await (const chunk of vault.exportStream({ granularity: 'collection' })) {\n if (filter && !filter.has(chunk.collection)) continue\n const collection = live.get(chunk.collection) ?? new Map<string, T>()\n for (const record of chunk.records) {\n const id = readIdField(record, idKey)\n if (!id) continue\n collection.set(id, record as T)\n }\n live.set(chunk.collection, collection)\n }\n\n // Side B — normalise the candidate into the same shape.\n const cand = await normaliseCandidate<T>(candidate, idKey, filter)\n\n // Walk every (collection, id) on either side and bucket.\n const added: VaultDiffEntry<T>[] = []\n const modified: VaultDiffModifiedEntry<T>[] = []\n const deleted: VaultDiffEntry<T>[] = []\n const unchanged: VaultDiffEntry<T>[] | undefined = options.includeUnchanged ? [] : undefined\n\n const collectionNames = new Set([...live.keys(), ...cand.keys()])\n for (const collection of [...collectionNames].sort()) {\n const liveColl = live.get(collection) ?? new Map<string, T>()\n const candColl = cand.get(collection) ?? new Map<string, T>()\n const allIds = new Set([...liveColl.keys(), ...candColl.keys()])\n\n for (const id of [...allIds].sort()) {\n const before = liveColl.get(id)\n const after = candColl.get(id)\n\n if (before === undefined && after !== undefined) {\n added.push({ collection, id, record: after })\n } else if (before !== undefined && after === undefined) {\n deleted.push({ collection, id, record: before })\n } else if (before !== undefined && after !== undefined) {\n if (compareFn(before, after)) {\n unchanged?.push({ collection, id, record: after })\n } else {\n const fieldDiffs = fieldDiff(before, after)\n const fieldsChanged = uniqueTopLevelKeys(fieldDiffs)\n modified.push({\n collection,\n id,\n record: after,\n before,\n fieldsChanged,\n fieldDiffs,\n })\n }\n }\n }\n }\n\n const summary = {\n add: added.length,\n modify: modified.length,\n delete: deleted.length,\n total: added.length + modified.length + deleted.length,\n }\n\n return {\n added,\n modified,\n deleted,\n unchanged,\n summary,\n format(opts) {\n return formatDiff(opts?.detail ?? 'full', { added, modified, deleted, summary })\n },\n }\n}\n\n// ─── Internals ─────────────────────────────────────────────────────────\n\nasync function normaliseCandidate<T>(\n candidate: DiffCandidate<T>,\n idKey: string,\n filter: Set<string> | null,\n): Promise<Map<string, Map<string, T>>> {\n const out = new Map<string, Map<string, T>>()\n\n // Vault instance — duck-type via the exportStream method (matches\n // vault.ts's structural shape without forcing a runtime instanceof check\n // that would import the class and risk circular deps).\n if (\n typeof candidate === 'object' &&\n candidate !== null &&\n 'exportStream' in candidate &&\n typeof (candidate as Vault).exportStream === 'function'\n ) {\n for await (const chunk of (candidate as Vault).exportStream({ granularity: 'collection' })) {\n if (filter && !filter.has(chunk.collection)) continue\n const collection = out.get(chunk.collection) ?? new Map<string, T>()\n for (const record of chunk.records) {\n const id = readIdField(record, idKey)\n if (!id) continue\n collection.set(id, record as T)\n }\n out.set(chunk.collection, collection)\n }\n return out\n }\n\n // String — assume a vault.dump() JSON string. Parse and reduce to the map shape.\n if (typeof candidate === 'string') {\n let parsed: unknown\n try {\n parsed = JSON.parse(candidate)\n } catch (err) {\n throw new Error(\n `diffVault: candidate string is not valid JSON (${(err as Error).message})`,\n )\n }\n return collectionsFromObject<T>(parsed, idKey, filter)\n }\n\n // Plain object — `Record<collection, records[]>` (same shape as-json.toObject() returns).\n return collectionsFromObject<T>(candidate, idKey, filter)\n}\n\nfunction collectionsFromObject<T>(\n raw: unknown,\n idKey: string,\n filter: Set<string> | null,\n): Map<string, Map<string, T>> {\n const out = new Map<string, Map<string, T>>()\n if (raw === null || typeof raw !== 'object') {\n throw new Error('diffVault: candidate must be a Vault, an object, or a JSON string')\n }\n // A vault dump JSON has a top-level shape like { _compartment, _keyring, <coll>: <records[]> }.\n // We accept both: keys starting with `_` are skipped (they're metadata), the rest are collections.\n for (const [key, value] of Object.entries(raw)) {\n if (key.startsWith('_')) continue\n if (filter && !filter.has(key)) continue\n if (!Array.isArray(value)) continue\n const collection = new Map<string, T>()\n for (const record of value as readonly T[]) {\n if (record === null || typeof record !== 'object') continue\n const id = readIdField(record, idKey)\n if (!id) continue\n collection.set(id, record)\n }\n out.set(key, collection)\n }\n return out\n}\n\nfunction uniqueTopLevelKeys(diffs: readonly FieldDiffEntry[]): readonly string[] {\n const keys = new Set<string>()\n for (const d of diffs) {\n // path is dot-separated; the top-level key is everything before the\n // first `.` or `[`. (`a.b.c` → `a`, `tags[0]` → `tags`, `(root)` → `(root)`).\n const m = /^[^.[]+/.exec(d.path)\n if (m) keys.add(m[0])\n }\n return [...keys]\n}\n\n/**\n * Pull the id field off a record without going through `String(obj)`,\n * which would emit `[object Object]` for nested objects and silently\n * collapse rows that share the same parent. Only string and number ids\n * are accepted; anything else returns the empty string and the record\n * is skipped at the call site.\n */\nfunction readIdField(record: unknown, idKey: string): string {\n if (record === null || typeof record !== 'object') return ''\n const v = (record as Record<string, unknown>)[idKey]\n if (typeof v === 'string') return v\n if (typeof v === 'number' && Number.isFinite(v)) return String(v)\n return ''\n}\n\ninterface FormatBuckets<T> {\n readonly added: readonly VaultDiffEntry<T>[]\n readonly modified: readonly VaultDiffModifiedEntry<T>[]\n readonly deleted: readonly VaultDiffEntry<T>[]\n readonly summary: VaultDiff<T>['summary']\n}\n\nfunction formatDiff<T>(\n detail: 'count' | 'one-line' | 'full',\n b: FormatBuckets<T>,\n): string {\n const head = `${b.summary.add} added · ${b.summary.modify} modified · ${b.summary.delete} deleted`\n if (detail === 'count') return head\n if (b.summary.total === 0) return head + '\\n(no changes)'\n if (detail === 'one-line') return head\n\n const rows: string[] = [head, '']\n for (const e of b.added) rows.push(`${e.collection}/${e.id}\\tadded`)\n for (const e of b.modified) {\n const fields = e.fieldDiffs\n .map((f) => `${f.path}: ${shortJSON(f.from)} → ${shortJSON(f.to)}`)\n .join(', ')\n rows.push(`${e.collection}/${e.id}\\tmodified\\t${fields}`)\n }\n for (const e of b.deleted) rows.push(`${e.collection}/${e.id}\\tdeleted`)\n return rows.join('\\n')\n}\n\nfunction shortJSON(value: unknown): string {\n if (value === undefined) return 'undefined'\n const s = JSON.stringify(value)\n // JSON.stringify returns string for any JSON value except `undefined`\n // (handled above), `function`, and `symbol`. Fall back to a static\n // tag for those — never let an arbitrary object hit the default\n // stringifier (which the lint rule explicitly bans).\n if (typeof s !== 'string') return '<unrepresentable>'\n return s.length > 60 ? s.slice(0, 57) + '...' : s\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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M,EAAE;AAChC,aAAW,KAAK,EAAE,MAAO,MAAK,KAAK,GAAG,EAAE,UAAU,IAAI,EAAE,EAAE,QAAS;AACnE,aAAW,KAAK,EAAE,UAAU;AAC1B,UAAM,SAAS,EAAE,WACd,IAAI,CAAC,MAAM,GAAG,EAAE,IAAI,KAAK,UAAU,EAAE,IAAI,CAAC,WAAM,UAAU,EAAE,EAAE,CAAC,EAAE,EACjE,KAAK,IAAI;AACZ,SAAK,KAAK,GAAG,EAAE,UAAU,IAAI,EAAE,EAAE,aAAe,MAAM,EAAE;AAAA,EAC1D;AACA,aAAW,KAAK,EAAE,QAAS,MAAK,KAAK,GAAG,EAAE,UAAU,IAAI,EAAE,EAAE,UAAW;AACvE,SAAO,KAAK,KAAK,IAAI;AACvB;AAEA,SAAS,UAAU,OAAwB;AACzC,MAAI,UAAU,OAAW,QAAO;AAChC,QAAM,IAAI,KAAK,UAAU,KAAK;AAK9B,MAAI,OAAO,MAAM,SAAU,QAAO;AAClC,SAAO,EAAE,SAAS,KAAK,EAAE,MAAM,GAAG,EAAE,IAAI,QAAQ;AAClD;","names":["formatDiff"]}
1
+ {"version":3,"sources":["../src/schema-update/strategies.ts","../src/schema-update/cutover.ts","../src/vault-diff.ts"],"sourcesContent":["/** Bundled light update strategies. */\nimport { NonAdditiveSchemaChangeError, SchemaLockedError } from '../errors.js'\nimport type { SchemaUpdateStrategy, SchemaDelta } from './types.js'\n\n/** Allow any schema change. Explicit blind / back-compat. */\nexport function blindUpdate(): SchemaUpdateStrategy {\n return { name: 'blindUpdate', onSchemaDelta: () => ({ action: 'allow' }) }\n}\n\n/** Allow additive changes; reject non-additive ones. The safety backstop. */\nexport function additiveOnly(): SchemaUpdateStrategy {\n return {\n name: 'additiveOnly',\n onSchemaDelta(delta: SchemaDelta) {\n if (delta.kind === 'non-additive') {\n return {\n action: 'reject' as const,\n error: new NonAdditiveSchemaChangeError(\n `Non-additive schema change to \"${delta.collection}\" ` +\n `(added: [${delta.added.join(', ')}], removed: [${delta.removed.join(', ')}], ` +\n `changed: [${delta.changed.map(c => c.field).join(', ')}]). ` +\n `Register a coordinatedCutover() strategy to migrate, or revert the change.`,\n ),\n }\n }\n return { action: 'allow' as const }\n },\n }\n}\n\n/**\n * Reject schema changes. With `fields`, reject only when one of those\n * fields is added/removed/changed; otherwise reject any non-`none` delta.\n */\nexport function lockSchema(opts?: { readonly fields?: readonly string[] }): SchemaUpdateStrategy {\n const fields = opts?.fields\n return {\n name: 'lockSchema',\n onSchemaDelta(delta: SchemaDelta) {\n if (delta.kind === 'none') return { action: 'allow' as const }\n const touched = fields\n ? [...delta.added, ...delta.removed, ...delta.changed.map(c => c.field)].filter(f => fields.includes(f))\n : ['<any>']\n if (touched.length === 0) return { action: 'allow' as const }\n return {\n action: 'reject' as const,\n error: new SchemaLockedError(\n `Schema for \"${delta.collection}\" is locked` +\n (fields ? ` on fields [${fields.join(', ')}] (touched: [${touched.join(', ')}])` : '') +\n `; the change was refused.`,\n ),\n }\n },\n }\n}\n","/** The coordinatedCutover update strategy (single-step — no from/to). */\nimport type { SchemaUpdateStrategy, SchemaDelta, TransformFn } from './types.js'\n\nexport function coordinatedCutover(opts: { readonly transform: TransformFn }): SchemaUpdateStrategy {\n return {\n name: 'coordinatedCutover',\n onSchemaDelta(delta: SchemaDelta) {\n if (delta.kind === 'non-additive') {\n return { action: 'cutover' as const, transform: opts.transform }\n }\n return { action: 'allow' as const }\n },\n }\n}\n","/**\n * Vault-level diff orchestrator.\n *\n * Compares a live `Vault`'s plaintext state against a candidate state\n * (another vault, a plain `{ collection: records[] }` map, or a vault\n * dump JSON) and returns a structured `VaultDiff` plan listing the\n * records that would be added, modified, or deleted to bring the live\n * vault into the candidate's shape.\n *\n * Builds on two existing record-level helpers:\n *\n * 1. `diff(a, b)` from `./history/diff.ts` — emits dot-pathed\n * `DiffEntry[]` with `type: 'added' | 'removed' | 'changed'` for\n * each changed field of two records. Used here for the\n * `fieldDiffs` of every `modified` entry, and (with empty result)\n * as the default deep-equal check.\n *\n * 2. `Vault.exportStream()` from `./vault.ts` — the canonical\n * decrypt-and-stream-records iterator. Used to walk both sides\n * when the candidate is itself a `Vault`. ACL-scoped: collections\n * the caller can't read silently drop out, the same way every\n * other plaintext-emitting export pipeline filters them.\n *\n * The new orchestration is the **vault-level** enumeration: bucket\n * each record id into added (only in candidate), deleted (only in\n * vault), or modified (in both with field changes); leave the\n * field-level granularity to the existing `diff()`.\n *\n * Use cases:\n *\n * - Import preview (`@noy-db/as-*` `fromString` returns a plan\n * whose body is a `VaultDiff`).\n * - Backup verification (\"does this `.noydb` bundle from yesterday\n * match the current vault?\").\n * - Two-vault reconciliation (\"what's different between Office A\n * and Office B before we sync?\").\n * - Test assertions (golden-file testing with one-liner\n * `expect(plan.summary).toEqual(...)`).\n *\n * @module\n */\n\nimport type { Vault } from './vault.js'\nimport { diff as fieldDiff, type DiffEntry as FieldDiffEntry } from './history/diff.js'\n\n// ─── Public types ──────────────────────────────────────────────────────\n\n/** Per-record entry shape — added and deleted records carry only the record value. */\nexport interface VaultDiffEntry<T = unknown> {\n readonly collection: string\n readonly id: string\n readonly record: T\n}\n\n/** Modified records carry both halves of the diff plus the field-level breakdown. */\nexport interface VaultDiffModifiedEntry<T = unknown> extends VaultDiffEntry<T> {\n /** The record as it stands in the live vault. */\n readonly before: T\n /** Top-level keys whose values differ between `before` and `record`. */\n readonly fieldsChanged: readonly string[]\n /**\n * Field-level diff entries from `diff(before, record)`. Reuses the\n * existing per-record diff helper so consumers can render git-style\n * `path: from → to` rows without re-walking the records.\n */\n readonly fieldDiffs: readonly FieldDiffEntry[]\n}\n\nexport interface VaultDiff<T = unknown> {\n readonly added: readonly VaultDiffEntry<T>[]\n readonly modified: readonly VaultDiffModifiedEntry<T>[]\n readonly deleted: readonly VaultDiffEntry<T>[]\n /** Only populated when `options.includeUnchanged: true`. */\n readonly unchanged: readonly VaultDiffEntry<T>[] | undefined\n readonly summary: {\n readonly add: number\n readonly modify: number\n readonly delete: number\n readonly total: number\n }\n /**\n * Format the diff as a human-readable string.\n *\n * - `'count'` — one line, just the numbers (`12 added · 3 modified · 0 deleted`)\n * - `'one-line'` — count plus a single overview line\n * - `'full'` — count + one row per added/modified/deleted record (default)\n */\n format(opts?: { detail?: 'count' | 'one-line' | 'full' }): string\n}\n\nexport interface DiffOptions {\n /** Restrict the diff to a subset of collections. */\n readonly collections?: readonly string[]\n /** Field on each record that carries its id. Defaults to `'id'`. */\n readonly idKey?: string\n /** Override the default deep-equal check for \"modified vs unchanged\". */\n readonly compareFn?: (a: unknown, b: unknown) => boolean\n /** If true, include unchanged records in the diff (off by default to save memory). */\n readonly includeUnchanged?: boolean\n}\n\n/**\n * Candidate state to diff the vault against:\n *\n * - A `Vault` instance — both sides are walked via `exportStream()`.\n * - A `Record<collection, records[]>` map — same shape `as-json.toObject()`\n * produces. Useful for diffing parsed file content against the live vault.\n * - A `VaultDump` (output of `vault.dump()`) — a JSON string carrying the\n * full vault state. Parsed and reduced to the map shape above.\n */\nexport type DiffCandidate<T = unknown> =\n | Vault\n | Record<string, readonly T[]>\n | string\n\n// ─── Implementation ────────────────────────────────────────────────────\n\n/**\n * Compute the diff between a live vault and a candidate state.\n *\n * Returns a fully buffered `VaultDiff` — no streaming. Memory cost is\n * O(n + m) in the row count of vault + candidate. For documented\n * 1K-50K-record vaults this is fine; a streaming variant lands as a\n * follow-up if a > 100K-record consumer arrives.\n */\nexport async function diffVault<T = unknown>(\n vault: Vault,\n candidate: DiffCandidate<T>,\n options: DiffOptions = {},\n): Promise<VaultDiff<T>> {\n const idKey = options.idKey ?? 'id'\n const filter = options.collections ? new Set(options.collections) : null\n const compareFn =\n options.compareFn ?? ((a: unknown, b: unknown) => fieldDiff(a, b).length === 0)\n\n // Side A — walk the live vault via exportStream(). Each chunk arrives\n // already decrypted and ACL-scoped, so collections the caller can't\n // read silently drop out. exportStream's records are typed `unknown[]`\n // — diffVault is the type-erasure boundary; the caller asserts the\n // record shape via the function's `<T>` generic.\n const live = new Map<string, Map<string, T>>()\n for await (const chunk of vault.exportStream({ granularity: 'collection' })) {\n if (filter && !filter.has(chunk.collection)) continue\n const collection = live.get(chunk.collection) ?? new Map<string, T>()\n for (const record of chunk.records) {\n const id = readIdField(record, idKey)\n if (!id) continue\n collection.set(id, record as T)\n }\n live.set(chunk.collection, collection)\n }\n\n // Side B — normalise the candidate into the same shape.\n const cand = await normaliseCandidate<T>(candidate, idKey, filter)\n\n // Walk every (collection, id) on either side and bucket.\n const added: VaultDiffEntry<T>[] = []\n const modified: VaultDiffModifiedEntry<T>[] = []\n const deleted: VaultDiffEntry<T>[] = []\n const unchanged: VaultDiffEntry<T>[] | undefined = options.includeUnchanged ? [] : undefined\n\n const collectionNames = new Set([...live.keys(), ...cand.keys()])\n for (const collection of [...collectionNames].sort()) {\n const liveColl = live.get(collection) ?? new Map<string, T>()\n const candColl = cand.get(collection) ?? new Map<string, T>()\n const allIds = new Set([...liveColl.keys(), ...candColl.keys()])\n\n for (const id of [...allIds].sort()) {\n const before = liveColl.get(id)\n const after = candColl.get(id)\n\n if (before === undefined && after !== undefined) {\n added.push({ collection, id, record: after })\n } else if (before !== undefined && after === undefined) {\n deleted.push({ collection, id, record: before })\n } else if (before !== undefined && after !== undefined) {\n if (compareFn(before, after)) {\n unchanged?.push({ collection, id, record: after })\n } else {\n const fieldDiffs = fieldDiff(before, after)\n const fieldsChanged = uniqueTopLevelKeys(fieldDiffs)\n modified.push({\n collection,\n id,\n record: after,\n before,\n fieldsChanged,\n fieldDiffs,\n })\n }\n }\n }\n }\n\n const summary = {\n add: added.length,\n modify: modified.length,\n delete: deleted.length,\n total: added.length + modified.length + deleted.length,\n }\n\n return {\n added,\n modified,\n deleted,\n unchanged,\n summary,\n format(opts) {\n return formatDiff(opts?.detail ?? 'full', { added, modified, deleted, summary })\n },\n }\n}\n\n// ─── Internals ─────────────────────────────────────────────────────────\n\nasync function normaliseCandidate<T>(\n candidate: DiffCandidate<T>,\n idKey: string,\n filter: Set<string> | null,\n): Promise<Map<string, Map<string, T>>> {\n const out = new Map<string, Map<string, T>>()\n\n // Vault instance — duck-type via the exportStream method (matches\n // vault.ts's structural shape without forcing a runtime instanceof check\n // that would import the class and risk circular deps).\n if (\n typeof candidate === 'object' &&\n candidate !== null &&\n 'exportStream' in candidate &&\n typeof (candidate as Vault).exportStream === 'function'\n ) {\n for await (const chunk of (candidate as Vault).exportStream({ granularity: 'collection' })) {\n if (filter && !filter.has(chunk.collection)) continue\n const collection = out.get(chunk.collection) ?? new Map<string, T>()\n for (const record of chunk.records) {\n const id = readIdField(record, idKey)\n if (!id) continue\n collection.set(id, record as T)\n }\n out.set(chunk.collection, collection)\n }\n return out\n }\n\n // String — assume a vault.dump() JSON string. Parse and reduce to the map shape.\n if (typeof candidate === 'string') {\n let parsed: unknown\n try {\n parsed = JSON.parse(candidate)\n } catch (err) {\n throw new Error(\n `diffVault: candidate string is not valid JSON (${(err as Error).message})`,\n )\n }\n return collectionsFromObject<T>(parsed, idKey, filter)\n }\n\n // Plain object — `Record<collection, records[]>` (same shape as-json.toObject() returns).\n return collectionsFromObject<T>(candidate, idKey, filter)\n}\n\nfunction collectionsFromObject<T>(\n raw: unknown,\n idKey: string,\n filter: Set<string> | null,\n): Map<string, Map<string, T>> {\n const out = new Map<string, Map<string, T>>()\n if (raw === null || typeof raw !== 'object') {\n throw new Error('diffVault: candidate must be a Vault, an object, or a JSON string')\n }\n // A vault dump JSON has a top-level shape like { _compartment, _keyring, <coll>: <records[]> }.\n // We accept both: keys starting with `_` are skipped (they're metadata), the rest are collections.\n for (const [key, value] of Object.entries(raw)) {\n if (key.startsWith('_')) continue\n if (filter && !filter.has(key)) continue\n if (!Array.isArray(value)) continue\n const collection = new Map<string, T>()\n for (const record of value as readonly T[]) {\n if (record === null || typeof record !== 'object') continue\n const id = readIdField(record, idKey)\n if (!id) continue\n collection.set(id, record)\n }\n out.set(key, collection)\n }\n return out\n}\n\nfunction uniqueTopLevelKeys(diffs: readonly FieldDiffEntry[]): readonly string[] {\n const keys = new Set<string>()\n for (const d of diffs) {\n // path is dot-separated; the top-level key is everything before the\n // first `.` or `[`. (`a.b.c` → `a`, `tags[0]` → `tags`, `(root)` → `(root)`).\n const m = /^[^.[]+/.exec(d.path)\n if (m) keys.add(m[0])\n }\n return [...keys]\n}\n\n/**\n * Pull the id field off a record without going through `String(obj)`,\n * which would emit `[object Object]` for nested objects and silently\n * collapse rows that share the same parent. Only string and number ids\n * are accepted; anything else returns the empty string and the record\n * is skipped at the call site.\n */\nfunction readIdField(record: unknown, idKey: string): string {\n if (record === null || typeof record !== 'object') return ''\n const v = (record as Record<string, unknown>)[idKey]\n if (typeof v === 'string') return v\n if (typeof v === 'number' && Number.isFinite(v)) return String(v)\n return ''\n}\n\ninterface FormatBuckets<T> {\n readonly added: readonly VaultDiffEntry<T>[]\n readonly modified: readonly VaultDiffModifiedEntry<T>[]\n readonly deleted: readonly VaultDiffEntry<T>[]\n readonly summary: VaultDiff<T>['summary']\n}\n\nfunction formatDiff<T>(\n detail: 'count' | 'one-line' | 'full',\n b: FormatBuckets<T>,\n): string {\n const head = `${b.summary.add} added · ${b.summary.modify} modified · ${b.summary.delete} deleted`\n if (detail === 'count') return head\n if (b.summary.total === 0) return head + '\\n(no changes)'\n if (detail === 'one-line') return head\n\n const rows: string[] = [head, '']\n for (const e of b.added) rows.push(`${e.collection}/${e.id}\\tadded`)\n for (const e of b.modified) {\n const fields = e.fieldDiffs\n .map((f) => `${f.path}: ${shortJSON(f.from)} → ${shortJSON(f.to)}`)\n .join(', ')\n rows.push(`${e.collection}/${e.id}\\tmodified\\t${fields}`)\n }\n for (const e of b.deleted) rows.push(`${e.collection}/${e.id}\\tdeleted`)\n return rows.join('\\n')\n}\n\nfunction shortJSON(value: unknown): string {\n if (value === undefined) return 'undefined'\n const s = JSON.stringify(value)\n // JSON.stringify returns string for any JSON value except `undefined`\n // (handled above), `function`, and `symbol`. Fall back to a static\n // tag for those — never let an arbitrary object hit the default\n // stringifier (which the lint rule explicitly b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