@noy-db/hub 0.2.0-pre.17 → 0.2.0-pre.18

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 (284) hide show
  1. package/dist/aggregate/index.cjs.map +1 -1
  2. package/dist/aggregate/index.d.cts +3 -3
  3. package/dist/aggregate/index.d.ts +3 -3
  4. package/dist/aggregate/index.js +4 -4
  5. package/dist/attestation/index.cjs.map +1 -1
  6. package/dist/attestation/index.d.cts +4 -4
  7. package/dist/attestation/index.d.ts +4 -4
  8. package/dist/attestation/index.js +6 -6
  9. package/dist/blobs/index.cjs.map +1 -1
  10. package/dist/blobs/index.d.cts +5 -5
  11. package/dist/blobs/index.d.ts +5 -5
  12. package/dist/blobs/index.js +6 -6
  13. package/dist/bundle/index.cjs +994 -273
  14. package/dist/bundle/index.cjs.map +1 -1
  15. package/dist/bundle/index.d.cts +6 -6
  16. package/dist/bundle/index.d.ts +6 -6
  17. package/dist/bundle/index.js +10 -10
  18. package/dist/{chunk-SHX5QBCI.js → chunk-2U226RDC.js} +3 -3
  19. package/dist/{chunk-7H2GEJ3O.js → chunk-32XVU2LT.js} +3 -3
  20. package/dist/{chunk-XJV6OB4D.js → chunk-33DAO2XG.js} +2 -2
  21. package/dist/{chunk-U5QCMH3W.js → chunk-45643PAU.js} +4 -4
  22. package/dist/{chunk-BH3X5L6A.js → chunk-4UI5T3K7.js} +3 -3
  23. package/dist/{chunk-2FU2FTXD.js → chunk-5KKNBDCT.js} +2 -2
  24. package/dist/{chunk-HGVSHKZW.js → chunk-647TFNYL.js} +30 -7
  25. package/dist/chunk-647TFNYL.js.map +1 -0
  26. package/dist/{chunk-CD2AVTEM.js → chunk-6FHCU3QO.js} +5 -5
  27. package/dist/{chunk-NBBMMJ2H.js → chunk-6Q5XRLKG.js} +4 -4
  28. package/dist/{chunk-XPIHJ34I.js → chunk-6XEGHIBA.js} +4 -4
  29. package/dist/{chunk-5LIROIDM.js → chunk-6YEC7LLO.js} +2 -2
  30. package/dist/{chunk-C3HYQPV4.js → chunk-AB7JF2KF.js} +2 -2
  31. package/dist/{chunk-UMLVJTYV.js → chunk-ADB7GPM3.js} +7 -4
  32. package/dist/chunk-ADB7GPM3.js.map +1 -0
  33. package/dist/{chunk-KCEHMDZF.js → chunk-BUBJYIZ7.js} +3 -3
  34. package/dist/{chunk-I5IUYN7B.js → chunk-C2OYWD5S.js} +3 -3
  35. package/dist/{chunk-WV7WV6JO.js → chunk-CMISAJAE.js} +5 -5
  36. package/dist/{chunk-SNMJ7SB3.js → chunk-DKMPR76W.js} +5 -5
  37. package/dist/{chunk-XMVHEWF6.js → chunk-DR5I7Q6N.js} +4 -4
  38. package/dist/{chunk-D77ZQSQQ.js → chunk-F2IJ2HGD.js} +652 -152
  39. package/dist/chunk-F2IJ2HGD.js.map +1 -0
  40. package/dist/{chunk-BSZOCSDZ.js → chunk-FQRAYDS4.js} +4 -4
  41. package/dist/{chunk-ZEGSDPB7.js → chunk-HMFC6M2G.js} +19 -1
  42. package/dist/chunk-HMFC6M2G.js.map +1 -0
  43. package/dist/{chunk-M476FOQ7.js → chunk-HOO5I3VG.js} +2 -2
  44. package/dist/{chunk-F4G63NTZ.js → chunk-HWK75CYX.js} +2 -2
  45. package/dist/{chunk-FEJDVE3Z.js → chunk-HZOEBM67.js} +2 -2
  46. package/dist/{chunk-QHM6XEAH.js → chunk-IQ4GMEYZ.js} +6 -6
  47. package/dist/{chunk-5AXTH4QZ.js → chunk-K3NYRK7U.js} +2 -2
  48. package/dist/{chunk-ROPJVUG3.js → chunk-KOURQXIU.js} +5 -5
  49. package/dist/chunk-KOURQXIU.js.map +1 -0
  50. package/dist/{chunk-GP3SDSH2.js → chunk-KQ523X3A.js} +15 -2
  51. package/dist/chunk-KQ523X3A.js.map +1 -0
  52. package/dist/{chunk-3G3W65EQ.js → chunk-KTZ2MHQK.js} +2 -2
  53. package/dist/{chunk-SISBMAPO.js → chunk-LGPSCKWZ.js} +1 -1
  54. package/dist/chunk-LGPSCKWZ.js.map +1 -0
  55. package/dist/{chunk-E77UKJYL.js → chunk-LQ3GD5LL.js} +5 -5
  56. package/dist/{chunk-JDWE6JMX.js → chunk-M3H7VSRV.js} +2 -2
  57. package/dist/{chunk-DWEBTE2W.js → chunk-MGB67HKX.js} +4 -4
  58. package/dist/{chunk-AEIKD3PP.js → chunk-P57D4KBG.js} +3 -3
  59. package/dist/{chunk-YYVZYTWW.js → chunk-PGVEL5IZ.js} +3 -3
  60. package/dist/{chunk-UNTGHX5A.js → chunk-QJKZ5WUP.js} +2 -2
  61. package/dist/{chunk-BJSLBUJ7.js → chunk-QPJ7Z4L3.js} +2 -2
  62. package/dist/{chunk-NYSYPFXJ.js → chunk-RQFG2YSV.js} +3 -3
  63. package/dist/{chunk-J7RWBXFY.js → chunk-RZWQNMMP.js} +2 -2
  64. package/dist/{chunk-BL5GYANC.js → chunk-T4T5I5L6.js} +3 -3
  65. package/dist/{chunk-ZNGPEV5J.js → chunk-TFAN3NFD.js} +3 -3
  66. package/dist/{chunk-DYYYUW5D.js → chunk-TPOHMOGX.js} +2 -2
  67. package/dist/{chunk-XMHUK5PN.js → chunk-TTS3RWL5.js} +2 -2
  68. package/dist/{chunk-TIDXB5DF.js → chunk-VVDSDOVV.js} +4 -4
  69. package/dist/{chunk-WIAOUFFB.js → chunk-WZCG3EZ6.js} +2 -2
  70. package/dist/{chunk-QO6RGLLD.js → chunk-Y5XVB75E.js} +4 -4
  71. package/dist/chunk-YWYW2YNO.js +129 -0
  72. package/dist/chunk-YWYW2YNO.js.map +1 -0
  73. package/dist/{chunk-H2MRGONI.js → chunk-Z3BE5BRK.js} +2 -2
  74. package/dist/{chunk-ROVO6NPJ.js → chunk-Z3I2WNGF.js} +58 -3
  75. package/dist/chunk-Z3I2WNGF.js.map +1 -0
  76. package/dist/{state-vault-W2OEABNO.js → chunk-ZJ67TB4S.js} +24 -7
  77. package/dist/chunk-ZJ67TB4S.js.map +1 -0
  78. package/dist/consent/index.cjs.map +1 -1
  79. package/dist/consent/index.d.cts +5 -5
  80. package/dist/consent/index.d.ts +5 -5
  81. package/dist/consent/index.js +3 -3
  82. package/dist/{crypto-7BN2HDWG.js → crypto-FNK3XPCS.js} +3 -3
  83. package/dist/{delegation-MGH5SODX.js → delegation-FMXNUWE6.js} +5 -5
  84. package/dist/derivations/index.cjs +82 -2
  85. package/dist/derivations/index.cjs.map +1 -1
  86. package/dist/derivations/index.d.cts +6 -6
  87. package/dist/derivations/index.d.ts +6 -6
  88. package/dist/derivations/index.js +8 -6
  89. package/dist/{dev-unlock-iXbYFAWl.d.cts → dev-unlock-3_2b_vo6.d.cts} +1 -1
  90. package/dist/{dev-unlock-CI1ijTML.d.ts → dev-unlock-BMvwPr_E.d.ts} +1 -1
  91. package/dist/{errors-Dz64FA65.d.ts → errors-DUTlAt3Y.d.cts} +16 -1
  92. package/dist/{errors-Dz64FA65.d.cts → errors-DUTlAt3Y.d.ts} +16 -1
  93. package/dist/executor-IZ2NVXCY.js +11 -0
  94. package/dist/executor-THSEYEJG.js +8 -0
  95. package/dist/executor-WLFDUTOM.js +8 -0
  96. package/dist/{fanout-sidecar-FIJJ46YG.js → fanout-sidecar-JGHXAJO5.js} +2 -2
  97. package/dist/forget/index.js +4 -4
  98. package/dist/guards/index.cjs +80 -3
  99. package/dist/guards/index.cjs.map +1 -1
  100. package/dist/guards/index.d.cts +6 -6
  101. package/dist/guards/index.d.ts +6 -6
  102. package/dist/guards/index.js +8 -4
  103. package/dist/{hash-blk7Bkes.d.ts → hash-BThBJFO1.d.ts} +1 -1
  104. package/dist/{hash-tEcM5fnv.d.cts → hash-BnWnL9bQ.d.cts} +1 -1
  105. package/dist/history/index.cjs.map +1 -1
  106. package/dist/history/index.d.cts +6 -6
  107. package/dist/history/index.d.ts +6 -6
  108. package/dist/history/index.js +5 -5
  109. package/dist/i18n/index.cjs.map +1 -1
  110. package/dist/i18n/index.d.cts +5 -5
  111. package/dist/i18n/index.d.ts +5 -5
  112. package/dist/i18n/index.js +6 -6
  113. package/dist/{index-u-kWzSrL.d.cts → index-C6lgoUhK.d.cts} +40 -3
  114. package/dist/{index-DpU6KWof.d.ts → index-DP1JTWHZ.d.ts} +40 -3
  115. package/dist/index.cjs +1202 -322
  116. package/dist/index.cjs.map +1 -1
  117. package/dist/index.d.cts +14 -14
  118. package/dist/index.d.ts +14 -14
  119. package/dist/index.js +65 -47
  120. package/dist/index.js.map +1 -1
  121. package/dist/indexing/index.cjs.map +1 -1
  122. package/dist/indexing/index.js +4 -4
  123. package/dist/issue-R2MWQO6K.js +12 -0
  124. package/dist/{ledger-LFVLHE5H.js → ledger-GXC2YA3A.js} +5 -5
  125. package/dist/materialized-views/index.cjs.map +1 -1
  126. package/dist/materialized-views/index.d.cts +6 -6
  127. package/dist/materialized-views/index.d.ts +6 -6
  128. package/dist/materialized-views/index.js +7 -7
  129. package/dist/noydb-RJL6FQ4B.js +37 -0
  130. package/dist/overlay-views/index.cjs.map +1 -1
  131. package/dist/overlay-views/index.d.cts +6 -6
  132. package/dist/overlay-views/index.d.ts +6 -6
  133. package/dist/overlay-views/index.js +4 -4
  134. package/dist/periods/index.cjs.map +1 -1
  135. package/dist/periods/index.d.cts +5 -5
  136. package/dist/periods/index.d.ts +5 -5
  137. package/dist/periods/index.js +5 -5
  138. package/dist/{public-envelope-RXZNP3V6.js → public-envelope-HXOFHY4N.js} +4 -4
  139. package/dist/query/index.cjs +26 -3
  140. package/dist/query/index.cjs.map +1 -1
  141. package/dist/query/index.d.cts +3 -3
  142. package/dist/query/index.d.ts +3 -3
  143. package/dist/query/index.js +6 -6
  144. package/dist/read-only-facade-EX6WZZBP.js +7 -0
  145. package/dist/registry-3T2RZC5A.js +8 -0
  146. package/dist/registry-DMS7OKBM.js +8 -0
  147. package/dist/{registry-SECUWSGY.js → registry-WVXO6NH5.js} +3 -3
  148. package/dist/{revoke-B54H2S2W.js → revoke-7LCWE2AH.js} +6 -6
  149. package/dist/sealed-record/index.cjs.map +1 -1
  150. package/dist/sealed-record/index.d.cts +1 -1
  151. package/dist/sealed-record/index.d.ts +1 -1
  152. package/dist/sealed-record/index.js +2 -2
  153. package/dist/session/index.cjs.map +1 -1
  154. package/dist/session/index.d.cts +6 -6
  155. package/dist/session/index.d.ts +6 -6
  156. package/dist/session/index.js +3 -3
  157. package/dist/shadow/index.cjs.map +1 -1
  158. package/dist/shadow/index.d.cts +5 -5
  159. package/dist/shadow/index.d.ts +5 -5
  160. package/dist/shadow/index.js +2 -2
  161. package/dist/{signer-YSXZT574.js → signer-HAVDLGOK.js} +5 -5
  162. package/dist/snapshots/index.cjs.map +1 -1
  163. package/dist/snapshots/index.d.cts +5 -5
  164. package/dist/snapshots/index.d.ts +5 -5
  165. package/dist/snapshots/index.js +4 -4
  166. package/dist/{stale-TOA36SRK.js → stale-PGTEGJDI.js} +2 -2
  167. package/dist/state-vault-QKQKN3H3.js +14 -0
  168. package/dist/state-vault-QKQKN3H3.js.map +1 -0
  169. package/dist/store/index.cjs.map +1 -1
  170. package/dist/store/index.d.cts +5 -5
  171. package/dist/store/index.d.ts +5 -5
  172. package/dist/store/index.js +2 -2
  173. package/dist/{strategy-4M9jo172.d.ts → strategy-Diwh5lzS.d.ts} +1 -1
  174. package/dist/{strategy-CLC1j79g.d.cts → strategy-nuyN8K5N.d.cts} +1 -1
  175. package/dist/sync/index.cjs.map +1 -1
  176. package/dist/sync/index.d.cts +4 -4
  177. package/dist/sync/index.d.ts +4 -4
  178. package/dist/sync/index.js +4 -4
  179. package/dist/team/index.cjs.map +1 -1
  180. package/dist/team/index.d.cts +5 -5
  181. package/dist/team/index.d.ts +5 -5
  182. package/dist/team/index.js +8 -8
  183. package/dist/transition-guard--t3exQHF.d.cts +165 -0
  184. package/dist/transition-guard-BlI9Oy5K.d.ts +165 -0
  185. package/dist/tx/index.cjs.map +1 -1
  186. package/dist/tx/index.d.cts +5 -5
  187. package/dist/tx/index.d.ts +5 -5
  188. package/dist/tx/index.js +3 -3
  189. package/dist/{types-CrSpRDuG.d.cts → types-BpLPqyaO.d.cts} +487 -25
  190. package/dist/{types-CljIHm_J.d.ts → types-Diqc2caK.d.ts} +487 -25
  191. package/dist/{ulid-CWfL2Vfv.d.ts → ulid-B1zNV8r9.d.ts} +1 -1
  192. package/dist/{ulid-CrI7PPbA.d.cts → ulid-DNiRB4Mx.d.cts} +1 -1
  193. package/dist/util/index.cjs.map +1 -1
  194. package/dist/util/index.js +1 -1
  195. package/dist/{vault-group-DHAHFX2A.js → vault-group-DPZVFRI5.js} +182 -6
  196. package/dist/vault-group-DPZVFRI5.js.map +1 -0
  197. package/dist/{with-materialized-view-NzF71cG_.d.cts → with-materialized-view-BdH_A_r6.d.cts} +1 -1
  198. package/dist/{with-materialized-view-B892zYZV.d.ts → with-materialized-view-CzAgp_HJ.d.ts} +1 -1
  199. package/dist/{with-overlayed-view-CR6m7CHe.d.ts → with-overlayed-view-BJbqQnsR.d.ts} +1 -1
  200. package/dist/{with-overlayed-view-UI8qSGL4.d.cts → with-overlayed-view-C40rDPlu.d.cts} +1 -1
  201. package/dist/with-rollup-Bopu5UDZ.d.cts +47 -0
  202. package/dist/with-rollup-DrlGkxiE.d.ts +47 -0
  203. package/package.json +3 -3
  204. package/dist/chunk-D77ZQSQQ.js.map +0 -1
  205. package/dist/chunk-GP3SDSH2.js.map +0 -1
  206. package/dist/chunk-HGVSHKZW.js.map +0 -1
  207. package/dist/chunk-PDULVIBY.js +0 -63
  208. package/dist/chunk-PDULVIBY.js.map +0 -1
  209. package/dist/chunk-ROPJVUG3.js.map +0 -1
  210. package/dist/chunk-ROVO6NPJ.js.map +0 -1
  211. package/dist/chunk-SISBMAPO.js.map +0 -1
  212. package/dist/chunk-UMLVJTYV.js.map +0 -1
  213. package/dist/chunk-ZEGSDPB7.js.map +0 -1
  214. package/dist/executor-3W63Y44O.js +0 -11
  215. package/dist/executor-CFFWPWBJ.js +0 -8
  216. package/dist/executor-VDQQOR4F.js +0 -8
  217. package/dist/immutable-guard-B5M95nbq.d.ts +0 -82
  218. package/dist/immutable-guard-qN3zF8o1.d.cts +0 -82
  219. package/dist/issue-TTMGHQ2J.js +0 -12
  220. package/dist/noydb-36S6GQNC.js +0 -37
  221. package/dist/read-only-facade-ITU6L7BL.js +0 -7
  222. package/dist/registry-3YFLZ7WD.js +0 -8
  223. package/dist/registry-TGZISEWC.js +0 -8
  224. package/dist/state-vault-W2OEABNO.js.map +0 -1
  225. package/dist/vault-group-DHAHFX2A.js.map +0 -1
  226. package/dist/with-derivation-BZ2y4bzF.d.ts +0 -13
  227. package/dist/with-derivation-Bozs8DmD.d.cts +0 -13
  228. /package/dist/{chunk-SHX5QBCI.js.map → chunk-2U226RDC.js.map} +0 -0
  229. /package/dist/{chunk-7H2GEJ3O.js.map → chunk-32XVU2LT.js.map} +0 -0
  230. /package/dist/{chunk-XJV6OB4D.js.map → chunk-33DAO2XG.js.map} +0 -0
  231. /package/dist/{chunk-U5QCMH3W.js.map → chunk-45643PAU.js.map} +0 -0
  232. /package/dist/{chunk-BH3X5L6A.js.map → chunk-4UI5T3K7.js.map} +0 -0
  233. /package/dist/{chunk-2FU2FTXD.js.map → chunk-5KKNBDCT.js.map} +0 -0
  234. /package/dist/{chunk-CD2AVTEM.js.map → chunk-6FHCU3QO.js.map} +0 -0
  235. /package/dist/{chunk-NBBMMJ2H.js.map → chunk-6Q5XRLKG.js.map} +0 -0
  236. /package/dist/{chunk-XPIHJ34I.js.map → chunk-6XEGHIBA.js.map} +0 -0
  237. /package/dist/{chunk-5LIROIDM.js.map → chunk-6YEC7LLO.js.map} +0 -0
  238. /package/dist/{chunk-C3HYQPV4.js.map → chunk-AB7JF2KF.js.map} +0 -0
  239. /package/dist/{chunk-KCEHMDZF.js.map → chunk-BUBJYIZ7.js.map} +0 -0
  240. /package/dist/{chunk-I5IUYN7B.js.map → chunk-C2OYWD5S.js.map} +0 -0
  241. /package/dist/{chunk-WV7WV6JO.js.map → chunk-CMISAJAE.js.map} +0 -0
  242. /package/dist/{chunk-SNMJ7SB3.js.map → chunk-DKMPR76W.js.map} +0 -0
  243. /package/dist/{chunk-XMVHEWF6.js.map → chunk-DR5I7Q6N.js.map} +0 -0
  244. /package/dist/{chunk-BSZOCSDZ.js.map → chunk-FQRAYDS4.js.map} +0 -0
  245. /package/dist/{chunk-M476FOQ7.js.map → chunk-HOO5I3VG.js.map} +0 -0
  246. /package/dist/{chunk-F4G63NTZ.js.map → chunk-HWK75CYX.js.map} +0 -0
  247. /package/dist/{chunk-FEJDVE3Z.js.map → chunk-HZOEBM67.js.map} +0 -0
  248. /package/dist/{chunk-QHM6XEAH.js.map → chunk-IQ4GMEYZ.js.map} +0 -0
  249. /package/dist/{chunk-5AXTH4QZ.js.map → chunk-K3NYRK7U.js.map} +0 -0
  250. /package/dist/{chunk-3G3W65EQ.js.map → chunk-KTZ2MHQK.js.map} +0 -0
  251. /package/dist/{chunk-E77UKJYL.js.map → chunk-LQ3GD5LL.js.map} +0 -0
  252. /package/dist/{chunk-JDWE6JMX.js.map → chunk-M3H7VSRV.js.map} +0 -0
  253. /package/dist/{chunk-DWEBTE2W.js.map → chunk-MGB67HKX.js.map} +0 -0
  254. /package/dist/{chunk-AEIKD3PP.js.map → chunk-P57D4KBG.js.map} +0 -0
  255. /package/dist/{chunk-YYVZYTWW.js.map → chunk-PGVEL5IZ.js.map} +0 -0
  256. /package/dist/{chunk-UNTGHX5A.js.map → chunk-QJKZ5WUP.js.map} +0 -0
  257. /package/dist/{chunk-BJSLBUJ7.js.map → chunk-QPJ7Z4L3.js.map} +0 -0
  258. /package/dist/{chunk-NYSYPFXJ.js.map → chunk-RQFG2YSV.js.map} +0 -0
  259. /package/dist/{chunk-J7RWBXFY.js.map → chunk-RZWQNMMP.js.map} +0 -0
  260. /package/dist/{chunk-BL5GYANC.js.map → chunk-T4T5I5L6.js.map} +0 -0
  261. /package/dist/{chunk-ZNGPEV5J.js.map → chunk-TFAN3NFD.js.map} +0 -0
  262. /package/dist/{chunk-DYYYUW5D.js.map → chunk-TPOHMOGX.js.map} +0 -0
  263. /package/dist/{chunk-XMHUK5PN.js.map → chunk-TTS3RWL5.js.map} +0 -0
  264. /package/dist/{chunk-TIDXB5DF.js.map → chunk-VVDSDOVV.js.map} +0 -0
  265. /package/dist/{chunk-WIAOUFFB.js.map → chunk-WZCG3EZ6.js.map} +0 -0
  266. /package/dist/{chunk-QO6RGLLD.js.map → chunk-Y5XVB75E.js.map} +0 -0
  267. /package/dist/{chunk-H2MRGONI.js.map → chunk-Z3BE5BRK.js.map} +0 -0
  268. /package/dist/{crypto-7BN2HDWG.js.map → crypto-FNK3XPCS.js.map} +0 -0
  269. /package/dist/{delegation-MGH5SODX.js.map → delegation-FMXNUWE6.js.map} +0 -0
  270. /package/dist/{executor-3W63Y44O.js.map → executor-IZ2NVXCY.js.map} +0 -0
  271. /package/dist/{executor-CFFWPWBJ.js.map → executor-THSEYEJG.js.map} +0 -0
  272. /package/dist/{executor-VDQQOR4F.js.map → executor-WLFDUTOM.js.map} +0 -0
  273. /package/dist/{fanout-sidecar-FIJJ46YG.js.map → fanout-sidecar-JGHXAJO5.js.map} +0 -0
  274. /package/dist/{issue-TTMGHQ2J.js.map → issue-R2MWQO6K.js.map} +0 -0
  275. /package/dist/{ledger-LFVLHE5H.js.map → ledger-GXC2YA3A.js.map} +0 -0
  276. /package/dist/{noydb-36S6GQNC.js.map → noydb-RJL6FQ4B.js.map} +0 -0
  277. /package/dist/{public-envelope-RXZNP3V6.js.map → public-envelope-HXOFHY4N.js.map} +0 -0
  278. /package/dist/{read-only-facade-ITU6L7BL.js.map → read-only-facade-EX6WZZBP.js.map} +0 -0
  279. /package/dist/{registry-3YFLZ7WD.js.map → registry-3T2RZC5A.js.map} +0 -0
  280. /package/dist/{registry-SECUWSGY.js.map → registry-DMS7OKBM.js.map} +0 -0
  281. /package/dist/{registry-TGZISEWC.js.map → registry-WVXO6NH5.js.map} +0 -0
  282. /package/dist/{revoke-B54H2S2W.js.map → revoke-7LCWE2AH.js.map} +0 -0
  283. /package/dist/{signer-YSXZT574.js.map → signer-HAVDLGOK.js.map} +0 -0
  284. /package/dist/{stale-TOA36SRK.js.map → stale-PGTEGJDI.js.map} +0 -0
