@noy-db/hub 0.3.0-pre.2 → 0.3.0-pre.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (331) hide show
  1. package/dist/adapter/index.d.ts +2 -2
  2. package/dist/adapter/index.js +1 -1
  3. package/dist/aggregate/index.d.ts +3 -3
  4. package/dist/aggregate/index.js +4 -4
  5. package/dist/api-LORZ2EZU.js +17 -0
  6. package/dist/as/index.d.ts +4 -4
  7. package/dist/as/index.js +9 -6
  8. package/dist/at/index.d.ts +2 -2
  9. package/dist/attestation/index.d.ts +3 -3
  10. package/dist/attestation/index.js +18 -15
  11. package/dist/attestation/index.js.map +1 -1
  12. package/dist/{backup-KMJQ66MF.js → backup-NGRJ46SH.js} +9 -6
  13. package/dist/{backup-KMJQ66MF.js.map → backup-NGRJ46SH.js.map} +1 -1
  14. package/dist/blobs/index.d.ts +4 -4
  15. package/dist/blobs/index.js +8 -5
  16. package/dist/blobs/index.js.map +1 -1
  17. package/dist/bundle/index.d.ts +5 -5
  18. package/dist/bundle/index.js +18 -15
  19. package/dist/bundle/index.js.map +1 -1
  20. package/dist/{bundle-PwBGkhpe.d.ts → bundle-B-P3_Jvb.d.ts} +1 -1
  21. package/dist/by/index.js +2 -2
  22. package/dist/cargo/index.d.ts +4 -4
  23. package/dist/cargo/index.js +20 -17
  24. package/dist/{chunk-Y22T3KQE.js → chunk-2KSPDSWI.js} +3 -3
  25. package/dist/{chunk-ITNUCOXM.js → chunk-2N4MUSF3.js} +7 -5
  26. package/dist/{chunk-ITNUCOXM.js.map → chunk-2N4MUSF3.js.map} +1 -1
  27. package/dist/{chunk-5N6CZTCY.js → chunk-2ZORB5RW.js} +3 -3
  28. package/dist/{chunk-FISN7WE4.js → chunk-3UDPDRUC.js} +4 -4
  29. package/dist/{chunk-TA66UMI4.js → chunk-46YGCU6Z.js} +2 -2
  30. package/dist/{chunk-IPB7FTQX.js → chunk-4DZGZ7II.js} +8 -6
  31. package/dist/{chunk-IPB7FTQX.js.map → chunk-4DZGZ7II.js.map} +1 -1
  32. package/dist/{chunk-SKF73JOP.js → chunk-4NMFWOS2.js} +3 -3
  33. package/dist/{chunk-IAGBDSCS.js → chunk-4NZCZUGL.js} +2 -2
  34. package/dist/{chunk-DFEMTNPJ.js → chunk-55HDKLI3.js} +8 -6
  35. package/dist/{chunk-DFEMTNPJ.js.map → chunk-55HDKLI3.js.map} +1 -1
  36. package/dist/{chunk-WWGT2MDV.js → chunk-5A6TC3RQ.js} +5 -5
  37. package/dist/{chunk-5O3AOPDT.js → chunk-5EZAJEES.js} +151 -432
  38. package/dist/chunk-5EZAJEES.js.map +1 -0
  39. package/dist/{chunk-62QYRORB.js → chunk-5Z3RNFJC.js} +3 -3
  40. package/dist/{chunk-M6OST55S.js → chunk-5ZPWVNL3.js} +2 -2
  41. package/dist/{chunk-PSMV73A5.js → chunk-6CNLU4TO.js} +5 -5
  42. package/dist/{chunk-QZISFCVG.js → chunk-6DP5HBQD.js} +11 -9
  43. package/dist/{chunk-QZISFCVG.js.map → chunk-6DP5HBQD.js.map} +1 -1
  44. package/dist/{chunk-AIWULCUO.js → chunk-6EVZXETK.js} +5 -3
  45. package/dist/{chunk-AIWULCUO.js.map → chunk-6EVZXETK.js.map} +1 -1
  46. package/dist/{chunk-GYGWYIOZ.js → chunk-6I2YPLAG.js} +7 -5
  47. package/dist/{chunk-GYGWYIOZ.js.map → chunk-6I2YPLAG.js.map} +1 -1
  48. package/dist/{chunk-SRB2XEWB.js → chunk-6OQ7NKMZ.js} +6 -4
  49. package/dist/{chunk-SRB2XEWB.js.map → chunk-6OQ7NKMZ.js.map} +1 -1
  50. package/dist/chunk-6RASM2J4.js +25 -0
  51. package/dist/chunk-6RASM2J4.js.map +1 -0
  52. package/dist/{chunk-5LUY7UTV.js → chunk-7IP75FP2.js} +2 -2
  53. package/dist/{chunk-HCIPRAGS.js → chunk-7MHVHGQZ.js} +2 -2
  54. package/dist/{chunk-PSHOXR6C.js → chunk-ADBMJDBW.js} +370 -83
  55. package/dist/chunk-ADBMJDBW.js.map +1 -0
  56. package/dist/{chunk-ZCGAHGUS.js → chunk-AY4P6PHN.js} +2 -2
  57. package/dist/{chunk-ZYUC53LT.js → chunk-BLZRNHMG.js} +51 -2
  58. package/dist/{chunk-ZYUC53LT.js.map → chunk-BLZRNHMG.js.map} +1 -1
  59. package/dist/{chunk-KXGNJJXB.js → chunk-BV7KNFJY.js} +7 -7
  60. package/dist/{chunk-BG3SPSR4.js → chunk-BYW7EU5L.js} +2 -2
  61. package/dist/{chunk-NF5JWERG.js → chunk-BZIWKN74.js} +2 -2
  62. package/dist/chunk-CPAROOKP.js +124 -0
  63. package/dist/chunk-CPAROOKP.js.map +1 -0
  64. package/dist/{chunk-AQTBSL7R.js → chunk-CVXLJIAV.js} +5 -5
  65. package/dist/{chunk-CWPPNPOH.js → chunk-DA34OEZU.js} +2 -2
  66. package/dist/{chunk-RUEKROOS.js → chunk-DGUR3CC4.js} +2 -2
  67. package/dist/{chunk-LXQT4WMP.js → chunk-DHIN36UC.js} +8 -6
  68. package/dist/{chunk-LXQT4WMP.js.map → chunk-DHIN36UC.js.map} +1 -1
  69. package/dist/{chunk-JNUWZ6D3.js → chunk-E4YJUNPU.js} +7 -5
  70. package/dist/{chunk-JNUWZ6D3.js.map → chunk-E4YJUNPU.js.map} +1 -1
  71. package/dist/{chunk-UV5MFVO3.js → chunk-FELHYKIO.js} +2 -2
  72. package/dist/{chunk-KVOXU4T5.js → chunk-HGQG3VIP.js} +2 -2
  73. package/dist/{chunk-XXYIOFUB.js → chunk-IIK7W3AN.js} +5 -5
  74. package/dist/{chunk-IGUYVGGI.js → chunk-IJW6K6UX.js} +3 -3
  75. package/dist/{chunk-76722EBH.js → chunk-IWVWB7BZ.js} +11 -9
  76. package/dist/{chunk-76722EBH.js.map → chunk-IWVWB7BZ.js.map} +1 -1
  77. package/dist/{chunk-QHJW5EXU.js → chunk-JFYIHLU3.js} +2 -2
  78. package/dist/chunk-L4IRFTIF.js +424 -0
  79. package/dist/chunk-L4IRFTIF.js.map +1 -0
  80. package/dist/{chunk-SM3AVUHC.js → chunk-LES2Z7B4.js} +2 -2
  81. package/dist/{chunk-IUEN57TV.js → chunk-LHYQE3BP.js} +4 -4
  82. package/dist/{chunk-V7RWQRG7.js → chunk-LKBLAUOB.js} +3 -3
  83. package/dist/{chunk-UDRIWL7A.js → chunk-MCJAUQGE.js} +3 -3
  84. package/dist/chunk-MIOLJG2R.js +105 -0
  85. package/dist/chunk-MIOLJG2R.js.map +1 -0
  86. package/dist/{chunk-UIU2THRG.js → chunk-N2FP26NH.js} +5 -5
  87. package/dist/{chunk-DGDI2D4M.js → chunk-NIA5VQ7G.js} +8 -6
  88. package/dist/{chunk-DGDI2D4M.js.map → chunk-NIA5VQ7G.js.map} +1 -1
  89. package/dist/{chunk-CMGR4ZEW.js → chunk-NMRKAGHE.js} +2 -2
  90. package/dist/{chunk-LV7M27WM.js → chunk-NPVICKZE.js} +4 -4
  91. package/dist/chunk-NTHKOFVL.js +195 -0
  92. package/dist/chunk-NTHKOFVL.js.map +1 -0
  93. package/dist/{chunk-IO6GRPT6.js → chunk-O5DNEXQC.js} +2 -2
  94. package/dist/{chunk-5TDJ56JE.js → chunk-OCDUQUAP.js} +1 -1
  95. package/dist/chunk-OCDUQUAP.js.map +1 -0
  96. package/dist/{chunk-UPJNJGGA.js → chunk-OVIVYAQL.js} +10 -8
  97. package/dist/{chunk-UPJNJGGA.js.map → chunk-OVIVYAQL.js.map} +1 -1
  98. package/dist/{chunk-I2NOIW44.js → chunk-P6DN5QU7.js} +8 -6
  99. package/dist/{chunk-I2NOIW44.js.map → chunk-P6DN5QU7.js.map} +1 -1
  100. package/dist/{chunk-Q7SS3IME.js → chunk-P6UXDALK.js} +3 -3
  101. package/dist/{chunk-UAG5KWVA.js → chunk-PJDK2PPQ.js} +3 -3
  102. package/dist/{chunk-AXRXJTE2.js → chunk-PUNJAEY6.js} +5 -5
  103. package/dist/{chunk-LFLXAY2W.js → chunk-PYWW4KLO.js} +9 -7
  104. package/dist/{chunk-LFLXAY2W.js.map → chunk-PYWW4KLO.js.map} +1 -1
  105. package/dist/{chunk-M2YKN37S.js → chunk-QLQS5A7X.js} +2 -2
  106. package/dist/{chunk-I3TIKTJO.js → chunk-TICO2I2O.js} +2 -2
  107. package/dist/{chunk-3YFXJ3ZP.js → chunk-U5DWHU3S.js} +2 -2
  108. package/dist/{chunk-26LGBE4T.js → chunk-U6OM4E67.js} +6 -4
  109. package/dist/{chunk-26LGBE4T.js.map → chunk-U6OM4E67.js.map} +1 -1
  110. package/dist/{chunk-TEILUWOI.js → chunk-UP6EMMDI.js} +10 -10
  111. package/dist/{chunk-SMXWYP24.js → chunk-VBYVKOMJ.js} +3 -3
  112. package/dist/{chunk-AZAOEIKW.js → chunk-VHEEU4ZO.js} +2 -2
  113. package/dist/{chunk-MD3Y6J3L.js → chunk-WVIIJPTJ.js} +7 -5
  114. package/dist/{chunk-MD3Y6J3L.js.map → chunk-WVIIJPTJ.js.map} +1 -1
  115. package/dist/{chunk-EIZUR2XW.js → chunk-XRE4JOEO.js} +2 -2
  116. package/dist/{chunk-VFQGRQIH.js → chunk-YDP2SA5K.js} +7 -5
  117. package/dist/{chunk-VFQGRQIH.js.map → chunk-YDP2SA5K.js.map} +1 -1
  118. package/dist/{chunk-5R3ERCDH.js → chunk-YN66UOXT.js} +3 -3
  119. package/dist/{chunk-IELYAOGG.js → chunk-YTIAXSUE.js} +4 -4
  120. package/dist/{chunk-TJYQIGAP.js → chunk-Z44OY24N.js} +3 -3
  121. package/dist/{chunk-VCTFO5CO.js → chunk-ZAWD6O46.js} +2 -2
  122. package/dist/{chunk-PKHL44ER.js → chunk-ZD4D7UM6.js} +2 -2
  123. package/dist/{chunk-MTMJVJ5W.js → chunk-ZFME46HJ.js} +5 -3
  124. package/dist/chunk-ZFME46HJ.js.map +1 -0
  125. package/dist/{chunk-LMTH2RM6.js → chunk-ZNI3RTFV.js} +2 -2
  126. package/dist/{chunk-WYSO2NIH.js → chunk-ZRDYQZYH.js} +2 -2
  127. package/dist/classified/index.d.ts +17 -0
  128. package/dist/classified/index.js +38 -0
  129. package/dist/collection-facade-XPVRHBGU.js +36 -0
  130. package/dist/consent/index.d.ts +3 -3
  131. package/dist/consent/index.js +7 -4
  132. package/dist/consent/index.js.map +1 -1
  133. package/dist/crdt/index.d.ts +3 -3
  134. package/dist/delegation-4HUHUE6T.js +22 -0
  135. package/dist/derivations/index.d.ts +4 -4
  136. package/dist/derivations/index.js +9 -6
  137. package/dist/describe/index.d.ts +1 -1
  138. package/dist/{describe-Ccd1hS7a.d.ts → describe-0tiXAjoO.d.ts} +10 -0
  139. package/dist/{dev-unlock-h0K-UZTk.d.ts → dev-unlock-B_s9DUWa.d.ts} +1 -1
  140. package/dist/{enclave-UL5LW66V.js → enclave-IS7HZSQ7.js} +34 -18
  141. package/dist/executor-ANFBCOYA.js +9 -0
  142. package/dist/executor-IKT47SH2.js +9 -0
  143. package/dist/executor-OIECZXTV.js +18 -0
  144. package/dist/export-accessible-NZWCFZHL.js +20 -0
  145. package/dist/extract-partition-52LX6RQH.js +33 -0
  146. package/dist/{fanout-sidecar-GF3DJ6KR.js → fanout-sidecar-DDKRG2MX.js} +14 -14
  147. package/dist/fanout-sidecar-DDKRG2MX.js.map +1 -0
  148. package/dist/forget/index.js +7 -4
  149. package/dist/forget/index.js.map +1 -1
  150. package/dist/guards/index.d.ts +4 -4
  151. package/dist/guards/index.js +3 -3
  152. package/dist/{hash-CdSr06sm.d.ts → hash-CWxn7sf6.d.ts} +7 -2
  153. package/dist/history/index.d.ts +4 -4
  154. package/dist/history/index.js +9 -6
  155. package/dist/history/index.js.map +1 -1
  156. package/dist/i18n/index.d.ts +3 -3
  157. package/dist/i18n/index.js +11 -8
  158. package/dist/i18n/index.js.map +1 -1
  159. package/dist/in/index.d.ts +2 -2
  160. package/dist/{index-_6At2_9_.d.ts → index-D05bV0_g.d.ts} +245 -5
  161. package/dist/{index-CGLLRtFc.d.ts → index-DTMUUwwW.d.ts} +3 -3
  162. package/dist/index.d.ts +30 -14
  163. package/dist/index.js +136 -75
  164. package/dist/index.js.map +1 -1
  165. package/dist/indexing/index.d.ts +3 -3
  166. package/dist/indexing/index.js +4 -4
  167. package/dist/issue-F4SYPJGJ.js +16 -0
  168. package/dist/kernel/index.d.ts +3 -3
  169. package/dist/kernel/index.js +10 -7
  170. package/dist/{ledger-RYI35CDS.js → ledger-YUAJUNFP.js} +9 -6
  171. package/dist/liberate-6LDETRIW.js +21 -0
  172. package/dist/materialized-views/index.d.ts +4 -4
  173. package/dist/materialized-views/index.js +13 -10
  174. package/dist/{mime-magic-B4RoFj3B.d.ts → mime-magic-Qr_4HjP6.d.ts} +1 -1
  175. package/dist/noydb-WQNBVJIG.js +54 -0
  176. package/dist/on/index.d.ts +2 -2
  177. package/dist/on/index.js +7 -4
  178. package/dist/overlay-views/index.d.ts +4 -4
  179. package/dist/overlay-views/index.js +4 -4
  180. package/dist/periods/index.d.ts +3 -3
  181. package/dist/periods/index.js +10 -7
  182. package/dist/pod/index.d.ts +3 -3
  183. package/dist/pod/index.js +9 -6
  184. package/dist/{policy-IXK4FVXP.js → policy-LRE6HTO5.js} +5 -5
  185. package/dist/portability/index.d.ts +3 -3
  186. package/dist/portability/index.js +8 -8
  187. package/dist/{public-envelope-JHDQCPSX.js → public-envelope-WVRRUVAJ.js} +4 -4
  188. package/dist/query/index.d.ts +2 -2
  189. package/dist/query/index.js +6 -6
  190. package/dist/registry-6HZ2JSQ7.js +14 -0
  191. package/dist/registry-GPXZQ7DT.js +9 -0
  192. package/dist/registry-USYD2ECC.js +16 -0
  193. package/dist/request-withdrawal-54V4L6CR.js +28 -0
  194. package/dist/reveal-WSUHXCSS.js +37 -0
  195. package/dist/reveal-WSUHXCSS.js.map +1 -0
  196. package/dist/revoke-JV26NTQD.js +21 -0
  197. package/dist/sealed-record/index.d.ts +3 -3
  198. package/dist/sealed-record/index.js +10 -7
  199. package/dist/sealed-record/index.js.map +1 -1
  200. package/dist/session/index.d.ts +4 -4
  201. package/dist/session/index.js +7 -4
  202. package/dist/session/index.js.map +1 -1
  203. package/dist/shadow/index.d.ts +3 -3
  204. package/dist/shadow/index.js +2 -2
  205. package/dist/{signer-PNKTBVF7.js → signer-AE56T5HE.js} +8 -5
  206. package/dist/snapshots/index.d.ts +3 -3
  207. package/dist/snapshots/index.js +8 -5
  208. package/dist/snapshots/index.js.map +1 -1
  209. package/dist/{stale-3JWHNDIY.js → stale-LX4BR43V.js} +2 -2
  210. package/dist/{store-coordination-provider-3I7XWZZK.js → store-coordination-provider-KTRIC6PR.js} +3 -3
  211. package/dist/sync/index.d.ts +2 -2
  212. package/dist/sync/index.js +7 -4
  213. package/dist/sync/index.js.map +1 -1
  214. package/dist/team/index.d.ts +3 -3
  215. package/dist/team/index.js +13 -10
  216. package/dist/tiers/index.d.ts +2 -2
  217. package/dist/tiers/index.js +8 -5
  218. package/dist/to/index.d.ts +2 -2
  219. package/dist/to/index.js +1 -1
  220. package/dist/{transition-guard-DqodPNKw.d.ts → transition-guard-C1Pyz8nH.d.ts} +1 -1
  221. package/dist/tx/index.d.ts +3 -3
  222. package/dist/tx/index.js +3 -3
  223. package/dist/ui/index.d.ts +1 -1
  224. package/dist/util/index.js +1 -1
  225. package/dist/validators-Dzn7T-3x.d.ts +62 -0
  226. package/dist/{vault-diff-BtpiBvic.d.ts → vault-diff-Fn0WeY2w.d.ts} +1 -1
  227. package/dist/verify-SW6J63Q2.js +135 -0
  228. package/dist/verify-SW6J63Q2.js.map +1 -0
  229. package/dist/with/index.d.ts +3 -3
  230. package/dist/with/index.js +9 -6
  231. package/dist/{with-materialized-view-DMmWtYfJ.d.ts → with-materialized-view-NKxs6iK5.d.ts} +1 -1
  232. package/dist/{with-overlayed-view-D_IB2nkM.d.ts → with-overlayed-view-B4fPYHwV.d.ts} +1 -1
  233. package/dist/{with-rollup-em2wxoHP.d.ts → with-rollup-Bl0sRFEt.d.ts} +1 -1
  234. package/dist/withdraw-accessible-DGA4V2TP.js +25 -0
  235. package/dist/withdraw-accessible-DGA4V2TP.js.map +1 -0
  236. package/package.json +7 -3
  237. package/dist/api-RW3KP7WU.js +0 -14
  238. package/dist/chunk-5O3AOPDT.js.map +0 -1
  239. package/dist/chunk-5TDJ56JE.js.map +0 -1
  240. package/dist/chunk-MTMJVJ5W.js.map +0 -1
  241. package/dist/chunk-PSHOXR6C.js.map +0 -1
  242. package/dist/collection-facade-GQAOGJP2.js +0 -33
  243. package/dist/delegation-UL5HKLER.js +0 -19
  244. package/dist/executor-2FWQRLMG.js +0 -15
  245. package/dist/executor-QZ7BXICW.js +0 -9
  246. package/dist/executor-Z5ZLJVTV.js +0 -9
  247. package/dist/export-accessible-KRV5W4GH.js +0 -17
  248. package/dist/extract-partition-GLKBOXFQ.js +0 -30
  249. package/dist/fanout-sidecar-GF3DJ6KR.js.map +0 -1
  250. package/dist/issue-Y6UVIR43.js +0 -13
  251. package/dist/liberate-CRPZEV7O.js +0 -18
  252. package/dist/noydb-LDEBLNHY.js +0 -50
  253. package/dist/registry-45RJNWGU.js +0 -9
  254. package/dist/registry-5GRV5VXI.js +0 -13
  255. package/dist/registry-WEUCHBO4.js +0 -11
  256. package/dist/request-withdrawal-GBPH2FDY.js +0 -25
  257. package/dist/revoke-TUFRGI6S.js +0 -18
  258. package/dist/withdraw-accessible-FFS46EOD.js +0 -22
  259. /package/dist/{api-RW3KP7WU.js.map → api-LORZ2EZU.js.map} +0 -0
  260. /package/dist/{chunk-Y22T3KQE.js.map → chunk-2KSPDSWI.js.map} +0 -0
  261. /package/dist/{chunk-5N6CZTCY.js.map → chunk-2ZORB5RW.js.map} +0 -0
  262. /package/dist/{chunk-FISN7WE4.js.map → chunk-3UDPDRUC.js.map} +0 -0
  263. /package/dist/{chunk-TA66UMI4.js.map → chunk-46YGCU6Z.js.map} +0 -0
  264. /package/dist/{chunk-SKF73JOP.js.map → chunk-4NMFWOS2.js.map} +0 -0
  265. /package/dist/{chunk-IAGBDSCS.js.map → chunk-4NZCZUGL.js.map} +0 -0
  266. /package/dist/{chunk-WWGT2MDV.js.map → chunk-5A6TC3RQ.js.map} +0 -0
  267. /package/dist/{chunk-62QYRORB.js.map → chunk-5Z3RNFJC.js.map} +0 -0
  268. /package/dist/{chunk-M6OST55S.js.map → chunk-5ZPWVNL3.js.map} +0 -0
  269. /package/dist/{chunk-PSMV73A5.js.map → chunk-6CNLU4TO.js.map} +0 -0
  270. /package/dist/{chunk-5LUY7UTV.js.map → chunk-7IP75FP2.js.map} +0 -0
  271. /package/dist/{chunk-HCIPRAGS.js.map → chunk-7MHVHGQZ.js.map} +0 -0
  272. /package/dist/{chunk-ZCGAHGUS.js.map → chunk-AY4P6PHN.js.map} +0 -0
  273. /package/dist/{chunk-KXGNJJXB.js.map → chunk-BV7KNFJY.js.map} +0 -0
  274. /package/dist/{chunk-BG3SPSR4.js.map → chunk-BYW7EU5L.js.map} +0 -0
  275. /package/dist/{chunk-NF5JWERG.js.map → chunk-BZIWKN74.js.map} +0 -0
  276. /package/dist/{chunk-AQTBSL7R.js.map → chunk-CVXLJIAV.js.map} +0 -0
  277. /package/dist/{chunk-CWPPNPOH.js.map → chunk-DA34OEZU.js.map} +0 -0
  278. /package/dist/{chunk-RUEKROOS.js.map → chunk-DGUR3CC4.js.map} +0 -0
  279. /package/dist/{chunk-UV5MFVO3.js.map → chunk-FELHYKIO.js.map} +0 -0
  280. /package/dist/{chunk-KVOXU4T5.js.map → chunk-HGQG3VIP.js.map} +0 -0
  281. /package/dist/{chunk-XXYIOFUB.js.map → chunk-IIK7W3AN.js.map} +0 -0
  282. /package/dist/{chunk-IGUYVGGI.js.map → chunk-IJW6K6UX.js.map} +0 -0
  283. /package/dist/{chunk-QHJW5EXU.js.map → chunk-JFYIHLU3.js.map} +0 -0
  284. /package/dist/{chunk-SM3AVUHC.js.map → chunk-LES2Z7B4.js.map} +0 -0
  285. /package/dist/{chunk-IUEN57TV.js.map → chunk-LHYQE3BP.js.map} +0 -0
  286. /package/dist/{chunk-V7RWQRG7.js.map → chunk-LKBLAUOB.js.map} +0 -0
  287. /package/dist/{chunk-UDRIWL7A.js.map → chunk-MCJAUQGE.js.map} +0 -0
  288. /package/dist/{chunk-UIU2THRG.js.map → chunk-N2FP26NH.js.map} +0 -0
  289. /package/dist/{chunk-CMGR4ZEW.js.map → chunk-NMRKAGHE.js.map} +0 -0
  290. /package/dist/{chunk-LV7M27WM.js.map → chunk-NPVICKZE.js.map} +0 -0
  291. /package/dist/{chunk-IO6GRPT6.js.map → chunk-O5DNEXQC.js.map} +0 -0
  292. /package/dist/{chunk-Q7SS3IME.js.map → chunk-P6UXDALK.js.map} +0 -0
  293. /package/dist/{chunk-UAG5KWVA.js.map → chunk-PJDK2PPQ.js.map} +0 -0
  294. /package/dist/{chunk-AXRXJTE2.js.map → chunk-PUNJAEY6.js.map} +0 -0
  295. /package/dist/{chunk-M2YKN37S.js.map → chunk-QLQS5A7X.js.map} +0 -0
  296. /package/dist/{chunk-I3TIKTJO.js.map → chunk-TICO2I2O.js.map} +0 -0
  297. /package/dist/{chunk-3YFXJ3ZP.js.map → chunk-U5DWHU3S.js.map} +0 -0
  298. /package/dist/{chunk-TEILUWOI.js.map → chunk-UP6EMMDI.js.map} +0 -0
  299. /package/dist/{chunk-SMXWYP24.js.map → chunk-VBYVKOMJ.js.map} +0 -0
  300. /package/dist/{chunk-AZAOEIKW.js.map → chunk-VHEEU4ZO.js.map} +0 -0
  301. /package/dist/{chunk-EIZUR2XW.js.map → chunk-XRE4JOEO.js.map} +0 -0
  302. /package/dist/{chunk-5R3ERCDH.js.map → chunk-YN66UOXT.js.map} +0 -0
  303. /package/dist/{chunk-IELYAOGG.js.map → chunk-YTIAXSUE.js.map} +0 -0
  304. /package/dist/{chunk-TJYQIGAP.js.map → chunk-Z44OY24N.js.map} +0 -0
  305. /package/dist/{chunk-VCTFO5CO.js.map → chunk-ZAWD6O46.js.map} +0 -0
  306. /package/dist/{chunk-PKHL44ER.js.map → chunk-ZD4D7UM6.js.map} +0 -0
  307. /package/dist/{chunk-LMTH2RM6.js.map → chunk-ZNI3RTFV.js.map} +0 -0
  308. /package/dist/{chunk-WYSO2NIH.js.map → chunk-ZRDYQZYH.js.map} +0 -0
  309. /package/dist/{collection-facade-GQAOGJP2.js.map → classified/index.js.map} +0 -0
  310. /package/dist/{delegation-UL5HKLER.js.map → collection-facade-XPVRHBGU.js.map} +0 -0
  311. /package/dist/{enclave-UL5LW66V.js.map → delegation-4HUHUE6T.js.map} +0 -0
  312. /package/dist/{executor-2FWQRLMG.js.map → enclave-IS7HZSQ7.js.map} +0 -0
  313. /package/dist/{executor-QZ7BXICW.js.map → executor-ANFBCOYA.js.map} +0 -0
  314. /package/dist/{executor-Z5ZLJVTV.js.map → executor-IKT47SH2.js.map} +0 -0
  315. /package/dist/{export-accessible-KRV5W4GH.js.map → executor-OIECZXTV.js.map} +0 -0
  316. /package/dist/{extract-partition-GLKBOXFQ.js.map → export-accessible-NZWCFZHL.js.map} +0 -0
  317. /package/dist/{issue-Y6UVIR43.js.map → extract-partition-52LX6RQH.js.map} +0 -0
  318. /package/dist/{ledger-RYI35CDS.js.map → issue-F4SYPJGJ.js.map} +0 -0
  319. /package/dist/{liberate-CRPZEV7O.js.map → ledger-YUAJUNFP.js.map} +0 -0
  320. /package/dist/{noydb-LDEBLNHY.js.map → liberate-6LDETRIW.js.map} +0 -0
  321. /package/dist/{policy-IXK4FVXP.js.map → noydb-WQNBVJIG.js.map} +0 -0
  322. /package/dist/{public-envelope-JHDQCPSX.js.map → policy-LRE6HTO5.js.map} +0 -0
  323. /package/dist/{registry-45RJNWGU.js.map → public-envelope-WVRRUVAJ.js.map} +0 -0
  324. /package/dist/{registry-5GRV5VXI.js.map → registry-6HZ2JSQ7.js.map} +0 -0
  325. /package/dist/{registry-WEUCHBO4.js.map → registry-GPXZQ7DT.js.map} +0 -0
  326. /package/dist/{request-withdrawal-GBPH2FDY.js.map → registry-USYD2ECC.js.map} +0 -0
  327. /package/dist/{revoke-TUFRGI6S.js.map → request-withdrawal-54V4L6CR.js.map} +0 -0
  328. /package/dist/{signer-PNKTBVF7.js.map → revoke-JV26NTQD.js.map} +0 -0
  329. /package/dist/{stale-3JWHNDIY.js.map → signer-AE56T5HE.js.map} +0 -0
  330. /package/dist/{withdraw-accessible-FFS46EOD.js.map → stale-LX4BR43V.js.map} +0 -0
  331. /package/dist/{store-coordination-provider-3I7XWZZK.js.map → store-coordination-provider-KTRIC6PR.js.map} +0 -0
