@noy-db/hub 0.2.0-pre.9 → 0.3.0-pre.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (541) hide show
  1. package/README.md +129 -3
  2. package/dist/adapter/index.d.ts +5 -0
  3. package/dist/adapter/index.js +15 -0
  4. package/dist/aggregate/index.d.ts +6 -2
  5. package/dist/aggregate/index.js +24 -16
  6. package/dist/aggregate/index.js.map +1 -1
  7. package/dist/api-RW3KP7WU.js +14 -0
  8. package/dist/as/index.d.ts +7 -0
  9. package/dist/as/index.js +24 -0
  10. package/dist/at/index.d.ts +5 -0
  11. package/dist/at/index.js +1 -0
  12. package/dist/attestation/index.d.ts +15 -47
  13. package/dist/attestation/index.js +54 -10
  14. package/dist/attestation/index.js.map +1 -1
  15. package/dist/backup-KMJQ66MF.js +219 -0
  16. package/dist/backup-KMJQ66MF.js.map +1 -0
  17. package/dist/blobs/index.d.ts +6 -8
  18. package/dist/blobs/index.js +19 -12
  19. package/dist/blobs/index.js.map +1 -1
  20. package/dist/bundle/index.d.ts +16 -70
  21. package/dist/bundle/index.js +39 -476
  22. package/dist/bundle/index.js.map +1 -1
  23. package/dist/{ulid-CJ8RzRrm.d.ts → bundle-PwBGkhpe.d.ts} +31 -86
  24. package/dist/by/index.d.ts +1 -0
  25. package/dist/by/index.js +11 -0
  26. package/dist/cargo/index.d.ts +9 -0
  27. package/dist/cargo/index.js +89 -0
  28. package/dist/chunk-26LGBE4T.js +42 -0
  29. package/dist/chunk-26LGBE4T.js.map +1 -0
  30. package/dist/{chunk-K3DK3NU5.js → chunk-3YFXJ3ZP.js} +20 -5
  31. package/dist/chunk-3YFXJ3ZP.js.map +1 -0
  32. package/dist/chunk-4Q6HSHHL.js +90 -0
  33. package/dist/chunk-4Q6HSHHL.js.map +1 -0
  34. package/dist/chunk-5LUY7UTV.js +380 -0
  35. package/dist/chunk-5LUY7UTV.js.map +1 -0
  36. package/dist/chunk-5N6CZTCY.js +367 -0
  37. package/dist/chunk-5N6CZTCY.js.map +1 -0
  38. package/dist/chunk-5O3AOPDT.js +992 -0
  39. package/dist/chunk-5O3AOPDT.js.map +1 -0
  40. package/dist/chunk-5R3ERCDH.js +239 -0
  41. package/dist/chunk-5R3ERCDH.js.map +1 -0
  42. package/dist/chunk-5TDJ56JE.js +32 -0
  43. package/dist/chunk-5TDJ56JE.js.map +1 -0
  44. package/dist/{chunk-T7JEBOGN.js → chunk-62QYRORB.js} +18 -11
  45. package/dist/chunk-62QYRORB.js.map +1 -0
  46. package/dist/{chunk-J66GRPNH.js → chunk-6S7T6WC4.js} +2 -2
  47. package/dist/chunk-6S7T6WC4.js.map +1 -0
  48. package/dist/chunk-76722EBH.js +451 -0
  49. package/dist/chunk-76722EBH.js.map +1 -0
  50. package/dist/{chunk-Z6FNBOTC.js → chunk-AIWULCUO.js} +13 -17
  51. package/dist/chunk-AIWULCUO.js.map +1 -0
  52. package/dist/{chunk-O3VZPBZG.js → chunk-AQTBSL7R.js} +47 -11
  53. package/dist/chunk-AQTBSL7R.js.map +1 -0
  54. package/dist/chunk-AURFOK3D.js +35 -0
  55. package/dist/chunk-AURFOK3D.js.map +1 -0
  56. package/dist/{chunk-53XBRIRT.js → chunk-AXRXJTE2.js} +9 -9
  57. package/dist/chunk-AXRXJTE2.js.map +1 -0
  58. package/dist/chunk-AZAOEIKW.js +155 -0
  59. package/dist/chunk-AZAOEIKW.js.map +1 -0
  60. package/dist/{chunk-HNRHLRDC.js → chunk-BG3SPSR4.js} +3 -3
  61. package/dist/chunk-BG3SPSR4.js.map +1 -0
  62. package/dist/chunk-BGIZAFY7.js +1 -0
  63. package/dist/chunk-CHFZDSE4.js +1 -0
  64. package/dist/{chunk-DJHHA6XH.js → chunk-CMGR4ZEW.js} +50 -20
  65. package/dist/chunk-CMGR4ZEW.js.map +1 -0
  66. package/dist/chunk-CWPPNPOH.js +23 -0
  67. package/dist/chunk-CWPPNPOH.js.map +1 -0
  68. package/dist/{chunk-QODLLGQ7.js → chunk-DFEMTNPJ.js} +371 -38
  69. package/dist/chunk-DFEMTNPJ.js.map +1 -0
  70. package/dist/{chunk-ZYWZWG6G.js → chunk-DGDI2D4M.js} +10 -10
  71. package/dist/chunk-DGDI2D4M.js.map +1 -0
  72. package/dist/{chunk-SYMWGEET.js → chunk-EIZUR2XW.js} +3 -3
  73. package/dist/chunk-EIZUR2XW.js.map +1 -0
  74. package/dist/{chunk-BVRYKATC.js → chunk-FISN7WE4.js} +36 -33
  75. package/dist/chunk-FISN7WE4.js.map +1 -0
  76. package/dist/chunk-GHVIKOHT.js +1 -0
  77. package/dist/chunk-GYGWYIOZ.js +200 -0
  78. package/dist/chunk-GYGWYIOZ.js.map +1 -0
  79. package/dist/chunk-HCIPRAGS.js +45 -0
  80. package/dist/chunk-HCIPRAGS.js.map +1 -0
  81. package/dist/{chunk-PX35GA7L.js → chunk-I2NOIW44.js} +10 -10
  82. package/dist/chunk-I2NOIW44.js.map +1 -0
  83. package/dist/{chunk-OIF6LZUR.js → chunk-I3TIKTJO.js} +3 -3
  84. package/dist/chunk-I3TIKTJO.js.map +1 -0
  85. package/dist/chunk-I7FD46FF.js +9 -0
  86. package/dist/chunk-I7FD46FF.js.map +1 -0
  87. package/dist/chunk-IAGBDSCS.js +40 -0
  88. package/dist/chunk-IAGBDSCS.js.map +1 -0
  89. package/dist/{chunk-JWRVQKRZ.js → chunk-IELYAOGG.js} +6 -18
  90. package/dist/chunk-IELYAOGG.js.map +1 -0
  91. package/dist/chunk-IGUYVGGI.js +205 -0
  92. package/dist/chunk-IGUYVGGI.js.map +1 -0
  93. package/dist/{chunk-U26HQ6KJ.js → chunk-IO6GRPT6.js} +4 -4
  94. package/dist/chunk-IO6GRPT6.js.map +1 -0
  95. package/dist/chunk-IPB7FTQX.js +273 -0
  96. package/dist/chunk-IPB7FTQX.js.map +1 -0
  97. package/dist/chunk-ITNUCOXM.js +148 -0
  98. package/dist/chunk-ITNUCOXM.js.map +1 -0
  99. package/dist/{chunk-WPLVTJ5D.js → chunk-IUEN57TV.js} +10 -10
  100. package/dist/chunk-IUEN57TV.js.map +1 -0
  101. package/dist/{chunk-DL3HWOQ5.js → chunk-JNUWZ6D3.js} +9 -9
  102. package/dist/chunk-JNUWZ6D3.js.map +1 -0
  103. package/dist/chunk-K2WCO3NX.js +1 -0
  104. package/dist/chunk-KVOXU4T5.js +30 -0
  105. package/dist/chunk-KVOXU4T5.js.map +1 -0
  106. package/dist/chunk-KXGNJJXB.js +135 -0
  107. package/dist/chunk-KXGNJJXB.js.map +1 -0
  108. package/dist/chunk-LB7FD65R.js +163 -0
  109. package/dist/chunk-LB7FD65R.js.map +1 -0
  110. package/dist/{chunk-22DWZL57.js → chunk-LFLXAY2W.js} +43 -218
  111. package/dist/chunk-LFLXAY2W.js.map +1 -0
  112. package/dist/chunk-LMTH2RM6.js +129 -0
  113. package/dist/chunk-LMTH2RM6.js.map +1 -0
  114. package/dist/{aggregate/index.cjs → chunk-LV7M27WM.js} +390 -219
  115. package/dist/chunk-LV7M27WM.js.map +1 -0
  116. package/dist/{chunk-PE2FR4J3.js → chunk-LXQT4WMP.js} +16 -18
  117. package/dist/chunk-LXQT4WMP.js.map +1 -0
  118. package/dist/chunk-M2YKN37S.js +524 -0
  119. package/dist/chunk-M2YKN37S.js.map +1 -0
  120. package/dist/chunk-M6OST55S.js +14 -0
  121. package/dist/chunk-M6OST55S.js.map +1 -0
  122. package/dist/{chunk-F3GDRNUT.js → chunk-MD3Y6J3L.js} +35 -69
  123. package/dist/chunk-MD3Y6J3L.js.map +1 -0
  124. package/dist/{chunk-XJFLDA7A.js → chunk-MTMJVJ5W.js} +8 -7
  125. package/dist/chunk-MTMJVJ5W.js.map +1 -0
  126. package/dist/{chunk-DFMLEQZB.js → chunk-NF5JWERG.js} +5 -10
  127. package/dist/chunk-NF5JWERG.js.map +1 -0
  128. package/dist/{chunk-DO7C2TOG.js → chunk-PKHL44ER.js} +3 -3
  129. package/dist/{chunk-DO7C2TOG.js.map → chunk-PKHL44ER.js.map} +1 -1
  130. package/dist/{chunk-6CME4UEK.js → chunk-PSHOXR6C.js} +7008 -4827
  131. package/dist/chunk-PSHOXR6C.js.map +1 -0
  132. package/dist/chunk-PSMV73A5.js +117 -0
  133. package/dist/chunk-PSMV73A5.js.map +1 -0
  134. package/dist/chunk-PY4KJPYU.js +9 -0
  135. package/dist/chunk-PY4KJPYU.js.map +1 -0
  136. package/dist/chunk-PZ5AY32C.js +10 -0
  137. package/dist/{chunk-DE6GKS6G.js → chunk-Q7SS3IME.js} +50 -9
  138. package/dist/chunk-Q7SS3IME.js.map +1 -0
  139. package/dist/chunk-QHJW5EXU.js +54 -0
  140. package/dist/chunk-QHJW5EXU.js.map +1 -0
  141. package/dist/chunk-QZISFCVG.js +233 -0
  142. package/dist/chunk-QZISFCVG.js.map +1 -0
  143. package/dist/{chunk-NONAAENK.js → chunk-RUEKROOS.js} +11 -4
  144. package/dist/chunk-RUEKROOS.js.map +1 -0
  145. package/dist/chunk-RUIMKQTA.js +23 -0
  146. package/dist/chunk-RUIMKQTA.js.map +1 -0
  147. package/dist/{chunk-TFBP23BX.js → chunk-SKF73JOP.js} +66 -7
  148. package/dist/chunk-SKF73JOP.js.map +1 -0
  149. package/dist/chunk-SM3AVUHC.js +42 -0
  150. package/dist/chunk-SM3AVUHC.js.map +1 -0
  151. package/dist/{chunk-ML236QKC.js → chunk-SMXWYP24.js} +5 -5
  152. package/dist/chunk-SMXWYP24.js.map +1 -0
  153. package/dist/chunk-SRB2XEWB.js +148 -0
  154. package/dist/chunk-SRB2XEWB.js.map +1 -0
  155. package/dist/chunk-SVLR4POP.js +64 -0
  156. package/dist/chunk-SVLR4POP.js.map +1 -0
  157. package/dist/chunk-TA66UMI4.js +123 -0
  158. package/dist/chunk-TA66UMI4.js.map +1 -0
  159. package/dist/chunk-TEILUWOI.js +664 -0
  160. package/dist/chunk-TEILUWOI.js.map +1 -0
  161. package/dist/chunk-TJYQIGAP.js +82 -0
  162. package/dist/chunk-TJYQIGAP.js.map +1 -0
  163. package/dist/{chunk-H2X3ISXG.js → chunk-UAG5KWVA.js} +7 -7
  164. package/dist/chunk-UAG5KWVA.js.map +1 -0
  165. package/dist/chunk-UDRIWL7A.js +382 -0
  166. package/dist/chunk-UDRIWL7A.js.map +1 -0
  167. package/dist/{chunk-2GLDA55J.js → chunk-UIU2THRG.js} +498 -133
  168. package/dist/chunk-UIU2THRG.js.map +1 -0
  169. package/dist/{chunk-3YPCK6JX.js → chunk-UPJNJGGA.js} +165 -423
  170. package/dist/chunk-UPJNJGGA.js.map +1 -0
  171. package/dist/chunk-UV5MFVO3.js +21 -0
  172. package/dist/chunk-UV5MFVO3.js.map +1 -0
  173. package/dist/{chunk-2WUSG3IT.js → chunk-V7RWQRG7.js} +5 -5
  174. package/dist/chunk-V7RWQRG7.js.map +1 -0
  175. package/dist/{chunk-VTKGMEPP.js → chunk-VCTFO5CO.js} +13 -3
  176. package/dist/chunk-VCTFO5CO.js.map +1 -0
  177. package/dist/{chunk-5T22KDPN.js → chunk-VFQGRQIH.js} +8 -8
  178. package/dist/chunk-VFQGRQIH.js.map +1 -0
  179. package/dist/{chunk-2QR2PQTT.js → chunk-VQNJ7UZL.js} +5 -3
  180. package/dist/chunk-VQNJ7UZL.js.map +1 -0
  181. package/dist/{chunk-DONMZAD2.js → chunk-WWGT2MDV.js} +43 -165
  182. package/dist/chunk-WWGT2MDV.js.map +1 -0
  183. package/dist/{chunk-EMIGCR7X.js → chunk-WXSYDNBT.js} +2 -2
  184. package/dist/chunk-WXSYDNBT.js.map +1 -0
  185. package/dist/chunk-WYSO2NIH.js +30 -0
  186. package/dist/chunk-WYSO2NIH.js.map +1 -0
  187. package/dist/chunk-XXYIOFUB.js +164 -0
  188. package/dist/chunk-XXYIOFUB.js.map +1 -0
  189. package/dist/{chunk-3BFJOWSU.js → chunk-Y22T3KQE.js} +35 -7
  190. package/dist/chunk-Y22T3KQE.js.map +1 -0
  191. package/dist/{chunk-A3JMGXPG.js → chunk-YMUGBZN2.js} +2 -2
  192. package/dist/chunk-YMUGBZN2.js.map +1 -0
  193. package/dist/{chunk-I5FOWO4J.js → chunk-ZCGAHGUS.js} +52 -73
  194. package/dist/chunk-ZCGAHGUS.js.map +1 -0
  195. package/dist/{chunk-FZU343FL.js → chunk-ZJADGNYF.js} +2 -2
  196. package/dist/chunk-ZJADGNYF.js.map +1 -0
  197. package/dist/{chunk-B6PB7JLN.js → chunk-ZYUC53LT.js} +427 -6
  198. package/dist/chunk-ZYUC53LT.js.map +1 -0
  199. package/dist/collection-facade-GQAOGJP2.js +33 -0
  200. package/dist/consent/index.d.ts +5 -7
  201. package/dist/consent/index.js +7 -5
  202. package/dist/consent/index.js.map +1 -1
  203. package/dist/crdt/index.d.ts +6 -2
  204. package/dist/crdt/index.js +3 -2
  205. package/dist/crdt/index.js.map +1 -1
  206. package/dist/decrypt-partition-IHtxEnTi.d.ts +21 -0
  207. package/dist/delegation-UL5HKLER.js +19 -0
  208. package/dist/derivations/index.d.ts +7 -9
  209. package/dist/derivations/index.js +11 -6
  210. package/dist/describe/index.d.ts +1 -0
  211. package/dist/describe/index.js +1 -0
  212. package/dist/describe-Ccd1hS7a.d.ts +143 -0
  213. package/dist/{dev-unlock-B4kDxep_.d.ts → dev-unlock-h0K-UZTk.d.ts} +1 -1
  214. package/dist/discriminant-BN9REW3o.d.ts +60 -0
  215. package/dist/enclave-UL5LW66V.js +88 -0
  216. package/dist/executor-2FWQRLMG.js +15 -0
  217. package/dist/executor-QZ7BXICW.js +9 -0
  218. package/dist/executor-Z5ZLJVTV.js +9 -0
  219. package/dist/export-accessible-KRV5W4GH.js +17 -0
  220. package/dist/extract-partition-GLKBOXFQ.js +30 -0
  221. package/dist/{fanout-sidecar-OKPMMPLG.js → fanout-sidecar-GF3DJ6KR.js} +34 -14
  222. package/dist/fanout-sidecar-GF3DJ6KR.js.map +1 -0
  223. package/dist/forget/index.d.ts +36 -0
  224. package/dist/forget/index.js +19 -0
  225. package/dist/forget/index.js.map +1 -0
  226. package/dist/guards/index.d.ts +13 -9
  227. package/dist/guards/index.js +12 -5
  228. package/dist/{hash-DdpVypUp.d.cts → hash-CdSr06sm.d.ts} +5 -1
  229. package/dist/history/index.d.ts +6 -8
  230. package/dist/history/index.js +19 -12
  231. package/dist/history/index.js.map +1 -1
  232. package/dist/i18n/index.d.ts +5 -7
  233. package/dist/i18n/index.js +104 -15
  234. package/dist/i18n/index.js.map +1 -1
  235. package/dist/in/index.d.ts +5 -0
  236. package/dist/in/index.js +1 -0
  237. package/dist/in/index.js.map +1 -0
  238. package/dist/index-B9QdHytu.d.ts +123 -0
  239. package/dist/index-CGLLRtFc.d.ts +123 -0
  240. package/dist/{types-Df28QFKb.d.ts → index-_6At2_9_.d.ts} +16270 -8358
  241. package/dist/index.d.ts +1088 -450
  242. package/dist/index.js +1165 -293
  243. package/dist/index.js.map +1 -1
  244. package/dist/indexing/index.d.ts +6 -3
  245. package/dist/indexing/index.js +6 -5
  246. package/dist/indexing/index.js.map +1 -1
  247. package/dist/issue-Y6UVIR43.js +13 -0
  248. package/dist/issue-Y6UVIR43.js.map +1 -0
  249. package/dist/kernel/index.d.ts +32 -0
  250. package/dist/kernel/index.js +53 -0
  251. package/dist/kernel/index.js.map +1 -0
  252. package/dist/{ledger-TMRZYNVJ.js → ledger-RYI35CDS.js} +12 -9
  253. package/dist/ledger-RYI35CDS.js.map +1 -0
  254. package/dist/liberate-CRPZEV7O.js +18 -0
  255. package/dist/liberate-CRPZEV7O.js.map +1 -0
  256. package/dist/materialized-views/index.d.ts +6 -19
  257. package/dist/materialized-views/index.js +16 -12
  258. package/dist/mime-magic-B4RoFj3B.d.ts +103 -0
  259. package/dist/noydb-LDEBLNHY.js +50 -0
  260. package/dist/noydb-LDEBLNHY.js.map +1 -0
  261. package/dist/on/index.d.ts +5 -0
  262. package/dist/on/index.js +11 -0
  263. package/dist/on/index.js.map +1 -0
  264. package/dist/overlay-views/index.d.ts +27 -11
  265. package/dist/overlay-views/index.js +7 -6
  266. package/dist/periods/index.d.ts +5 -7
  267. package/dist/periods/index.js +13 -9
  268. package/dist/pod/index.d.ts +63 -0
  269. package/dist/pod/index.js +61 -0
  270. package/dist/pod/index.js.map +1 -0
  271. package/dist/policy-IXK4FVXP.js +41 -0
  272. package/dist/policy-IXK4FVXP.js.map +1 -0
  273. package/dist/portability/index.d.ts +20 -0
  274. package/dist/portability/index.js +43 -0
  275. package/dist/portability/index.js.map +1 -0
  276. package/dist/{public-envelope-BW6OXORV.js → public-envelope-JHDQCPSX.js} +6 -5
  277. package/dist/public-envelope-JHDQCPSX.js.map +1 -0
  278. package/dist/query/index.d.ts +5 -3
  279. package/dist/query/index.js +21 -13
  280. package/dist/read-only-facade-5ADRJVTM.js +8 -0
  281. package/dist/read-only-facade-5ADRJVTM.js.map +1 -0
  282. package/dist/registry-45RJNWGU.js +9 -0
  283. package/dist/registry-45RJNWGU.js.map +1 -0
  284. package/dist/registry-5GRV5VXI.js +13 -0
  285. package/dist/registry-5GRV5VXI.js.map +1 -0
  286. package/dist/registry-VW6P6A3J.js +8 -0
  287. package/dist/registry-VW6P6A3J.js.map +1 -0
  288. package/dist/registry-WEUCHBO4.js +11 -0
  289. package/dist/registry-WEUCHBO4.js.map +1 -0
  290. package/dist/request-withdrawal-GBPH2FDY.js +25 -0
  291. package/dist/request-withdrawal-GBPH2FDY.js.map +1 -0
  292. package/dist/revoke-TUFRGI6S.js +18 -0
  293. package/dist/revoke-TUFRGI6S.js.map +1 -0
  294. package/dist/sealed-record/index.d.ts +69 -0
  295. package/dist/sealed-record/index.js +65 -0
  296. package/dist/sealed-record/index.js.map +1 -0
  297. package/dist/session/index.d.ts +6 -8
  298. package/dist/session/index.js +7 -5
  299. package/dist/session/index.js.map +1 -1
  300. package/dist/shadow/index.d.ts +5 -7
  301. package/dist/shadow/index.js +4 -3
  302. package/dist/shadow/index.js.map +1 -1
  303. package/dist/{signer-72QAUSVW.js → signer-PNKTBVF7.js} +6 -5
  304. package/dist/signer-PNKTBVF7.js.map +1 -0
  305. package/dist/snapshots/index.d.ts +6 -8
  306. package/dist/snapshots/index.js +13 -11
  307. package/dist/snapshots/index.js.map +1 -1
  308. package/dist/{stale-6ZDBTQT7.js → stale-3JWHNDIY.js} +3 -2
  309. package/dist/stale-3JWHNDIY.js.map +1 -0
  310. package/dist/store-coordination-provider-3I7XWZZK.js +142 -0
  311. package/dist/store-coordination-provider-3I7XWZZK.js.map +1 -0
  312. package/dist/subject-index-O75wKshW.d.ts +362 -0
  313. package/dist/sync/index.d.ts +4 -6
  314. package/dist/sync/index.js +7 -6
  315. package/dist/sync/index.js.map +1 -1
  316. package/dist/team/index.d.ts +5 -7
  317. package/dist/team/index.js +20 -16
  318. package/dist/tiers/index.d.ts +5 -0
  319. package/dist/tiers/index.js +33 -0
  320. package/dist/tiers/index.js.map +1 -0
  321. package/dist/to/index.d.ts +5 -0
  322. package/dist/to/index.js +17 -0
  323. package/dist/to/index.js.map +1 -0
  324. package/dist/transition-guard-DqodPNKw.d.ts +165 -0
  325. package/dist/tx/index.d.ts +23 -9
  326. package/dist/tx/index.js +13 -8
  327. package/dist/tx/index.js.map +1 -1
  328. package/dist/ui/index.d.ts +1 -0
  329. package/dist/ui/index.js +1 -0
  330. package/dist/ui/index.js.map +1 -0
  331. package/dist/ulid-DRH25k3y.d.ts +66 -0
  332. package/dist/ulid-PTAIMDG4.js +10 -0
  333. package/dist/ulid-PTAIMDG4.js.map +1 -0
  334. package/dist/util/index.d.ts +2 -0
  335. package/dist/util/index.js +7 -2
  336. package/dist/util/index.js.map +1 -1
  337. package/dist/vault-diff-BtpiBvic.d.ts +147 -0
  338. package/dist/with/index.d.ts +38 -0
  339. package/dist/with/index.js +25 -0
  340. package/dist/with/index.js.map +1 -0
  341. package/dist/{with-materialized-view-BLkQxoQN.d.ts → with-materialized-view-DMmWtYfJ.d.ts} +1 -1
  342. package/dist/{with-overlayed-view-CRsSEwHR.d.ts → with-overlayed-view-D_IB2nkM.d.ts} +2 -3
  343. package/dist/with-rollup-em2wxoHP.d.ts +47 -0
  344. package/dist/withdraw-accessible-FFS46EOD.js +22 -0
  345. package/dist/withdraw-accessible-FFS46EOD.js.map +1 -0
  346. package/dist/zod-HAJM7LMS.js +14763 -0
  347. package/dist/zod-HAJM7LMS.js.map +1 -0
  348. package/package.json +121 -201
  349. package/dist/aggregate/index.cjs.map +0 -1
  350. package/dist/aggregate/index.d.cts +0 -38
  351. package/dist/attestation/index.cjs +0 -305
  352. package/dist/attestation/index.cjs.map +0 -1
  353. package/dist/attestation/index.d.cts +0 -52
  354. package/dist/blobs/index.cjs +0 -1480
  355. package/dist/blobs/index.cjs.map +0 -1
  356. package/dist/blobs/index.d.cts +0 -46
  357. package/dist/bundle/index.cjs +0 -19264
  358. package/dist/bundle/index.cjs.map +0 -1
  359. package/dist/bundle/index.d.cts +0 -176
  360. package/dist/chunk-22DWZL57.js.map +0 -1
  361. package/dist/chunk-2GLDA55J.js.map +0 -1
  362. package/dist/chunk-2QR2PQTT.js.map +0 -1
  363. package/dist/chunk-2WUSG3IT.js.map +0 -1
  364. package/dist/chunk-3BFJOWSU.js.map +0 -1
  365. package/dist/chunk-3YPCK6JX.js.map +0 -1
  366. package/dist/chunk-53XBRIRT.js.map +0 -1
  367. package/dist/chunk-5T22KDPN.js.map +0 -1
  368. package/dist/chunk-5XHKQ56N.js +0 -340
  369. package/dist/chunk-5XHKQ56N.js.map +0 -1
  370. package/dist/chunk-6CME4UEK.js.map +0 -1
  371. package/dist/chunk-6STK5TQP.js +0 -139
  372. package/dist/chunk-6STK5TQP.js.map +0 -1
  373. package/dist/chunk-A3JMGXPG.js.map +0 -1
  374. package/dist/chunk-B6PB7JLN.js.map +0 -1
  375. package/dist/chunk-BVRYKATC.js.map +0 -1
  376. package/dist/chunk-DE6GKS6G.js.map +0 -1
  377. package/dist/chunk-DFMLEQZB.js.map +0 -1
  378. package/dist/chunk-DJHHA6XH.js.map +0 -1
  379. package/dist/chunk-DL3HWOQ5.js.map +0 -1
  380. package/dist/chunk-DONMZAD2.js.map +0 -1
  381. package/dist/chunk-EMIGCR7X.js.map +0 -1
  382. package/dist/chunk-F3GDRNUT.js.map +0 -1
  383. package/dist/chunk-FZU343FL.js.map +0 -1
  384. package/dist/chunk-H2X3ISXG.js.map +0 -1
  385. package/dist/chunk-HNRHLRDC.js.map +0 -1
  386. package/dist/chunk-I5FOWO4J.js.map +0 -1
  387. package/dist/chunk-J66GRPNH.js.map +0 -1
  388. package/dist/chunk-JWRVQKRZ.js.map +0 -1
  389. package/dist/chunk-K3DK3NU5.js.map +0 -1
  390. package/dist/chunk-ML236QKC.js.map +0 -1
  391. package/dist/chunk-NONAAENK.js.map +0 -1
  392. package/dist/chunk-O3VZPBZG.js.map +0 -1
  393. package/dist/chunk-OIF6LZUR.js.map +0 -1
  394. package/dist/chunk-OQ6PIGHA.js +0 -19
  395. package/dist/chunk-OQ6PIGHA.js.map +0 -1
  396. package/dist/chunk-PE2FR4J3.js.map +0 -1
  397. package/dist/chunk-PP6W64Y3.js +0 -275
  398. package/dist/chunk-PP6W64Y3.js.map +0 -1
  399. package/dist/chunk-PX35GA7L.js.map +0 -1
  400. package/dist/chunk-QEILDE6R.js +0 -793
  401. package/dist/chunk-QEILDE6R.js.map +0 -1
  402. package/dist/chunk-QODLLGQ7.js.map +0 -1
  403. package/dist/chunk-RAZ4OVLL.js +0 -51
  404. package/dist/chunk-RAZ4OVLL.js.map +0 -1
  405. package/dist/chunk-SYMWGEET.js.map +0 -1
  406. package/dist/chunk-T7JEBOGN.js.map +0 -1
  407. package/dist/chunk-TFBP23BX.js.map +0 -1
  408. package/dist/chunk-TV3YZ35S.js +0 -90
  409. package/dist/chunk-TV3YZ35S.js.map +0 -1
  410. package/dist/chunk-U26HQ6KJ.js.map +0 -1
  411. package/dist/chunk-UF3BUNQZ.js +0 -1
  412. package/dist/chunk-UMLVJTYV.js +0 -20
  413. package/dist/chunk-UMLVJTYV.js.map +0 -1
  414. package/dist/chunk-VTKGMEPP.js.map +0 -1
  415. package/dist/chunk-W6EQLGMB.js +0 -100
  416. package/dist/chunk-W6EQLGMB.js.map +0 -1
  417. package/dist/chunk-WIRRPTFH.js +0 -17
  418. package/dist/chunk-WIRRPTFH.js.map +0 -1
  419. package/dist/chunk-WPLVTJ5D.js.map +0 -1
  420. package/dist/chunk-XJFLDA7A.js.map +0 -1
  421. package/dist/chunk-Z6FNBOTC.js.map +0 -1
  422. package/dist/chunk-ZYWZWG6G.js.map +0 -1
  423. package/dist/consent/index.cjs +0 -204
  424. package/dist/consent/index.cjs.map +0 -1
  425. package/dist/consent/index.d.cts +0 -25
  426. package/dist/crdt/index.cjs +0 -152
  427. package/dist/crdt/index.cjs.map +0 -1
  428. package/dist/crdt/index.d.cts +0 -30
  429. package/dist/crypto-HTZ4FJOP.js +0 -44
  430. package/dist/delegation-RI54P6I5.js +0 -17
  431. package/dist/derivations/index.cjs +0 -351
  432. package/dist/derivations/index.cjs.map +0 -1
  433. package/dist/derivations/index.d.cts +0 -72
  434. package/dist/dev-unlock-BIoEFbwm.d.cts +0 -263
  435. package/dist/executor-5PNY7LGW.js +0 -8
  436. package/dist/executor-B4QIYGZX.js +0 -8
  437. package/dist/executor-BWXXDQ7K.js +0 -11
  438. package/dist/fanout-sidecar-OKPMMPLG.js.map +0 -1
  439. package/dist/guards/index.cjs +0 -322
  440. package/dist/guards/index.cjs.map +0 -1
  441. package/dist/guards/index.d.cts +0 -31
  442. package/dist/hash-HJqD14vS.d.ts +0 -63
  443. package/dist/history/index.cjs +0 -1222
  444. package/dist/history/index.cjs.map +0 -1
  445. package/dist/history/index.d.cts +0 -63
  446. package/dist/i18n/index.cjs +0 -1100
  447. package/dist/i18n/index.cjs.map +0 -1
  448. package/dist/i18n/index.d.cts +0 -39
  449. package/dist/index-4fBVt8j9.d.cts +0 -2387
  450. package/dist/index-D8I_pyJD.d.ts +0 -2387
  451. package/dist/index.cjs +0 -24487
  452. package/dist/index.cjs.map +0 -1
  453. package/dist/index.d.cts +0 -776
  454. package/dist/indexing/index.cjs +0 -742
  455. package/dist/indexing/index.cjs.map +0 -1
  456. package/dist/indexing/index.d.cts +0 -36
  457. package/dist/issue-VGDPP4B5.js +0 -12
  458. package/dist/lazy-builder-7tIpFyWN.d.ts +0 -304
  459. package/dist/lazy-builder-wY4pMCEe.d.cts +0 -304
  460. package/dist/materialized-views/index.cjs +0 -854
  461. package/dist/materialized-views/index.cjs.map +0 -1
  462. package/dist/materialized-views/index.d.cts +0 -186
  463. package/dist/mime-magic-CBBSOkjm.d.cts +0 -50
  464. package/dist/mime-magic-CBBSOkjm.d.ts +0 -50
  465. package/dist/noydb-G725ZSZG.js +0 -34
  466. package/dist/overlay-views/index.cjs +0 -359
  467. package/dist/overlay-views/index.cjs.map +0 -1
  468. package/dist/overlay-views/index.d.cts +0 -82
  469. package/dist/periods/index.cjs +0 -1041
  470. package/dist/periods/index.cjs.map +0 -1
  471. package/dist/periods/index.d.cts +0 -22
  472. package/dist/predicate-BSAGEyu5.d.cts +0 -209
  473. package/dist/predicate-BSAGEyu5.d.ts +0 -209
  474. package/dist/query/index.cjs +0 -2375
  475. package/dist/query/index.cjs.map +0 -1
  476. package/dist/query/index.d.cts +0 -3
  477. package/dist/read-only-facade-ITU6L7BL.js +0 -7
  478. package/dist/registry-3QP3YKQS.js +0 -8
  479. package/dist/registry-DKEXOJVO.js +0 -7
  480. package/dist/registry-OJIOSBV6.js +0 -10
  481. package/dist/registry-USRVT6YF.js +0 -8
  482. package/dist/revoke-JCC7N56X.js +0 -17
  483. package/dist/session/index.cjs +0 -495
  484. package/dist/session/index.cjs.map +0 -1
  485. package/dist/session/index.d.cts +0 -46
  486. package/dist/shadow/index.cjs +0 -133
  487. package/dist/shadow/index.cjs.map +0 -1
  488. package/dist/shadow/index.d.cts +0 -17
  489. package/dist/snapshots/index.cjs +0 -937
  490. package/dist/snapshots/index.cjs.map +0 -1
  491. package/dist/snapshots/index.d.cts +0 -28
  492. package/dist/store/index.cjs +0 -1083
  493. package/dist/store/index.cjs.map +0 -1
  494. package/dist/store/index.d.cts +0 -492
  495. package/dist/store/index.d.ts +0 -492
  496. package/dist/store/index.js +0 -37
  497. package/dist/strategy-BSxFXGzb.d.cts +0 -110
  498. package/dist/strategy-BSxFXGzb.d.ts +0 -110
  499. package/dist/strategy-DSTrsZ8t.d.cts +0 -601
  500. package/dist/strategy-DSTrsZ8t.d.ts +0 -601
  501. package/dist/sync/index.cjs +0 -1062
  502. package/dist/sync/index.cjs.map +0 -1
  503. package/dist/sync/index.d.cts +0 -43
  504. package/dist/team/index.cjs +0 -2798
  505. package/dist/team/index.cjs.map +0 -1
  506. package/dist/team/index.d.cts +0 -118
  507. package/dist/tx/index.cjs +0 -544
  508. package/dist/tx/index.cjs.map +0 -1
  509. package/dist/tx/index.d.cts +0 -21
  510. package/dist/types-DyXYr8rE.d.cts +0 -12818
  511. package/dist/ulid-COREQ2RQ.js +0 -9
  512. package/dist/ulid-Drr7ykr6.d.cts +0 -603
  513. package/dist/util/index.cjs +0 -230
  514. package/dist/util/index.cjs.map +0 -1
  515. package/dist/util/index.d.cts +0 -77
  516. package/dist/with-derivation-DFnFByiQ.d.ts +0 -13
  517. package/dist/with-derivation-DU3Sjazm.d.cts +0 -13
  518. package/dist/with-guard-ByyxmEe7.d.cts +0 -18
  519. package/dist/with-guard-qube6BMI.d.ts +0 -18
  520. package/dist/with-materialized-view-BmEToIR1.d.cts +0 -27
  521. package/dist/with-overlayed-view-BMsQQbWm.d.cts +0 -13
  522. /package/dist/{store → adapter}/index.js.map +0 -0
  523. /package/dist/{chunk-UF3BUNQZ.js.map → api-RW3KP7WU.js.map} +0 -0
  524. /package/dist/{crypto-HTZ4FJOP.js.map → as/index.js.map} +0 -0
  525. /package/dist/{delegation-RI54P6I5.js.map → at/index.js.map} +0 -0
  526. /package/dist/{executor-5PNY7LGW.js.map → by/index.js.map} +0 -0
  527. /package/dist/{executor-B4QIYGZX.js.map → cargo/index.js.map} +0 -0
  528. /package/dist/{executor-BWXXDQ7K.js.map → chunk-BGIZAFY7.js.map} +0 -0
  529. /package/dist/{issue-VGDPP4B5.js.map → chunk-CHFZDSE4.js.map} +0 -0
  530. /package/dist/{ledger-TMRZYNVJ.js.map → chunk-GHVIKOHT.js.map} +0 -0
  531. /package/dist/{noydb-G725ZSZG.js.map → chunk-K2WCO3NX.js.map} +0 -0
  532. /package/dist/{public-envelope-BW6OXORV.js.map → chunk-PZ5AY32C.js.map} +0 -0
  533. /package/dist/{read-only-facade-ITU6L7BL.js.map → collection-facade-GQAOGJP2.js.map} +0 -0
  534. /package/dist/{registry-3QP3YKQS.js.map → delegation-UL5HKLER.js.map} +0 -0
  535. /package/dist/{registry-DKEXOJVO.js.map → describe/index.js.map} +0 -0
  536. /package/dist/{registry-OJIOSBV6.js.map → enclave-UL5LW66V.js.map} +0 -0
  537. /package/dist/{registry-USRVT6YF.js.map → executor-2FWQRLMG.js.map} +0 -0
  538. /package/dist/{revoke-JCC7N56X.js.map → executor-QZ7BXICW.js.map} +0 -0
  539. /package/dist/{signer-72QAUSVW.js.map → executor-Z5ZLJVTV.js.map} +0 -0
  540. /package/dist/{stale-6ZDBTQT7.js.map → export-accessible-KRV5W4GH.js.map} +0 -0
  541. /package/dist/{ulid-COREQ2RQ.js.map → extract-partition-GLKBOXFQ.js.map} +0 -0