@@ -1,9 +1,9 @@
1
1
  import { I as IndexStrategy, d as LazyQuery } from './lazy-builder-ChSqcF5t.js';
2
- import { L as LiveAggregation, b as AggregateSpec, a as AggregateResult, v as MoneyDescriptor, A as AggregateStrategy } from './strategy-4M9jo172.js';
2
+ import { L as LiveAggregation, b as AggregateSpec, a as AggregateResult, v as MoneyDescriptor, A as AggregateStrategy } from './strategy-Diwh5lzS.js';
3
3
  import { C as CrdtStrategy, a as CrdtMode, b as CrdtState } from './strategy-BSxFXGzb.js';
4
4
  import { L as LedgerEntry, F as ForgetStrategy, S as SubjectRef, b as ForgetResult } from './index-C-SSRIxP.js';
5
- import { N as NoydbError } from './errors-Dz64FA65.js';
6
- import { L as LiveQuery, Q as Query, c as JoinStrategy, j as RefRegistry, R as RefDescriptor, d as JoinableSource, l as RefViolation, S as ScanBuilder } from './index-DpU6KWof.js';
5
+ import { N as NoydbError } from './errors-DUTlAt3Y.js';
6
+ import { L as LiveQuery, Q as Query, c as JoinStrategy, j as RefRegistry, R as RefDescriptor, d as JoinableSource, l as RefViolation, S as ScanBuilder } from './index-DP1JTWHZ.js';
7
7
  import { I as IndexDef, O as Operator, F as FieldClause, C as CollectionIndexes } from './predicate-BmhBSPCH.js';