@@ -1,22 +1,22 @@
1
1
  import {
2
2
  loadVaultPolicy
3
- } from "./chunk-SM3AVUHC.js";
3
+ } from "./chunk-LES2Z7B4.js";
4
4
  import {
5
5
  NO_SEQUENCE,
6
6
  SEQUENCE_COLLECTION,
7
7
  compileSequenceFormat,
8
8
  resolveSequenceKey
9
- } from "./chunk-GYGWYIOZ.js";
9
+ } from "./chunk-6I2YPLAG.js";
10
10
  import {
11
11
  loadFence
12
- } from "./chunk-IAGBDSCS.js";
12
+ } from "./chunk-4NZCZUGL.js";
13
13
  import {
14
14
  InvertedIndex,
15
15
  MemoryIndexStore,
16
16
  NO_SEARCH,
17
17
  VectorSet,
18
18
  buildPersistedIndexCallbacks
19
- } from "./chunk-TEILUWOI.js";
19
+ } from "./chunk-UP6EMMDI.js";
20
20
  import {
21
21
  ServiceBus,
22
22
  WriteHookRegistry,
@@ -24,57 +24,62 @@ import {
24
24
  assertCanImport,
25
25
  canExport,
26
26
  canImport
27
- } from "./chunk-5R3ERCDH.js";
27
+ } from "./chunk-YN66UOXT.js";
28
28
  import {
29
29
  NO_ATTESTATION
30
- } from "./chunk-WYSO2NIH.js";
30
+ } from "./chunk-ZRDYQZYH.js";
31
+ import {
32
+ NO_CLASSIFIED,
33
+ enforceClassifiedWrite,
34
+ resolveClassifiedFields
35
+ } from "./chunk-MIOLJG2R.js";
31
36
  import {
32
37
  NO_TIERS,
33
38
  classifySealedShred
34
- } from "./chunk-IPB7FTQX.js";
39
+ } from "./chunk-4DZGZ7II.js";
35
40
  import {
36
41
  NO_PORTABILITY
37
- } from "./chunk-KVOXU4T5.js";
42
+ } from "./chunk-HGQG3VIP.js";
38
43
  import {
39
44
  CustodyApi,
40
45
  NO_CARGO,
41
46
  NO_CUSTODY
42
- } from "./chunk-TJYQIGAP.js";
47
+ } from "./chunk-Z44OY24N.js";
43
48
  import {
44
49
  runDrainBarrier
45
- } from "./chunk-QHJW5EXU.js";
50
+ } from "./chunk-JFYIHLU3.js";
46
51
  import {
47
52
  TxContext,
48
53
  revertExecuted
49
- } from "./chunk-SKF73JOP.js";
54
+ } from "./chunk-4NMFWOS2.js";
50
55
  import {
51
56
  OverlayedCollection
52
- } from "./chunk-CMGR4ZEW.js";
57
+ } from "./chunk-NMRKAGHE.js";
53
58
  import {
54
59
  EXPORT_AUDIT_COLLECTION,
55
60
  createExportBlobsHandle,
56
61
  runCompaction
57
- } from "./chunk-Y22T3KQE.js";
62
+ } from "./chunk-2KSPDSWI.js";
58
63
  import {
59
64
  LazyQuery,
60
65
  decodeIdxId,
61
66
  encodeIdxId
62
- } from "./chunk-V7RWQRG7.js";
67
+ } from "./chunk-LKBLAUOB.js";
63
68
  import {
64
69
  loadPersistedSchema,
65
70
  savePersistedSchema
66
- } from "./chunk-26LGBE4T.js";
71
+ } from "./chunk-U6OM4E67.js";
67
72
  import {
68
73
  resolveManagedSecret,
69
74
  saveSealedPassphrase
70
- } from "./chunk-ZCGAHGUS.js";
75
+ } from "./chunk-AY4P6PHN.js";
71
76
  import {
72
77
  PERIODS_COLLECTION
73
- } from "./chunk-IELYAOGG.js";
78
+ } from "./chunk-YTIAXSUE.js";
74
79
  import {
75
80
  isDictCollectionName,
76
81
  isStaticDictDescriptor
77
- } from "./chunk-LFLXAY2W.js";
82
+ } from "./chunk-PYWW4KLO.js";
78
83
  import {
79
84
  enrollAuthenticator,
80
85
  findAuthenticator,
@@ -84,7 +89,7 @@ import {
84
89
  rotatePassphrase,
85
90
  updateAuthenticator,
86
91
  writeMagicLinkGrant
87
- } from "./chunk-UPJNJGGA.js";
92
+ } from "./chunk-OVIVYAQL.js";
88
93
  import {
89
94
  hasRecoveryEnrolled,
90
95
  hasStrongRecoveryEnrolled,
@@ -94,7 +99,7 @@ import {
94
99
  mintShamirRecoveryEntry,
95
100
  savePaperRecoveryEntries,
96
101
  saveShamirRecoveryEntries
97
- } from "./chunk-IGUYVGGI.js";
102
+ } from "./chunk-IJW6K6UX.js";
98
103
  import {
99
104
  INDEXED_STORE_POLICY
100
105
  } from "./chunk-VQNJ7UZL.js";
