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

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 (286) hide show
  1. package/dist/aggregate/index.cjs.map +1 -1
  2. package/dist/aggregate/index.d.cts +3 -2
  3. package/dist/aggregate/index.d.ts +3 -2
  4. package/dist/aggregate/index.js +4 -4
  5. package/dist/attestation/index.cjs.map +1 -1
  6. package/dist/attestation/index.d.cts +5 -3
  7. package/dist/attestation/index.d.ts +5 -3
  8. package/dist/attestation/index.js +6 -6
  9. package/dist/blobs/index.cjs +226 -11
  10. package/dist/blobs/index.cjs.map +1 -1
  11. package/dist/blobs/index.d.cts +6 -4
  12. package/dist/blobs/index.d.ts +6 -4
  13. package/dist/blobs/index.js +6 -5
  14. package/dist/blobs/index.js.map +1 -1
  15. package/dist/bundle/index.cjs +1087 -95
  16. package/dist/bundle/index.cjs.map +1 -1
  17. package/dist/bundle/index.d.cts +7 -5
  18. package/dist/bundle/index.d.ts +7 -5
  19. package/dist/bundle/index.js +21 -10
  20. package/dist/bundle/index.js.map +1 -1
  21. package/dist/{chunk-G4SCICH5.js → chunk-2FU2FTXD.js} +2 -2
  22. package/dist/{chunk-JD3OZAI4.js → chunk-3G3W65EQ.js} +2 -2
  23. package/dist/{chunk-XWH4MXIU.js → chunk-5AXTH4QZ.js} +2 -2
  24. package/dist/{chunk-4TBBMHVC.js → chunk-5LIROIDM.js} +2 -2
  25. package/dist/{chunk-L2BNJ6HM.js → chunk-7H2GEJ3O.js} +3 -3
  26. package/dist/{chunk-GNI5STXQ.js → chunk-AEIKD3PP.js} +52 -38
  27. package/dist/chunk-AEIKD3PP.js.map +1 -0
  28. package/dist/{chunk-QSUK7YWK.js → chunk-BH3X5L6A.js} +4 -4
  29. package/dist/{chunk-BQ65SS5A.js → chunk-BJSLBUJ7.js} +2 -2
  30. package/dist/{chunk-FFXM3ZIF.js → chunk-BL5GYANC.js} +3 -3
  31. package/dist/{chunk-6H2ZUNR7.js → chunk-BSZOCSDZ.js} +4 -4
  32. package/dist/{chunk-ZNQYHJXX.js → chunk-C3HYQPV4.js} +2 -2
  33. package/dist/{chunk-E2CDVKMH.js → chunk-CD2AVTEM.js} +5 -5
  34. package/dist/{chunk-667MB6AH.js → chunk-D77ZQSQQ.js} +769 -131
  35. package/dist/chunk-D77ZQSQQ.js.map +1 -0
  36. package/dist/{chunk-BR3AMFGS.js → chunk-DWEBTE2W.js} +5 -5
  37. package/dist/{chunk-Z4DO7YSI.js → chunk-DYYYUW5D.js} +2 -2
  38. package/dist/{chunk-SCJPI4Z5.js → chunk-E77UKJYL.js} +5 -5
  39. package/dist/{chunk-OMAMZKKD.js → chunk-F4G63NTZ.js} +2 -2
  40. package/dist/{chunk-TKIY625R.js → chunk-FEJDVE3Z.js} +2 -2
  41. package/dist/{chunk-7Z7KSVA5.js → chunk-GP3SDSH2.js} +2 -2
  42. package/dist/{chunk-IQLVUT37.js → chunk-H2MRGONI.js} +2 -2
  43. package/dist/{chunk-DUREQF5W.js → chunk-HGVSHKZW.js} +8 -5
  44. package/dist/chunk-HGVSHKZW.js.map +1 -0
  45. package/dist/chunk-I5IUYN7B.js +125 -0
  46. package/dist/chunk-I5IUYN7B.js.map +1 -0
  47. package/dist/{chunk-CJORTUJ2.js → chunk-J7RWBXFY.js} +2 -2
  48. package/dist/{chunk-AAVWKNZW.js → chunk-JDWE6JMX.js} +2 -2
  49. package/dist/{chunk-XL35NSEN.js → chunk-KCEHMDZF.js} +3 -3
  50. package/dist/{chunk-TS26M2SB.js → chunk-M476FOQ7.js} +2 -2
  51. package/dist/{chunk-F4OJZIWQ.js → chunk-NBBMMJ2H.js} +4 -4
  52. package/dist/{chunk-CZI2A4MQ.js → chunk-NYSYPFXJ.js} +3 -3
  53. package/dist/{chunk-OQSRJG6A.js → chunk-PDULVIBY.js} +2 -2
  54. package/dist/{chunk-Z6FNBOTC.js → chunk-PDVP3C2I.js} +1 -1
  55. package/dist/{chunk-Z6FNBOTC.js.map → chunk-PDVP3C2I.js.map} +1 -1
  56. package/dist/{chunk-DLZ2ONOD.js → chunk-QHM6XEAH.js} +6 -6
  57. package/dist/{chunk-HBXJ37ZY.js → chunk-QO6RGLLD.js} +4 -4
  58. package/dist/{chunk-7BQ4QWYX.js → chunk-ROPJVUG3.js} +23 -6
  59. package/dist/chunk-ROPJVUG3.js.map +1 -0
  60. package/dist/{chunk-42FEUPZQ.js → chunk-ROVO6NPJ.js} +2 -2
  61. package/dist/{chunk-6RR3MNMG.js → chunk-SHX5QBCI.js} +3 -3
  62. package/dist/{chunk-F3BPIPLS.js → chunk-SISBMAPO.js} +1 -1
  63. package/dist/chunk-SISBMAPO.js.map +1 -0
  64. package/dist/{chunk-3YWP3WBP.js → chunk-SNMJ7SB3.js} +5 -5
  65. package/dist/{chunk-IXBIFDEW.js → chunk-TIDXB5DF.js} +4 -4
  66. package/dist/chunk-U5QCMH3W.js +151 -0
  67. package/dist/chunk-U5QCMH3W.js.map +1 -0
  68. package/dist/{chunk-YULZKK4F.js → chunk-UNTGHX5A.js} +37 -2
  69. package/dist/chunk-UNTGHX5A.js.map +1 -0
  70. package/dist/{chunk-FWPKCXTN.js → chunk-WIAOUFFB.js} +2 -2
  71. package/dist/{chunk-KABJXG2F.js → chunk-WV7WV6JO.js} +195 -17
  72. package/dist/chunk-WV7WV6JO.js.map +1 -0
  73. package/dist/{chunk-X73VS74Y.js → chunk-XJV6OB4D.js} +2 -2
  74. package/dist/{chunk-VLMPU56Q.js → chunk-XMHUK5PN.js} +2 -2
  75. package/dist/{chunk-BI6ETQPF.js → chunk-XMVHEWF6.js} +4 -4
  76. package/dist/{chunk-HOR4R722.js → chunk-XPIHJ34I.js} +30 -4
  77. package/dist/chunk-XPIHJ34I.js.map +1 -0
  78. package/dist/{chunk-OB2ZJQ2D.js → chunk-YYVZYTWW.js} +3 -3
  79. package/dist/{chunk-535SSHBS.js → chunk-ZEGSDPB7.js} +81 -2
  80. package/dist/chunk-ZEGSDPB7.js.map +1 -0
  81. package/dist/{chunk-QVIEAYTP.js → chunk-ZNGPEV5J.js} +3 -3
  82. package/dist/consent/index.cjs.map +1 -1
  83. package/dist/consent/index.d.cts +6 -4
  84. package/dist/consent/index.d.ts +6 -4
  85. package/dist/consent/index.js +3 -3
  86. package/dist/{crypto-QXQOHMHF.js → crypto-7BN2HDWG.js} +7 -3
  87. package/dist/{delegation-NIQ43IPU.js → delegation-MGH5SODX.js} +5 -5
  88. package/dist/derivations/index.cjs.map +1 -1
  89. package/dist/derivations/index.d.cts +7 -5
  90. package/dist/derivations/index.d.ts +7 -5
  91. package/dist/derivations/index.js +4 -4
  92. package/dist/{dev-unlock-DR3upLd1.d.ts → dev-unlock-CI1ijTML.d.ts} +1 -1
  93. package/dist/{dev-unlock-8XzcD2Z4.d.cts → dev-unlock-iXbYFAWl.d.cts} +1 -1
  94. package/dist/{strategy-BtW8fAjz.d.ts → errors-Dz64FA65.d.cts} +98 -727
  95. package/dist/{strategy-BtW8fAjz.d.cts → errors-Dz64FA65.d.ts} +98 -727
  96. package/dist/executor-3W63Y44O.js +11 -0
  97. package/dist/executor-CFFWPWBJ.js +8 -0
  98. package/dist/executor-VDQQOR4F.js +8 -0
  99. package/dist/{fanout-sidecar-67CMI3UT.js → fanout-sidecar-FIJJ46YG.js} +2 -2
  100. package/dist/forget/index.cjs +43 -0
  101. package/dist/forget/index.cjs.map +1 -0
  102. package/dist/forget/index.d.cts +1 -0
  103. package/dist/forget/index.d.ts +1 -0
  104. package/dist/forget/index.js +14 -0
  105. package/dist/guards/index.cjs.map +1 -1
  106. package/dist/guards/index.d.cts +7 -5
  107. package/dist/guards/index.d.ts +7 -5
  108. package/dist/guards/index.js +6 -6
  109. package/dist/{hash-CDjye9KV.d.ts → hash-blk7Bkes.d.ts} +1 -1
  110. package/dist/{hash-DuQ88_5W.d.cts → hash-tEcM5fnv.d.cts} +1 -1
  111. package/dist/history/index.cjs +27 -4
  112. package/dist/history/index.cjs.map +1 -1
  113. package/dist/history/index.d.cts +7 -5
  114. package/dist/history/index.d.ts +7 -5
  115. package/dist/history/index.js +9 -7
  116. package/dist/history/index.js.map +1 -1
  117. package/dist/i18n/index.cjs +53 -0
  118. package/dist/i18n/index.cjs.map +1 -1
  119. package/dist/i18n/index.d.cts +6 -4
  120. package/dist/i18n/index.d.ts +6 -4
  121. package/dist/i18n/index.js +16 -8
  122. package/dist/i18n/index.js.map +1 -1
  123. package/dist/{immutable-guard-Dov3WvwF.d.ts → immutable-guard-B5M95nbq.d.ts} +1 -1
  124. package/dist/{immutable-guard-CRPvu24K.d.cts → immutable-guard-qN3zF8o1.d.cts} +1 -1
  125. package/dist/index-C-SSRIxP.d.cts +348 -0
  126. package/dist/index-C-SSRIxP.d.ts +348 -0
  127. package/dist/{index-nP99bXLg.d.ts → index-DpU6KWof.d.ts} +9 -1
  128. package/dist/{index-C8Bk3-VF.d.cts → index-u-kWzSrL.d.cts} +9 -1
  129. package/dist/index.cjs +7271 -6079
  130. package/dist/index.cjs.map +1 -1
  131. package/dist/index.d.cts +15 -12
  132. package/dist/index.d.ts +15 -12
  133. package/dist/index.js +130 -106
  134. package/dist/index.js.map +1 -1
  135. package/dist/indexing/index.cjs.map +1 -1
  136. package/dist/indexing/index.js +4 -4
  137. package/dist/issue-TTMGHQ2J.js +12 -0
  138. package/dist/{ledger-A3LL253R.js → ledger-LFVLHE5H.js} +6 -6
  139. package/dist/materialized-views/index.cjs.map +1 -1
  140. package/dist/materialized-views/index.d.cts +7 -5
  141. package/dist/materialized-views/index.d.ts +7 -5
  142. package/dist/materialized-views/index.js +12 -12
  143. package/dist/noydb-36S6GQNC.js +37 -0
  144. package/dist/overlay-views/index.cjs.map +1 -1
  145. package/dist/overlay-views/index.d.cts +7 -5
  146. package/dist/overlay-views/index.d.ts +7 -5
  147. package/dist/overlay-views/index.js +4 -4
  148. package/dist/periods/index.cjs.map +1 -1
  149. package/dist/periods/index.d.cts +6 -4
  150. package/dist/periods/index.d.ts +6 -4
  151. package/dist/periods/index.js +6 -6
  152. package/dist/{public-envelope-YP2UWMLG.js → public-envelope-RXZNP3V6.js} +4 -4
  153. package/dist/query/index.cjs +4 -1
  154. package/dist/query/index.cjs.map +1 -1
  155. package/dist/query/index.d.cts +3 -2
  156. package/dist/query/index.d.ts +3 -2
  157. package/dist/query/index.js +6 -6
  158. package/dist/registry-3YFLZ7WD.js +8 -0
  159. package/dist/{registry-UTA4CLQS.js → registry-SECUWSGY.js} +3 -3
  160. package/dist/registry-TGZISEWC.js +8 -0
  161. package/dist/{revoke-HNMQZSCL.js → revoke-B54H2S2W.js} +6 -6
  162. package/dist/sealed-record/index.cjs +139 -0
  163. package/dist/sealed-record/index.cjs.map +1 -0
  164. package/dist/sealed-record/index.d.cts +123 -0
  165. package/dist/sealed-record/index.d.ts +123 -0
  166. package/dist/sealed-record/index.js +42 -0
  167. package/dist/sealed-record/index.js.map +1 -0
  168. package/dist/session/index.cjs.map +1 -1
  169. package/dist/session/index.d.cts +7 -5
  170. package/dist/session/index.d.ts +7 -5
  171. package/dist/session/index.js +3 -3
  172. package/dist/shadow/index.cjs.map +1 -1
  173. package/dist/shadow/index.d.cts +6 -4
  174. package/dist/shadow/index.d.ts +6 -4
  175. package/dist/shadow/index.js +2 -2
  176. package/dist/{signer-DCMNKXSF.js → signer-YSXZT574.js} +5 -5
  177. package/dist/snapshots/index.cjs.map +1 -1
  178. package/dist/snapshots/index.d.cts +6 -4
  179. package/dist/snapshots/index.d.ts +6 -4
  180. package/dist/snapshots/index.js +4 -4
  181. package/dist/{stale-W5PQTRYH.js → stale-TOA36SRK.js} +2 -2
  182. package/dist/stale-TOA36SRK.js.map +1 -0
  183. package/dist/{state-vault-TMXZRTY5.js → state-vault-W2OEABNO.js} +3 -3
  184. package/dist/store/index.cjs.map +1 -1
  185. package/dist/store/index.d.cts +6 -4
  186. package/dist/store/index.d.ts +6 -4
  187. package/dist/store/index.js +2 -2
  188. package/dist/strategy-4M9jo172.d.ts +739 -0
  189. package/dist/strategy-CLC1j79g.d.cts +739 -0
  190. package/dist/sync/index.cjs.map +1 -1
  191. package/dist/sync/index.d.cts +5 -3
  192. package/dist/sync/index.d.ts +5 -3
  193. package/dist/sync/index.js +4 -4
  194. package/dist/team/index.cjs.map +1 -1
  195. package/dist/team/index.d.cts +6 -4
  196. package/dist/team/index.d.ts +6 -4
  197. package/dist/team/index.js +8 -8
  198. package/dist/tx/index.cjs.map +1 -1
  199. package/dist/tx/index.d.cts +6 -4
  200. package/dist/tx/index.d.ts +6 -4
  201. package/dist/tx/index.js +3 -3
  202. package/dist/{types-DrmBTscX.d.ts → types-CljIHm_J.d.ts} +789 -500
  203. package/dist/{types-Bze6vkwm.d.cts → types-CrSpRDuG.d.cts} +789 -500
  204. package/dist/{ulid-DbBVrNSt.d.ts → ulid-CWfL2Vfv.d.ts} +1 -1
  205. package/dist/{ulid-DfZlAh0u.d.cts → ulid-CrI7PPbA.d.cts} +1 -1
  206. package/dist/util/index.cjs.map +1 -1
  207. package/dist/util/index.js +1 -1
  208. package/dist/{vault-group-DX2HFQMX.js → vault-group-DHAHFX2A.js} +4 -4
  209. package/dist/{with-derivation-_lySGdlm.d.ts → with-derivation-BZ2y4bzF.d.ts} +1 -1
  210. package/dist/{with-derivation-CCqAchD5.d.cts → with-derivation-Bozs8DmD.d.cts} +1 -1
  211. package/dist/{with-materialized-view-QT1Tp7NO.d.ts → with-materialized-view-B892zYZV.d.ts} +1 -1
  212. package/dist/{with-materialized-view--4PsvMDu.d.cts → with-materialized-view-NzF71cG_.d.cts} +1 -1
  213. package/dist/{with-overlayed-view-BEXfpzSb.d.ts → with-overlayed-view-CR6m7CHe.d.ts} +1 -1
  214. package/dist/{with-overlayed-view-DlH5qmeB.d.cts → with-overlayed-view-UI8qSGL4.d.cts} +1 -1
  215. package/package.json +23 -3
  216. package/dist/chunk-535SSHBS.js.map +0 -1
  217. package/dist/chunk-667MB6AH.js.map +0 -1
  218. package/dist/chunk-7BQ4QWYX.js.map +0 -1
  219. package/dist/chunk-DUREQF5W.js.map +0 -1
  220. package/dist/chunk-F3BPIPLS.js.map +0 -1
  221. package/dist/chunk-GNI5STXQ.js.map +0 -1
  222. package/dist/chunk-HOR4R722.js.map +0 -1
  223. package/dist/chunk-KABJXG2F.js.map +0 -1
  224. package/dist/chunk-YULZKK4F.js.map +0 -1
  225. package/dist/executor-6ZDSDZ6V.js +0 -8
  226. package/dist/executor-AZLS3KBK.js +0 -11
  227. package/dist/executor-IDZDAFNH.js +0 -8
  228. package/dist/issue-RZP3VI6O.js +0 -12
  229. package/dist/noydb-WCMY2ZOW.js +0 -35
  230. package/dist/registry-EB6SISTA.js +0 -8
  231. package/dist/registry-IUZQVVBB.js +0 -8
  232. /package/dist/{chunk-G4SCICH5.js.map → chunk-2FU2FTXD.js.map} +0 -0
  233. /package/dist/{chunk-JD3OZAI4.js.map → chunk-3G3W65EQ.js.map} +0 -0
  234. /package/dist/{chunk-XWH4MXIU.js.map → chunk-5AXTH4QZ.js.map} +0 -0
  235. /package/dist/{chunk-4TBBMHVC.js.map → chunk-5LIROIDM.js.map} +0 -0
  236. /package/dist/{chunk-L2BNJ6HM.js.map → chunk-7H2GEJ3O.js.map} +0 -0
  237. /package/dist/{chunk-QSUK7YWK.js.map → chunk-BH3X5L6A.js.map} +0 -0
  238. /package/dist/{chunk-BQ65SS5A.js.map → chunk-BJSLBUJ7.js.map} +0 -0
  239. /package/dist/{chunk-FFXM3ZIF.js.map → chunk-BL5GYANC.js.map} +0 -0
  240. /package/dist/{chunk-6H2ZUNR7.js.map → chunk-BSZOCSDZ.js.map} +0 -0
  241. /package/dist/{chunk-ZNQYHJXX.js.map → chunk-C3HYQPV4.js.map} +0 -0
  242. /package/dist/{chunk-E2CDVKMH.js.map → chunk-CD2AVTEM.js.map} +0 -0
  243. /package/dist/{chunk-BR3AMFGS.js.map → chunk-DWEBTE2W.js.map} +0 -0
  244. /package/dist/{chunk-Z4DO7YSI.js.map → chunk-DYYYUW5D.js.map} +0 -0
  245. /package/dist/{chunk-SCJPI4Z5.js.map → chunk-E77UKJYL.js.map} +0 -0
  246. /package/dist/{chunk-OMAMZKKD.js.map → chunk-F4G63NTZ.js.map} +0 -0
  247. /package/dist/{chunk-TKIY625R.js.map → chunk-FEJDVE3Z.js.map} +0 -0
  248. /package/dist/{chunk-7Z7KSVA5.js.map → chunk-GP3SDSH2.js.map} +0 -0
  249. /package/dist/{chunk-IQLVUT37.js.map → chunk-H2MRGONI.js.map} +0 -0
  250. /package/dist/{chunk-CJORTUJ2.js.map → chunk-J7RWBXFY.js.map} +0 -0
  251. /package/dist/{chunk-AAVWKNZW.js.map → chunk-JDWE6JMX.js.map} +0 -0
  252. /package/dist/{chunk-XL35NSEN.js.map → chunk-KCEHMDZF.js.map} +0 -0
  253. /package/dist/{chunk-TS26M2SB.js.map → chunk-M476FOQ7.js.map} +0 -0
  254. /package/dist/{chunk-F4OJZIWQ.js.map → chunk-NBBMMJ2H.js.map} +0 -0
  255. /package/dist/{chunk-CZI2A4MQ.js.map → chunk-NYSYPFXJ.js.map} +0 -0
  256. /package/dist/{chunk-OQSRJG6A.js.map → chunk-PDULVIBY.js.map} +0 -0
  257. /package/dist/{chunk-DLZ2ONOD.js.map → chunk-QHM6XEAH.js.map} +0 -0
  258. /package/dist/{chunk-HBXJ37ZY.js.map → chunk-QO6RGLLD.js.map} +0 -0
  259. /package/dist/{chunk-42FEUPZQ.js.map → chunk-ROVO6NPJ.js.map} +0 -0
  260. /package/dist/{chunk-6RR3MNMG.js.map → chunk-SHX5QBCI.js.map} +0 -0
  261. /package/dist/{chunk-3YWP3WBP.js.map → chunk-SNMJ7SB3.js.map} +0 -0
  262. /package/dist/{chunk-IXBIFDEW.js.map → chunk-TIDXB5DF.js.map} +0 -0
  263. /package/dist/{chunk-FWPKCXTN.js.map → chunk-WIAOUFFB.js.map} +0 -0
  264. /package/dist/{chunk-X73VS74Y.js.map → chunk-XJV6OB4D.js.map} +0 -0
  265. /package/dist/{chunk-VLMPU56Q.js.map → chunk-XMHUK5PN.js.map} +0 -0
  266. /package/dist/{chunk-BI6ETQPF.js.map → chunk-XMVHEWF6.js.map} +0 -0
  267. /package/dist/{chunk-OB2ZJQ2D.js.map → chunk-YYVZYTWW.js.map} +0 -0
  268. /package/dist/{chunk-QVIEAYTP.js.map → chunk-ZNGPEV5J.js.map} +0 -0
  269. /package/dist/{crypto-QXQOHMHF.js.map → crypto-7BN2HDWG.js.map} +0 -0
  270. /package/dist/{delegation-NIQ43IPU.js.map → delegation-MGH5SODX.js.map} +0 -0
  271. /package/dist/{executor-6ZDSDZ6V.js.map → executor-3W63Y44O.js.map} +0 -0
  272. /package/dist/{executor-AZLS3KBK.js.map → executor-CFFWPWBJ.js.map} +0 -0
  273. /package/dist/{executor-IDZDAFNH.js.map → executor-VDQQOR4F.js.map} +0 -0
  274. /package/dist/{fanout-sidecar-67CMI3UT.js.map → fanout-sidecar-FIJJ46YG.js.map} +0 -0
  275. /package/dist/{issue-RZP3VI6O.js.map → forget/index.js.map} +0 -0
  276. /package/dist/{ledger-A3LL253R.js.map → issue-TTMGHQ2J.js.map} +0 -0
  277. /package/dist/{noydb-WCMY2ZOW.js.map → ledger-LFVLHE5H.js.map} +0 -0
  278. /package/dist/{public-envelope-YP2UWMLG.js.map → noydb-36S6GQNC.js.map} +0 -0
  279. /package/dist/{registry-EB6SISTA.js.map → public-envelope-RXZNP3V6.js.map} +0 -0
  280. /package/dist/{registry-IUZQVVBB.js.map → registry-3YFLZ7WD.js.map} +0 -0
  281. /package/dist/{registry-UTA4CLQS.js.map → registry-SECUWSGY.js.map} +0 -0
  282. /package/dist/{revoke-HNMQZSCL.js.map → registry-TGZISEWC.js.map} +0 -0
  283. /package/dist/{signer-DCMNKXSF.js.map → revoke-B54H2S2W.js.map} +0 -0
  284. /package/dist/{stale-W5PQTRYH.js.map → signer-YSXZT574.js.map} +0 -0
  285. /package/dist/{state-vault-TMXZRTY5.js.map → state-vault-W2OEABNO.js.map} +0 -0
  286. /package/dist/{vault-group-DX2HFQMX.js.map → vault-group-DHAHFX2A.js.map} +0 -0