8
8
  import { AttestationFieldSchema, RevocationList } from '@noy-db/attestation';
9
9
 
@@ -1758,12 +1758,14 @@ interface I18nTextOptions {
1758
1758
  * export). Default `'throw'` — today's behavior, zero breaking change.
1759
1759
  * See {@link OnMissingPolicy}.
1760
1760
  *
1761
- * NOTE (current wiring): the `read` layer (`get`/`list`) is enforced.
1762
- * Guard, derivation, mv, join and export reads currently resolve
1763
- * through the same read path and so observe the `read`/scalar policy;
1764
- * dedicated per-layer enforcement for those contexts is a tracked
1765
- * follow-up (mv/join additionally require resolution to be injected
1766
- * into the query/aggregate pipeline, which today reads raw maps).
1761
+ * NOTE (current wiring): the `read` (`get`/`list`), `guard` and
1762
+ * `derivation` layers are enforced guard / derivation `ctx.vault`
1763
+ * reads resolve under their own layer policy (`guard` defaults to the
1764
+ * lenient `'substitute'`). The `mv`, `join` and `export` layers are NOT
1765
+ * yet wired: mv/join read raw `{locale}` maps in the query/aggregate
1766
+ * pipeline (no resolution call site), so injecting resolution there is a
1767
+ * tracked follow-up (#285 D2/D3). Until then those reads observe the raw
1768
+ * map, not this policy.
1767
1769
  */
1768
1770
  readonly onMissing?: OnMissingPolicy;
1769
1771
  /**
@@ -3750,6 +3752,25 @@ interface VaultGroupOptions<T> {
3750
3752
  */
3751
3753
  readonly registry?: Collection<VaultRegistryRow>;
3752
3754
  readonly sharding: ShardingConfig<T>;
3755
+ /**
3756
+ * Lazy migrate-on-open (#271 fleet migration). When `true`, opening a shard
3757
+ * whose registry `schemaVersion` is behind the template's version runs that
3758
+ * shard's cutover inline (via `migrateShard`) before surfacing the handle.
3759
+ * Zero cost for shards never opened. Default `false` (use `migrateFleet`).
3760
+ */
3761
+ readonly migrateOnOpen?: boolean;
3762
+ }
3763
+ /** Result of `VaultGroup.migrateFleet` (#271 active batch runner). */
3764
+ interface FleetMigrationResult {
3765
+ /** The version migrated toward (the template's current version). */
3766
+ readonly target: number;
3767
+ /** vaultIds successfully migrated (or already current). */
3768
+ readonly migrated: string[];
3769
+ /** vaultIds whose cutover failed, with the error message. */
3770
+ readonly failed: {
3771
+ readonly vaultId: string;
3772
+ readonly error: string;
3773
+ }[];
3753
3774
  }
3754
3775
  /** Options for a cross-shard fan-out read. */