@@ -112,17 +117,17 @@ import {
112
117
  revoke,
113
118
  rotateKeys,
114
119
  updateKeyringIdentity
115
- } from "./chunk-WWGT2MDV.js";
120
+ } from "./chunk-5A6TC3RQ.js";
116
121
  import {
117
122
  persistDirectoryConfig,
118
123
  readDirectoryConfig
119
- } from "./chunk-ITNUCOXM.js";
124
+ } from "./chunk-2N4MUSF3.js";
120
125
  import {
121
126
  generateULID
122
127
  } from "./chunk-ZJADGNYF.js";
123
128
  import {
124
129
  sha256Hex as sha256Hex2
125
- } from "./chunk-AIWULCUO.js";
130
+ } from "./chunk-6EVZXETK.js";
126
131
  import {
127
132
  NO_FORGET,
128
133
  addSubjectRef,
@@ -131,27 +136,31 @@ import {
131
136
  readDottedPath,
132
137
  rebuildSubjectIndex,
133
138
  removeSubjectRef
134
- } from "./chunk-SRB2XEWB.js";
139
+ } from "./chunk-6OQ7NKMZ.js";
135
140
  import {
136
141
  NO_SEALED_RECORD
137
- } from "./chunk-UV5MFVO3.js";
142
+ } from "./chunk-FELHYKIO.js";
138
143
  import {
139
144
  RecordCodec,
140
145
  SEALED_CEK_NS,
141
- buildTombstone,
142
- encrypt,
143
146
  findByDet,
144
147
  hasPerRecordKey,
145
- isTombstone,
146
148
  openEnvelopeJson,
147
149
  queryByDet,
148
150
  resolveStableCek,
149
- sha256Hex,
150
151
  validateSchemaInput
151
- } from "./chunk-5O3AOPDT.js";
152
+ } from "./chunk-5EZAJEES.js";
153
+ import {
154
+ buildTombstone,
155
+ isTombstone
156
+ } from "./chunk-6RASM2J4.js";
157
+ import {
158
+ encrypt,
159
+ sha256Hex
160
+ } from "./chunk-L4IRFTIF.js";
152
161
  import {
153
162
  NOYDB_FORMAT_VERSION
154
- } from "./chunk-5TDJ56JE.js";
163
+ } from "./chunk-OCDUQUAP.js";
155
164
  import {
156
165
  NO_AGGREGATE,
157
166
  Query,
@@ -161,22 +170,25 @@ import {
161
170
  decodeMoneyFields,
162
171
  quantizeMoneyFields,
163
172
  validateMoneyFieldPaths
164
- } from "./chunk-UIU2THRG.js";
173
+ } from "./chunk-N2FP26NH.js";
165
174
  import {
166
175
  canonicalGroupKey
167
- } from "./chunk-LV7M27WM.js";
176
+ } from "./chunk-NPVICKZE.js";
168
177
  import {
169
178
  readPath
170
- } from "./chunk-M2YKN37S.js";
179
+ } from "./chunk-QLQS5A7X.js";
171
180
  import {
172
181
  getAtPath,
173
182
  resolvePolicy,
174
183
  setAtPathInPlace,
175
184
  stripI18nFilled
176
- } from "./chunk-5LUY7UTV.js";
185
+ } from "./chunk-7IP75FP2.js";
177
186
  import {
178
187
  AlreadyElevatedError,
179
188
  AttestationError,
189
+ ClassifiedConfigError,
190
+ ClassifiedRevealError,
191
+ ClassifiedVerifyError,
180
192
  ConflictError,
181
193
  DebugPlaintextError,
182
194
  DerivationCapExceededError,
@@ -207,14 +219,66 @@ import {
207
219
  UnknownDictCodeError,
208
220
  UnsupportedIndexOptionError,
209
221
  ValidationError
210
- } from "./chunk-ZYUC53LT.js";
222
+ } from "./chunk-BLZRNHMG.js";
211
223
 