@@ -0,0 +1,143 @@
1
+ /**
2
+ * Consumer-neutral, data-relatable field descriptors — the canonical,
3
+ * validator-agnostic authoring channel. Merged by `collection.describe()`.
4
+ *
5
+ * Descriptive, never prescriptive: label/semanticType/unit/sensitivity/
6
+ * aggregate/aliases/displayFor only. Layout, styling, and active-locale
7
+ * selection stay app-side.
8
+ *
9
+ * @module
10
+ */
11
+ /** Known semantic types; the union is open — unknown strings pass through. */
12
+ type SemanticType = 'date' | 'datetime' | 'email' | 'url' | 'currency' | 'percent' | 'country' | 'vat' | 'iban' | 'entity' | (string & {});
13
+ interface FieldMeta {
14
+ /** Human label for any displayable field. Required. */
15
+ label: string;
16
+ description?: string;
17
+ semanticType?: SemanticType;
18
+ /** Display unit, e.g. '€', '%', 'kg'. */
19
+ unit?: string;
20
+ /** Data classification driving redaction/inspector masking. */
21
+ sensitivity?: 'public' | 'pii' | 'secret';
22
+ /** Default aggregation for this field. */
23
+ aggregate?: 'sum' | 'count' | 'distinct' | 'none';
24
+ /** Canonical search synonyms (data vocabulary, not UI). */
25
+ aliases?: readonly string[];
26
+ /** Entity pairing: the field holding the human label for this id (buyerId → buyerName). */
27
+ displayFor?: string;
28
+ /**
29
+ * Override the widget hint derived from semanticType/type.
30
+ * e.g. 'textarea', 'date', 'money', 'select', 'checkbox', 'number', 'text'.
31
+ * When absent, the widget is derived automatically by buildDescription.
32
+ */
33
+ widget?: string;
34
+ /**
35
+ * Card/section grouping hint for detail & form layouts (e.g. 'Identity',
36
+ * 'Amounts'). Purely descriptive metadata — consumers group; describe()
37
+ * keeps emitting fields alphabetically.
38
+ */
39
+ group?: string;
40
+ /** Relative ordering hint within (and across) groups. Lower renders first. */
41
+ order?: number;
42
+ }
43
+
44
+ /**
45
+ * Descriptive metadata for the collection and vault levels of the metadata
46
+ * ladder (field level = FieldMeta). Identity, not structure: label /
47
+ * description / icon only. Descriptive, never prescriptive.
48
+ * @module
49
+ */
50
+ /** A collection's own descriptive metadata. */
51
+ interface CollectionMeta {
52
+ /** Friendly name; falls back to the humanized collection name. */
53
+ label?: string;
54
+ description?: string;
55
+ /** Semantic icon NAME (e.g. a Lucide key), not styling. */
56
+ icon?: string;
57
+ /** Plural form for list headers ("Invoice" → "Invoices"). */
58
+ pluralLabel?: string;
59
+ }
60
+ /** A vault's own descriptive metadata. */
61
+ interface VaultMeta {
62
+ label?: string;
63
+ description?: string;
64
+ icon?: string;
65
+ }
66
+
67
+ /**
68
+ * `buildDescription` — pure assembler that merges collection config
69
+ * (moneyFields / dictKeyFields / refs / computed / fieldMeta) with an
70
+ * optional validator-derived `zodFields` map into a normalised
71
+ * {@link CollectionDescription}.
72
+ *
73
+ * The sync path (`collection.describe()`) passes `zodFields: undefined`.
74
+ * The async path supplies a populated map and validator-derived type
75
+ * strings.
76
+ *
77
+ * @module
78
+ */
79
+
80
+ interface DescribedField {
81
+ readonly key: string;
82
+ /** Sync: inferred from config ('number'|'enum'|'string'|'array'|'unknown'). Async (Task 4): validator-derived. */
83
+ readonly type: string;
84
+ readonly optional: boolean;
85
+ readonly constraints?: Record<string, unknown>;
86
+ readonly label: string;
87
+ readonly description?: string;
88
+ /** Card/section grouping hint for detail & form layouts. From fieldMeta/zod .meta(). */
89
+ readonly group?: string;
90
+ /** Relative ordering hint within and across groups. Lower renders first. */
91
+ readonly order?: number;
92
+ readonly semanticType?: string;
93
+ readonly unit?: string;
94
+ readonly sensitivity?: 'public' | 'pii' | 'secret';
95
+ readonly aggregate?: 'sum' | 'count' | 'distinct' | 'none';
96
+ readonly aliases?: readonly string[];
97
+ readonly ref?: {
98
+ target: string;
99
+ mode: string;
100
+ isArray?: true;
101
+ };
102
+ readonly displayFor?: string;
103
+ readonly money?: {
104
+ mode: 'fixed' | 'multi';
105
+ currency?: string;
106
+ scale?: number;
107
+ rounding?: string;
108
+ };
109
+ readonly dict?: {
110
+ name: string;
111
+ static: boolean;
112
+ values?: readonly {
113
+ value: string;
114
+ label?: string;
115
+ }[];
116
+ };
117
+ readonly computed?: true;
118
+ /** i18n metadata for fields declared with i18nText(). Present only when the field is i18n-enabled. */
119
+ readonly i18n?: {
120
+ readonly locales?: readonly string[];
121
+ readonly densify?: boolean;
122
+ };
123
+ /** Widget hint derived from semanticType+type, overridable via fieldMeta.widget. */
124
+ readonly widget: string;
125
+ /** Whether the field is user-editable. False for computed, id, and provenance-stamped fields. */
126
+ readonly editable: boolean;
127
+ }
128
+ interface CollectionDescription {
129
+ readonly collection: string;
130
+ readonly fields: readonly DescribedField[];
131
+ /** Collection-level descriptive metadata; label falls back to the humanized collection name. */
132
+ readonly meta: CollectionMeta;
133
+ }
134
+ /** Options for the async describe(opts) overload. */
135
+ interface DescribeOptions {
136
+ /**
137
+ * When true, resolve dynamic-dict labels from vault.dictionary(name).list()
138
+ * and populate dict.values[].label for dynamic dictKey fields.
139
+ */
140
+ readonly resolveDictLabels?: boolean;
141
+ }
142
+
143
+ export type { CollectionDescription as C, DescribeOptions as D, FieldMeta as F, SemanticType as S, VaultMeta as V, CollectionMeta as a, DescribedField as b };
@@ -1,4 +1,4 @@
1
- import { b0 as Role, b1 as UnlockedKeyring } from './types-Df28QFKb.js';
1
+ import { cR as Role, cF as UnlockedKeyring } from './index-_6At2_9_.js';
2
2
 