@@ -1,10 +1,12 @@
1
- import { I as I18nStrategy } from '../types-Bze6vkwm.cjs';
2
- export { D as DICT_COLLECTION_PREFIX, a as DictEntry, b as DictKeyDescriptor, c as DictionaryHandle, d as DictionaryOptions, e as I18nMap, f as I18nTextDescriptor, g as I18nTextOptions, L as Layer, O as OnMissing, h as OnMissingPolicy, R as ResolveI18nOptions, S as ScriptWarning, i as applyI18nLocale, j as dictCollectionName, k as dictKey, l as enforceScript, m as getAtPath, n as i18nText, o as inferScripts, p as isDictCollectionName, q as isDictKeyDescriptor, r as isI18nTextDescriptor, s as resolveI18nText, t as resolvePolicy, u as setAtPathInPlace, v as validateI18nTextValue } from '../types-Bze6vkwm.cjs';
3
- export { D as DictKeyInUseError, a as DictKeyMissingError, L as LocaleNotSpecifiedError, M as MissingTranslationError, R as ReservedCollectionNameError, S as ScriptViolationError, T as TranslatorNotConfiguredError } from '../strategy-BtW8fAjz.cjs';
1
+ import { I as I18nStrategy } from '../types-CrSpRDuG.cjs';
2
+ export { D as DICT_COLLECTION_PREFIX, a as DictEntry, b as DictKeyDescriptor, c as DictionaryHandle, d as DictionaryOptions, e as I18nMap, f as I18nTextDescriptor, g as I18nTextOptions, L as Layer, O as OnMissing, h as OnMissingPolicy, R as ResolveI18nOptions, S as ScriptWarning, i as StaticDictDescriptor, j as applyI18nLocale, k as dictCollectionName, l as dictKey, m as enforceScript, n as getAtPath, o as i18nText, p as inferScripts, q as isDictCollectionName, r as isDictKeyDescriptor, s as isI18nTextDescriptor, t as isStaticDictDescriptor, u as resolveI18nText, v as resolvePolicy, w as setAtPathInPlace, x as staticDict, y as validateI18nTextValue } from '../types-CrSpRDuG.cjs';
3
+ export { D as DictKeyInUseError, a as DictKeyMissingError, L as LocaleNotSpecifiedError, M as MissingTranslationError, R as ReservedCollectionNameError, S as ScriptViolationError, b as StaticDictReadonlyError, T as TranslatorNotConfiguredError, U as UnknownDictCodeError } from '../errors-Dz64FA65.cjs';
4
4
  import '../lazy-builder-eYZzLEL1.cjs';