212
224
  // src/port/by/default-provider.ts
213
225
  async function createDefaultCoordinationProvider(store) {
214
- const { StoreCoordinationProvider } = await import("./store-coordination-provider-3I7XWZZK.js");
226
+ const { StoreCoordinationProvider } = await import("./store-coordination-provider-KTRIC6PR.js");
215
227
  return new StoreCoordinationProvider(store);
216
228
  }
217
229
 
230
+ // src/with-shape/classified/guards.ts
231
+ function guardClassifiedCompat(collection, byField, ctx) {
232
+ const digestOnly = Object.entries(byField).filter(([, s]) => s.storage === "digest-only");
233
+ const protectedForms = Object.values(byField).filter((s) => s.storage === "digest-only" || s.storage === "recoverable");
234
+ if (protectedForms.length > 0 && (ctx.crdt || ctx.hasConflictPolicy)) {
235
+ throw new ClassifiedConfigError(
236
+ collection,
237
+ "digest-only/recoverable classified fields cannot combine with a crdt mode or a conflictPolicy resolver \u2014 merge paths bypass write enforcement (R2)"
238
+ );
239
+ }
240
+ if (digestOnly.length === 0) return;
241
+ if (!ctx.storeCiphertext) {
242
+ throw new ClassifiedConfigError(
243
+ collection,
244
+ `storage:'digest-only' requires an encrypted collection \u2014 with encrypt: false the write path skips the digest slot entirely and the secret would persist as raw plaintext`
245
+ );
246
+ }
247
+ if (!ctx.perRecordKeys) {
248
+ throw new ClassifiedConfigError(
249
+ collection,
250
+ `storage:'digest-only' requires perRecordKeys: true \u2014 vdig keys derive from the per-record CEK so forget() shreds them (R1)`
251
+ );
252
+ }
253
+ for (const [f, spec] of digestOnly) {
254
+ const n = spec.notLastN ?? 0;
255
+ if (!Number.isInteger(n) || n < 0 || n > 8) {
256
+ throw new ClassifiedConfigError(
257
+ collection,
258
+ `digest-only field "${f}" declares notLastN ${n} \u2014 must be an integer 0..8 (write cost is n \xD7 600K PBKDF2; ring blast radius is documented)`
259
+ );
260
+ }
261
+ if (ctx.bareSensitiveFields.has(f)) {
262
+ throw new ClassifiedConfigError(
263
+ collection,
264
+ `field "${f}" is digest-only AND listed in sensitive[] \u2014 storage forms are mutually exclusive per field (R5)`
265
+ );
266
+ }
267
+ if (ctx.deterministicFields?.has(f)) {
268
+ throw new ClassifiedConfigError(
269
+ collection,
270
+ `digest-only field "${f}" cannot be deterministic \u2014 equality-correlatable ciphertext defeats per-write salts (R3)`
271
+ );
272
+ }
273
+ if (ctx.indexedFields.has(f) || ctx.textIndexFields.has(f) || ctx.vectorSourceFields.has(f) || ctx.subjectKeyField === f) {
274
+ throw new ClassifiedConfigError(
275
+ collection,
276
+ `digest-only field "${f}" cannot be indexed, text-indexed, embedded, or a forget-subject key (R4)`
277
+ );
278
+ }
279
+ }
280
+ }
281
+
218
282
  // src/with-formula/computed/index.ts