3
3
  /**
4
4
  * Session tokens —
@@ -0,0 +1,60 @@
1
+ /**
2
+ * Type-guard helper for narrowing discriminated-union records.
3
+ *
4
+ * `Collection<T>` correctly threads `T` through `get` / `query` / `scan`, but
5
+ * accessing member-specific fields after reading from a `Collection<Union>`
6
+ * still requires a narrowing step in application code. In regular `.ts` files
7
+ * a simple `if (r.kind === 'IV')` block narrows correctly; in vue-tsc /
8
+ * template contexts the inline comparison is sometimes not enough, and the
9
+ * helper below makes the guard portable and avoids `as unknown as …` casts.
10
+ *
11
+ * **Usage with Collection<T>**
12
+ *
13
+ * ```ts
14
+ * import { isDiscriminant } from '@noy-db/hub'
15
+ *
16
+ * type IV = { kind: 'IV'; invoiceNo: string; amount: number }
17
+ * type RE = { kind: 'RE'; receiptNo: string; paidAt: string }
18
+ * type Receipt = IV | RE | ...
19
+ *
20
+ * const receipts = await vault.collection<Receipt>('receipts').query().toArray()
21
+ *
22
+ * // Filter approach — result is IV[], invoiceNo accessible without cast:
23
+ * const ivs = receipts.filter(r => isDiscriminant(r, 'kind', 'IV'))
24
+ * console.log(ivs[0].invoiceNo)
25
+ *
26
+ * // Branch approach:
27
+ * for (const r of receipts) {
28
+ * if (isDiscriminant(r, 'kind', 'IV')) {
29
+ * console.log(r.invoiceNo) // r: IV here
30
+ * }
31
+ * }
32
+ * ```
33
+ *
34
+ * @module
35
+ */
36
+ /**
37
+ * Type-guard for narrowing a discriminated-union record by its discriminant.
38
+ *
39
+ * Returns `true` when `record[key] === value`, and narrows `record` to
40
+ * `Extract<T, Record<K, V>>` — the exact union member(s) that carry that
41
+ * discriminant value.
42
+ *
43
+ * The discriminant key is a parameter (not hardcoded to `'kind'`), so this
44
+ * works with any field name: `'kind'`, `'type'`, `'tag'`, etc.
45
+ *
46
+ * @example
47
+ * const ivs = receipts.filter(r => isDiscriminant(r, 'kind', 'IV'))
48
+ * // ivs: IV[] — invoiceNo accessible, no cast needed
49
+ *
50
+ * @typeParam T - The union type of the record (e.g. `Receipt`). Both type-alias
51
+ * unions and interface-extended unions work; use a `type` alias (`type Receipt = IV | RE`) for best
52
+ * results.
53
+ * @typeParam K - The discriminant key (must be a key of `T`).
54
+ * @typeParam V - The discriminant value to match. The `const` modifier ensures
55
+ * TypeScript infers the string literal (e.g. `'IV'`), not the full union
56
+ * `T[K]`, so the predicate resolves to the exact member type.
57
+ */
58
+ declare function isDiscriminant<T, K extends keyof T, const V extends T[K]>(record: T, key: K, value: V): record is Extract<T, Record<K, V>>;
59
+
60
+ export { isDiscriminant as i };
@@ -0,0 +1,88 @@
1
+ import {
2
+ RecordCodec,
3
+ SEALED_CEK_NS,
4
+ base64ToBuffer,
5
+ bufferToBase64,
6
+ buildTombstone,
7
+ decrypt,
8
+ decryptBytes,
9
+ decryptBytesWithAAD,
10
+ decryptDeterministic,
11
+ deriveKey,
12
+ derivePassphraseKey,
13
+ derivePresenceKey,
14
+ deriveSealedFieldKey,
15
+ deriveSealedFieldKeyFromCek,
16
+ encrypt,
17
+ encryptBytes,
18
+ encryptBytesWithAAD,
19
+ encryptDeterministic,
20
+ envelopeBodyForHash,
21
+ findByDet,
22
+ generateDEK,
23
+ generateIV,
24
+ generateSalt,
25
+ hasPerRecordKey,
26
+ hmacSha256Hex,
27
+ importCek,
28
+ isTombstone,
29
+ openEnvelopeJson,
30
+ queryByDet,
31
+ resolveStableCek,
32
+ revokeSealedRecord,
33
+ rewrapBodyToDek,
34
+ rotateRecordCek,
35
+ sealRecordToHost,
36
+ sha256Hex,
37
+ unwrapCek,
38
+ unwrapKey,
39
+ wrapCek,
40
+ wrapKey,
41
+ writeEnvelopeBody
42
+ } from "./chunk-5O3AOPDT.js";
43
+ import "./chunk-5TDJ56JE.js";
44
+ import "./chunk-ZYUC53LT.js";
45
+ import "./chunk-PZ5AY32C.js";
46
+ export {
47
+ RecordCodec,
48
+ SEALED_CEK_NS,
49
+ base64ToBuffer,
50
+ bufferToBase64,
51
+ buildTombstone,
52
+ decrypt,
53
+ decryptBytes,
54
+ decryptBytesWithAAD,
55
+ decryptDeterministic,
56
+ deriveKey,
57
+ derivePassphraseKey,
58
+ derivePresenceKey,
59
+ deriveSealedFieldKey,
60
+ deriveSealedFieldKeyFromCek,
61
+ encrypt,
62
+ encryptBytes,
63
+ encryptBytesWithAAD,
64
+ encryptDeterministic,
65
+ envelopeBodyForHash,
66
+ findByDet,
67
+ generateDEK,
68
+ generateIV,
69
+ generateSalt,
70
+ hasPerRecordKey,
71
+ hmacSha256Hex,
72
+ importCek,
73
+ isTombstone,
74
+ openEnvelopeJson,
75
+ queryByDet,
76
+ resolveStableCek,
77
+ revokeSealedRecord,
78
+ rewrapBodyToDek,
79
+ rotateRecordCek,
80
+ sealRecordToHost,
81
+ sha256Hex,
82
+ unwrapCek,
83
+ unwrapKey,
84
+ wrapCek,
85
+ wrapKey,
86
+ writeEnvelopeBody
87
+ };
88
+ //# sourceMappingURL=enclave-UL5LW66V.js.map
@@ -0,0 +1,15 @@
1
+ import {
2
+ MaterializedViewExecutor
3
+ } from "./chunk-AQTBSL7R.js";
4
+ import "./chunk-62QYRORB.js";
5
+ import "./chunk-5O3AOPDT.js";
6
+ import "./chunk-5TDJ56JE.js";
7
+ import "./chunk-LV7M27WM.js";
8
+ import "./chunk-M2YKN37S.js";
9
+ import "./chunk-5LUY7UTV.js";
10
+ import "./chunk-ZYUC53LT.js";
11
+ import "./chunk-PZ5AY32C.js";
12
+ export {
13
+ MaterializedViewExecutor
14
+ };
15
+ //# sourceMappingURL=executor-2FWQRLMG.js.map
@@ -0,0 +1,9 @@
1
+ import {
2
+ GuardExecutor
3
+ } from "./chunk-RUEKROOS.js";
4
+ import "./chunk-ZYUC53LT.js";
5
+ import "./chunk-PZ5AY32C.js";
6
+ export {
7
+ GuardExecutor
8
+ };
9
+ //# sourceMappingURL=executor-QZ7BXICW.js.map
@@ -0,0 +1,9 @@
1
+ import {
2
+ DerivationExecutor
3
+ } from "./chunk-PKHL44ER.js";
4
+ import "./chunk-ZYUC53LT.js";
5
+ import "./chunk-PZ5AY32C.js";
6
+ export {
7
+ DerivationExecutor
8
+ };
9
+ //# sourceMappingURL=executor-Z5ZLJVTV.js.map
@@ -0,0 +1,17 @@
1
+ import {
2
+ buildAccessibleBundle,
3
+ exportAccessibleData,
4
+ resolveAccessibleCollections
5
+ } from "./chunk-HCIPRAGS.js";
6
+ import "./chunk-FISN7WE4.js";
7
+ import "./chunk-SMXWYP24.js";
8
+ import "./chunk-5O3AOPDT.js";
9
+ import "./chunk-5TDJ56JE.js";
10
+ import "./chunk-ZYUC53LT.js";
11
+ import "./chunk-PZ5AY32C.js";
12
+ export {
13
+ buildAccessibleBundle,
14
+ exportAccessibleData,
15
+ resolveAccessibleCollections
16
+ };
17
+ //# sourceMappingURL=export-accessible-KRV5W4GH.js.map
@@ -0,0 +1,30 @@
1
+ import {
2
+ extractPartition,
3
+ extractPartitionCore,
4
+ reKeyBlobs,
5
+ reKeyClosure,
6
+ reKeyLedger,
7
+ reKeySchemas,
8
+ sealDeks
9
+ } from "./chunk-76722EBH.js";
10
+ import "./chunk-26LGBE4T.js";
11
+ import "./chunk-DFEMTNPJ.js";
12
+ import "./chunk-FISN7WE4.js";
13
+ import "./chunk-SMXWYP24.js";
14
+ import "./chunk-ZJADGNYF.js";
15
+ import "./chunk-I7FD46FF.js";
16
+ import "./chunk-AIWULCUO.js";
17
+ import "./chunk-5O3AOPDT.js";
18
+ import "./chunk-5TDJ56JE.js";
19
+ import "./chunk-ZYUC53LT.js";
20
+ import "./chunk-PZ5AY32C.js";
21
+ export {
22
+ extractPartition,
23
+ extractPartitionCore,
24
+ reKeyBlobs,
25
+ reKeyClosure,
26
+ reKeyLedger,
27
+ reKeySchemas,
28
+ sealDeks
29
+ };
30
+ //# sourceMappingURL=extract-partition-GLKBOXFQ.js.map
@@ -1,16 +1,24 @@
1
+ import {
2
+ encrypt,
3
+ openEnvelopeJson
4
+ } from "./chunk-5O3AOPDT.js";
1
5
  import {
2
6
  NOYDB_FORMAT_VERSION
3
- } from "./chunk-WIRRPTFH.js";
7
+ } from "./chunk-5TDJ56JE.js";
8
+ import "./chunk-ZYUC53LT.js";
9
+ import "./chunk-PZ5AY32C.js";
4
10
 