5
5
  import '../predicate-BmhBSPCH.cjs';
6
+ import '../strategy-CLC1j79g.cjs';
6
7
  import '../strategy-BSxFXGzb.cjs';
7
- import '../index-C8Bk3-VF.cjs';
8
+ import '../index-C-SSRIxP.cjs';
9
+ import '../index-u-kWzSrL.cjs';
8
10
  import '@noy-db/attestation';
9
11
 
10
12
  /**
@@ -1,10 +1,12 @@
1
- import { I as I18nStrategy } from '../types-DrmBTscX.js';
2
- export { D as DICT_COLLECTION_PREFIX, a as DictEntry, b as DictKeyDescriptor, c as DictionaryHandle, d as DictionaryOptions, e as I18nMap, f as I18nTextDescriptor, g as I18nTextOptions, L as Layer, O as OnMissing, h as OnMissingPolicy, R as ResolveI18nOptions, S as ScriptWarning, i as applyI18nLocale, j as dictCollectionName, k as dictKey, l as enforceScript, m as getAtPath, n as i18nText, o as inferScripts, p as isDictCollectionName, q as isDictKeyDescriptor, r as isI18nTextDescriptor, s as resolveI18nText, t as resolvePolicy, u as setAtPathInPlace, v as validateI18nTextValue } from '../types-DrmBTscX.js';
3
- export { D as DictKeyInUseError, a as DictKeyMissingError, L as LocaleNotSpecifiedError, M as MissingTranslationError, R as ReservedCollectionNameError, S as ScriptViolationError, T as TranslatorNotConfiguredError } from '../strategy-BtW8fAjz.js';
1
+ import { I as I18nStrategy } from '../types-CljIHm_J.js';
2
+ export { D as DICT_COLLECTION_PREFIX, a as DictEntry, b as DictKeyDescriptor, c as DictionaryHandle, d as DictionaryOptions, e as I18nMap, f as I18nTextDescriptor, g as I18nTextOptions, L as Layer, O as OnMissing, h as OnMissingPolicy, R as ResolveI18nOptions, S as ScriptWarning, i as StaticDictDescriptor, j as applyI18nLocale, k as dictCollectionName, l as dictKey, m as enforceScript, n as getAtPath, o as i18nText, p as inferScripts, q as isDictCollectionName, r as isDictKeyDescriptor, s as isI18nTextDescriptor, t as isStaticDictDescriptor, u as resolveI18nText, v as resolvePolicy, w as setAtPathInPlace, x as staticDict, y as validateI18nTextValue } from '../types-CljIHm_J.js';
3
+ export { D as DictKeyInUseError, a as DictKeyMissingError, L as LocaleNotSpecifiedError, M as MissingTranslationError, R as ReservedCollectionNameError, S as ScriptViolationError, b as StaticDictReadonlyError, T as TranslatorNotConfiguredError, U as UnknownDictCodeError } from '../errors-Dz64FA65.js';
4
4
  import '../lazy-builder-ChSqcF5t.js';
5
5
  import '../predicate-BmhBSPCH.js';
6
+ import '../strategy-4M9jo172.js';
6
7
  import '../strategy-BSxFXGzb.js';
7
- import '../index-nP99bXLg.js';
8
+ import '../index-C-SSRIxP.js';
9
+ import '../index-DpU6KWof.js';
8
10
  import '@noy-db/attestation';
9
11
 
10
12
  /**
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  enforceScript,
3
3
  inferScripts
4
- } from "../chunk-AAVWKNZW.js";
4
+ } from "../chunk-JDWE6JMX.js";
5
5
  import {
6
6
  DICT_COLLECTION_PREFIX,
7
7
  DictionaryHandle,
@@ -13,15 +13,17 @@ import {
13
13
  isDictCollectionName,
14
14
  isDictKeyDescriptor,
15
15
  isI18nTextDescriptor,
16
+ isStaticDictDescriptor,
16
17
  resolveI18nText,
17
18
  resolvePolicy,
18
19
  setAtPathInPlace,
20
+ staticDict,
19
21
  validateI18nTextValue
20
- } from "../chunk-7BQ4QWYX.js";
21
- import "../chunk-6H2ZUNR7.js";
22
- import "../chunk-Z6FNBOTC.js";
23
- import "../chunk-F3BPIPLS.js";
24
- import "../chunk-YULZKK4F.js";
22
+ } from "../chunk-ROPJVUG3.js";
23
+ import "../chunk-BSZOCSDZ.js";
24
+ import "../chunk-PDVP3C2I.js";
25
+ import "../chunk-SISBMAPO.js";
26
+ import "../chunk-UNTGHX5A.js";
25
27
  import {
26
28
  DictKeyInUseError,
27
29
  DictKeyMissingError,
@@ -29,8 +31,10 @@ import {
29
31
  MissingTranslationError,
30
32
  ReservedCollectionNameError,
31
33
  ScriptViolationError,
32
- TranslatorNotConfiguredError
33
- } from "../chunk-535SSHBS.js";
34
+ StaticDictReadonlyError,
35
+ TranslatorNotConfiguredError,
36
+ UnknownDictCodeError
37
+ } from "../chunk-ZEGSDPB7.js";
34
38
 
35
39
  // src/i18n/active.ts
36
40
  function withI18n() {
@@ -63,7 +67,9 @@ export {
63
67
  MissingTranslationError,
64
68
  ReservedCollectionNameError,
65
69
  ScriptViolationError,
70
+ StaticDictReadonlyError,
66
71
  TranslatorNotConfiguredError,
72
+ UnknownDictCodeError,
67
73
  applyI18nLocale,
68
74
  dictCollectionName,
69
75
  dictKey,
@@ -74,9 +80,11 @@ export {
74
80
  isDictCollectionName,
75
81
  isDictKeyDescriptor,
76
82
  isI18nTextDescriptor,
83
+ isStaticDictDescriptor,
77
84
  resolveI18nText,
78
85
  resolvePolicy,
79
86
  setAtPathInPlace,
87
+ staticDict,
80
88
  validateI18nTextValue,
81
89
  withI18n
82
90
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/i18n/active.ts"],"sourcesContent":["/**\n * Active i18n strategy — `withI18n()` returns the real implementation\n * that wires multi-locale resolution, i18nText validation, and the\n * `DictionaryHandle` for `dictKey` fields into the core read/write\n * paths.\n *\n * Consumers opt in by:\n *\n * ```ts\n * import { createNoydb } from '@noy-db/hub'\n * import { withI18n } from '@noy-db/hub/i18n'\n *\n * const db = await createNoydb({\n * store: ...,\n * user: ...,\n * i18nStrategy: withI18n(),\n * })\n * ```\n *\n * The factory delegates to the existing `core.ts` and `dictionary.ts`\n * modules. Splitting the import chain through this file is what lets\n * tsup tree-shake the `~854 LOC` of dictionary + locale resolution\n * out of the default bundle when no `withI18n()` import is present.\n *\n * @public\n */\n\nimport type { I18nStrategy, BuildDictionaryHandleOptions } from './strategy.js'\nimport { applyI18nLocale, validateI18nTextValue } from './core.js'\nimport { enforceScript } from './script.js'\nimport { DictionaryHandle } from './dictionary.js'\n\nexport function withI18n(): I18nStrategy {\n return {\n applyI18nLocale,\n validateI18nTextValue,\n enforceScript,\n buildDictionaryHandle<Keys extends string = string>(\n opts: BuildDictionaryHandleOptions<Keys>,\n ): DictionaryHandle<Keys> {\n return new DictionaryHandle<Keys>(\n opts.adapter,\n opts.compartmentName,\n opts.dictionaryName,\n opts.keyring,\n opts.getDEK,\n opts.encrypted,\n opts.ledger,\n opts.options,\n opts.findAndUpdateReferences,\n opts.emitter,\n )\n },\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCO,SAAS,WAAyB;AACvC,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA,sBACE,MACwB;AACxB,aAAO,IAAI;AAAA,QACT,KAAK;AAAA,QACL,KAAK;AAAA,QACL,KAAK;AAAA,QACL,KAAK;AAAA,QACL,KAAK;AAAA,QACL,KAAK;AAAA,QACL,KAAK;AAAA,QACL,KAAK;AAAA,QACL,KAAK;AAAA,QACL,KAAK;AAAA,MACP;AAAA,IACF;AAAA,EACF;AACF;","names":[]}
1
+ {"version":3,"sources":["../../src/i18n/active.ts"],"sourcesContent":["/**\n * Active i18n strategy — `withI18n()` returns the real implementation\n * that wires multi-locale resolution, i18nText validation, and the\n * `DictionaryHandle` for `dictKey` fields into the core read/write\n * paths.\n *\n * Consumers opt in by:\n *\n * ```ts\n * import { createNoydb } from '@noy-db/hub'\n * import { withI18n } from '@noy-db/hub/i18n'\n *\n * const db = await createNoydb({\n * store: ...,\n * user: ...,\n * i18nStrategy: withI18n(),\n * })\n * ```\n *\n * The factory delegates to the existing `core.ts` and `dictionary.ts`\n * modules. Splitting the import chain through this file is what lets\n * tsup tree-shake the `~854 LOC` of dictionary + locale resolution\n * out of the default bundle when no `withI18n()` import is present.\n *\n * @public\n */\n\nimport type { I18nStrategy, BuildDictionaryHandleOptions } from './strategy.js'\nimport { applyI18nLocale, validateI18nTextValue } from './core.js'\nimport { enforceScript } from './script.js'\nimport { DictionaryHandle } from './dictionary.js'\n\nexport function withI18n(): I18nStrategy {\n return {\n applyI18nLocale,\n validateI18nTextValue,\n enforceScript,\n buildDictionaryHandle<Keys extends string = string>(\n opts: BuildDictionaryHandleOptions<Keys>,\n ): DictionaryHandle<Keys> {\n return new DictionaryHandle<Keys>(\n opts.adapter,\n opts.compartmentName,\n opts.dictionaryName,\n opts.keyring,\n opts.getDEK,\n opts.encrypted,\n opts.ledger,\n opts.options,\n opts.findAndUpdateReferences,\n opts.emitter,\n )\n },\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCO,SAAS,WAAyB;AACvC,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA,sBACE,MACwB;AACxB,aAAO,IAAI;AAAA,QACT,KAAK;AAAA,QACL,KAAK;AAAA,QACL,KAAK;AAAA,QACL,KAAK;AAAA,QACL,KAAK;AAAA,QACL,KAAK;AAAA,QACL,KAAK;AAAA,QACL,KAAK;AAAA,QACL,KAAK;AAAA,QACL,KAAK;AAAA,MACP;AAAA,IACF;AAAA,EACF;AACF;","names":[]}
@@ -1,4 +1,4 @@
1
- import { as as GuardStrategy, aw as GuardStrategyHandle, at as GuardChange, au as GuardContext } from './types-DrmBTscX.js';
1
+ import { av as GuardStrategy, az as GuardStrategyHandle, aw as GuardChange, ax as GuardContext } from './types-CljIHm_J.js';
2
2
 
3
3
  /**
4
4
  * Register a guard for a collection. Guards run on every `put()` /
@@ -1,4 +1,4 @@
1
- import { as as GuardStrategy, aw as GuardStrategyHandle, at as GuardChange, au as GuardContext } from './types-Bze6vkwm.cjs';
1
+ import { av as GuardStrategy, az as GuardStrategyHandle, aw as GuardChange, ax as GuardContext } from './types-CrSpRDuG.cjs';
2
2
 
3
3
  /**
4
4
  * Register a guard for a collection. Guards run on every `put()` /
@@ -0,0 +1,348 @@
1
+ /**
2
+ * Ledger entry shape + canonical JSON + sha256 helpers.
3
+ *
4
+ * This file holds the PURE primitives used by the hash-chained ledger:
5
+ * the entry type, the deterministic (sort-stable) JSON encoder, and
6
+ * the sha256 hasher that produces `prevHash` and `ledger.head()`.
7
+ *
8
+ * Everything here is validator-free and side-effect free — the only
9
+ * runtime dep is Web Crypto's `subtle.digest` for the sha256 call,
10
+ * which we already use for every other hashing operation in the core.
11
+ *
12
+ * The hash chain property works like this:
13
+ *
14
+ * hash(entry[i]) = sha256(canonicalJSON(entry[i]))
15
+ * entry[i+1].prevHash = hash(entry[i])
16
+ *
17
+ * Any modification to `entry[i]` (field values, field order, whitespace)
18
+ * produces a different `hash(entry[i])`, which means `entry[i+1]`'s
19
+ * stored `prevHash` no longer matches the recomputed hash, which means
20
+ * `verify()` returns `{ ok: false, divergedAt: i + 1 }`. The chain is
21
+ * append-only and tamper-evident without external anchoring.
22
+ */
23
+ /**
24
+ * A single ledger entry in its plaintext form — what gets serialized,
25
+ * hashed, and then encrypted with the ledger DEK before being written
26
+ * to the `_ledger/` adapter collection.
27
+ *
28
+ * ## Why hash the ciphertext, not the plaintext?
29
+ *
30
+ * `payloadHash` is the sha256 of the record's ENCRYPTED envelope bytes,
31
+ * not its plaintext. This matters:
32
+ *
33
+ * 1. **Zero-knowledge preserved.** A user (or a third party) can
34
+ * verify the ledger against the stored envelopes without any
35
+ * decryption keys. The adapter layer already holds only
36
+ * ciphertext, so hashing the ciphertext keeps the ledger at the
37
+ * same privacy level as the adapter.
38
+ *
39
+ * 2. **Determinism.** Plaintext → ciphertext is randomized by the
40
+ * fresh per-write IV, so `hash(plaintext)` would need extra
41
+ * normalization. `hash(ciphertext)` is already deterministic and
42
+ * unique per write.
43
+ *
44
+ * 3. **Detection property.** If an attacker modifies even one byte of
45
+ * the stored ciphertext (trying to flip a record), the hash
46
+ * changes, the ledger's recorded `payloadHash` no longer matches,
47
+ * and a data-integrity check fails. We don't do that check in
48
+ * `verify()` today, but the
49
+ * hook is there for a future `verifyIntegrity()` follow-up.
50
+ *
51
+ * Fields marked `op`, `collection`, `id`, `version`, `ts`, `actor` are
52
+ * plaintext METADATA about the operation — NOT the record itself. The
53
+ * entry is still encrypted at rest via the ledger DEK, but adapters
54
+ * could theoretically infer operation patterns from the sizes and
55
+ * timestamps. This is an accepted trade-off for the tamper-evidence
56
+ * property; full ORAM-level privacy is out of scope for noy-db.
57
+ */
58
+ interface LedgerEntry {
59
+ /**
60
+ * Zero-based sequential position of this entry in the chain. The
61
+ * canonical adapter key is this number zero-padded to 10 digits
62
+ * (`"0000000001"`) so lexicographic ordering matches numeric order.
63
+ */
64
+ readonly index: number;
65
+ /**
66
+ * Hex-encoded sha256 of the canonical JSON of the PREVIOUS entry.
67
+ * The genesis entry (index 0) has `prevHash === ''` — the first
68
+ * entry in a fresh vault has nothing to point back to.
69
+ */
70
+ readonly prevHash: string;
71
+ /**
72
+ * Which kind of mutation this entry records. only supports
73
+ * data operations (`put`, `delete`, `amendment`). Access-control
74
+ * operations (`grant`, `revoke`, `rotate`) will be added in a
75
+ * follow-up once the keyring write path is instrumented — that's
76
+ * tracked in the epic issue.
77
+ *
78
+ * `'amendment'` is the multi-record audit entry written by the
79
+ * guards subsystem when an admin/owner uses `withTransactions(...)`
80
+ * to repair a constraint-violating state. See `amendment` field
81
+ * below for the structured payload.
82
+ *
83
+ * `'lifecycle'` records a non-data audit event (e.g. partition
84
+ * handover) — `collection`/`id` are empty and the event detail
85
+ * lives in `reason` (e.g. `'partition-handed-over:<sealId>'`). Like
86
+ * `amendment`, it carries no data envelope, so `verifyBackupIntegrity`
87
+ * skips it in the data cross-check (it still participates in the
88
+ * tamper-evident chain).
89
+ *
90
+ * `'forget'` is the single summary entry written by `vault.forget()`
91
+ * (#304 GDPR crypto-shred). `collection`/`id` are empty and `version`
92
+ * is 0 — a forget is not scoped to one record. `payloadHash` carries
93
+ * `sha256Hex(subjectId)` so the ledger PROVES "subject X existed and
94
+ * was erased on date D" without retaining the subject id or any
95
+ * plaintext; `reason` holds a JSON summary of the shred counts. Like
96
+ * `amendment`/`lifecycle` it carries no data envelope and is skipped
97
+ * by the reconstruct walker (it still participates in the chain, so
98
+ * `verify()` passes after a shred).
99
+ */
100
+ readonly op: 'put' | 'delete' | 'amendment' | 'lifecycle' | 'migration' | 'forget';
101
+ /** The collection the mutation targeted. */
102
+ readonly collection: string;
103
+ /** The record id the mutation targeted. */
104
+ readonly id: string;
105
+ /**
106
+ * The record version AFTER this mutation. For `put` this is the
107
+ * newly assigned version; for `delete` this is the version that
108
+ * was deleted (the last version visible to reads).
109
+ */
110
+ readonly version: number;
111
+ /** ISO timestamp of the mutation. */
112
+ readonly ts: string;
113
+ /** User id of the actor who performed the mutation. */
114
+ readonly actor: string;
115
+ /**
116
+ * Hex-encoded sha256 of the encrypted envelope's `_data` field.
117
+ * For `put`, this is the hash of the new ciphertext. For `delete`,
118
+ * it's the hash of the last visible ciphertext at deletion time,
119
+ * or the empty string if nothing was there to delete. Hashing the
120
+ * ciphertext (not the plaintext) preserves zero-knowledge — see
121
+ * the file docstring.
122
+ */
123
+ readonly payloadHash: string;
124
+ /**
125
+ * Optional human-readable tag describing why this mutation happened.
126
+ * Threaded through `collection.put(_, _, { reason })`. Common
127
+ * values include `'import:csv'`, `'import:json'`, `'import:xlsx'` from
128
+ * `as-*` ImportPlan.apply(), but consumers can use any string for
129
+ * domain-specific audit filtering. Auto-strip via `canonicalJson` —
130
+ * absent on the wire, never serialized as `null`.
131
+ *
132
+ * Audit consumers filter: `entries.filter(e => e.reason?.startsWith('import:'))`.
133
+ */
134
+ readonly reason?: string;
135
+ /**
136
+ * Optional hex-encoded sha256 of the encrypted JSON Patch delta
137
+ * blob stored alongside this entry in `_ledger_deltas/`. Present
138
+ * only for `put` operations that had a previous version — the
139
+ * genesis put of a new record, and every `delete`, leave this
140
+ * field undefined.
141
+ *
142
+ * The delta payload itself lives in a sibling internal collection
143
+ * (`_ledger_deltas/<paddedIndex>`) and is encrypted with the
144
+ * ledger DEK. Callers use `ledger.loadDelta(index)` to decrypt and
145
+ * deserialize it when reconstructing a historical version.
146
+ *
147
+ * Why optional instead of always-present: the first put of a
148
+ * record has no previous version to diff against, so storing an
149
+ * empty patch would be noise. For deletes there's no "next" state
150
+ * to describe with a delta. Both cases set this field to undefined.
151
+ *
152
+ * Note: the canonical-JSON hasher treats `undefined` as invalid
153
+ * (it's one of the guard rails), so on the wire this field is
154
+ * either `{ deltaHash: '<hex>' }` or absent from the JSON
155
+ * entirely — never `{ deltaHash: undefined }`.
156
+ */
157
+ readonly deltaHash?: string;
158
+ /**
159
+ * Present only when `op === 'amendment'`. Records the human reason,
160
+ * the role of the actor, the (collection, id, vBefore, vAfter) tuple
161
+ * for every record touched, and which guard invariants passed.
162
+ *
163
+ * See docs/superpowers/specs/2026-05-18-guards-design.md.
164
+ */
165
+ readonly amendment?: {
166
+ readonly reason: string;
167
+ readonly role: 'admin' | 'owner';
168
+ readonly changes: ReadonlyArray<{
169
+ readonly collection: string;
170
+ readonly id: string;
171
+ readonly vBefore: number;
172
+ readonly vAfter: number;
173
+ }>;
174
+ readonly invariantsPassed: ReadonlyArray<string>;
175
+ };
176
+ }
177
+ /**
178
+ * Canonical (sort-stable) JSON encoder.
179
+ *
180
+ * This function is the load-bearing primitive of the hash chain:
181
+ * `sha256(canonicalJSON(entry))` must produce the same hex string
182
+ * every time, on every machine, for the same logical entry — otherwise
183
+ * `verify()` would return `{ ok: false }` on cross-platform reads.
184
+ *
185
+ * JavaScript's `JSON.stringify` is almost canonical, but NOT quite:
186
+ * it preserves the insertion order of object keys, which means
187
+ * `{a:1,b:2}` and `{b:2,a:1}` serialize differently. We fix this by
188
+ * recursively walking objects and sorting their keys before
189
+ * concatenation.
190
+ *
191
+ * Arrays keep their original order (reordering them would change
192
+ * semantics). Numbers, strings, booleans, and `null` use the default
193
+ * JSON encoding. `undefined` and functions are rejected — ledger
194
+ * entries are plain data, and silently dropping `undefined` would
195
+ * break the "same input → same hash" property if a caller forgot to
196
+ * omit a field.
197
+ *
198
+ * Performance: one pass per nesting level; O(n log n) for key sorting
199
+ * at each object. Entries are small (< 1 KB) so this is negligible
200
+ * compared to the sha256 call.
201
+ */
202
+ declare function canonicalJson(value: unknown): string;
203
+ /**
204
+ * Compute a hex-encoded sha256 of a string via Web Crypto's subtle API.
205
+ *
206
+ * We use hex (not base64) for hashes because hex is case-insensitive,
207
+ * fixed-length (64 chars), and easier to compare visually in debug
208
+ * output. Base64 would save a few bytes in storage but every encrypted
209
+ * ledger entry is already much larger than the hash itself.
210
+ */
211
+ declare function sha256Hex(input: string): Promise<string>;
212
+ /**
213
+ * Compute the canonical hash of a ledger entry. Short wrapper around
214
+ * `canonicalJson` + `sha256Hex`; callers use this instead of composing
215
+ * the two functions every time, so any future change to the hashing
216
+ * pipeline (e.g., adding a domain-separation prefix) lives in one place.
217
+ */
218
+ declare function hashEntry(entry: LedgerEntry): Promise<string>;
219
+ /**
220
+ * Pad an index to the canonical 10-digit form used as the adapter key.
221
+ * Ten digits is enough for ~10 billion ledger entries per vault
222
+ * — far beyond any realistic use case, but cheap enough that the extra
223
+ * digits don't hurt storage.
224
+ */
225
+ declare function paddedIndex(index: number): string;
226
+ /** Parse a padded adapter key back into a number. Returns NaN on malformed input. */
227
+ declare function parseIndex(key: string): number;
228
+
229
+ /**
230
+ * `withForgetCascade` — declaration surface for GDPR right-to-erasure via
231
+ * per-record CEK crypto-shred (#304, step 2 of the CEK security epic).
232
+ *
233
+ * This file holds only the *declaration* shape and the disabled sentinel.
234
+ * The actual erasure machinery lives in:
235
+ * - `subject-index.ts` — the encrypted `_subject_index` reserved collection
236
+ * - `vault.ts` `forget()` — the per-record tombstone + ledger flow
237
+ * - `collection.ts` `_writeTombstone` — the envelope rewrite
238
+ *
239
+ * A `ForgetStrategy` declares which collections carry erasable subject data
240
+ * and the (dotted-path) field on each record that names the data subject.
241
+ * Declaring a collection here ALSO forces `perRecordKeys: true` for it (a
242
+ * shred can only erase a record whose body is keyed off a per-record CEK),
243
+ * so adopters opt into the CEK foundation transitively.
244
+ *
245
+ * @module
246
+ */
247
+
248
+ /**
249
+ * User-supplied declaration passed to {@link withForgetCascade}. Maps a
250
+ * collection name to the record field (dotted path supported, e.g.
251
+ * `'billing.buyerId'`) that identifies the data subject for erasure.
252
+ *
253
+ * ```ts
254
+ * withForgetCascade({ subjects: { invoices: 'buyerId', contacts: 'id' } })
255
+ * ```
256
+ */
257
+ interface SubjectDeclaration {
258
+ readonly subjects: Record<string, string>;
259
+ }
260
+ /**
261
+ * Resolved forget strategy threaded through Noydb → every Vault. Carries
262
+ * the same `subjects` map the user declared. `NO_FORGET` (empty map) is the
263
+ * off-by-default sentinel; `vault.forget()` throws
264
+ * `ForgetStrategyNotConfiguredError` when the map is empty.
265
+ */
266
+ interface ForgetStrategy {
267
+ /** Collection → subject-field (dotted path). Empty under `NO_FORGET`. */
268
+ readonly subjects: Readonly<Record<string, string>>;
269
+ }
270
+ /**
271
+ * Disabled sentinel — no collections declare a subject field. `vault.forget()`
272
+ * refuses with `ForgetStrategyNotConfiguredError`; no write hooks register; no
273
+ * collection is forced into `perRecordKeys`. Non-adopters pay nothing.
274
+ */
275
+ declare const NO_FORGET: ForgetStrategy;
276
+ /**
277
+ * Declare GDPR crypto-shred for one or more collections.
278
+ *
279
+ * Each declared collection is forced to `perRecordKeys: true` (a shred can
280
+ * only guarantee erasure of a record whose body is keyed off a per-record
281
+ * CEK). On write, Noydb extracts `record[subjectField]` and maintains an
282
+ * encrypted `_subject_index` mapping `subject → [{collection, id}]`, so
283
+ * `vault.forget(subjectId)` can find every record for a subject and rewrite
284
+ * each to a tombstone (body + history permanently undecryptable) while the
285
+ * collection DEK and every other record stay intact.
286
+ *
287
+ * @example
288
+ * ```ts
289
+ * createNoydb({
290
+ * secret, user,
291
+ * forgetStrategy: withForgetCascade({ subjects: { invoices: 'buyerId' } }),
292
+ * })
293
+ * const result = await vault.forget('buyer-123')
294
+ * // → { subject, recordsShredded, historyVersionsShredded, collections, … }
295
+ * ```
296
+ */
297
+ declare function withForgetCascade(opts: SubjectDeclaration): ForgetStrategy;
298
+ /**
299
+ * The outcome of a `vault.forget(subjectId)` call.
300
+ *
301
+ * `unmigratedRecords` lists `collection:id` pairs that were tombstoned but
302
+ * whose body had NOT been migrated to a per-record CEK at shred time (legacy
303
+ * body still under the shared collection DEK). Those records are tombstoned
304
+ * (live envelope + history stripped) but their pre-shred ciphertext, if it
305
+ * leaked into a backup before migration, remains decryptable under the
306
+ * collection DEK — so erasure-completeness is NOT guaranteed for them. Run
307
+ * the per-record-CEK migration pass, then re-forget, to close the gap.
308
+ *
309
+ * Blob attachments (#365): a shredded record's **erasable** blobs (on a
310
+ * `perRecordKeys` collection) are crypto-shredded inline — `blobsShredded`
311
+ * counts those taken to refCount 0 (BlobObject deleted → chunks permanently
312
+ * undecryptable), `blobsRetainedShared` counts those still referenced by
313
+ * another record (shared content legitimately persists for its other owner).
314
+ * `blobResidueCollections` now lists only collections with blobs that could
315
+ * NOT be crypto-shredded: **legacy** blobs (no per-blob `_cek`, chunks under
316
+ * the shared `_blob` DEK — migrate them), or a session without the blob
317
+ * subsystem loaded. An all-erasable subject yields an empty residue list.
318
+ */
319
+ interface ForgetResult {
320
+ /** The subject id passed to `forget()`. Echoed for caller convenience. */
321
+ readonly subject: string;
322
+ /** Count of live records rewritten to a tombstone. */
323
+ readonly recordsShredded: number;
324
+ /** Count of `_history` envelopes tombstoned across all shredded records. */
325
+ readonly historyVersionsShredded: number;
326
+ /** Distinct collections that had at least one record shredded. */
327
+ readonly collections: readonly string[];
328
+ /** `collection:id` pairs shredded while still un-migrated (see type docs). */
329
+ readonly unmigratedRecords: readonly string[];
330
+ /** Count of erasable blobs crypto-shredded (refCount → 0, BlobObject deleted). */
331
+ readonly blobsShredded: number;
332
+ /** Count of erasable blobs retained because still referenced elsewhere (shared). */
333
+ readonly blobsRetainedShared: number;
334
+ /** Collections with blobs that could NOT be crypto-shredded — legacy (no `_cek`) or blobs disabled (see type docs). */
335
+ readonly blobResidueCollections: readonly string[];
336
+ /** The single `op:'forget'` ledger entry appended for this erasure. */
337
+ readonly ledgerEntry: LedgerEntry;
338
+ }
339
+
340
+ /** Reserved collection holding the encrypted subject → records index. */
341
+ declare const SUBJECT_INDEX_COLLECTION = "_subject_index";
342
+ /** A single record reference held in a subject's index entry. */
343
+ interface SubjectRef {
344
+ readonly collection: string;
345
+ readonly id: string;
346
+ }
347
+
348
+ export { type ForgetStrategy as F, type LedgerEntry as L, NO_FORGET as N, type SubjectRef as S, parseIndex as a, type ForgetResult as b, canonicalJson as c, SUBJECT_INDEX_COLLECTION as d, type SubjectDeclaration as e, hashEntry as h, paddedIndex as p, sha256Hex as s, withForgetCascade as w };