219
283
  var ComputedFieldError = class extends NoydbError {
220
284
  constructor(field, id, cause) {
@@ -985,7 +1049,7 @@ function deriveWidget(opts) {
985
1049
  return "text";
986
1050
  }
987
1051
  function buildDescription(input) {
988
- const { collection, fieldMeta, moneyFields, dictKeyFields, computed, refs, zodFields, dictLabels, meta, i18nFields } = input;
1052
+ const { collection, fieldMeta, moneyFields, dictKeyFields, computed, refs, zodFields, dictLabels, meta, i18nFields, classified } = input;
989
1053
  if (zodFields !== void 0 && Object.keys(zodFields).length > 0 && fieldMeta !== void 0) {
990
1054
  const knownFields = /* @__PURE__ */ new Set([
991
1055
  ...Object.keys(moneyFields ?? {}),
@@ -1004,7 +1068,8 @@ function buildDescription(input) {
1004
1068
  ...Object.keys(computed ?? {}),
1005
1069
  ...Object.keys(fieldMeta ?? {}),
1006
1070
  ...Object.keys(zodFields ?? {}),
1007
- ...Object.keys(i18nFields ?? {})
1071
+ ...Object.keys(i18nFields ?? {}),
1072
+ ...Object.keys(classified ?? {})
1008
1073
  ]);
1009
1074
  const fields = [];
1010
1075
  for (const key of [...allKeys].sort()) {
@@ -1014,6 +1079,7 @@ function buildDescription(input) {
1014
1079
  const refDesc = refs[key];
1015
1080
  const isComputed = computed !== void 0 && key in computed;
1016
1081
  const i18nDesc = i18nFields?.[key];
1082
+ const cls = classified?.[key];
1017
1083
  let type = zod?.type ?? "unknown";
1018
1084
  const inferred = {};
1019
1085
  let moneyBlock;
@@ -1069,6 +1135,7 @@ function buildDescription(input) {
1069
1135
  type = "string";
1070
1136
  } else if (isComputed) {
1071
1137
  }
1138
+ if (cls !== void 0) inferred.sensitivity = cls.sensitivity;
1072
1139
  const channelEntry = fieldMeta?.[key];
1073
1140
  const zodMeta = zod?.meta;
1074
1141
  const resolved = resolveFieldMeta(key, {
@@ -1096,6 +1163,7 @@ function buildDescription(input) {
1096
1163
  key,
1097
1164
  type,
1098
1165
  optional: zod?.optional ?? false,
1166
+ ...zod?.constraints !== void 0 ? { constraints: zod.constraints } : {},
1099
1167
  label: resolved.label,
1100
1168
  ...resolved.description !== void 0 ? { description: resolved.description } : {},
1101
1169
  ...resolved.group !== void 0 ? { group: resolved.group } : {},
@@ -1112,7 +1180,14 @@ function buildDescription(input) {
1112
1180
  ...isComputed ? { computed: true } : {},
1113
1181
  ...i18nBlock !== void 0 ? { i18n: i18nBlock } : {},
1114
1182
  widget,
1115
- editable
1183
+ editable,
1184
+ ...cls !== void 0 ? {
1185
+ classified: {
1186
+ preset: cls.preset,
1187
+ storage: cls.storage,
1188
+ list: cls.list.kind === "omit" ? "omit" : cls.list.kind === "mask" ? { mask: cls.list.pattern } : { rider: cls.list.rider }
1189
+ }
1190
+ } : {}
1116
1191
  };
1117
1192
  fields.push(field);
1118
1193
  }
@@ -1160,6 +1235,7 @@ function buildJsonSchema(desc, base) {
1160
1235
  for (const v of f.dict.values) if (v.label !== void 0) labels[v.value] = v.label;
1161
1236
  if (Object.keys(labels).length) prop["x-enumLabels"] = labels;
1162
1237
  }
1238
+ if (f.classified !== void 0) prop["x-classified"] = f.classified;
1163
1239
  properties[f.key] = prop;
1164
1240
  }
1165
1241
  return base != null && typeof base === "object" ? { ...base, properties } : { type: "object", properties };
@@ -1360,7 +1436,7 @@ async function resolveStaleOnRead(accessor, outputCollection, id) {
1360
1436
  }
1361
1437
  const sourceWithId = { ...source, id };
1362
1438
  if (DerivationExecutor === null) {
1363
- ({ DerivationExecutor } = await import("./executor-Z5ZLJVTV.js"));
1439
+ ({ DerivationExecutor } = await import("./executor-ANFBCOYA.js"));
1364
1440
  }
1365
1441
  const ctx = { vault: accessor.getReadOnlyFacade() };
1366
1442
  const result = await DerivationExecutor.run(spec, sourceWithId, 0, strategyHash, ctx);
@@ -1518,6 +1594,16 @@ function resolveCollectionConfig(opts) {
1518
1594
  );
1519
1595
  }
1520
1596
  if (opts.moneyFields) validateMoneyFieldPaths(opts.moneyFields);
1597
+ const resolvedClassified = opts.classifiedFields !== void 0 ? resolveClassifiedFields(opts.name, opts.classifiedFields) : void 0;
1598
+ let mergedComputed = opts.computed;
1599
+ if (resolvedClassified !== void 0) {
1600
+ for (const key of Object.keys(opts.computed ?? {})) {
1601
+ if (resolvedClassified.riderComputed[key] !== void 0) {
1602
+ throw new ClassifiedConfigError(opts.name, `computed field "${key}" collides with a rider companion`);
1603
+ }
1604
+ }
1605
+ mergedComputed = { ...resolvedClassified.riderComputed, ...opts.computed ?? {} };
1606
+ }
1521
1607
  let deterministicFields;
1522
1608
  if (opts.deterministicFields && opts.deterministicFields.length > 0) {
1523
1609
  if (opts.acknowledgeDeterministicRisk !== true) {
@@ -1533,7 +1619,37 @@ function resolveCollectionConfig(opts) {
1533
1619
  Object.entries(opts.i18nFields).filter(([, d]) => d.options.densifyOnWrite === true)
1534
1620
  ) : {};
1535
1621
  const i18nDensifyFields = Object.keys(densifyFields).length > 0 ? densifyFields : void 0;
1536
- const sensitiveFields = opts.sensitive && opts.sensitive.length > 0 ? Object.freeze(new Set(opts.sensitive)) : Object.freeze(/* @__PURE__ */ new Set());
1622
+ const guardIndexedFields = /* @__PURE__ */ new Set();
1623
+ for (const ix of opts.indexes ?? []) {
1624
+ if (typeof ix === "string") guardIndexedFields.add(ix);
1625
+ else if (Array.isArray(ix)) for (const f of ix) guardIndexedFields.add(f);
1626
+ else for (const f of ix.fields) guardIndexedFields.add(f);
1627
+ }
1628
+ const embeddingSources = opts.embeddings === void 0 ? [] : typeof opts.embeddings.source === "string" ? [opts.embeddings.source] : [...opts.embeddings.source];
1629
+ const classifiedGuardCtx = {
1630
+ perRecordKeys: opts.perRecordKeys === true,
1631
+ crdt: opts.crdt !== void 0,
1632
+ hasConflictPolicy: opts.conflictPolicy !== void 0,
1633
+ storeCiphertext: opts.encrypted,
1634
+ deterministicFields,
1635
+ indexedFields: guardIndexedFields,
1636
+ textIndexFields: new Set(opts.textIndexes ?? []),
1637
+ vectorSourceFields: new Set(embeddingSources),
1638
+ subjectKeyField: opts.subjectKeyField,
1639
+ bareSensitiveFields: new Set(opts.sensitive ?? [])
1640
+ };
1641
+ if (resolvedClassified !== void 0) {
1642
+ guardClassifiedCompat(opts.name, resolvedClassified.byField, classifiedGuardCtx);
1643
+ }
1644
+ const classifiedSensitive = resolvedClassified === void 0 ? [] : Object.entries(resolvedClassified.byField).filter(([, s]) => s.storage === "recoverable").map(([f]) => f);
1645
+ const sensitiveList = [...opts.sensitive ?? [], ...classifiedSensitive];
1646
+ const sensitiveFields = sensitiveList.length > 0 ? Object.freeze(new Set(sensitiveList)) : Object.freeze(/* @__PURE__ */ new Set());
1647
+ const vdigEntries = resolvedClassified === void 0 ? [] : Object.entries(resolvedClassified.byField).filter(([, s]) => s.storage === "digest-only").map(([f, s]) => [f, {
1648
+ normalize: s.verifyNormalize ?? "password",
1649
+ notLastN: s.notLastN ?? 0,
1650
+ ...s.rotateDays !== void 0 ? { rotateDays: s.rotateDays } : {}
1651
+ }]);
1652
+ const vdigFields = vdigEntries.length > 0 ? new Map(vdigEntries) : null;
1537
1653
  const perRecordCek = opts.perRecordKeys === true;
1538
1654
  const cekCache = perRecordCek ? new Lru({ maxRecords: 4096 }) : null;
1539
1655
  return {
@@ -1577,7 +1693,10 @@ function resolveCollectionConfig(opts) {
1577
1693
  meta: opts.meta,
1578
1694
  _refs: opts.declaredRefs ?? {},
1579
1695
  moneyFields: opts.moneyFields,
1580
- computed: opts.computed,
1696
+ classified: resolvedClassified,
1697
+ classifiedGuardCtx,
1698
+ classifiedStrategy: opts.classifiedStrategy ?? NO_CLASSIFIED,
1699
+ computed: mergedComputed,
1581
1700
  dictLabelResolver: opts.dictLabelResolver,
1582
1701
  getDictionary: opts.getDictionary,
1583
1702
  i18nPutValidator: opts.i18nPutValidator,
@@ -1595,6 +1714,7 @@ function resolveCollectionConfig(opts) {
1595
1714
  onCrossTierAccess: opts.onCrossTierAccess,
1596
1715
  deterministicFields,
1597
1716
  sensitiveFields,
1717
+ vdigFields,
1598
1718
  perRecordCek,
1599
1719
  cekCache,
1600
1720
  provenance: opts.provenance === true
@@ -1827,6 +1947,32 @@ var Collection = class {
1827
1947
  * the same MV-pre-creation reconcile as {@link moneyFields}.
1828
1948
  */
1829
1949
  computed;
1950
+ /**
1951
+ * Resolved classified() sensitive-field descriptors, declared via the
1952
+ * `classifiedFields` collection option. Mutable so {@link _applyClassifiedFields}
1953
+ * can attach a declaration to a collection MV-analysis pre-created.
1954
+ */
1955
+ classified;
1956
+ /**
1957
+ * Frozen construction-time facts the refusal matrix (R1-R5) checks against.
1958
+ * Stored so {@link _applyClassifiedFields} — door 2, the reconcile seam —
1959
+ * can re-run the SAME guard the config resolver ran at door 1 (C5's lesson:
1960
+ * crdt/conflictPolicy/perRecordKeys are construction-only but
1961
+ * classifiedFields can attach later).
1962
+ */
1963
+ classifiedGuardCtx;
1964
+ /**
1965
+ * Digest-only classified fields (`storage: 'digest-only'`), keyed by field
1966
+ * name — the enclave-consumable policy map the codec's write path carries
1967
+ * `_vdig` forward under (C6). `null` when the collection declares none.
1968
+ */
1969
+ vdigFields;
1970
+ /**
1971
+ * Tree-shake seam for `reveal()` — defaults to `NO_CLASSIFIED`, which
1972
+ * throws `ClassifiedNotEnabledError`. Set via the `classifiedStrategy`
1973
+ * `createNoydb()` option (opt in with `withClassified()`).
1974
+ */
1975
+ classifiedStrategy;
1830
1976
  /**
1831
1977
  * Async callback provided by the Vault that resolves a dict key
1832
1978
  * to its label for a given locale. Used by the locale-read path for
@@ -2031,6 +2177,10 @@ var Collection = class {
2031
2177
  this.meta = cfg.meta;
2032
2178
  this._refs = cfg._refs;
2033
2179
  this.moneyFields = cfg.moneyFields;
2180
+ this.classified = cfg.classified;
2181
+ this.classifiedGuardCtx = cfg.classifiedGuardCtx;
2182
+ this.vdigFields = cfg.vdigFields;
2183
+ this.classifiedStrategy = cfg.classifiedStrategy;
2034
2184
  this.computed = cfg.computed;
2035
2185
  this.dictLabelResolver = cfg.dictLabelResolver;
2036
2186
  this.getDictionary = cfg.getDictionary;
@@ -2077,6 +2227,7 @@ var Collection = class {
2077
2227
  provenance: this.provenance,
2078
2228
  sensitiveFields: this.sensitiveFields,
2079
2229
  deterministicFields: this.deterministicFields,
2230
+ vdigFields: this.vdigFields,
2080
2231
  crdtMode: this.crdtMode,
2081
2232
  crdtStrategy: this.crdtStrategy,
2082
2233
  schema: this.schema,
@@ -2248,7 +2399,8 @@ var Collection = class {
2248
2399
  refs: this._refs,
2249
2400
  zodFields: void 0,
2250
2401
  ...this.meta !== void 0 ? { meta: this.meta } : {},
2251
- ...this.i18nFields !== void 0 ? { i18nFields: this.i18nFields } : {}
2402
+ ...this.i18nFields !== void 0 ? { i18nFields: this.i18nFields } : {},
2403
+ ...this.classified !== void 0 ? { classified: this.classified.byField } : {}
2252
2404
  });
2253
2405
  }
2254
2406
  /**
@@ -2285,7 +2437,8 @@ var Collection = class {
2285
2437
  zodFields,
2286
2438
  ...dictLabels !== void 0 ? { dictLabels } : {},
2287
2439
  ...this.meta !== void 0 ? { meta: this.meta } : {},
2288
- ...this.i18nFields !== void 0 ? { i18nFields: this.i18nFields } : {}
2440
+ ...this.i18nFields !== void 0 ? { i18nFields: this.i18nFields } : {},
2441
+ ...this.classified !== void 0 ? { classified: this.classified.byField } : {}
2289
2442
  });
2290
2443
  }
2291
2444
  /** JSON Schema for this collection with describe() metadata as x- extensions. */
@@ -2298,6 +2451,61 @@ var Collection = class {
2298
2451
  }
2299
2452
  return buildJsonSchema(desc, base);
2300
2453
  }
2454
+ /** Single-point audited reveal of one classified field. Requires withClassified(). */
2455
+ async reveal(id, field) {
2456
+ const spec = this.classified?.byField[field];
2457
+ if (spec === void 0) throw new ClassifiedRevealError(this.name, field, "field is not classified");
2458
+ if (spec.storage === "never") {
2459
+ throw new ClassifiedRevealError(this.name, field, `storage:'never' \u2014 nothing is stored to reveal`);
2460
+ }
2461
+ if (spec.storage === "digest-only") {
2462
+ throw new ClassifiedRevealError(this.name, field, `storage:'digest-only' \u2014 verify-only; nothing recoverable to reveal`);
2463
+ }
2464
+ return this.classifiedStrategy.reveal({
2465
+ collection: this.name,
2466
+ spec,
2467
+ encrypted: this.storeCiphertext,
2468
+ getEnvelope: (rid) => this.adapter.get(this.vault, this.name, rid),
2469
+ resolveCek: (env) => this.codec.resolveEnvelopeCek(env),
2470
+ getDEK: () => this.getDEK(this.name),
2471
+ ...this.onAccess !== void 0 ? { onAccess: async (_op, rid) => {
2472
+ await this.onAccess("reveal", rid);
2473
+ } } : {}
2474
+ }, id, field);
2475
+ }
2476
+ /** Verify-without-reveal: verdict-only oracle for one classified field. Requires withClassified(). */
2477
+ async verify(id, field, candidate) {
2478
+ const spec = this.classified?.byField[field];
2479
+ if (spec === void 0) throw new ClassifiedVerifyError(this.name, field, "field is not classified");
2480
+ if (spec.storage === "never") {
2481
+ throw new ClassifiedVerifyError(this.name, field, `storage:'never' \u2014 nothing is stored to verify against`);
2482
+ }
2483
+ const ctx = this._classifiedVerifyCtx(spec);
2484
+ return spec.storage === "digest-only" ? this.classifiedStrategy.verify(ctx, id, field, candidate) : this.classifiedStrategy.verifyText(ctx, id, field, candidate);
2485
+ }
2486
+ /** k-of-n challenge over the collection's secretAnswer members. Requires withClassified(). */
2487
+ async verifyGroup(id, answers, opts) {
2488
+ const members = Object.entries(this.classified?.byField ?? {}).filter(([, s]) => s.storage === "digest-only" && s.verifyGroupMember === true).map(([field, spec]) => ({ field, spec }));
2489
+ if (members.length === 0) {
2490
+ throw new ClassifiedVerifyError(this.name, "*", "no groupable digest-only (secretAnswer) fields declared");
2491
+ }
2492
+ const ctx = { ...this._classifiedVerifyCtx(members[0].spec), groupMembers: members };
2493
+ return this.classifiedStrategy.matchGroup(ctx, id, answers, opts);
2494
+ }
2495
+ _classifiedVerifyCtx(spec) {
2496
+ return {
2497
+ collection: this.name,
2498
+ spec,
2499
+ getEnvelope: (rid) => this.adapter.get(this.vault, this.name, rid),
2500
+ resolveCek: (env) => this.codec.resolveEnvelopeCek(env),
2501
+ getDEK: () => this.getDEK(this.name),
2502
+ now: () => Date.now(),
2503
+ // Q7: injected here; engine tests inject their own
2504
+ ...this.onAccess !== void 0 ? { onAccess: async (_op, rid) => {
2505
+ await this.onAccess("verify", rid);
2506
+ } } : {}
2507
+ };
2508
+ }
2301
2509
  /**
2302
2510
  * @internal — attach money descriptors post-construction. MV dependency
2303
2511
  * analysis auto-creates a source collection (without options) during
@@ -2321,6 +2529,52 @@ var Collection = class {
2321
2529
  _applyMeta(meta) {
2322
2530
  if (this.meta === void 0) this.meta = meta;
2323
2531
  }
2532
+ /**
2533
+ * @internal — attach classified fields post-construction. See {@link _applyMoneyFields}.
2534
+ * First-wins. Note: unlike money/computed/meta, this cannot retro-seal a
2535
+ * collection that was already auto-created — `sensitiveFields` is frozen at
2536
+ * construction time. A reconciled declaration is only accepted when none of
2537
+ * its members are `storage: 'recoverable'` (those require sealing at first
2538
+ * open); otherwise this throws rather than silently persisting the value as
2539
+ * inline plaintext while `describe()` advertises protection.
2540
+ */
2541
+ _applyClassifiedFields(classifiedFields) {
2542
+ const resolved = resolveClassifiedFields(this.name, classifiedFields);
2543
+ if (this.classified !== void 0) {
2544
+ for (const [field, spec] of Object.entries(resolved.byField)) {
2545
+ const prior = this.classified.byField[field];
2546
+ if (prior !== void 0 && prior.storage !== spec.storage) {
2547
+ throw new ClassifiedConfigError(
2548
+ this.name,
2549
+ `field "${field}" was already declared storage:'${prior.storage}' \u2014 storage-form transitions are refused (R6); migrate explicitly`
2550
+ );
2551
+ }
2552
+ }
2553
+ return;
2554
+ }
2555
+ guardClassifiedCompat(this.name, resolved.byField, this.classifiedGuardCtx);
2556
+ for (const key of Object.keys(resolved.riderComputed)) {
2557
+ if (this.computed?.[key] !== void 0) {
2558
+ throw new ClassifiedConfigError(this.name, `rider companion "${key}" collides with a declared field`);
2559
+ }
2560
+ }
2561
+ const retroDigest = Object.entries(resolved.byField).filter(([, spec]) => spec.storage === "digest-only").map(([field]) => field);
2562
+ if (retroDigest.length > 0) {
2563
+ throw new ClassifiedConfigError(
2564
+ this.name,
2565
+ `digest-only classified field(s) ${retroDigest.map((f) => `"${f}"`).join(", ")} were declared after the collection was first opened without them \u2014 the digest write path is fixed at first open, so these values would persist recoverably in _data. Declare classifiedFields at the collection's first vault.collection() call.`
2566
+ );
2567
+ }
2568
+ const unsealable = Object.entries(resolved.byField).filter(([field, spec]) => spec.storage === "recoverable" && !this.sensitiveFields.has(field)).map(([field]) => field);
2569
+ if (unsealable.length > 0) {
2570
+ throw new ClassifiedConfigError(
2571
+ this.name,
2572
+ `recoverable classified field(s) ${unsealable.map((f) => `"${f}"`).join(", ")} were declared after the collection was first opened without them \u2014 sealing is fixed at first open, so these values would persist as inline plaintext. Declare classifiedFields at the collection's first vault.collection() call (for materialized-view sources this means recoverable classified fields are not supported in stage 1).`
2573
+ );
2574
+ }
2575
+ this.classified = resolved;
2576
+ this.computed = { ...resolved.riderComputed, ...this.computed ?? {} };
2577
+ }
2324
2578
  /** @internal — used only in tests; do not read in production code. */
2325
2579
  get _ramCiphertext() {
2326
2580
  return this.ramCiphertext;
@@ -2346,7 +2600,7 @@ var Collection = class {
2346
2600
  }
2347
2601
  }
2348
2602
  if (this.materializedViewSource !== void 0) {
2349
- const { resolveStaleMVOnRead } = await import("./stale-3JWHNDIY.js");
2603
+ const { resolveStaleMVOnRead } = await import("./stale-LX4BR43V.js");
2350
2604
  await resolveStaleMVOnRead(this.materializedViewSource, this.name);
2351
2605
  }
2352
2606
  let record;
@@ -2578,6 +2832,21 @@ var Collection = class {
2578
2832
  const cached = this.cache.get(id);
2579
2833
  return cached ? { record: cached.record, version: cached.version } : void 0;
2580
2834
  }
2835
+ /**
2836
+ * Wraps {@link RecordCodec.toCacheRecord} with an additional strip for
2837
+ * digest-only classified fields: the codec already omits them from `_data`
2838
+ * on write, but the write path caches the pre-encrypt `record` object
2839
+ * directly (to skip a redundant decrypt) — without this, a vdig field's
2840
+ * plaintext would sit in the working-set cache and `get()` would leak it
2841
+ * right back out, defeating C6.
2842
+ */
2843
+ async _toCacheableRecord(record, envelope, id) {
2844
+ const base = await this.codec.toCacheRecord(record, envelope, id);
2845
+ if (this.vdigFields === null) return base;
2846
+ const clone = { ...base };
2847
+ for (const field of this.vdigFields.keys()) delete clone[field];
2848
+ return clone;
2849
+ }
2581
2850
  /** @internal Untracked put body — call {@link put}, not this. */
2582
2851
  async _putInternal(id, record, options) {
2583
2852
  if (!hasWritePermission(this.keyring, this.name)) {
@@ -2609,6 +2878,9 @@ var Collection = class {
2609
2878
  };
2610
2879
  await this.subsystemBus.dispatchGate("beforePut", gateEvent);
2611
2880
  }
2881
+ if (this.classified !== void 0) {
2882
+ enforceClassifiedWrite(record, this.classified.byField, this.name);
2883
+ }
2612
2884
  if (this.computed !== void 0) {
2613
2885
  record = evalComputedFields(record, this.computed, id);
2614
2886
  }
@@ -2744,7 +3016,8 @@ var Collection = class {
2744
3016
  const existingResolvedRecord = existingEnvelope ? await this.codec.decryptRecord(existingEnvelope, { skipValidation: true }) : null;
2745
3017
  const existingResolved = existingResolvedRecord !== null ? { record: existingResolvedRecord, version: existingVersion } : void 0;
2746
3018
  if (existingResolved && this.historyConfig.enabled !== false) {
2747
- const histEnvelope = await this.codec.encryptRecord(existingResolved.record, existingResolved.version, cek2);
3019
+ const vdigCtx2 = this.vdigFields !== null ? { id, prev: existingEnvelope } : void 0;
3020
+ const histEnvelope = await this.codec.encryptRecord(existingResolved.record, existingResolved.version, cek2, void 0, void 0, vdigCtx2);
2748
3021
  await this.historyStrategy.saveHistory(this.adapter, this.vault, this.name, id, histEnvelope);
2749
3022
  this.emitter.emit("history:save", { vault: this.vault, collection: this.name, id, version: existingResolved.version });
2750
3023
  if (this.historyConfig.maxVersions) {
@@ -2803,8 +3076,9 @@ var Collection = class {
2803
3076
  const version = existing ? existing.version + 1 : 1;
2804
3077
  this.uniqueConstraints?.check(id, record);
2805
3078
  const cek = this.perRecordCek ? await this.resolveRecordCek(id) : void 0;
3079
+ const vdigCtx = this.vdigFields !== null ? { id, prev: await this.adapter.get(this.vault, this.name, id) } : void 0;
2806
3080
  if (existing && this.historyConfig.enabled !== false) {
2807
- const historyEnvelope = await this.codec.encryptRecord(existing.record, existing.version, cek);
3081
+ const historyEnvelope = await this.codec.encryptRecord(existing.record, existing.version, cek, void 0, void 0, vdigCtx);
2808
3082
  await this.historyStrategy.saveHistory(this.adapter, this.vault, this.name, id, historyEnvelope);
2809
3083
  this.emitter.emit("history:save", {
2810
3084
  vault: this.vault,
@@ -2818,7 +3092,7 @@ var Collection = class {
2818
3092
  });
2819
3093
  }
2820
3094
  }
2821
- const envelope = await this.codec.encryptRecord(record, version, cek, options?.source, options?.sourceTs);
3095
+ const envelope = await this.codec.encryptRecord(record, version, cek, options?.source, options?.sourceTs, vdigCtx);
2822
3096
  await this.adapter.put(this.vault, this.name, id, envelope);
2823
3097
  if (this.embeddings) {
2824
3098
  await this.searchStrategy.embedOnWrite(this.searchContext(), id, record, version);
@@ -2839,10 +3113,10 @@ var Collection = class {
2839
3113
  await this.ledger.append(appendInput);
2840
3114
  }
2841
3115
  if (this.lazy && this.lru) {
2842
- this.lru.set(id, { record: await this.codec.toCacheRecord(record, envelope, id), version }, estimateRecordBytes(record));
3116
+ this.lru.set(id, { record: await this._toCacheableRecord(record, envelope, id), version }, estimateRecordBytes(record));
2843
3117
  await this.maintainPersistedIndexesOnPut(id, record, existing ? existing.record : null, version);
2844
3118
  } else {
2845
- this.cache.set(id, { record: await this.codec.toCacheRecord(record, envelope, id), version });
3119
+ this.cache.set(id, { record: await this._toCacheableRecord(record, envelope, id), version });
2846
3120
  this.indexes?.upsert(id, record, existing ? existing.record : null);
2847
3121
  this.uniqueConstraints?.upsert(id, record, existing?.record);
2848
3122
  }
@@ -2885,7 +3159,7 @@ var Collection = class {
2885
3159
  if (mode === "eager") {
2886
3160
  if (executor === null) {
2887
3161
  ;
2888
- ({ MaterializedViewExecutor: executor } = await import("./executor-2FWQRLMG.js"));
3162
+ ({ MaterializedViewExecutor: executor } = await import("./executor-OIECZXTV.js"));
2889
3163
  }
2890
3164
  await executor.refresh(reg, {
2891
3165
  getCollection: (name) => this.materializedViewSource.getCollection(name),
@@ -2894,7 +3168,7 @@ var Collection = class {
2894
3168
  });
2895
3169
  } else if (mode === "lazy") {
2896
3170
  if (staleHelpers === null) {
2897
- staleHelpers = await import("./stale-3JWHNDIY.js");
3171
+ staleHelpers = await import("./stale-LX4BR43V.js");
2898
3172
  }
2899
3173
  staleHelpers.markMVStale(registry, reg.spec.name);
2900
3174
  }
@@ -3079,7 +3353,7 @@ var Collection = class {
3079
3353
  continue;
3080
3354
  }
3081
3355
  if (DerivationExecutor === null) {
3082
- ({ DerivationExecutor } = await import("./executor-Z5ZLJVTV.js"));
3356
+ ({ DerivationExecutor } = await import("./executor-ANFBCOYA.js"));
3083
3357
  }
3084
3358
  for (const run of runs) {
3085
3359
  const ctx = { vault: this.derivationSource.getReadOnlyFacade() };
@@ -3098,7 +3372,7 @@ var Collection = class {
3098
3372
  const outputCollection = this.derivationSource.getCollection(outSpec.collection);
3099
3373
  const txCtx = this.derivationSource.getActiveTxContext();
3100
3374
  if (out.kind === "array") {
3101
- const { loadFanoutSidecar, saveFanoutSidecar } = await import("./fanout-sidecar-GF3DJ6KR.js");
3375
+ const { loadFanoutSidecar, saveFanoutSidecar } = await import("./fanout-sidecar-DDKRG2MX.js");
3102
3376
  const prior = await loadFanoutSidecar(this.adapter, this.vault, spec.source, run.runId, key, this.getDEK, this.storeCiphertext);
3103
3377
  const prevKeys = new Set(prior?.keys ?? []);
3104
3378
  const newKeysList = out.entries.map((e) => e.key);
@@ -3225,7 +3499,7 @@ var Collection = class {
3225
3499
  const next = transform(record);
3226
3500
  const nextVersion = (env._v ?? 0) + 1;
3227
3501
  const cek = this.perRecordCek ? await this.resolveRecordCek(id) : void 0;
3228
- const newEnv = await this.codec.encryptRecord(next, nextVersion, cek);
3502
+ const newEnv = await this.codec.encryptRecord(next, nextVersion, cek, void 0, void 0, this.vdigFields !== null ? { id, prev: env } : void 0);
3229
3503
  await this.adapter.put(this.vault, this.name, id, newEnv);
3230
3504
  await this._invalidateCacheEntry(id);
3231
3505
  if (this.ledger) {
@@ -3347,7 +3621,8 @@ var Collection = class {
3347
3621
  }
3348
3622
  if (existing && this.historyConfig.enabled !== false) {
3349
3623
  const cek = this.perRecordCek ? await this.resolveRecordCek(id) : void 0;
3350
- const historyEnvelope = await this.codec.encryptRecord(existing.record, existing.version, cek);
3624
+ const prevForVdig = this.vdigFields !== null ? await this.adapter.get(this.vault, this.name, id) : null;
3625
+ const historyEnvelope = await this.codec.encryptRecord(existing.record, existing.version, cek, void 0, void 0, this.vdigFields !== null ? { id, prev: prevForVdig } : void 0);
3351
3626
  await this.historyStrategy.saveHistory(this.adapter, this.vault, this.name, id, historyEnvelope);
3352
3627
  }
3353
3628
  const previousEnvelope = await this.adapter.get(this.vault, this.name, id);
@@ -3456,7 +3731,7 @@ var Collection = class {
3456
3731
  for (const [outputKey, outSpec] of Object.entries(spec.outputs)) {
3457
3732
  if (outSpec.shape !== "array") continue;
3458
3733
  if (helpers === null) {
3459
- helpers = await import("./fanout-sidecar-GF3DJ6KR.js");
3734
+ helpers = await import("./fanout-sidecar-DDKRG2MX.js");
3460
3735
  }
3461
3736
  const sidecar = await helpers.loadFanoutSidecar(this.adapter, this.vault, spec.source, id, outputKey, this.getDEK, this.storeCiphertext);
3462
3737
  if (!sidecar) continue;
@@ -3490,7 +3765,7 @@ var Collection = class {
3490
3765
  if (mode === "eager") {
3491
3766
  if (executor === null) {
3492
3767
  ;
3493
- ({ MaterializedViewExecutor: executor } = await import("./executor-2FWQRLMG.js"));
3768
+ ({ MaterializedViewExecutor: executor } = await import("./executor-OIECZXTV.js"));
3494
3769
  }
3495
3770
  await executor.refresh(reg, {
3496
3771
  getCollection: (name) => this.materializedViewSource.getCollection(name),
@@ -3499,7 +3774,7 @@ var Collection = class {
3499
3774
  });
3500
3775
  } else if (mode === "lazy") {
3501
3776
  if (staleHelpers === null) {
3502
- staleHelpers = await import("./stale-3JWHNDIY.js");
3777
+ staleHelpers = await import("./stale-LX4BR43V.js");
3503
3778
  }
3504
3779
  staleHelpers.markMVStale(registry, reg.spec.name);
3505
3780
  }
@@ -3522,7 +3797,7 @@ var Collection = class {
3522
3797
  );
3523
3798
  }
3524
3799
  if (this.materializedViewSource !== void 0) {
3525
- const { resolveStaleMVOnRead } = await import("./stale-3JWHNDIY.js");
3800
+ const { resolveStaleMVOnRead } = await import("./stale-LX4BR43V.js");
3526
3801
  await resolveStaleMVOnRead(this.materializedViewSource, this.name);
3527
3802
  }
3528
3803
  await this.ensureHydrated();
@@ -4351,7 +4626,8 @@ var Collection = class {
4351
4626
  const result = {};
4352
4627
  for (const [id, entry] of this.cache) {
4353
4628
  const cek = this.perRecordCek ? await this.resolveRecordCek(id) : void 0;
4354
- result[id] = await this.codec.encryptRecord(entry.record, entry.version, cek);
4629
+ const prevForVdig = this.vdigFields !== null ? await this.adapter.get(this.vault, this.name, id) : null;
4630
+ result[id] = await this.codec.encryptRecord(entry.record, entry.version, cek, void 0, void 0, this.vdigFields !== null ? { id, prev: prevForVdig } : void 0);
4355
4631
  }
4356
4632
  return result;
4357
4633
  }
@@ -6448,6 +6724,7 @@ var Vault = class {
6448
6724
  forgetStrategy;
6449
6725
  i18nStrategy;
6450
6726
  syncStrategy;
6727
+ classifiedStrategy;
6451
6728
  /**
6452
6729
  * Per-vault guard registry. `null` until `_initGuards()` runs; stays
6453
6730
  * `null` for vaults that never register any guard strategy. The
@@ -6713,6 +6990,7 @@ var Vault = class {
6713
6990
  this.forgetStrategy = opts.forgetStrategy ?? NO_FORGET;
6714
6991
  this.i18nStrategy = opts.i18nStrategy ?? NO_I18N;
6715
6992
  this.syncStrategy = opts.syncStrategy ?? NO_SYNC;
6993
+ this.classifiedStrategy = opts.classifiedStrategy ?? NO_CLASSIFIED;
6716
6994
  void opts.guardStrategies;
6717
6995
  this.historyConfig = opts.historyConfig ?? { enabled: true };
6718
6996
  this.reloadKeyring = opts.reloadKeyring;
@@ -6825,6 +7103,9 @@ var Vault = class {
6825
7103
  if (coll && options?.meta) {
6826
7104
  coll._applyMeta(options.meta);
6827
7105
  }
7106
+ if (coll && options?.classifiedFields) {
7107
+ coll._applyClassifiedFields(options.classifiedFields);
7108
+ }
6828
7109
  if (!coll) {
6829
7110
  if (options?.refs) {
6830
7111
  this.refRegistry.register(collectionName, options.refs);
@@ -6921,6 +7202,7 @@ var Vault = class {
6921
7202
  historyStrategy: this.historyStrategy,
6922
7203
  i18nStrategy: this.i18nStrategy,
6923
7204
  syncStrategy: this.syncStrategy,
7205
+ classifiedStrategy: this.classifiedStrategy,
6924
7206
  // Per-collection ledger opt-out: when this collection sets
6925
7207
  // `historyConfig.ledger: false`, withhold the ledger reference so all
6926
7208
  // four `if (this.ledger)` append sites in Collection no-op. The chain
@@ -6976,13 +7258,15 @@ var Vault = class {
6976
7258
  if (options?.perRecordKeys !== void 0) {
6977
7259
  collOpts.perRecordKeys = options.perRecordKeys;
6978
7260
  }
6979
- if (this.forgetStrategy.subjects[collectionName] !== void 0) {
7261
+ const subjectKey = this.forgetStrategy.subjects[collectionName];
7262
+ if (subjectKey !== void 0) {
6980
7263
  if (options?.perRecordKeys === false) {
6981
7264
  console.warn(
6982
7265
  `[noy-db] Collection "${collectionName}" is declared in withForgetCascade but opened with perRecordKeys: false. Forcing perRecordKeys: true \u2014 GDPR crypto-shred requires per-record CEKs.`
6983
7266
  );
6984
7267
  }
6985
7268
  collOpts.perRecordKeys = true;
7269
+ collOpts.subjectKeyField = subjectKey;
6986
7270
  }
6987
7271
  if (options?.provenance !== void 0) collOpts.provenance = options.provenance;
6988
7272
  if (options?.ramCiphertext !== void 0) collOpts.ramCiphertext = options.ramCiphertext;
@@ -6997,6 +7281,7 @@ var Vault = class {
6997
7281
  if (options?.textIndexPersist !== void 0) collOpts.textIndexPersist = options.textIndexPersist;
6998
7282
  if (options?.moneyFields !== void 0) collOpts.moneyFields = options.moneyFields;
6999
7283
  if (options?.computed !== void 0) collOpts.computed = options.computed;
7284
+ if (options?.classifiedFields !== void 0) collOpts.classifiedFields = options.classifiedFields;
7000
7285
  if (options?.dictKeyFields !== void 0) {
7001
7286
  collOpts.dictLabelResolver = async (dictName, key, locale, fallback) => {
7002
7287
  const stat = this.staticByName.get(dictName);
@@ -8114,7 +8399,7 @@ var Vault = class {
8114
8399
  async _initDerivations(handles) {
8115
8400
  if (handles.length === 0) return;
8116
8401
  const [{ DerivationRegistry }, { ReadOnlyVaultFacade }] = await Promise.all([
8117
- import("./registry-WEUCHBO4.js"),
8402
+ import("./registry-6HZ2JSQ7.js"),
8118
8403
  import("./read-only-facade-5ADRJVTM.js")
8119
8404
  ]);
8120
8405
  const registry = new DerivationRegistry();
@@ -8145,7 +8430,7 @@ var Vault = class {
8145
8430
  */
8146
8431
  async _initMaterializedViews(handles) {
8147
8432
  if (handles.length === 0) return;
8148
- const { MaterializedViewRegistry } = await import("./registry-5GRV5VXI.js");
8433
+ const { MaterializedViewRegistry } = await import("./registry-USYD2ECC.js");
8149
8434
  const registry = new MaterializedViewRegistry();
8150
8435
  this.materializedViewRegistry = registry;
8151
8436
  const db = this;
@@ -8169,7 +8454,7 @@ var Vault = class {
8169
8454
  */
8170
8455
  async _initOverlayedViews(handles) {
8171
8456
  if (handles.length === 0) return;
8172
- const { OverlayedViewRegistry } = await import("./registry-45RJNWGU.js");
8457
+ const { OverlayedViewRegistry } = await import("./registry-GPXZQ7DT.js");
8173
8458
  const registry = new OverlayedViewRegistry();
8174
8459
  const mvRegistry = this.materializedViewRegistry;
8175
8460
  const overlayNames = /* @__PURE__ */ new Set();
@@ -8216,13 +8501,13 @@ var Vault = class {
8216
8501
  if (!reg) {
8217
8502
  throw new Error(`refreshView: no MV registered with name "${name}"`);
8218
8503
  }
8219
- const { MaterializedViewExecutor } = await import("./executor-2FWQRLMG.js");
8504
+ const { MaterializedViewExecutor } = await import("./executor-OIECZXTV.js");
8220
8505
  const result = await MaterializedViewExecutor.refresh(reg, {
8221
8506
  getCollection: (n) => this.collection(n),
8222
8507
  getActiveTxContext: () => this.noydb._activeTxContextOrNull,
8223
8508
  getQueryContext: () => this
8224
8509
  });
8225
- const { clearMVStale } = await import("./stale-3JWHNDIY.js");
8510
+ const { clearMVStale } = await import("./stale-LX4BR43V.js");
8226
8511
  clearMVStale(registry, name);
8227
8512
  return result;
8228
8513
  }
@@ -8238,7 +8523,7 @@ var Vault = class {
8238
8523
  if (registry === null) return { derived: 0, failed: 0 };
8239
8524
  const strategies = registry.strategiesForSource(sourceCollection);
8240
8525
  if (strategies.length === 0) return { derived: 0, failed: 0 };
8241
- const { DerivationExecutor } = await import("./executor-Z5ZLJVTV.js");
8526
+ const { DerivationExecutor } = await import("./executor-ANFBCOYA.js");
8242
8527
  const sourceColl = this.collection(sourceCollection);
8243
8528
  const records = await sourceColl.list();
8244
8529
  const ctx = { vault: this.derivationFacade ?? new (await import("./read-only-facade-5ADRJVTM.js")).ReadOnlyVaultFacade(this, "derivation") };
@@ -8263,7 +8548,7 @@ var Vault = class {
8263
8548
  if (!outSpec) continue;
8264
8549
  const outputColl = this.collection(outSpec.collection);
8265
8550
  if (out.kind === "array") {
8266
- const { loadFanoutSidecar, saveFanoutSidecar } = await import("./fanout-sidecar-GF3DJ6KR.js");
8551
+ const { loadFanoutSidecar, saveFanoutSidecar } = await import("./fanout-sidecar-DDKRG2MX.js");
8267
8552
  const prior = await loadFanoutSidecar(this.adapter, this.name, spec.source, id, key, this.getDEK, this.encrypted);
8268
8553
  const prevKeys = new Set(prior?.keys ?? []);
8269
8554
  const newKeysList = out.entries.map((e) => e.key);
@@ -8485,7 +8770,7 @@ var Vault = class {
8485
8770
  * collection.
8486
8771
  */
8487
8772
  async delegate(opts) {
8488
- const { issueDelegation, DELEGATIONS_COLLECTION } = await import("./delegation-UL5HKLER.js");
8773
+ const { issueDelegation, DELEGATIONS_COLLECTION } = await import("./delegation-4HUHUE6T.js");
8489
8774
  if (!this.keyring.kek) {
8490
8775
  throw new ValidationError(
8491
8776
  "issueDelegation: keyring.kek is null \u2014 issuing a delegation requires a tier-1 unlock. Re-authenticate at tier 1 (passphrase) first."
@@ -8507,7 +8792,7 @@ var Vault = class {
8507
8792
  * if the id does not exist.
8508
8793
  */
8509
8794
  async revokeDelegation(id) {
8510
- const { revokeDelegation, DELEGATIONS_COLLECTION } = await import("./delegation-UL5HKLER.js");
8795
+ const { revokeDelegation, DELEGATIONS_COLLECTION } = await import("./delegation-4HUHUE6T.js");
8511
8796
  await revokeDelegation(this.adapter, this.name, id);
8512
8797
  void DELEGATIONS_COLLECTION;
8513
8798
  }
@@ -8857,7 +9142,7 @@ var Vault = class {
8857
9142
  * @see https://github.com/vLannaAi/noy-db-docs/blob/main/content/docs/services/public-envelope.md
8858
9143
  */
8859
9144
  async getPublicEnvelope(opts = {}) {
8860
- const { readPublicEnvelope } = await import("./public-envelope-JHDQCPSX.js");
9145
+ const { readPublicEnvelope } = await import("./public-envelope-WVRRUVAJ.js");
8861
9146
  return readPublicEnvelope(this.adapter, this.name, opts);
8862
9147
  }
8863
9148
  /**
@@ -8872,7 +9157,7 @@ var Vault = class {
8872
9157
  * both modes round-trip cleanly.
8873
9158
  */
8874
9159
  async dump() {
8875
- const { dumpVault } = await import("./backup-KMJQ66MF.js");
9160
+ const { dumpVault } = await import("./backup-NGRJ46SH.js");
8876
9161
  return dumpVault(this.backupContext());
8877
9162
  }
8878
9163
  /**
@@ -8924,7 +9209,7 @@ var Vault = class {
8924
9209
  * — there's no chain to verify against.
8925
9210
  */
8926
9211
  async load(backupJson) {
8927
- const { loadVault } = await import("./backup-KMJQ66MF.js");
9212
+ const { loadVault } = await import("./backup-NGRJ46SH.js");
8928
9213
  return loadVault(this.backupContext(), backupJson);
8929
9214
  }
8930
9215
  /**
@@ -8956,7 +9241,7 @@ var Vault = class {
8956
9241
  * way to detect tampering of an in-place vault.
8957
9242
  */
8958
9243
  async verifyBackupIntegrity() {
8959
- const { verifyBackupIntegrity } = await import("./backup-KMJQ66MF.js");
9244
+ const { verifyBackupIntegrity } = await import("./backup-NGRJ46SH.js");
8960
9245
  return verifyBackupIntegrity(this.backupContext());
8961
9246
  }
8962
9247
  /**
@@ -9174,7 +9459,7 @@ var Vault = class {
9174
9459
  * is the live validator object, not a serialization of it).
9175
9460
  */
9176
9461
  async exportJSON(opts = {}) {
9177
- const { exportVaultJSON } = await import("./backup-KMJQ66MF.js");
9462
+ const { exportVaultJSON } = await import("./backup-NGRJ46SH.js");
9178
9463
  return exportVaultJSON(this.backupContext(), opts);
9179
9464
  }
9180
9465
  };
@@ -11001,7 +11286,7 @@ var Noydb = class {
11001
11286
  if (!facade) return;
11002
11287
  const ctx = { existing, vault: facade, userId: e.userId, role: e.role };
11003
11288
  await registry.runChecks(e.collection, incoming, ctx);
11004
- const { GuardExecutor } = await import("./executor-QZ7BXICW.js");
11289
+ const { GuardExecutor } = await import("./executor-IKT47SH2.js");
11005
11290
  for (const g of guards) {
11006
11291
  await GuardExecutor.checkFrozenFields(g, e.docId, existing, incoming, e.computedFieldNames);
11007
11292
  }
@@ -11178,6 +11463,7 @@ var Noydb = class {
11178
11463
  ...this.options.numbering !== void 0 ? { numberingConfigs: this.options.numbering } : {},
11179
11464
  forgetStrategy: this.forgetStrategy,
11180
11465
  ...this.options.attestationStrategy !== void 0 ? { attestationStrategy: this.options.attestationStrategy } : {},
11466
+ ...this.options.classifiedStrategy !== void 0 ? { classifiedStrategy: this.options.classifiedStrategy } : {},
11181
11467
  ...this.options.sealedRecordStrategy !== void 0 ? { sealedRecordStrategy: this.options.sealedRecordStrategy } : {},
11182
11468
  ...this.options.portabilityStrategy !== void 0 ? { portabilityStrategy: this.options.portabilityStrategy } : {},
11183
11469
  ...this.options.sequenceStrategy !== void 0 ? { sequenceStrategy: this.options.sequenceStrategy } : {},
@@ -11243,6 +11529,7 @@ var Noydb = class {
11243
11529
  ...this.options.numbering !== void 0 ? { numberingConfigs: this.options.numbering } : {},
11244
11530
  forgetStrategy: this.forgetStrategy,
11245
11531
  ...this.options.attestationStrategy !== void 0 ? { attestationStrategy: this.options.attestationStrategy } : {},
11532
+ ...this.options.classifiedStrategy !== void 0 ? { classifiedStrategy: this.options.classifiedStrategy } : {},
11246
11533
  ...this.options.sealedRecordStrategy !== void 0 ? { sealedRecordStrategy: this.options.sealedRecordStrategy } : {},
11247
11534
  ...this.options.portabilityStrategy !== void 0 ? { portabilityStrategy: this.options.portabilityStrategy } : {},
11248
11535
  ...this.options.sequenceStrategy !== void 0 ? { sequenceStrategy: this.options.sequenceStrategy } : {}
@@ -12239,7 +12526,7 @@ var Noydb = class {
12239
12526
  "setPublicEnvelope: the public-envelope feature is not enabled. Pass `publicEnvelope: true` (or a schema object) to `createNoydb`."
12240
12527
  );
12241
12528
  }
12242
- const { loadPublicEnvelope, savePublicEnvelope, resolveSchema, validatePublicEnvelopeInput } = await import("./public-envelope-JHDQCPSX.js");
12529
+ const { loadPublicEnvelope, savePublicEnvelope, resolveSchema, validatePublicEnvelopeInput } = await import("./public-envelope-WVRRUVAJ.js");
12243
12530
  const schema = resolveSchema(this.options.publicEnvelope);
12244
12531
  validatePublicEnvelopeInput(input, schema);
12245
12532
  const now = (/* @__PURE__ */ new Date()).toISOString();
@@ -12268,7 +12555,7 @@ var Noydb = class {
12268
12555
  * regardless).
12269
12556
  */
12270
12557
  async getPublicEnvelope(vault, opts = {}) {
12271
- const { readPublicEnvelope } = await import("./public-envelope-JHDQCPSX.js");
12558
+ const { readPublicEnvelope } = await import("./public-envelope-WVRRUVAJ.js");
12272
12559
  return readPublicEnvelope(this.options.store, vault, opts);
12273
12560
  }
12274
12561
  // ─── Auth introspection ─────────────────────────────────────────
@@ -12459,9 +12746,9 @@ async function createNoydb(options) {
12459
12746
  throw new ValidationError("A secret (passphrase) or getKeyring callback is required when encryption is enabled");
12460
12747
  }
12461
12748
  if (!options.coordinationStrategy) options = { ...options, coordinationStrategy: await createDefaultCoordinationProvider(options.store) };
12462
- if (!options.userApiFactory) options = { ...options, userApiFactory: (await import("./api-RW3KP7WU.js")).createUserApi };
12749
+ if (!options.userApiFactory) options = { ...options, userApiFactory: (await import("./api-LORZ2EZU.js")).createUserApi };
12463
12750
  if (!options.policyFactory) {
12464
- const policyModule = await import("./policy-IXK4FVXP.js");
12751
+ const policyModule = await import("./policy-LRE6HTO5.js");
12465
12752
  options = { ...options, policyFactory: policyModule.createNoydbPolicy, policyCheckGateFn: policyModule.checkGate };
12466
12753
  }
12467
12754
  return new Noydb(options);
@@ -12507,4 +12794,4 @@ export {
12507
12794
  Noydb,
12508
12795
  createNoydb
12509
12796
  };
12510
- //# sourceMappingURL=chunk-PSHOXR6C.js.map
12797
+ //# sourceMappingURL=chunk-ADBMJDBW.js.map