5
- // src/derivations/fanout-sidecar.ts
11
+ // src/with-formula/derivations/fanout-sidecar.ts
12
+ var FANOUT_DEK_COLLECTION = "_meta";
6
13
  function recordId(source, sourceId, outputKey) {
7
14
  return `derivations-fanout/${source}/${sourceId}/${outputKey}`;
8
15
  }
9
- async function loadFanoutSidecar(store, vault, source, sourceId, outputKey) {
16
+ async function loadFanoutSidecar(store, vault, source, sourceId, outputKey, getDEK, encrypted) {
10
17
  const envelope = await store.get(vault, "_meta", recordId(source, sourceId, outputKey));
11
18
  if (!envelope) return void 0;
12
19
  try {
13
- const parsed = JSON.parse(envelope._data);
20
+ const json = !encrypted || envelope._iv === "" ? envelope._data : await openEnvelopeJson(envelope, await getDEK(FANOUT_DEK_COLLECTION));
21
+ const parsed = JSON.parse(json);
14
22
  if (parsed._noydb_fanout !== 1) return void 0;
15
23
  if (!Array.isArray(parsed.keys)) return void 0;
16
24
  return parsed;
@@ -18,7 +26,7 @@ async function loadFanoutSidecar(store, vault, source, sourceId, outputKey) {
18
26
  return void 0;
19
27
  }
20
28
  }
21
- async function saveFanoutSidecar(store, vault, payload) {
29
+ async function saveFanoutSidecar(store, vault, payload, getDEK, encrypted) {
22
30
  const doc = {
23
31
  _noydb_fanout: 1,
24
32
  source: payload.source,
@@ -30,14 +38,26 @@ async function saveFanoutSidecar(store, vault, payload) {
30
38
  };
31
39
  const id = recordId(payload.source, payload.sourceId, payload.outputKey);
32
40
  const prior = await store.get(vault, "_meta", id);
33
- const envelope = {
34
- _noydb: NOYDB_FORMAT_VERSION,
35
- _v: (prior?._v ?? 0) + 1,
36
- _ts: (/* @__PURE__ */ new Date()).toISOString(),
37
- // AES-GCM bypassed — sidecar is system metadata, no user data inside.
38
- _iv: "",
39
- _data: JSON.stringify(doc)
40
- };
41
+ const json = JSON.stringify(doc);
42
+ let envelope;
43
+ if (!encrypted) {
44
+ envelope = {
45
+ _noydb: NOYDB_FORMAT_VERSION,
46
+ _v: (prior?._v ?? 0) + 1,
47
+ _ts: (/* @__PURE__ */ new Date()).toISOString(),
48
+ _iv: "",
49
+ _data: json
50
+ };
51
+ } else {
52
+ const { iv, data } = await encrypt(json, await getDEK(FANOUT_DEK_COLLECTION));
53
+ envelope = {
54
+ _noydb: NOYDB_FORMAT_VERSION,
55
+ _v: (prior?._v ?? 0) + 1,
56
+ _ts: (/* @__PURE__ */ new Date()).toISOString(),
57
+ _iv: iv,
58
+ _data: data
59
+ };
60
+ }
41
61
  await store.put(vault, "_meta", id, envelope);
42
62
  }
43
63
  async function deleteFanoutSidecar(store, vault, source, sourceId, outputKey) {
@@ -48,4 +68,4 @@ export {
48
68
  loadFanoutSidecar,
49
69
  saveFanoutSidecar
50
70
  };
51
- //# sourceMappingURL=fanout-sidecar-OKPMMPLG.js.map
71
+ //# sourceMappingURL=fanout-sidecar-GF3DJ6KR.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/with-formula/derivations/fanout-sidecar.ts"],"sourcesContent":["/**\n * Per-source-row fanout sidecar for `shape: 'array'` derivations.\n *\n * Each `(sourceCollection, sourceId, outputKey)` triple gets its own\n * envelope at:\n *\n * _meta/derivations-fanout/<sourceCollection>/<sourceId>/<outputKey>\n *\n * The envelope records the last-emitted derived row ids so the\n * dispatcher can compute the diff on every source-row update in O(1):\n * read prior keys, compute `toDelete = prev \\ new`, write new, persist\n * back.\n *\n * The body is encrypted (AES-GCM under the `_meta` collection DEK) when\n * the vault is encrypted — the `keys[]` are derived-row ids produced by a\n * user-supplied key extractor and can be content-bearing (SKU, tag, email),\n * so a ciphertext-only store must not read them, the derivation graph, or\n * `emittedAt`. Back-compat: sidecars written before this fix are plaintext\n * (`_iv === ''`); `loadFanoutSidecar` dual-reads them.\n *\n * @module\n */\nimport type { NoydbStore, EncryptedEnvelope } from '../../kernel/types.js'\nimport { NOYDB_FORMAT_VERSION } from '../../kernel/types.js'\nimport { encrypt, openEnvelopeJson, type EnclaveKey } from '../../kernel/enclave/index.js'\n\ntype GetDEK = (collectionName: string) => Promise<EnclaveKey>\n\n/** The `_meta` collection name whose DEK encrypts the sidecar body. */\nconst FANOUT_DEK_COLLECTION = '_meta'\n\n/** Magic-prefixed JSON payload at `_meta/<recordId>`. */\nexport interface FanoutSidecar {\n readonly _noydb_fanout: 1\n /** Source collection name. */\n readonly source: string\n /** Source record id. */\n readonly sourceId: string\n /** Strategy output key (the key in `strategy.outputs`). */\n readonly outputKey: string\n /** Output collection name (audit / forensics). */\n readonly outputCollection: string\n /** Derived-row ids last emitted for this (source, output) pair. */\n readonly keys: ReadonlyArray<string>\n /** ISO timestamp of last dispatch. */\n readonly emittedAt: string\n}\n\n/**\n * Build the canonical `_meta` record id for a fanout sidecar.\n *\n * The full path inside the store is `_meta/<this-string>`. We pack the\n * full triple into the id so a single `_meta` collection holds all\n * sidecars (collection-per-source would proliferate names; the\n * existing `_meta` flat namespace is cheaper).\n */\nfunction recordId(source: string, sourceId: string, outputKey: string): string {\n // Use `/` as a separator. None of the components is supposed to\n // contain it (collection names + output keys are bare identifiers;\n // source ids are typically ULIDs / UUIDs / app-chosen strings\n // without slashes). If a future source carries `/` in its id, we'd\n // need an escape; deferred until that's a real case.\n return `derivations-fanout/${source}/${sourceId}/${outputKey}`\n}\n\n/**\n * Read the sidecar; returns empty if absent.\n *\n * Dual-reads for back-compat: an envelope with `_iv === ''` is a legacy\n * plaintext sidecar (parse `_data` directly); otherwise the body was\n * encrypted under the `_meta` DEK and is decrypted first.\n */\nexport async function loadFanoutSidecar(\n store: NoydbStore,\n vault: string,\n source: string,\n sourceId: string,\n outputKey: string,\n getDEK: GetDEK,\n encrypted: boolean,\n): Promise<FanoutSidecar | undefined> {\n const envelope = await store.get(vault, '_meta', recordId(source, sourceId, outputKey))\n if (!envelope) return undefined\n try {\n // Legacy plaintext (`_iv === ''`) reads directly; encrypted bodies decrypt.\n const json = (!encrypted || envelope._iv === '')\n ? envelope._data\n : await openEnvelopeJson(envelope, await getDEK(FANOUT_DEK_COLLECTION))\n const parsed = JSON.parse(json) as FanoutSidecar\n if (parsed._noydb_fanout !== 1) return undefined\n if (!Array.isArray(parsed.keys)) return undefined\n return parsed\n } catch {\n return undefined\n }\n}\n\n/**\n * Persist (insert/replace) the sidecar with a fresh key set. The body is\n * encrypted under the `_meta` DEK when the vault is encrypted (the `keys[]`\n * can be content-bearing); plaintext only in debug/unencrypted vaults.\n */\nexport async function saveFanoutSidecar(\n store: NoydbStore,\n vault: string,\n payload: {\n readonly source: string\n readonly sourceId: string\n readonly outputKey: string\n readonly outputCollection: string\n readonly keys: ReadonlyArray<string>\n },\n getDEK: GetDEK,\n encrypted: boolean,\n): Promise<void> {\n const doc: FanoutSidecar = {\n _noydb_fanout: 1,\n source: payload.source,\n sourceId: payload.sourceId,\n outputKey: payload.outputKey,\n outputCollection: payload.outputCollection,\n keys: payload.keys,\n emittedAt: new Date().toISOString(),\n }\n const id = recordId(payload.source, payload.sourceId, payload.outputKey)\n const prior = await store.get(vault, '_meta', id)\n const json = JSON.stringify(doc)\n let envelope: EncryptedEnvelope\n if (!encrypted) {\n envelope = {\n _noydb: NOYDB_FORMAT_VERSION,\n _v: (prior?._v ?? 0) + 1,\n _ts: new Date().toISOString(),\n _iv: '',\n _data: json,\n }\n } else {\n const { iv, data } = await encrypt(json, await getDEK(FANOUT_DEK_COLLECTION))\n envelope = {\n _noydb: NOYDB_FORMAT_VERSION,\n _v: (prior?._v ?? 0) + 1,\n _ts: new Date().toISOString(),\n _iv: iv,\n _data: data,\n }\n }\n await store.put(vault, '_meta', id, envelope)\n}\n\n/** Delete the sidecar (used on source-row delete cascade). */\nexport async function deleteFanoutSidecar(\n store: NoydbStore,\n vault: string,\n source: string,\n sourceId: string,\n outputKey: string,\n): Promise<void> {\n await store.delete(vault, '_meta', recordId(source, sourceId, outputKey))\n}\n"],"mappings":";;;;;;;;;;;AA6BA,IAAM,wBAAwB;AA2B9B,SAAS,SAAS,QAAgB,UAAkB,WAA2B;AAM7E,SAAO,sBAAsB,MAAM,IAAI,QAAQ,IAAI,SAAS;AAC9D;AASA,eAAsB,kBACpB,OACA,OACA,QACA,UACA,WACA,QACA,WACoC;AACpC,QAAM,WAAW,MAAM,MAAM,IAAI,OAAO,SAAS,SAAS,QAAQ,UAAU,SAAS,CAAC;AACtF,MAAI,CAAC,SAAU,QAAO;AACtB,MAAI;AAEF,UAAM,OAAQ,CAAC,aAAa,SAAS,QAAQ,KACzC,SAAS,QACT,MAAM,iBAAiB,UAAU,MAAM,OAAO,qBAAqB,CAAC;AACxE,UAAM,SAAS,KAAK,MAAM,IAAI;AAC9B,QAAI,OAAO,kBAAkB,EAAG,QAAO;AACvC,QAAI,CAAC,MAAM,QAAQ,OAAO,IAAI,EAAG,QAAO;AACxC,WAAO;AAAA,EACT,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAOA,eAAsB,kBACpB,OACA,OACA,SAOA,QACA,WACe;AACf,QAAM,MAAqB;AAAA,IACzB,eAAe;AAAA,IACf,QAAQ,QAAQ;AAAA,IAChB,UAAU,QAAQ;AAAA,IAClB,WAAW,QAAQ;AAAA,IACnB,kBAAkB,QAAQ;AAAA,IAC1B,MAAM,QAAQ;AAAA,IACd,YAAW,oBAAI,KAAK,GAAE,YAAY;AAAA,EACpC;AACA,QAAM,KAAK,SAAS,QAAQ,QAAQ,QAAQ,UAAU,QAAQ,SAAS;AACvE,QAAM,QAAQ,MAAM,MAAM,IAAI,OAAO,SAAS,EAAE;AAChD,QAAM,OAAO,KAAK,UAAU,GAAG;AAC/B,MAAI;AACJ,MAAI,CAAC,WAAW;AACd,eAAW;AAAA,MACT,QAAQ;AAAA,MACR,KAAK,OAAO,MAAM,KAAK;AAAA,MACvB,MAAK,oBAAI,KAAK,GAAE,YAAY;AAAA,MAC5B,KAAK;AAAA,MACL,OAAO;AAAA,IACT;AAAA,EACF,OAAO;AACL,UAAM,EAAE,IAAI,KAAK,IAAI,MAAM,QAAQ,MAAM,MAAM,OAAO,qBAAqB,CAAC;AAC5E,eAAW;AAAA,MACT,QAAQ;AAAA,MACR,KAAK,OAAO,MAAM,KAAK;AAAA,MACvB,MAAK,oBAAI,KAAK,GAAE,YAAY;AAAA,MAC5B,KAAK;AAAA,MACL,OAAO;AAAA,IACT;AAAA,EACF;AACA,QAAM,MAAM,IAAI,OAAO,SAAS,IAAI,QAAQ;AAC9C;AAGA,eAAsB,oBACpB,OACA,OACA,QACA,UACA,WACe;AACf,QAAM,MAAM,OAAO,OAAO,SAAS,SAAS,QAAQ,UAAU,SAAS,CAAC;AAC1E;","names":[]}
@@ -0,0 +1,36 @@
1
+ import { S as SubjectDeclaration, F as ForgetStrategy } from '../subject-index-O75wKshW.js';
2
+ export { a as ForgetResult, N as NO_FORGET, b as SUBJECT_INDEX_COLLECTION, c as SubjectRef } from '../subject-index-O75wKshW.js';
3
+
4
+ /**
5
+ * `withForgetCascade` — the active factory for GDPR right-to-erasure via
6
+ * per-record CEK crypto-shred. Mirrors the canonical
7
+ * `strategy.ts` (type + `NO_FORGET` sentinel) / `active.ts` (factory) split
8
+ * used by the other services.
9
+ *
10
+ * @module
11
+ */
12
+
13
+ /**
14
+ * Declare GDPR crypto-shred for one or more collections.
15
+ *
16
+ * Each declared collection is forced to `perRecordKeys: true` (a shred can
17
+ * only guarantee erasure of a record whose body is keyed off a per-record
18
+ * CEK). On write, Noydb extracts `record[subjectField]` and maintains an
19
+ * encrypted `_subject_index` mapping `subject → [{collection, id}]`, so
20
+ * `vault.forget(subjectId)` can find every record for a subject and rewrite
21
+ * each to a tombstone (body + history permanently undecryptable) while the
22
+ * collection DEK and every other record stay intact.
23
+ *
24
+ * @example
25
+ * ```ts
26
+ * createNoydb({
27
+ * secret, user,
28
+ * forgetStrategy: withForgetCascade({ subjects: { invoices: 'buyerId' } }),
29
+ * })
30
+ * const result = await vault.forget('buyer-123')
31
+ * // → { subject, recordsShredded, historyVersionsShredded, collections, … }
32
+ * ```
33
+ */
34
+ declare function withForgetCascade(opts: SubjectDeclaration): ForgetStrategy;
35
+
36
+ export { ForgetStrategy, SubjectDeclaration, withForgetCascade };
@@ -0,0 +1,19 @@
1
+ import {
2
+ NO_FORGET,
3
+ SUBJECT_INDEX_COLLECTION
4
+ } from "../chunk-SRB2XEWB.js";
5
+ import "../chunk-5O3AOPDT.js";
6
+ import "../chunk-5TDJ56JE.js";
7
+ import "../chunk-ZYUC53LT.js";
8
+ import "../chunk-PZ5AY32C.js";
9
+
10
+ // src/with-audit/forget/active.ts
11
+ function withForgetCascade(opts) {
12
+ return { subjects: { ...opts.subjects } };
13
+ }
14
+ export {
15
+ NO_FORGET,
16
+ SUBJECT_INDEX_COLLECTION,
17
+ withForgetCascade
18
+ };
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/with-audit/forget/active.ts"],"sourcesContent":["/**\n * `withForgetCascade` — the active factory for GDPR right-to-erasure via\n * per-record CEK crypto-shred. Mirrors the canonical\n * `strategy.ts` (type + `NO_FORGET` sentinel) / `active.ts` (factory) split\n * used by the other services.\n *\n * @module\n */\nimport type { SubjectDeclaration, ForgetStrategy } from './strategy.js'\n\n/**\n * Declare GDPR crypto-shred for one or more collections.\n *\n * Each declared collection is forced to `perRecordKeys: true` (a shred can\n * only guarantee erasure of a record whose body is keyed off a per-record\n * CEK). On write, Noydb extracts `record[subjectField]` and maintains an\n * encrypted `_subject_index` mapping `subject → [{collection, id}]`, so\n * `vault.forget(subjectId)` can find every record for a subject and rewrite\n * each to a tombstone (body + history permanently undecryptable) while the\n * collection DEK and every other record stay intact.\n *\n * @example\n * ```ts\n * createNoydb({\n * secret, user,\n * forgetStrategy: withForgetCascade({ subjects: { invoices: 'buyerId' } }),\n * })\n * const result = await vault.forget('buyer-123')\n * // → { subject, recordsShredded, historyVersionsShredded, collections, … }\n * ```\n */\nexport function withForgetCascade(opts: SubjectDeclaration): ForgetStrategy {\n return { subjects: { ...opts.subjects } }\n}\n"],"mappings":";;;;;;;;;;AA+BO,SAAS,kBAAkB,MAA0C;AAC1E,SAAO,EAAE,UAAU,EAAE,GAAG,KAAK,SAAS,EAAE;AAC1C;","names":[]}
@@ -1,11 +1,9 @@
1
- export { w as withGuard } from '../with-guard-qube6BMI.js';
2
- import { as as GuardStrategy, at as GuardChange, au as GuardContext } from '../types-Df28QFKb.js';
3
- export { av as GuardRegistry, aw as GuardStrategyHandle, ax as ReadOnlyVaultFacade } from '../types-Df28QFKb.js';
4
- export { A as AmendmentForbiddenError, F as FieldFrozenError, I as InvariantError, e as RecordLockedError } from '../index-D8I_pyJD.js';
5
- import '../lazy-builder-7tIpFyWN.js';
6
- import '../predicate-BSAGEyu5.js';
7
- import '../strategy-DSTrsZ8t.js';
8
- import '../strategy-BSxFXGzb.js';
1
+ export { I as ImmutableGuardConfig, T as TransitionGuardConfig, i as immutableGuard, t as transitionGuard, w as withGuard } from '../transition-guard-DqodPNKw.js';
2
+ import { bJ as GuardStrategy, bK as GuardChange, bL as GuardContext } from '../index-_6At2_9_.js';
3
+ export { bM as AmendmentForbiddenError, bN as FieldFrozenError, bO as GuardRegistry, bP as GuardStrategyHandle, bQ as IllegalTransitionError, bR as InvariantError, bS as ReadOnlyVaultFacade, bT as RecordLockedError } from '../index-_6At2_9_.js';
4
+ import '../subject-index-O75wKshW.js';
5
+ import '../describe-Ccd1hS7a.js';
6
+ import '../index-B9QdHytu.js';
9
7
  import '@noy-db/attestation';
10
8
 
11
9
  /**
@@ -19,8 +17,14 @@ declare const GuardExecutor: {
19
17
  * Compare existing vs incoming for each `frozenFields.fields` entry
20
18
  * when `frozenFields.when(existing)` is true. Throws
21
19
  * `FieldFrozenError` listing every changed frozen field.
20
+ *
21
+ * @param skipFields — field names that are schema-owned computed fields.
22
+ * These are excluded from the comparison because `incoming` carries the
23
+ * raw user input (computed fields not yet evaluated), so comparing
24
+ * `existing[field]` vs `incoming[field]` would always look like a
25
+ * change even when the computed result is unchanged.
22
26
  */
23
- checkFrozenFields<T extends Record<string, unknown>>(guard: GuardStrategy<T>, id: string, existing: T | null, incoming: T): Promise<void>;
27
+ checkFrozenFields<T extends Record<string, unknown>>(guard: GuardStrategy<T>, id: string, existing: T | null, incoming: T, skipFields?: ReadonlySet<string>): Promise<void>;
24
28
  /**
25
29
  * Run a single guard's invariant over its slice of the change-set.
26
30
  * Any throw is converted to `InvariantError` unless it already is one.
@@ -1,29 +1,36 @@
1
1
  import {
2
+ immutableGuard,
3
+ transitionGuard,
2
4
  withGuard
3
- } from "../chunk-OQ6PIGHA.js";
5
+ } from "../chunk-TA66UMI4.js";
4
6
  import {
5
7
  GuardRegistry
6
- } from "../chunk-A3JMGXPG.js";
8
+ } from "../chunk-YMUGBZN2.js";
7
9
  import {
8
10
  ReadOnlyVaultFacade
9
- } from "../chunk-UMLVJTYV.js";
11
+ } from "../chunk-RUIMKQTA.js";
10
12
  import {
11
13
  GuardExecutor
12
- } from "../chunk-NONAAENK.js";
14
+ } from "../chunk-RUEKROOS.js";
13
15
  import {
14
16
  AmendmentForbiddenError,
15
17
  FieldFrozenError,
18
+ IllegalTransitionError,
16
19
  InvariantError,
17
20
  RecordLockedError
18
- } from "../chunk-B6PB7JLN.js";
21
+ } from "../chunk-ZYUC53LT.js";
22
+ import "../chunk-PZ5AY32C.js";
19
23
  export {
20
24
  AmendmentForbiddenError,
21
25
  FieldFrozenError,
22
26
  GuardExecutor,
23
27
  GuardRegistry,
28
+ IllegalTransitionError,
24
29
  InvariantError,
25
30
  ReadOnlyVaultFacade,
26
31
  RecordLockedError,
32
+ immutableGuard,
33
+ transitionGuard,
27
34
  withGuard
28
35
  };
29
36
  //# sourceMappingURL=index.js.map
@@ -1,4 +1,4 @@
1
- import { b5 as EncryptedEnvelope } from './types-DyXYr8rE.cjs';
1
+ import { cV as EncryptedEnvelope } from './index-_6At2_9_.js';
2
2
 
3
3
  /**
4
4
  * Ledger storage constants — pinned in their own leaf module so
@@ -54,6 +54,10 @@ declare const LEDGER_DELTAS_COLLECTION = "_ledger_deltas";
54
54
  * delete (hash the previous envelope) paths, and by
55
55
  * `DictionaryHandle` so its ledger entries match the same contract.
56
56
  *
57
+ * Hashes the open `_data` ciphertext, plus the sealed-field ciphertext
58
+ * map (`_sealed`) when a record carries one — so the ledger attests to
59
+ * both the open body AND every sealed value.
60
+ *
57
61
  * Returns the empty string when there is no envelope (delete of a
58
62
  * never-existed record). The empty string tolerated by the ledger
59
63
  * entry's `payloadHash` field as the canonical "nothing here" value.
@@ -1,11 +1,9 @@
1
- import { b2 as HistoryStrategy, b3 as NoydbStore, b4 as HistoryOptions, b5 as EncryptedEnvelope, b6 as PruneOptions } from '../types-Df28QFKb.js';
2
- export { b7 as AppendInput, b8 as ChangeType, b9 as CollectionInstant, ba as DiffEntry, bb as JsonPatch, bc as JsonPatchOp, bd as LedgerEntry, be as LedgerStore, bf as VaultEngine, bg as VaultInstant, bh as VerifyResult, bi as applyPatch, bj as canonicalJson, bk as computePatch, bl as diff, bm as formatDiff, bn as hashEntry, bo as paddedIndex, bp as parseIndex, bq as sha256Hex } from '../types-Df28QFKb.js';
3
- export { L as LEDGER_COLLECTION, a as LEDGER_DELTAS_COLLECTION, e as envelopePayloadHash } from '../hash-HJqD14vS.js';
4
- import '../lazy-builder-7tIpFyWN.js';
5
- import '../predicate-BSAGEyu5.js';
6
- import '../strategy-DSTrsZ8t.js';
7
- import '../strategy-BSxFXGzb.js';
8
- import '../index-D8I_pyJD.js';
1
+ import { cS as HistoryStrategy, cT as NoydbStore, cU as HistoryOptions, cV as EncryptedEnvelope, cW as PruneOptions } from '../index-_6At2_9_.js';
2
+ export { cX as AppendInput, cY as ChangeType, cZ as CollectionInstant, cE as DiffEntry, c_ as JsonPatch, c$ as JsonPatchOp, d0 as LedgerStore, d1 as VaultEngine, d2 as VaultInstant, d3 as VerifyResult, d4 as applyPatch, d5 as computePatch, d6 as diff, d7 as formatDiff } from '../index-_6At2_9_.js';
3
+ export { L as LedgerEntry, d as canonicalJson, h as hashEntry, p as paddedIndex, e as parseIndex, s as sha256Hex } from '../subject-index-O75wKshW.js';
4
+ export { L as LEDGER_COLLECTION, a as LEDGER_DELTAS_COLLECTION, e as envelopePayloadHash } from '../hash-CdSr06sm.js';
5
+ import '../describe-Ccd1hS7a.js';
6
+ import '../index-B9QdHytu.js';
9
7
  import '@noy-db/attestation';
10
8
 
11
9
  /**