3755
3776
  interface FanoutQueryOptions {
@@ -3794,6 +3815,48 @@ interface CrossVaultLiveAggregation<R> extends LiveAggregation<R> {
3794
3815
  readonly skippedVaults: readonly SkippedVault[];
3795
3816
  readonly ready: Promise<void>;
3796
3817
  }
3818
+ /**
3819
+ * Context passed to a cross-vault `derive` callback (#271 Insight Vault).
3820
+ * One call per shard; identifies which shard the records came from.
3821
+ */
3822
+ interface CrossVaultDerivationContext {
3823
+ /** The shard's vault id (e.g. `firm-clients--acme`). */
3824
+ readonly vaultId: string;
3825
+ /** The shard's partition key (e.g. `acme`). */
3826
+ readonly partitionKey: string;
3827
+ /** The shard's schema/template version, from its registry row. */
3828
+ readonly schemaVersion: number;
3829
+ }
3830
+ /**
3831
+ * A push-model cross-vault derivation (#271, Insight Vault — Layer 4).
3832
+ *
3833
+ * For each eligible shard, `refreshInsights()` reads the shard's `source`
3834
+ * collection, runs `derive` on that shard's records, and writes the returned
3835
+ * summary row into a separate analytics ("Insight") vault — keyed by partition
3836
+ * key, one row per shard. The summary is re-encrypted under the Insight Vault's
3837
+ * own DEK; the shard's ciphertext never leaves its DEK boundary (the push model
3838
+ * that resolves the cross-vault DEK conflict). See the ZK note in the spec —
3839
+ * the Insight Vault backend sees aggregated structure across shards, a weaker
3840
+ * profile than per-shard vaults; opt-in.
3841
+ */
3842
+ interface CrossVaultDerivationSpec<R = Record<string, unknown>, S = Record<string, unknown>> {
3843
+ /** Collection read from each shard. */
3844
+ readonly source: string;
3845
+ /** Destination Insight Vault + collection for the per-shard summary rows. */
3846
+ readonly target: {
3847
+ readonly vault: string;
3848
+ readonly collection: string;
3849
+ };
3850
+ /** Per-shard reducer: that shard's source records + context → one summary row. */
3851
+ readonly derive: (records: R[], ctx: CrossVaultDerivationContext) => S;
3852
+ }
3853
+ /** The result of `refreshInsights()`. */
3854
+ interface RefreshInsightsResult {
3855
+ /** Number of summary rows written (one per eligible shard × registered derivation). */
3856
+ readonly written: number;
3857
+ /** Shards excluded (schema-drift, unprovisioned, or read error). */
3858
+ readonly skippedVaults: SkippedVault[];
3859
+ }
3797
3860
  /** A serializable blueprint captured from a VaultTemplate.configure run. */
3798
3861
  interface CapturedBlueprint {
3799
3862
  /** Sorted collection names declared by the template. */
@@ -3818,12 +3881,34 @@ interface SchemaManifestRow {
3818
3881
  interface DeploymentEvent {
3819
3882
  readonly id: string;
3820
3883
  readonly ts: number;
3821
- readonly type: 'shard-created' | 'manifest-recorded' | 'group-opened';
3884
+ readonly type: 'shard-created' | 'manifest-recorded' | 'group-opened' | 'migration-started' | 'migration-completed' | 'migration-failed';
3822
3885
  readonly group: string;
3823
3886
  readonly vaultId?: string;
3824
3887
  readonly templateName?: string;
3825
3888
  readonly version?: number;
3826
3889
  readonly actor?: string;
3890
+ /** Free-form detail (e.g. migration error message). */
3891
+ readonly detail?: string;
3892
+ }
3893
+ /**
3894
+ * One row in the StateManagement `migration-status` collection (#271 fleet
3895
+ * schema-migration runner), keyed by `vaultId`. Tracks each shard's progress
3896
+ * toward the template's current version so the active batch runner is
3897
+ * resumable and the staged rollout can verify a cohort before proceeding.
3898
+ */
3899
+ interface MigrationStatusRow {
3900
+ readonly vaultId: string;
3901
+ readonly group: string;
3902
+ /** The shard's registry schemaVersion at the time of this status. */
3903
+ readonly currentVersion: number;
3904
+ /** The version the runner is moving this shard to (the template's version). */
3905
+ readonly targetVersion: number;
3906
+ readonly status: 'pending' | 'running' | 'done' | 'failed';
3907
+ readonly startedAt?: number;
3908
+ readonly finishedAt?: number;
3909
+ /** Records migrated by the per-shard cutover (when status `done`). */
3910
+ readonly migrated?: number;
3911
+ readonly error?: string;
3827
3912
  }
3828
3913
 
3829
3914
  /**
@@ -3838,8 +3923,14 @@ declare class StateManagementVault {
3838
3923
  readonly registry: Collection<VaultRegistryRow>;
3839
3924
  readonly schemaManifest: Collection<SchemaManifestRow>;
3840
3925
  private constructor();
3841
- /** Idempotently open the reserved state vault and bind the three control-plane collections. */
3926
+ /** Idempotently open the reserved state vault and bind the control-plane collections. */
3842
3927
  static open(db: Noydb): Promise<StateManagementVault>;
3928
+ /** Read one shard's migration status (or null). */
3929
+ getMigrationStatus(vaultId: string): Promise<MigrationStatusRow | null>;
3930
+ /** All migration-status rows (hydrates first). */
3931
+ listMigrationStatus(): Promise<MigrationStatusRow[]>;
3932
+ /** Upsert one shard's migration status (keyed by vaultId). */
3933
+ upsertMigrationStatus(row: MigrationStatusRow): Promise<void>;
3843
3934
  /** Read-only query over the append-only deployment-events log. */
3844
3935
  queryEvents(): Query<DeploymentEvent>;
3845
3936
  /**
@@ -5544,12 +5635,14 @@ declare class VaultGroup<T> {
5544
5635
  /** @internal */ readonly registry: Collection<VaultRegistryRow>;
5545
5636
  /** @internal */ readonly sharding: ShardingConfig<T>;
5546
5637
  /** @internal */ readonly template: VaultTemplate;
5638
+ /** @internal — lazy migrate-on-open (#271). */ readonly migrateOnOpen: boolean;
5547
5639
  constructor(
5548
5640
  /** @internal */ db: Noydb,
5549
5641
  /** @internal */ name: string,
5550
5642
  /** @internal */ registry: Collection<VaultRegistryRow>,
5551
5643
  /** @internal */ sharding: ShardingConfig<T>,
5552
- /** @internal */ template: VaultTemplate);
5644
+ /** @internal */ template: VaultTemplate,
5645
+ /** @internal — lazy migrate-on-open (#271). */ migrateOnOpen?: boolean);
5553
5646
  /** @internal — set when the group is managed (no explicit registry). */
5554
5647
  private stateVault;
5555
5648
  /** @internal */
@@ -5572,8 +5665,14 @@ declare class VaultGroup<T> {
5572
5665
  * `liveBinding().isRelevant` already applies to the reactive path.
5573
5666
  */
5574
5667
  allRows(): Promise<VaultRegistryRow[]>;
5575
- /** Open an existing shard and apply the template. */
5668
+ /**
5669
+ * Open an existing shard and apply the template. When `migrateOnOpen` is set
5670
+ * (#271) and the shard's registry version is behind the template, its cutover
5671
+ * runs inline first — so a behind shard never surfaces a stale handle.
5672
+ */
5576
5673
  openShard(partitionKey: string): Promise<Vault>;
5674
+ /** @internal — open + configure with no migrate-on-open hook (used by the migration path itself to avoid recursion). */
5675
+ private _openShardRaw;
5577
5676
  /**
5578
5677
  * Idempotently provision a shard for `partitionKey`. Returns the
5579
5678
  * configured vault handle.
@@ -5598,6 +5697,69 @@ declare class VaultGroup<T> {
5598
5697
  eligible: VaultRegistryRow[];
5599
5698
  skipped: SkippedVault[];
5600
5699
  }>;
5700
+ /** @internal — registered push-model cross-vault derivations (#271 Insight Vault). */
5701
+ private readonly crossVaultDerivations;
5702
+ /**
5703
+ * Register a push-model cross-vault derivation — the Insight Vault pattern
5704
+ * (#271, Layer 4). Drive it with {@link refreshInsights}.
5705
+ *
5706
+ * For each shard, `derive(records, ctx)` runs on that shard's `source`
5707
+ * records and its return value is written into the analytics
5708
+ * (`target.vault` / `target.collection`) vault, keyed by partition key —
5709
+ * one summary row per shard. The derivation runs in-process under THIS
5710
+ * group's `Noydb` (which already holds both the shard and Insight Vault
5711
+ * keyrings); the shard's decrypted records are reduced to a summary that is
5712
+ * re-encrypted under the Insight Vault's own DEK, so no shard ciphertext
5713
+ * crosses a DEK boundary.
5714
+ *
5715
+ * **Zero-knowledge note:** the Insight Vault backend sees aggregated
5716
+ * structure (totals, counts, timestamps) drawn from many shards — a weaker
5717
+ * ZK profile than the per-shard vaults. Opt-in; keep summaries to aggregate
5718
+ * scalars (no embeddings / no raw records).
5719
+ *
5720
+ * v1 is explicit-refresh (no write-path push); call `refreshInsights()`
5721
+ * after a batch of writes, or on a schedule.
5722
+ */
5723
+ withCrossVaultDerivation<R = Record<string, unknown>, S = Record<string, unknown>>(spec: CrossVaultDerivationSpec<R, S>): void;
5724
+ /**
5725
+ * Run every registered {@link withCrossVaultDerivation}: read each eligible
5726
+ * shard's source records, derive a per-shard summary, and write it into the
5727
+ * Insight Vault keyed by partition key. Shards behind `minVersion`,
5728
+ * unprovisioned, or whose read errors are reported in `skippedVaults` and
5729
+ * are not written (a stale summary is never left behind for a failed shard).
5730
+ */
5731
+ refreshInsights(options?: {
5732
+ minVersion?: number;
5733
+ concurrency?: number;
5734
+ }): Promise<RefreshInsightsResult>;
5735
+ /** @internal — the control-plane vault for migration status; lazily opened. */
5736
+ private ensureStateVault;
5737
+ /**
5738
+ * Migrate ONE shard to the template's current version (#271 fleet runner,
5739
+ * per-shard step). Opens the shard (applying the template, which arms the
5740
+ * M12 cutover), drains schema-write detection, runs `vault.runSchemaCutover()`
5741
+ * (the per-vault drain-barrier-transform protocol), then advances the
5742
+ * registry row's `schemaVersion` and records `migration-status`. A shard
5743
+ * already at the template version is a no-op (`status: 'done'`, migrated 0).
5744
+ * Never throws on a cutover failure — it records `status: 'failed'` and
5745
+ * returns the row, so a fleet run continues past a bad shard.
5746
+ */
5747
+ migrateShard(partitionKey: string): Promise<MigrationStatusRow>;
5748
+ /**
5749
+ * Active batch runner (#271): migrate every shard behind the template version
5750
+ * to it, in controlled batches. **Resumable + crash-safe** — shards already at
5751
+ * the target are skipped (the registry version is the source of truth), so a
5752
+ * re-run after a crash only picks up the unfinished + previously-failed shards.
5753
+ *
5754
+ * - `cohort` — restrict to these partition keys (the staged / canary rollout:
5755
+ * migrate a small cohort, verify the Insight Vault, then run the rest).
5756
+ * - `batchSize` — max shards migrated concurrently per batch (back-pressure).
5757
+ * Default 4. Batches run sequentially; shards within a batch run in parallel.
5758
+ */
5759
+ migrateFleet(options?: {
5760
+ cohort?: readonly string[];
5761
+ batchSize?: number;
5762
+ }): Promise<FleetMigrationResult>;
5601
5763
  }
5602
5764
  declare class ShardedCollection<T, R = T> {
5603
5765
  private readonly group;
@@ -6862,6 +7024,27 @@ interface RecordOutputSpec {
6862
7024
  * `DerivationOutputShapeError` — same as v1.
6863
7025
  */
6864
7026
  optional?: boolean;
7027
+ /**
7028
+ * Field-level provenance for a **self-write** output (#376) — an output
7029
+ * whose `collection` equals the strategy's `source`, used by
7030
+ * reverse-denormalization (`triggerBy`) to patch a denormalized field
7031
+ * back onto the source record.
7032
+ *
7033
+ * `denorm` names the ONLY top-level fields the derivation owns on that
7034
+ * record. The engine merges just those fields from the `derive` return
7035
+ * value onto the current stored record (`{ ...current, ...pick(out, denorm) }`)
7036
+ * — the rest of the user's record is never clobbered by a stale snapshot.
7037
+ * The whole-record `_derivedFrom` provenance tag is NOT applied (the
7038
+ * record stays user-owned); the derivation only claims `denorm`.
7039
+ *
7040
+ * Cycle break is value-level: if the patch changes nothing, no write is
7041
+ * issued — so the self-write that re-fires the source-path derivation
7042
+ * terminates after one idempotent pass.
7043
+ *
7044
+ * REQUIRED when `collection === source` (validated at construction);
7045
+ * ignored for outputs to a different collection.
7046
+ */
7047
+ denorm?: readonly string[];
6865
7048
  }
6866
7049
  /**
6867
7050
  * Array-shape output — one source row produces a variable-length
@@ -6942,6 +7125,52 @@ interface DerivationStrategy<TSource extends Record<string, unknown>, TOutputs e
6942
7125
  * (validated at `withDerivation()` construction time).
6943
7126
  */
6944
7127
  sources?: ReadonlyArray<string>;
7128
+ /**
7129
+ * Foreign-key-keyed triggers for reverse-denormalization (#376). Unlike
7130
+ * `sources[]` (which re-fires at the SAME id), a `triggerBy` entry fans a
7131
+ * write to a PARENT collection OUT to every source record whose FK matches
7132
+ * the written parent's id.
7133
+ *
7134
+ * `{ collection, on }`: a write to `collection` (the parent, e.g.
7135
+ * `'buyers'`) re-fires this derivation once per source record where
7136
+ * `source[on] === writtenParentId` (`on` is the FK field ON the source,
7137
+ * e.g. `'buyerId'`). The matched source record — not the parent — is
7138
+ * passed to `derive`.
7139
+ *
7140
+ * Typical use: keep a denormalized field on the source in sync with a
7141
+ * parent change (a buyer rename → refresh `buyerName` on all their sales),
7142
+ * via a self-write output (`collection === source`) declaring `denorm`.
7143
+ *
7144
+ * Fan-out runs through `ctx.vault.collection(source).query().where(on,'==',id)`,
7145
+ * which uses the FK index when the source declares `withIndexing()` on
7146
+ * `on` (O(children)) and otherwise scans (O(N) — fine for small child
7147
+ * sets). Set `maxFanout` as a safety rail; exceeding it throws
7148
+ * `DerivationCapExceededError` before any write. `triggerBy` collections
7149
+ * participate in cycle detection like `source`/`sources`.
7150
+ *
7151
+ * Each `collection` must be non-empty and not equal `source`; `on` must
7152
+ * be a non-empty field name (validated at construction).
7153
+ */
7154
+ triggerBy?: ReadonlyArray<{
7155
+ collection: string;
7156
+ on: string;
7157
+ maxFanout?: number;
7158
+ }>;
7159
+ /**
7160
+ * @internal — set by `withRollup()` (#376 slice 2). Marks this strategy as
7161
+ * an aggregate-onto-parent rollup: a write OR delete of a `from` (child)
7162
+ * record recomputes `compute(children where child[key] === parentId)` and
7163
+ * patches it onto `source[field]` of the parent at `parentId` (= child[key]).
7164
+ * `source` is the parent (`into`) collection; the synthetic self-write
7165
+ * output carries `denorm: [field]`. Dispatch handles rollup specially (it
7166
+ * does not run the executor). Eager-only in this slice.
7167
+ */
7168
+ rollup?: {
7169
+ readonly from: string;
7170
+ readonly key: string;
7171
+ readonly field: string;
7172
+ readonly compute: (children: any[]) => unknown;
7173
+ };
6945
7174
  /** v1: only deterministic derivations supported. */
6946
7175
  deterministic: true;
6947
7176
  /**
@@ -7563,7 +7792,43 @@ interface NextOptions {
7563
7792
  interface SequenceOptions {
7564
7793
  /** Partition tuple. Each component is URI-encoded and `'/'`-joined. */
7565
7794
  readonly partition?: readonly (string | number)[];
7795
+ /**
7796
+ * Render template for the serial string (#375). When set, `vault.sequence`
7797
+ * returns a {@link FormattedSequenceHandle} whose `next()` resolves to
7798
+ * `{ serial, formatted }`. Tokens:
7799
+ * - `{seq}` — the allocated integer
7800
+ * - `{seq:0N}` — zero-padded to width N (e.g. `{seq:04}` → `0001`)
7801
+ * - `{partition.i}` — the i-th `partition` component (original value)
7802
+ *
7803
+ * Any other token, or a `{partition.i}` index beyond the supplied
7804
+ * `partition`, throws `ValidationError` at `vault.sequence()` construction.
7805
+ * Per-partition reset is inherent: a new partition tuple starts at 1.
7806
+ */
7807
+ readonly format?: string;
7808
+ }
7809
+ /**
7810
+ * A formatted sequence handle (#375). Identical to {@link SequenceHandle}
7811
+ * except `next()` also returns the rendered `formatted` string. `peek()` /
7812
+ * `seedTo()` operate on the underlying integer counter, unchanged.
7813
+ */
7814
+ interface FormattedSequenceHandle {
7815
+ /** Allocate the next value and return it with its rendered serial string. */
7816
+ next(opts?: NextOptions): Promise<{
7817
+ serial: number;
7818
+ formatted: string;
7819
+ }>;
7820
+ /** Read the current integer value without allocating. Returns 0 if never used. */
7821
+ peek(): Promise<number>;
7822
+ /** Set-if-greater on the underlying integer counter. See {@link SequenceHandle.seedTo}. */
7823
+ seedTo(n: number): Promise<void>;
7566
7824
  }
7825
+ /**
7826
+ * Validate a sequence `format` against the supplied partition and return a
7827
+ * pure `(serial) => string` renderer. Eager validation: every token is
7828
+ * checked now, so a bad pattern throws `ValidationError` at construction —
7829
+ * never at `next()` time.
7830
+ */
7831
+ declare function compileSequenceFormat(format: string, series: string, partition: readonly (string | number)[] | undefined): (serial: number) => string;
7567
7832
  /**
7568
7833
  * Resolve the CAS storage key for a (series, partition) pair.
7569
7834
  *
@@ -7639,6 +7904,78 @@ interface Assignment {
7639
7904
  serial: number;
7640
7905
  }
7641
7906
 
7907
+ /**
7908
+ * `_links_*` reserved collections — managed bidirectional many-to-many
7909
+ * junctions (#377 design B).
7910
+ *
7911
+ * Where `refArray` (design A) stores an id-array on one owning record,
7912
+ * `vault.link()` creates a first-class junction: a dedicated encrypted
7913
+ * `_links_<name>` collection whose rows are `{ a, b, meta? }` link tuples.
7914
+ * It is queryable from BOTH sides (`of(id)`), carries optional per-link
7915
+ * metadata, and cascades on endpoint delete.
7916
+ *
7917
+ * Each link is slot-typed: `a` is an id in the `a` endpoint collection,
7918
+ * `b` an id in the `b` endpoint collection (they may be the same
7919
+ * collection for self-links). A link's identity is the ordered pair
7920
+ * `(a, b)`; `of(id)` matches either slot.
7921
+ *
7922
+ * Rows are encrypted under a dedicated `_links_<name>` DEK — same
7923
+ * zero-knowledge stack as every other collection (the store sees only
7924
+ * ciphertext). Backup/restore rides the normal `loadAll` path.
7925
+ */
7926
+
7927
+ /** True for any reserved link-collection name. */
7928
+ declare function isLinkCollectionName(name: string): boolean;
7929
+ /** What happens to a link's rows when one of its endpoint records is deleted. */
7930
+ type LinkOnDelete = 'cascade' | 'strict' | 'warn';
7931
+ /**
7932
+ * Declaration for a link set, passed to `vault.link(name, spec)`. `a` and
7933
+ * `b` are the endpoint collection names (slot-typed). `onDelete` governs
7934
+ * what happens to link rows when an endpoint record is deleted:
7935
+ * `'cascade'` (default) removes the touching link rows, `'strict'` blocks
7936
+ * the endpoint delete while links exist, `'warn'` leaves orphan rows
7937
+ * (surfaced by `vault.checkIntegrity()`).
7938
+ */
7939
+ interface LinkSpec {
7940
+ readonly a: string;
7941
+ readonly b: string;
7942
+ readonly onDelete?: LinkOnDelete;
7943
+ }
7944
+ /** One link tuple as returned by `of()` / `list()`. */
7945
+ interface LinkRow {
7946
+ readonly a: string;
7947
+ readonly b: string;
7948
+ readonly meta?: Record<string, unknown>;
7949
+ }
7950
+ /** Public handle returned by `vault.links(name)`. */
7951
+ interface LinkSetHandle {
7952
+ /** Create (or overwrite the metadata of) the link `(aId, bId)`. Validates both endpoints exist. */
7953
+ connect(aId: string, bId: string, meta?: Record<string, unknown>): Promise<void>;
7954
+ /** Remove the link `(aId, bId)`. Idempotent — a no-op if it doesn't exist. */
7955
+ disconnect(aId: string, bId: string): Promise<void>;
7956
+ /** Whether the link `(aId, bId)` exists. */
7957
+ has(aId: string, bId: string): Promise<boolean>;
7958
+ /** All links touching `id` on EITHER endpoint. */
7959
+ of(id: string): Promise<LinkRow[]>;
7960
+ /** All links in the set. */
7961
+ list(): Promise<LinkRow[]>;
7962
+ }
7963
+ /** Thrown by `connect()` when an endpoint record does not exist. */
7964
+ declare class LinkEndpointError extends NoydbError {
7965
+ readonly link: string;
7966
+ readonly endpoint: string;
7967
+ readonly missingId: string;
7968
+ constructor(link: string, endpoint: string, missingId: string);
7969
+ }
7970
+ /** Thrown when a `strict` link blocks deletion of an endpoint that still has links. */
7971
+ declare class LinkIntegrityError extends NoydbError {
7972
+ readonly link: string;
7973
+ readonly endpoint: string;
7974
+ readonly id: string;
7975
+ readonly count: number;
7976
+ constructor(link: string, endpoint: string, id: string, count: number);
7977
+ }
7978
+
7642
7979
  /**
7643
7980
  * Vault-internal singleton that holds the guard graph and dispatches
7644
7981
  * per-collection guard execution. Owned by `Vault`; not exported.
@@ -7708,12 +8045,25 @@ declare class GuardRegistry {
7708
8045
 
7709
8046
  /**
7710
8047
  * Minimal read-only wrapper over a `Vault`. Used as `ctx.vault` inside
7711
- * guard callbacks so they can fetch related records without acquiring
7712
- * any write capability.
8048
+ * guard / derivation callbacks so they can fetch related records without
8049
+ * acquiring any write capability.
8050
+ *
8051
+ * The `layer` tags every `get`/`list` read with the resolution layer it
8052
+ * belongs to (#285). A guard-seeded facade reads at `'guard'`, a
8053
+ * derivation-seeded one at `'derivation'`, so i18nText / dictKey fields
8054
+ * resolve under that layer's `onMissing` policy instead of the `'read'`
8055
+ * policy — e.g. a guard read can `substitute` a missing locale (lenient
8056
+ * default) while the same field `throw`s on an ordinary app read.
8057
+ *
8058
+ * `query()` is left untagged: the query/aggregate pipeline reads raw
8059
+ * `{locale}` maps (no resolution call site), so a layer tag there would be
8060
+ * inert. Routing `mv`/`join` resolution through the pipeline is tracked
8061
+ * separately (#285 D2/D3).
7713
8062
  */
7714
8063
  declare class ReadOnlyVaultFacade implements ReadOnlyVaultFacade$1 {
7715
8064
  private readonly _vault;
7716
- constructor(vault: Vault);
8065
+ private readonly _layer;
8066
+ constructor(vault: Vault, layer?: Layer);
7717
8067
  collection<T = unknown>(name: string): {
7718
8068
  get(id: string): Promise<T | null>;
7719
8069
  list(): Promise<T[]>;
@@ -8910,13 +9260,17 @@ declare class Vault {
8910
9260
  */
8911
9261
  private overlayedViewRegistry;
8912
9262
  /**
8913
- * Cached read-only facade handed to guard callbacks via `ctx.vault`,
8914
- * and to derivation callbacks via `derive(source, ctx)`. Allocated
8915
- * eagerly inside `_initGuards()` and/or `_initDerivations()` so read
9263
+ * Cached read-only facades handed to guard callbacks via `ctx.vault`
9264
+ * and to derivation callbacks via `derive(source, ctx)`. Split by
9265
+ * resolution layer (#285): the guard facade reads at `layer:'guard'`,
9266
+ * the derivation facade at `layer:'derivation'`, so i18nText / dictKey
9267
+ * fields resolve under that layer's `onMissing` policy. Allocated
9268
+ * eagerly inside `_initGuards()` / `_initDerivations()` so read
8916
9269
  * accessors stay synchronous (callers in `tx/transaction.ts` rely on
8917
- * that). Stays `null` for vaults with neither subsystem configured.
9270
+ * that). Each stays `null` for vaults without that subsystem.
8918
9271
  */
8919
- private readOnlyFacade;
9272
+ private guardFacade;
9273
+ private derivationFacade;
8920
9274
  private getDEK;
8921
9275
  /**
8922
9276
  * Per-principal user envelope API.
@@ -9073,6 +9427,10 @@ declare class Vault {
9073
9427
  private readonly i18nFieldRegistry;
9074
9428
  /** Cache of DictionaryHandle instances, one per dictionary name. */
9075
9429
  private readonly dictionaryCache;
9430
+ /** Registered link specs (#377-B), keyed by link name; set by `vault.link()`. */
9431
+ private readonly linkRegistry;
9432
+ /** Cache of LinkSet handles, one per link name. */
9433
+ private readonly linkSetCache;
9076
9434
  /** — subscribers for cross-tier access events. */
9077
9435
  private readonly crossTierSubs;
9078
9436
  /** — currently-active elevation, or null. One per vault. */
@@ -9232,6 +9590,17 @@ declare class Vault {
9232
9590
  schemaUpdate?: readonly SchemaUpdateStrategy[];
9233
9591
  /** — declare the per-field schema for document attestation (issue side). */
9234
9592
  attestation?: AttestationFieldSchema;
9593
+ /**
9594
+ * Per-collection history & tamper-ledger scoping. Overrides the
9595
+ * vault-wide `history` config for THIS collection only (wholesale, not
9596
+ * merged). `enabled: false` suppresses per-record snapshots for this
9597
+ * collection; `ledger: false` excludes its writes from the vault-wide
9598
+ * hash-chained tamper ledger. Lets you confine version snapshots +
9599
+ * tamper-evidence to the few collections where they carry legal weight,
9600
+ * without paying snapshot + ledger-entry-per-write across operational /
9601
+ * derived collections. Defaults to the vault-wide `history` config. See #361.
9602
+ */
9603
+ historyConfig?: HistoryConfig;
9235
9604
  }): Collection<T>;
9236
9605
  /**
9237
9606
  * Await all background persisted-schema writes triggered by
@@ -9318,6 +9687,32 @@ declare class Vault {
9318
9687
  * ```
9319
9688
  */
9320
9689
  dictionary<Keys extends string = string>(name: string, options?: DictionaryOptions): DictionaryHandle<Keys>;
9690
+ /**
9691
+ * Declare a managed many-to-many link set (#377-B). Registers a
9692
+ * `_links_<name>` junction between two endpoint collections; access its
9693
+ * rows via `vault.links(name)`. Idempotent for an identical re-declaration;
9694
+ * a conflicting one throws. See {@link links}.
9695
+ *
9696
+ * ```ts
9697
+ * vault.link('saleLineLinks', { a: ref('saleLines'), b: ref('purchaseLines'), onDelete: 'cascade' })
9698
+ * ```
9699
+ *
9700
+ * `a` / `b` accept either a collection name or a `ref(target)` descriptor
9701
+ * (only its `target` is used — links manage their own integrity). `onDelete`
9702
+ * governs what happens to link rows when an endpoint record is deleted
9703
+ * (`'cascade'` default, `'strict'`, `'warn'`).
9704
+ */
9705
+ link(name: string, spec: {
9706
+ a: string | RefDescriptor;
9707
+ b: string | RefDescriptor;
9708
+ onDelete?: LinkSpec['onDelete'];
9709
+ }): void;
9710
+ /**
9711
+ * Access a declared link set (#377-B). Throws if `name` was not first
9712
+ * declared via {@link link}. Returns a cached {@link LinkSetHandle}:
9713
+ * `connect(a, b, meta?)`, `disconnect(a, b)`, `has(a, b)`, `of(id)`, `list()`.
9714
+ */
9715
+ links(name: string): LinkSetHandle;
9321
9716
  /**
9322
9717
  * Build a `JoinableSource` for a dictKey field, for use in dict joins
9323
9718
  *. Returns a source whose snapshot contains `{ key, ...labels }`
@@ -9473,7 +9868,19 @@ declare class Vault {
9473
9868
  * const n = await vault.sequence('invoice-2026').next() // 1, then 2, …
9474
9869
  * const cur = await vault.sequence('invoice-2026').peek() // current value, no allocation
9475
9870
  * ```
9871
+ *
9872
+ * Pass a `format` (#375) to emit a serial string instead of a bare
9873
+ * integer — `next()` then returns `{ serial, formatted }`. Per-partition
9874
+ * reset is inherent (a new partition tuple starts at 1):
9875
+ *
9876
+ * ```ts
9877
+ * const seq = vault.sequence('fatture', { partition: [2026], format: '{partition.0}/{seq:04}' })
9878
+ * await seq.next() // { serial: 1, formatted: '2026/0001' }
9879
+ * ```
9476
9880
  */
9881
+ sequence(series: string, opts: SequenceOptions & {
9882
+ format: string;
9883
+ }): FormattedSequenceHandle;
9477
9884
  sequence(series: string, opts?: SequenceOptions): SequenceHandle;
9478
9885
  /** @internal — lazily build the deferred-numbering engine with a cache-coherent stamp. */
9479
9886
  private deferred;
@@ -9566,6 +9973,13 @@ declare class Vault {
9566
9973
  * mutually-cascading collections don't recurse forever.
9567
9974
  */
9568
9975
  enforceRefsOnDelete(collectionName: string, id: string): Promise<void>;
9976
+ /**
9977
+ * @internal — apply link `onDelete` policy when an endpoint record is
9978
+ * deleted (#377-B). `'strict'` throws (blocks the delete), `'cascade'`
9979
+ * removes the touching link rows (tx-atomic when a transaction is active),
9980
+ * `'warn'` leaves orphans for `checkIntegrity()`.
9981
+ */
9982
+ private enforceLinksOnDelete;
9569
9983
  /**
9570
9984
  * Look up the `RefDescriptor` the left collection declared for a
9571
9985
  * given field name. Returns `null` when the field has no ref
@@ -9826,9 +10240,10 @@ declare class Vault {
9826
10240
  */
9827
10241
  _getReadOnlyFacade(): ReadOnlyVaultFacade | null;
9828
10242
  /**
9829
- * Internal lazy-allocator for the read-only facade. Used as a
9830
- * defensive fallback; in practice `_initGuards()` eagerly
9831
- * instantiates this, so the lazy path is a no-op.
10243
+ * Internal lazy-allocator for the derivation read-only facade
10244
+ * (`layer:'derivation'`). Used as a defensive fallback; in practice
10245
+ * `_initDerivations()` eagerly instantiates this, so the lazy path is
10246
+ * a no-op.
9832
10247
  */
9833
10248
  private _ensureReadOnlyFacade;
9834
10249
  /**
@@ -11216,6 +11631,34 @@ declare class Collection<T> {
11216
11631
  * output (carries `_derivedFrom`) — defensive guard against missed
11217
11632
  * cycle detection.
11218
11633
  */
11634
+ /**
11635
+ * @internal #376 — the RAW stored record (canonical-money form, i18n maps
11636
+ * intact), WITHOUT the locale resolution `get()` applies. Used as the
11637
+ * patch base for self-write reverse-denorm so writing back never clobbers
11638
+ * an i18n map or re-quantizes money incorrectly. Returns null for
11639
+ * missing / tombstoned records.
11640
+ */
11641
+ _getStoredRecord(id: string): Promise<T | null>;
11642
+ /**
11643
+ * @internal #376 — ids of records whose top-level `field` equals `value`.
11644
+ * Uses the FK index when the field is indexed (O(matches)); otherwise a
11645
+ * linear scan (O(N) — fine for small child sets; index the FK to scale).
11646
+ */
11647
+ _findMatchingIds(field: string, value: unknown): Promise<string[]>;
11648
+ /**
11649
+ * @internal #376 slice 2 — recompute a rollup aggregate onto the parent.
11650
+ * Gathers every child of `parentId`, runs `compute`, and patches only the
11651
+ * rollup `field` onto the parent's raw stored record (value-equality
11652
+ * guarded). No-op when the parent record does not exist.
11653
+ */
11654
+ private recomputeRollup;
11655
+ /**
11656
+ * @internal #376 slice 2 — fire any rollups for which THIS collection is the
11657
+ * child `from`, recomputing the affected parent after a child delete. Called
11658
+ * from the delete path with the just-removed record's key value. Other
11659
+ * derivation kinds do not react to deletes (unchanged).
11660
+ */
11661
+ private dispatchRollupsOnDelete;
11219
11662
  private dispatchDerivations;
11220
11663
  /**
11221
11664
  * Delete a record by ID. Runs inside the hub's write-queue tracker
@@ -13403,6 +13846,15 @@ interface LocaleReadOptions {
13403
13846
  * element to fall back to any present translation.
13404
13847
  */
13405
13848
  readonly fallback?: string | readonly string[];
13849
+ /**
13850
+ * @internal — the resolution layer this read belongs to (`'read'` by
13851
+ * default). Threaded by layer-tagged read facades (guard / derivation)
13852
+ * so `applyI18nLocale` and dictKey `resolvePolicy` select that layer's
13853
+ * `onMissing` policy instead of the `'read'` policy. Not part of the
13854
+ * public read API — callers select policy via the field's `onMissing`
13855
+ * map, not by setting this. See #285.
13856
+ */
13857
+ readonly _layer?: Layer;
13406
13858
  }
13407
13859
  /**
13408
13860
  * Context passed to the consumer-supplied `plaintextTranslator` function.
@@ -14095,6 +14547,16 @@ interface HistoryConfig {
14095
14547
  readonly enabled?: boolean;
14096
14548
  /** Maximum history entries per record. Oldest pruned on overflow. Default: unlimited. */
14097
14549
  readonly maxVersions?: number;
14550
+ /**
14551
+ * Participate in the vault-wide hash-chained tamper ledger. Default:
14552
+ * `true` (every write of this collection appends a ledger entry when
14553
+ * `withHistory()` is active). Set `false` to exclude this collection's
14554
+ * writes from the chain — its puts/deletes leave no ledger entry,
14555
+ * confining tamper-evidence to the collections where it carries weight.
14556
+ * Independent of `enabled`, which gates per-record snapshots. Has no
14557
+ * effect when `withHistory()` is not active (there is no ledger). See #361.
14558
+ */
14559
+ readonly ledger?: boolean;
14098
14560
  }
14099
14561
  /** Options for querying history. */
14100
14562
  interface HistoryOptions {
@@ -14163,4 +14625,4 @@ interface DeleteManyResult {
14163
14625
  }>;
14164
14626
  }
14165
14627
 
14166
- export { DEFAULT_CHUNK_SIZE as $, createEnforcer as A, validateSessionPolicy as B, type BlobStrategy as C, DICT_COLLECTION_PREFIX as D, BLOB_CHUNKS_COLLECTION as E, BLOB_COLLECTION as F, BLOB_EVICTION_AUDIT_COLLECTION as G, BLOB_INDEX_COLLECTION as H, type I18nStrategy as I, BLOB_SLOTS_PREFIX as J, BLOB_VERSIONS_PREFIX as K, type Layer as L, type BlobEvictionEntry as M, type BlobFieldPolicy as N, type OnMissing as O, PolicyEnforcer as P, type BlobFieldsConfig as Q, type ResolveI18nOptions as R, type ScriptWarning as S, type BlobObject as T, type BlobPutOptions as U, type BlobResponseOptions as V, BlobSet as W, type BlobStrategyOpenArgs as X, type CompactRunOptions as Y, type CompactionContext as Z, type CompactionResult as _, type DictEntry as a, type Role as a$, EXPORT_AUDIT_COLLECTION as a0, ExportBlobsAbortedError as a1, type ExportBlobsAuditEntry as a2, type ExportBlobsHandle as a3, type ExportBlobsOptions as a4, type ExportedBlob as a5, type SlotInfo as a6, type SlotRecord as a7, type VersionRecord as a8, createExportBlobsHandle as a9, ReadOnlyVaultFacade as aA, type ShadowStrategy as aB, CollectionFrame as aC, VaultFrame as aD, type NoydbBundleStore as aE, type RetentionPolicy as aF, type SnapshotPolicy as aG, type SnapshotStrategy as aH, type SnapshotMeta as aI, type SnapshotMode as aJ, type DerivationStrategy as aK, type DerivationContext as aL, type ArrayOutputSpec as aM, DerivationRegistry as aN, type DerivationStrategyHandle as aO, type DerivedFromMeta as aP, type OutputSpec as aQ, type RecordOutputSpec as aR, type MaterializedViewStrategy as aS, type MaterializedViewStrategyHandle as aT, type OverlayedViewStrategy as aU, Collection as aV, type OverlayFieldMergeMode as aW, type OverlayFieldMergeRule as aX, OverlayedViewRegistry as aY, type OverlayedViewStrategyHandle as aZ, type SyncStrategy as a_, runCompaction as aa, type ConsentStrategy as ab, CONSENT_AUDIT_COLLECTION as ac, type ConsentAuditEntry as ad, type ConsentAuditFilter as ae, type ConsentContext as af, type ConsentOp as ag, loadConsentEntries as ah, writeConsentEntry as ai, type PeriodsStrategy as aj, type CarryForwardContext as ak, type ClosePeriodOptions as al, type OpenPeriodOptions as am, PERIODS_COLLECTION as an, type PeriodRecord as ao, type ReadOnlyCollection as ap, appendPeriodLedgerEntry as aq, assertTsWritable as ar, chainAnchor as as, loadPeriods as at, validatePeriodName as au, type GuardStrategy as av, type GuardChange as aw, type GuardContext as ax, GuardRegistry as ay, type GuardStrategyHandle as az, type DictKeyDescriptor as b, type CollectionStats as b$, type UnlockedKeyring as b0, type HistoryStrategy as b1, type NoydbStore as b2, type HistoryOptions as b3, type EncryptedEnvelope as b4, type PruneOptions as b5, type AppendInput as b6, type ChangeType as b7, CollectionInstant as b8, type DiffEntry as b9, type UserEnvelope as bA, type GateName as bB, type GatePolicy as bC, type VaultPolicy as bD, type ActiveTier as bE, type FactorProof as bF, type SchemaUpdateStrategy as bG, type TransformFn as bH, type PersistedSchemaEnvelope as bI, type UpdateDecision as bJ, type DirectoryConfig as bK, type UserVisibility as bL, type AccessibleVault as bM, type AffectedDocument as bN, type ArchivePolicy as bO, type ArchiveResult as bP, type ArchiveRunOptions as bQ, type ArchiveStrategy as bR, BUNDLE_STORE_POLICY as bS, type BuiltInGateName as bT, type CacheOptions as bU, type CacheStats as bV, type CapturedBlueprint as bW, type ChangeEvent as bX, type CollectionChangeEvent as bY, type CollectionConflictResolver as bZ, type CollectionDescriptor as b_, type JsonPatch as ba, type JsonPatchOp as bb, LedgerStore as bc, type VaultEngine as bd, VaultInstant as be, type VerifyResult as bf, applyPatch as bg, computePatch as bh, diff as bi, formatDiff as bj, type PublicEnvelope as bk, type SealingKeyProvider as bl, type BundleRecipient as bm, type RecipientSealer as bn, type RecipientHint as bo, Vault as bp, type RecoveryEnrollmentInput as bq, type ShamirRecoveryProvider as br, TxContext as bs, type MVQueryContext as bt, type RegisteredMV as bu, MaterializedViewRegistry as bv, type MaterializedFromMeta as bw, type MaterializedViewOutput as bx, type UnionArmJoin as by, type UnionSource as bz, DictionaryHandle as c, type LiveUserEnvelope as c$, ComputedFieldError as c0, type ComputedFields as c1, type ComputedFn as c2, type Conflict as c3, type ConflictPolicy as c4, type ConflictStrategy as c5, type CrossTierAccessEvent as c6, CrossVaultAggregation as c7, CrossVaultGroupedAggregation as c8, type GroupedRow as c9, type FactorRequirement as cA, type FanoutQueryOptions as cB, type FanoutResult as cC, type FenceDoc as cD, type FenceState as cE, type FieldChange as cF, type FieldDescriptor as cG, type FieldSource as cH, type GhostRecord as cI, type GrantOptions as cJ, type GuardViolation as cK, type HistoryConfig as cL, type HistoryEntry as cM, INDEXED_STORE_POLICY as cN, type ImportCapability as cO, type InferOutput as cP, type InternalCollectionStats as cQ, type IssueDelegationOptions as cR, type IssueMagicLinkGrantOptions as cS, type KeyringAuthenticator as cT, type KeyringAuthenticatorWrappingDEKs as cU, type KeyringAuthenticatorWrappingKEK as cV, type KeyringFile as cW, type ListAccessibleVaultsOptions as cX, type ListPageResult as cY, type ListUsersOptions as cZ, type LiveQueryOptions as c_, type CrossVaultLiveAggregation as ca, type CrossVaultLiveQuery as cb, DEFAULT_PUBLIC_ENVELOPE_SCHEMA as cc, DELEGATIONS_COLLECTION as cd, type DeepPartial as ce, type DeepPartialOrNull as cf, type DeferredNumberingConfig as cg, type DelegationToken as ch, type DeleteManyResult as ci, type DeploymentEvent as cj, type DerivationDescriptor as ck, type DirtyEntry as cl, type DryRunResult as cm, type DumpSchemaOptions as cn, ELEVATION_AUDIT_COLLECTION as co, ElevatedHandle as cp, type EnrollAuthenticatorOptions as cq, type EnrollAuthenticatorWrappingDEKsOptions as cr, type EnrollAuthenticatorWrappingKEKOptions as cs, type EnrollRecoveryResult as ct, type ExportCapability as cu, type ExportChunk as cv, type ExportFormat as cw, type ExportStreamOptions as cx, type FactorKind as cy, type FactorProofBundle as cz, type DictionaryOptions as d, SEALED_PASSPHRASE_RECORD_ID as d$, type LocaleReadOptions as d0, Lru as d1, type LruOptions as d2, type LruStats as d3, MAGIC_LINK_CONTENT_INFO_PREFIX as d4, MAGIC_LINK_GRANTS_COLLECTION as d5, MAGIC_LINK_KEK_INFO_PREFIX as d6, type MagicLinkGrantPayload as d7, type MagicLinkGrantRecord as d8, type MaterializedViewDescriptor as d9, type PublicEnvelopeSchema as dA, type PublicEnvelopeText as dB, type PullMode as dC, type PullOptions as dD, type PullPolicy as dE, type PullResult as dF, type PushMode as dG, type PushOptions as dH, type PushPolicy as dI, type PushResult as dJ, type PutManyItemOptions as dK, type PutManyOptions as dL, type PutManyResult as dM, type QueryAcrossOptions as dN, type QueryAcrossResult as dO, type QuickUnlockState as dP, QuickUnlockStore as dQ, type ReAuthOperation as dR, type RecoverPassphraseInput as dS, type RecoverPassphraseResult as dT, type RecoverUserOptions as dU, type RecoveryProof as dV, type ResolvedPublicEnvelopeSchema as dW, type RevokeOptions as dX, type RotatePassphraseInput as dY, type RotateRecoveryOptions as dZ, type RotateRecoveryResult as d_, MemoryRecipientSealer as da, MemorySealingKeyProvider as db, NOYDB_BACKUP_VERSION as dc, NOYDB_FORMAT_VERSION as dd, NOYDB_KEYRING_VERSION as de, NOYDB_SYNC_VERSION as df, type NextOptions as dg, Noydb as dh, type NoydbEventMap as di, type NoydbOptions as dj, type Assignment as dk, type OverlayViewDescriptor as dl, PUBLIC_ENVELOPE_FIELDS as dm, type PaperRecoveryDoc as dn, type PaperRecoveryEntry as dp, type PassphrasePolicy as dq, type PassphraseValidationResult as dr, type Permission as ds, type Permissions as dt, type PersistedSchemaKind as du, type PlaintextTranslatorContext as dv, type PlaintextTranslatorFn as dw, PresenceHandle as dx, type PresencePeer as dy, type PublicEnvelopeField as dz, type I18nMap as e, type VaultRegistryRow as e$, type SchemaDelta as e0, type SchemaIntrospection as e1, type SchemaManifestRow as e2, type SealedEnvelope as e3, type SealedPassphrase as e4, type SequenceHandle as e5, type SequenceOptions as e6, SequenceStore as e7, type SessionPolicy as e8, type SetPublicEnvelopeInput as e9, type SyncTransactionResult as eA, type TabChannel as eB, type TabCoordinationOptions as eC, type TabLockManager as eD, type TabPresence as eE, type TabRole as eF, type TierMode as eG, type TransactionInvariant as eH, type TranslatorAuditEntry as eI, TxCollection as eJ, type TxOp as eK, TxVault as eL, USER_ENVELOPE_COLLECTION as eM, USER_ENVELOPE_MAX_BYTES as eN, type Unsubscribe as eO, type UpdateAuthenticatorOptions as eP, type UpdateContext as eQ, type UpdateUserOptions as eR, UserApi as eS, type UserEnvelopeCheckGate as eT, UserEnvelopeOversizedError as eU, type UserEnvelopePresented as eV, type UserInfo as eW, type VaultBackup as eX, VaultGroup as eY, type VaultGroupOptions as eZ, type VaultPolicyOnDisk as e_, type ShamirRecoveryDoc as ea, type ShamirRecoveryEntry as eb, ShardedCollection as ec, ShardedGroupedQuery as ed, ShardedQuery as ee, type ShardingConfig as ef, type SkippedVault as eg, type SlotRewrapCeremony as eh, type SlotRewrapContext as ei, type StandardSchemaV1 as ej, type StandardSchemaV1Issue as ek, type StandardSchemaV1SyncResult as el, StateManagementVault as em, type StoreAuth as en, type StoreAuthKind as eo, type StoreCapabilities as ep, type StoreTime as eq, SyncEngine as er, type SyncMetadata as es, type SyncPolicy as et, SyncScheduler as eu, type SyncSchedulerStatus as ev, type SyncStatus as ew, type SyncTarget as ex, type SyncTargetRole as ey, SyncTransaction as ez, type I18nTextDescriptor as f, validatePublicEnvelopeInput as f$, type VaultSchemaSnapshot as f0, type VaultSnapshot as f1, type VaultTemplate as f2, type WarningRules as f3, WeakPassphraseError as f4, type WeakPassphraseReason as f5, type WithArchiveOptions as f6, type WrappedDeksBlob as f7, type WriteConflict as f8, type WriteEvent as f9, loadActiveDelegations as fA, loadPaperRecoveryEntries as fB, loadSealedPassphrase as fC, loadShamirRecoveryEntries as fD, magicLinkGrantRecordId as fE, mintPaperRecoveryEntry as fF, mintShamirRecoveryEntry as fG, mintWrappedDeksBlob as fH, parseRsaOaepTlv as fI, parseSealedEnvelope as fJ, readMagicLinkGrantRecord as fK, recoverUser as fL, removeAuthenticator as fM, resolveSchema as fN, resolveSequenceKey as fO, revokeDelegation as fP, revokeMagicLinkGrant as fQ, runTransaction as fR, savePaperRecoveryEntries as fS, saveSealedPassphrase as fT, saveShamirRecoveryEntries as fU, sealRsaOaepTlv as fV, unwrapDeksFromBlob as fW, unwrapDeksFromPaperEntry as fX, unwrapDeksFromShamirEntry as fY, unwrapMagicLinkGrant as fZ, validatePassphrase as f_, type WriteHook as fa, type WriteQueue as fb, aesGcmOpen as fc, assertStrongPassphrase as fd, buildRecipientKeyringFile as fe, burnPaperRecoveryEntry as ff, createNoydb as fg, createStore as fh, deriveMagicLinkContentKey as fi, enrollAuthenticator as fj, estimateEntropy as fk, evalComputedFields as fl, evaluateExportCapability as fm, evaluateImportCapability as fn, findAuthenticator as fo, hasExportCapability as fp, hasImportCapability as fq, hasRecoveryEnrolled as fr, isMagicLinkGrantExpired as fs, isPublicEnvelope as ft, issueDelegation as fu, recoverPassphrase as fv, rotatePassphrase as fw, listMagicLinkGrants as fx, listUsers as fy, listUsersWithEnvelopes as fz, type I18nTextOptions as g, validateSchemaInput as g0, validateSchemaOutput as g1, withArchive as g2, withDeferredNumbering as g3, writeMagicLinkGrant as g4, changeSecret as g5, createOwnerKeyring as g6, ensureCollectionDEK as g7, grant as g8, loadKeyring as g9, persistKeyring as ga, revoke as gb, updateAuthenticator as gc, updateKeyringIdentity as gd, type TxStrategy as ge, type AmendmentTxOptions as gf, type OnMissingPolicy as h, type StaticDictDescriptor as i, applyI18nLocale as j, dictCollectionName as k, dictKey as l, enforceScript as m, getAtPath as n, i18nText as o, inferScripts as p, isDictCollectionName as q, isDictKeyDescriptor as r, isI18nTextDescriptor as s, isStaticDictDescriptor as t, resolveI18nText as u, resolvePolicy as v, setAtPathInPlace as w, staticDict as x, validateI18nTextValue as y, type SessionStrategy as z };
14628
+ export { DEFAULT_CHUNK_SIZE as $, createEnforcer as A, validateSessionPolicy as B, type BlobStrategy as C, DICT_COLLECTION_PREFIX as D, BLOB_CHUNKS_COLLECTION as E, BLOB_COLLECTION as F, BLOB_EVICTION_AUDIT_COLLECTION as G, BLOB_INDEX_COLLECTION as H, type I18nStrategy as I, BLOB_SLOTS_PREFIX as J, BLOB_VERSIONS_PREFIX as K, type Layer as L, type BlobEvictionEntry as M, type BlobFieldPolicy as N, type OnMissing as O, PolicyEnforcer as P, type BlobFieldsConfig as Q, type ResolveI18nOptions as R, type ScriptWarning as S, type BlobObject as T, type BlobPutOptions as U, type BlobResponseOptions as V, BlobSet as W, type BlobStrategyOpenArgs as X, type CompactRunOptions as Y, type CompactionContext as Z, type CompactionResult as _, type DictEntry as a, type Role as a$, EXPORT_AUDIT_COLLECTION as a0, ExportBlobsAbortedError as a1, type ExportBlobsAuditEntry as a2, type ExportBlobsHandle as a3, type ExportBlobsOptions as a4, type ExportedBlob as a5, type SlotInfo as a6, type SlotRecord as a7, type VersionRecord as a8, createExportBlobsHandle as a9, ReadOnlyVaultFacade as aA, type ShadowStrategy as aB, CollectionFrame as aC, VaultFrame as aD, type NoydbBundleStore as aE, type RetentionPolicy as aF, type SnapshotPolicy as aG, type SnapshotStrategy as aH, type SnapshotMeta as aI, type SnapshotMode as aJ, type DerivationStrategy as aK, type DerivationContext as aL, type ArrayOutputSpec as aM, DerivationRegistry as aN, type DerivationStrategyHandle as aO, type DerivedFromMeta as aP, type OutputSpec as aQ, type RecordOutputSpec as aR, type MaterializedViewStrategy as aS, type MaterializedViewStrategyHandle as aT, type OverlayedViewStrategy as aU, Collection as aV, type OverlayFieldMergeMode as aW, type OverlayFieldMergeRule as aX, OverlayedViewRegistry as aY, type OverlayedViewStrategyHandle as aZ, type SyncStrategy as a_, runCompaction as aa, type ConsentStrategy as ab, CONSENT_AUDIT_COLLECTION as ac, type ConsentAuditEntry as ad, type ConsentAuditFilter as ae, type ConsentContext as af, type ConsentOp as ag, loadConsentEntries as ah, writeConsentEntry as ai, type PeriodsStrategy as aj, type CarryForwardContext as ak, type ClosePeriodOptions as al, type OpenPeriodOptions as am, PERIODS_COLLECTION as an, type PeriodRecord as ao, type ReadOnlyCollection as ap, appendPeriodLedgerEntry as aq, assertTsWritable as ar, chainAnchor as as, loadPeriods as at, validatePeriodName as au, type GuardStrategy as av, type GuardChange as aw, type GuardContext as ax, GuardRegistry as ay, type GuardStrategyHandle as az, type DictKeyDescriptor as b, type CollectionStats as b$, type UnlockedKeyring as b0, type HistoryStrategy as b1, type NoydbStore as b2, type HistoryOptions as b3, type EncryptedEnvelope as b4, type PruneOptions as b5, type AppendInput as b6, type ChangeType as b7, CollectionInstant as b8, type DiffEntry as b9, type UserEnvelope as bA, type GateName as bB, type GatePolicy as bC, type VaultPolicy as bD, type ActiveTier as bE, type FactorProof as bF, type SchemaUpdateStrategy as bG, type TransformFn as bH, type PersistedSchemaEnvelope as bI, type UpdateDecision as bJ, type DirectoryConfig as bK, type UserVisibility as bL, type AccessibleVault as bM, type AffectedDocument as bN, type ArchivePolicy as bO, type ArchiveResult as bP, type ArchiveRunOptions as bQ, type ArchiveStrategy as bR, BUNDLE_STORE_POLICY as bS, type BuiltInGateName as bT, type CacheOptions as bU, type CacheStats as bV, type CapturedBlueprint as bW, type ChangeEvent as bX, type CollectionChangeEvent as bY, type CollectionConflictResolver as bZ, type CollectionDescriptor as b_, type JsonPatch as ba, type JsonPatchOp as bb, LedgerStore as bc, type VaultEngine as bd, VaultInstant as be, type VerifyResult as bf, applyPatch as bg, computePatch as bh, diff as bi, formatDiff as bj, type PublicEnvelope as bk, type SealingKeyProvider as bl, type BundleRecipient as bm, type RecipientSealer as bn, type RecipientHint as bo, Vault as bp, type RecoveryEnrollmentInput as bq, type ShamirRecoveryProvider as br, TxContext as bs, type MVQueryContext as bt, type RegisteredMV as bu, MaterializedViewRegistry as bv, type MaterializedFromMeta as bw, type MaterializedViewOutput as bx, type UnionArmJoin as by, type UnionSource as bz, DictionaryHandle as c, LinkEndpointError as c$, ComputedFieldError as c0, type ComputedFields as c1, type ComputedFn as c2, type Conflict as c3, type ConflictPolicy as c4, type ConflictStrategy as c5, type CrossTierAccessEvent as c6, CrossVaultAggregation as c7, type CrossVaultDerivationContext as c8, type CrossVaultDerivationSpec as c9, type FactorKind as cA, type FactorProofBundle as cB, type FactorRequirement as cC, type FanoutQueryOptions as cD, type FanoutResult as cE, type FenceDoc as cF, type FenceState as cG, type FieldChange as cH, type FieldDescriptor as cI, type FieldSource as cJ, type FleetMigrationResult as cK, type FormattedSequenceHandle as cL, type GhostRecord as cM, type GrantOptions as cN, type GuardViolation as cO, type HistoryConfig as cP, type HistoryEntry as cQ, INDEXED_STORE_POLICY as cR, type ImportCapability as cS, type InferOutput as cT, type InternalCollectionStats as cU, type IssueDelegationOptions as cV, type IssueMagicLinkGrantOptions as cW, type KeyringAuthenticator as cX, type KeyringAuthenticatorWrappingDEKs as cY, type KeyringAuthenticatorWrappingKEK as cZ, type KeyringFile as c_, CrossVaultGroupedAggregation as ca, type GroupedRow as cb, type CrossVaultLiveAggregation as cc, type CrossVaultLiveQuery as cd, DEFAULT_PUBLIC_ENVELOPE_SCHEMA as ce, DELEGATIONS_COLLECTION as cf, type DeepPartial as cg, type DeepPartialOrNull as ch, type DeferredNumberingConfig as ci, type DelegationToken as cj, type DeleteManyResult as ck, type DeploymentEvent as cl, type DerivationDescriptor as cm, type DirtyEntry as cn, type DryRunResult as co, type DumpSchemaOptions as cp, ELEVATION_AUDIT_COLLECTION as cq, ElevatedHandle as cr, type EnrollAuthenticatorOptions as cs, type EnrollAuthenticatorWrappingDEKsOptions as ct, type EnrollAuthenticatorWrappingKEKOptions as cu, type EnrollRecoveryResult as cv, type ExportCapability as cw, type ExportChunk as cx, type ExportFormat as cy, type ExportStreamOptions as cz, type DictionaryOptions as d, QuickUnlockStore as d$, LinkIntegrityError as d0, type LinkOnDelete as d1, type LinkRow as d2, type LinkSetHandle as d3, type LinkSpec as d4, type ListAccessibleVaultsOptions as d5, type ListPageResult as d6, type ListUsersOptions as d7, type LiveQueryOptions as d8, type LiveUserEnvelope as d9, type PaperRecoveryEntry as dA, type PassphrasePolicy as dB, type PassphraseValidationResult as dC, type Permission as dD, type Permissions as dE, type PersistedSchemaKind as dF, type PlaintextTranslatorContext as dG, type PlaintextTranslatorFn as dH, PresenceHandle as dI, type PresencePeer as dJ, type PublicEnvelopeField as dK, type PublicEnvelopeSchema as dL, type PublicEnvelopeText as dM, type PullMode as dN, type PullOptions as dO, type PullPolicy as dP, type PullResult as dQ, type PushMode as dR, type PushOptions as dS, type PushPolicy as dT, type PushResult as dU, type PutManyItemOptions as dV, type PutManyOptions as dW, type PutManyResult as dX, type QueryAcrossOptions as dY, type QueryAcrossResult as dZ, type QuickUnlockState as d_, type LocaleReadOptions as da, Lru as db, type LruOptions as dc, type LruStats as dd, MAGIC_LINK_CONTENT_INFO_PREFIX as de, MAGIC_LINK_GRANTS_COLLECTION as df, MAGIC_LINK_KEK_INFO_PREFIX as dg, type MagicLinkGrantPayload as dh, type MagicLinkGrantRecord as di, type MaterializedViewDescriptor as dj, MemoryRecipientSealer as dk, MemorySealingKeyProvider as dl, type MigrationStatusRow as dm, NOYDB_BACKUP_VERSION as dn, NOYDB_FORMAT_VERSION as dp, NOYDB_KEYRING_VERSION as dq, NOYDB_SYNC_VERSION as dr, type NextOptions as ds, Noydb as dt, type NoydbEventMap as du, type NoydbOptions as dv, type Assignment as dw, type OverlayViewDescriptor as dx, PUBLIC_ENVELOPE_FIELDS as dy, type PaperRecoveryDoc as dz, type I18nMap as e, type UpdateAuthenticatorOptions as e$, type ReAuthOperation as e0, type RecoverPassphraseInput as e1, type RecoverPassphraseResult as e2, type RecoverUserOptions as e3, type RecoveryProof as e4, type RefreshInsightsResult as e5, type ResolvedPublicEnvelopeSchema as e6, type RevokeOptions as e7, type RotatePassphraseInput as e8, type RotateRecoveryOptions as e9, type StoreAuthKind as eA, type StoreCapabilities as eB, type StoreTime as eC, SyncEngine as eD, type SyncMetadata as eE, type SyncPolicy as eF, SyncScheduler as eG, type SyncSchedulerStatus as eH, type SyncStatus as eI, type SyncTarget as eJ, type SyncTargetRole as eK, SyncTransaction as eL, type SyncTransactionResult as eM, type TabChannel as eN, type TabCoordinationOptions as eO, type TabLockManager as eP, type TabPresence as eQ, type TabRole as eR, type TierMode as eS, type TransactionInvariant as eT, type TranslatorAuditEntry as eU, TxCollection as eV, type TxOp as eW, TxVault as eX, USER_ENVELOPE_COLLECTION as eY, USER_ENVELOPE_MAX_BYTES as eZ, type Unsubscribe as e_, type RotateRecoveryResult as ea, SEALED_PASSPHRASE_RECORD_ID as eb, type SchemaDelta as ec, type SchemaIntrospection as ed, type SchemaManifestRow as ee, type SealedEnvelope as ef, type SealedPassphrase as eg, type SequenceHandle as eh, type SequenceOptions as ei, SequenceStore as ej, type SessionPolicy as ek, type SetPublicEnvelopeInput as el, type ShamirRecoveryDoc as em, type ShamirRecoveryEntry as en, ShardedCollection as eo, ShardedGroupedQuery as ep, ShardedQuery as eq, type ShardingConfig as er, type SkippedVault as es, type SlotRewrapCeremony as et, type SlotRewrapContext as eu, type StandardSchemaV1 as ev, type StandardSchemaV1Issue as ew, type StandardSchemaV1SyncResult as ex, StateManagementVault as ey, type StoreAuth as ez, type I18nTextDescriptor as f, resolveSchema as f$, type UpdateContext as f0, type UpdateUserOptions as f1, UserApi as f2, type UserEnvelopeCheckGate as f3, UserEnvelopeOversizedError as f4, type UserEnvelopePresented as f5, type UserInfo as f6, type VaultBackup as f7, VaultGroup as f8, type VaultGroupOptions as f9, evaluateImportCapability as fA, findAuthenticator as fB, hasExportCapability as fC, hasImportCapability as fD, hasRecoveryEnrolled as fE, isLinkCollectionName as fF, isMagicLinkGrantExpired as fG, isPublicEnvelope as fH, issueDelegation as fI, recoverPassphrase as fJ, rotatePassphrase as fK, listMagicLinkGrants as fL, listUsers as fM, listUsersWithEnvelopes as fN, loadActiveDelegations as fO, loadPaperRecoveryEntries as fP, loadSealedPassphrase as fQ, loadShamirRecoveryEntries as fR, magicLinkGrantRecordId as fS, mintPaperRecoveryEntry as fT, mintShamirRecoveryEntry as fU, mintWrappedDeksBlob as fV, parseRsaOaepTlv as fW, parseSealedEnvelope as fX, readMagicLinkGrantRecord as fY, recoverUser as fZ, removeAuthenticator as f_, type VaultPolicyOnDisk as fa, type VaultRegistryRow as fb, type VaultSchemaSnapshot as fc, type VaultSnapshot as fd, type VaultTemplate as fe, type WarningRules as ff, WeakPassphraseError as fg, type WeakPassphraseReason as fh, type WithArchiveOptions as fi, type WrappedDeksBlob as fj, type WriteConflict as fk, type WriteEvent as fl, type WriteHook as fm, type WriteQueue as fn, aesGcmOpen as fo, assertStrongPassphrase as fp, buildRecipientKeyringFile as fq, burnPaperRecoveryEntry as fr, compileSequenceFormat as fs, createNoydb as ft, createStore as fu, deriveMagicLinkContentKey as fv, enrollAuthenticator as fw, estimateEntropy as fx, evalComputedFields as fy, evaluateExportCapability as fz, type I18nTextOptions as g, resolveSequenceKey as g0, revokeDelegation as g1, revokeMagicLinkGrant as g2, runTransaction as g3, savePaperRecoveryEntries as g4, saveSealedPassphrase as g5, saveShamirRecoveryEntries as g6, sealRsaOaepTlv as g7, unwrapDeksFromBlob as g8, unwrapDeksFromPaperEntry as g9, unwrapDeksFromShamirEntry as ga, unwrapMagicLinkGrant as gb, validatePassphrase as gc, validatePublicEnvelopeInput as gd, validateSchemaInput as ge, validateSchemaOutput as gf, withArchive as gg, withDeferredNumbering as gh, writeMagicLinkGrant as gi, changeSecret as gj, createOwnerKeyring as gk, ensureCollectionDEK as gl, grant as gm, loadKeyring as gn, persistKeyring as go, revoke as gp, updateAuthenticator as gq, updateKeyringIdentity as gr, type TxStrategy as gs, type AmendmentTxOptions as gt, type OnMissingPolicy as h, type StaticDictDescriptor as i, applyI18nLocale as j, dictCollectionName as k, dictKey as l, enforceScript as m, getAtPath as n, i18nText as o, inferScripts as p, isDictCollectionName as q, isDictKeyDescriptor as r, isI18nTextDescriptor as s, isStaticDictDescriptor as t, resolveI18nText as u, resolvePolicy as v, setAtPathInPlace as w, staticDict as x, validateI18nTextValue as y, type SessionStrategy as z };