@noy-db/hub 0.3.0-pre.4 → 0.3.0-pre.6

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 (345) hide show
  1. package/dist/adapter/index.d.ts +1 -1
  2. package/dist/adapter/index.js +1 -1
  3. package/dist/aggregate/index.d.ts +2 -2
  4. package/dist/aggregate/index.js +4 -4
  5. package/dist/api-OQ65LUSK.js +20 -0
  6. package/dist/as/index.d.ts +3 -3
  7. package/dist/as/index.js +9 -9
  8. package/dist/at/index.d.ts +1 -1
  9. package/dist/attestation/index.d.ts +2 -2
  10. package/dist/attestation/index.js +16 -16
  11. package/dist/{backup-MOB27UUN.js → backup-Y3RMFGVX.js} +9 -9
  12. package/dist/blobs/index.d.ts +3 -3
  13. package/dist/blobs/index.js +8 -8
  14. package/dist/bundle/index.d.ts +4 -4
  15. package/dist/bundle/index.js +17 -17
  16. package/dist/{bundle-Bs13EZtX.d.ts → bundle-BPOSpGZG.d.ts} +1 -1
  17. package/dist/by/index.js +2 -2
  18. package/dist/cargo/index.d.ts +3 -3
  19. package/dist/cargo/index.js +19 -19
  20. package/dist/{chunk-BMQOH7MM.js → chunk-26FSVNBL.js} +2 -2
  21. package/dist/{chunk-HLUKZ36Q.js → chunk-3IMGBWP7.js} +5 -5
  22. package/dist/{chunk-LPRPVCNY.js → chunk-3UUXDQPM.js} +2 -2
  23. package/dist/{chunk-AF5ZRTZ4.js → chunk-47C4CI7R.js} +2 -2
  24. package/dist/{chunk-P27Z66EB.js → chunk-4I4UNXHM.js} +4 -4
  25. package/dist/{chunk-ULIHDPKL.js → chunk-55LSDABW.js} +2 -2
  26. package/dist/{chunk-P5WXDYMD.js → chunk-5GQE5IDB.js} +4 -4
  27. package/dist/{chunk-TLJOJBZD.js → chunk-5HZULLHE.js} +2 -2
  28. package/dist/chunk-5JQMX2EH.js +50 -0
  29. package/dist/chunk-5JQMX2EH.js.map +1 -0
  30. package/dist/{chunk-PGFY7IRW.js → chunk-5UOPIPZC.js} +3 -3
  31. package/dist/{chunk-6HNKCKFZ.js → chunk-65FW3ALF.js} +4 -4
  32. package/dist/{chunk-ZKF6HH7V.js → chunk-6P5AJ2ZS.js} +2 -2
  33. package/dist/{chunk-QNTEDPWP.js → chunk-6PALJTC2.js} +3 -3
  34. package/dist/{chunk-GBTUANXF.js → chunk-6Z435B6N.js} +5 -5
  35. package/dist/{chunk-Z3FZC5GV.js → chunk-73C4RPMX.js} +3 -3
  36. package/dist/{chunk-VMJ5URU7.js → chunk-7A7LTSJR.js} +5 -5
  37. package/dist/{chunk-OVO2RZAE.js → chunk-7AGLCOYE.js} +10 -10
  38. package/dist/{chunk-XYYW64LB.js → chunk-7CZ6YXMO.js} +2 -2
  39. package/dist/{chunk-RDHAGBEB.js → chunk-7KTL4RHZ.js} +3 -3
  40. package/dist/{chunk-4K3MQ5S3.js → chunk-BASCPHNM.js} +2 -2
  41. package/dist/{chunk-CPXPHQGX.js → chunk-BYS45GOJ.js} +17 -12
  42. package/dist/chunk-BYS45GOJ.js.map +1 -0
  43. package/dist/{chunk-P2LDXRGP.js → chunk-C2ZKWL37.js} +2 -2
  44. package/dist/{chunk-BKGIWGCX.js → chunk-C4NOLA5X.js} +2 -2
  45. package/dist/{chunk-EWR7HL3K.js → chunk-C57J6AWN.js} +30 -5
  46. package/dist/{chunk-EWR7HL3K.js.map → chunk-C57J6AWN.js.map} +1 -1
  47. package/dist/{chunk-TB5RNNJ4.js → chunk-C6A2DPRE.js} +4 -4
  48. package/dist/{chunk-SW56GSYC.js → chunk-CHK5VVMI.js} +2 -2
  49. package/dist/{chunk-GOUNIHFA.js → chunk-CYWF3JJE.js} +10 -10
  50. package/dist/{chunk-ZPHDGUZZ.js → chunk-D6ADQ4QL.js} +581 -82
  51. package/dist/chunk-D6ADQ4QL.js.map +1 -0
  52. package/dist/{chunk-H7RYPVMJ.js → chunk-DBBP35OP.js} +2 -2
  53. package/dist/{chunk-A5DYVMDR.js → chunk-E7MAS736.js} +3 -3
  54. package/dist/{chunk-3Y4QLJ6K.js → chunk-EU7HDMT3.js} +2 -2
  55. package/dist/{chunk-T65UZXR6.js → chunk-FCOZ7DEC.js} +3 -3
  56. package/dist/{chunk-HBKDR7R3.js → chunk-GEK6UGOJ.js} +2 -2
  57. package/dist/{chunk-7J7JRYXW.js → chunk-GGFT2XFF.js} +4 -4
  58. package/dist/chunk-GYGLAVCX.js +19 -0
  59. package/dist/chunk-GYGLAVCX.js.map +1 -0
  60. package/dist/{chunk-HY6ZGGEC.js → chunk-HJZ3CTZ2.js} +2 -2
  61. package/dist/{chunk-GXGK22QU.js → chunk-HU55NPHZ.js} +2 -2
  62. package/dist/{chunk-U24XHXNK.js → chunk-I6JJ6VJS.js} +2 -2
  63. package/dist/{chunk-3QRQOBS7.js → chunk-I7GTYPWF.js} +2 -2
  64. package/dist/{chunk-N5YVZHCB.js → chunk-II6DLDZM.js} +2 -2
  65. package/dist/{chunk-XJR3COJO.js → chunk-IVIGZTFH.js} +4 -4
  66. package/dist/{chunk-Z7KI4WHR.js → chunk-LFGJG4XZ.js} +2 -2
  67. package/dist/{chunk-ZKYMKF2S.js → chunk-ML5UP7YN.js} +5 -5
  68. package/dist/{chunk-ZROMNP7Q.js → chunk-MOQ5M46U.js} +2 -2
  69. package/dist/{chunk-GQOT6QJR.js → chunk-MT4YWJRW.js} +5 -5
  70. package/dist/{chunk-P3V7JTB6.js → chunk-NL4HVTNO.js} +3 -3
  71. package/dist/{chunk-GZZL5R73.js → chunk-OCVO2V63.js} +4 -4
  72. package/dist/{chunk-U23JUUPX.js → chunk-OJ64XMPJ.js} +10 -2
  73. package/dist/{chunk-U23JUUPX.js.map → chunk-OJ64XMPJ.js.map} +1 -1
  74. package/dist/{chunk-VFRNWE5P.js → chunk-OLVIGEHQ.js} +6 -6
  75. package/dist/{chunk-HMXLN43G.js → chunk-OWGAXPRE.js} +2 -2
  76. package/dist/{chunk-T2EGAXPM.js → chunk-PAJCRV7O.js} +2 -2
  77. package/dist/{chunk-5MRE3C4Q.js → chunk-PLQCXH75.js} +2 -2
  78. package/dist/{chunk-RTS23VIJ.js → chunk-PYIUDUGS.js} +2 -2
  79. package/dist/{chunk-5CY35H55.js → chunk-QQQE6QUO.js} +8 -8
  80. package/dist/{chunk-TYGW5TOR.js → chunk-RIZQZKU6.js} +4 -4
  81. package/dist/{chunk-VPCMJ5Z4.js → chunk-RLP65PI3.js} +5 -5
  82. package/dist/{chunk-6RXPSMKR.js → chunk-RNYDHIQL.js} +3 -3
  83. package/dist/{chunk-5W7AOFWA.js → chunk-RXUFMTD5.js} +2 -2
  84. package/dist/chunk-S2IDC6MO.js +167 -0
  85. package/dist/chunk-S2IDC6MO.js.map +1 -0
  86. package/dist/{chunk-Z5PIUYNB.js → chunk-S55MJQUQ.js} +5 -5
  87. package/dist/{chunk-O2DB4C3M.js → chunk-SXLMLECV.js} +3 -3
  88. package/dist/{chunk-OPTFANOX.js → chunk-TSAT3E7Y.js} +3 -3
  89. package/dist/{chunk-M66NAZA4.js → chunk-TWJVOYU2.js} +3 -3
  90. package/dist/{chunk-43ISXURO.js → chunk-U7LV2DUN.js} +2 -2
  91. package/dist/{chunk-FH52CDEW.js → chunk-UB3XHGFG.js} +5 -5
  92. package/dist/{chunk-TCIUO62Z.js → chunk-UWZ7O4NR.js} +2 -2
  93. package/dist/{chunk-K5P46KB3.js → chunk-UZZFV3O3.js} +7 -7
  94. package/dist/{chunk-P3NGV5RV.js → chunk-V76PHWLE.js} +2 -2
  95. package/dist/{chunk-UOEWDCUX.js → chunk-VFQOE76I.js} +2 -2
  96. package/dist/{chunk-VRPBEOWU.js → chunk-VIWOGJ2O.js} +2 -2
  97. package/dist/{chunk-5EWYUR5P.js → chunk-VK6OC22R.js} +2 -2
  98. package/dist/{chunk-VAWY44JW.js → chunk-WAL4MRBK.js} +25 -10
  99. package/dist/chunk-WAL4MRBK.js.map +1 -0
  100. package/dist/{chunk-H5XRIJX3.js → chunk-WAW4VFS7.js} +4 -4
  101. package/dist/{chunk-SEQ2JI3Y.js → chunk-WQAT24C2.js} +6 -6
  102. package/dist/{chunk-NB47TXGP.js → chunk-XDWNF4BS.js} +8 -8
  103. package/dist/{chunk-G7RDYYTE.js → chunk-XW5LZYV4.js} +2 -2
  104. package/dist/{chunk-LIP6JWYK.js → chunk-YTCCC6NG.js} +3 -3
  105. package/dist/{chunk-OFBFAVLI.js → chunk-YXGIPYH4.js} +52 -6
  106. package/dist/chunk-YXGIPYH4.js.map +1 -0
  107. package/dist/{chunk-TVRQ3RYH.js → chunk-ZHK3F5RB.js} +6 -7
  108. package/dist/chunk-ZHK3F5RB.js.map +1 -0
  109. package/dist/{chunk-G4MGYGSS.js → chunk-ZRJBLWKQ.js} +5 -5
  110. package/dist/classified/index.d.ts +3 -3
  111. package/dist/classified/index.js +3 -3
  112. package/dist/{collection-facade-MKEBZDWW.js → collection-facade-5V3JS7SD.js} +13 -13
  113. package/dist/{computed-BMMEFRFJ.js → computed-6FOFXQPE.js} +3 -3
  114. package/dist/{config-drift-KGM7ZRW4.js → config-drift-SWZNEH5H.js} +3 -3
  115. package/dist/consent/index.d.ts +2 -2
  116. package/dist/consent/index.js +7 -7
  117. package/dist/crdt/index.d.ts +2 -2
  118. package/dist/dead-filter-MGWMNRO2.js +28 -0
  119. package/dist/dead-filter-MGWMNRO2.js.map +1 -0
  120. package/dist/{delegation-BQNIEHZE.js → delegation-AUY42TGU.js} +9 -9
  121. package/dist/derivations/index.d.ts +3 -3
  122. package/dist/derivations/index.js +9 -9
  123. package/dist/derive-FWSEWWI7.js +21 -0
  124. package/dist/{dev-unlock-Cqd5Xv5J.d.ts → dev-unlock-DxecHstJ.d.ts} +1 -1
  125. package/dist/{enclave-YN6223OG.js → enclave-UYZGSE2C.js} +8 -8
  126. package/dist/executor-EUPYHCLU.js +9 -0
  127. package/dist/executor-KZ4B3PRT.js +9 -0
  128. package/dist/executor-XWPD5PIM.js +21 -0
  129. package/dist/export-accessible-M54OI6FO.js +23 -0
  130. package/dist/{extract-partition-RNVSFHAB.js → extract-partition-MIHAL6PP.js} +13 -13
  131. package/dist/{fanout-sidecar-WS22Q5WH.js → fanout-sidecar-SSEW7BQB.js} +7 -7
  132. package/dist/find-OH4BEULF.js +11 -0
  133. package/dist/forget/index.js +7 -7
  134. package/dist/guards/index.d.ts +3 -3
  135. package/dist/guards/index.js +6 -6
  136. package/dist/{hash-D8Q5MJLA.d.ts → hash-umqwdLhO.d.ts} +1 -1
  137. package/dist/history/index.d.ts +3 -3
  138. package/dist/history/index.js +9 -9
  139. package/dist/i18n/index.d.ts +2 -2
  140. package/dist/i18n/index.js +11 -11
  141. package/dist/in/index.d.ts +1 -1
  142. package/dist/{index-D4GQe1Rx.d.ts → index-B-LKCpm6.d.ts} +103 -4
  143. package/dist/{index-DRxk8q_7.d.ts → index-zdEVWlkZ.d.ts} +2 -2
  144. package/dist/index.d.ts +21 -14
  145. package/dist/index.js +115 -113
  146. package/dist/index.js.map +1 -1
  147. package/dist/indexing/index.d.ts +2 -2
  148. package/dist/indexing/index.js +4 -4
  149. package/dist/issue-PHWTGH2G.js +19 -0
  150. package/dist/kernel/index.d.ts +2 -2
  151. package/dist/kernel/index.js +10 -10
  152. package/dist/lazy/index.d.ts +2 -2
  153. package/dist/{ledger-KZWBKAG5.js → ledger-IWWY7IIC.js} +9 -9
  154. package/dist/liberate-QDTNV7SM.js +24 -0
  155. package/dist/{link-set-UQEIYQAM.js → link-set-HJOC7GB7.js} +9 -9
  156. package/dist/materialized-views/index.d.ts +3 -3
  157. package/dist/materialized-views/index.js +13 -13
  158. package/dist/{mime-magic-DmwT7OzZ.d.ts → mime-magic-C_O9KsAk.d.ts} +1 -1
  159. package/dist/noydb-Y5L74IDJ.js +62 -0
  160. package/dist/on/index.d.ts +1 -1
  161. package/dist/on/index.js +7 -7
  162. package/dist/overlay-views/index.d.ts +3 -3
  163. package/dist/overlay-views/index.js +4 -4
  164. package/dist/periods/index.d.ts +2 -2
  165. package/dist/periods/index.js +10 -10
  166. package/dist/pod/index.d.ts +2 -2
  167. package/dist/pod/index.js +9 -9
  168. package/dist/{policy-YIKUH4AD.js → policy-3ZKSGSRK.js} +3 -3
  169. package/dist/portability/index.d.ts +2 -2
  170. package/dist/portability/index.js +8 -8
  171. package/dist/post-register-BIXGCZ2M.js +55 -0
  172. package/dist/post-register-BIXGCZ2M.js.map +1 -0
  173. package/dist/{public-envelope-MRN5YYZZ.js → public-envelope-6UBQ4IUY.js} +3 -3
  174. package/dist/query/index.d.ts +1 -1
  175. package/dist/query/index.js +6 -6
  176. package/dist/register-OVONZ2MJ.js +23 -0
  177. package/dist/registry-AIEYUOSG.js +19 -0
  178. package/dist/registry-D5J7SVJ2.js +17 -0
  179. package/dist/registry-HSNQ4NBP.js +9 -0
  180. package/dist/{request-withdrawal-EHALV66Y.js → request-withdrawal-IHF64VIT.js} +12 -12
  181. package/dist/{reveal-TBLTFWQ2.js → reveal-B77Q2BJW.js} +5 -5
  182. package/dist/{revoke-MHAUAESM.js → revoke-BPPOUZPE.js} +9 -9
  183. package/dist/satellites/index.d.ts +5 -0
  184. package/dist/satellites/index.js +8 -0
  185. package/dist/sealed-record/index.d.ts +2 -2
  186. package/dist/sealed-record/index.js +10 -10
  187. package/dist/session/index.d.ts +3 -3
  188. package/dist/session/index.js +7 -7
  189. package/dist/shadow/index.d.ts +2 -2
  190. package/dist/shadow/index.js +2 -2
  191. package/dist/{signer-PQ74YXRY.js → signer-MNQEL27B.js} +8 -8
  192. package/dist/snapshots/index.d.ts +2 -2
  193. package/dist/snapshots/index.js +8 -8
  194. package/dist/{stale-7Q62KVI3.js → stale-COBBJORL.js} +2 -2
  195. package/dist/storage-DVKYH7UU.js +23 -0
  196. package/dist/storage-DVKYH7UU.js.map +1 -0
  197. package/dist/sync/index.d.ts +1 -1
  198. package/dist/sync/index.js +7 -7
  199. package/dist/team/index.d.ts +29 -4
  200. package/dist/team/index.js +14 -14
  201. package/dist/tiers/index.d.ts +1 -1
  202. package/dist/tiers/index.js +8 -8
  203. package/dist/to/index.d.ts +1 -1
  204. package/dist/to/index.js +1 -1
  205. package/dist/{transition-guard-C4hvR-Ac.d.ts → transition-guard-CzqWwVGP.d.ts} +1 -1
  206. package/dist/tx/index.d.ts +2 -2
  207. package/dist/tx/index.js +3 -3
  208. package/dist/util/index.js +1 -1
  209. package/dist/{validators-Ctgkj5qd.d.ts → validators-Bdiv0ucK.d.ts} +1 -1
  210. package/dist/{vault-diff-B1Ir6EGs.d.ts → vault-diff-BbZngJUP.d.ts} +1 -1
  211. package/dist/{verify-YB5LQHNA.js → verify-CAYGXYNO.js} +5 -5
  212. package/dist/{walk-5C3GPKT2.js → walk-CVNXFUEF.js} +9 -9
  213. package/dist/with/index.d.ts +2 -2
  214. package/dist/with/index.js +9 -9
  215. package/dist/{with-materialized-view-Bp65kKdQ.d.ts → with-materialized-view-BmKXygt2.d.ts} +1 -1
  216. package/dist/{with-overlayed-view-BRhdQNrK.d.ts → with-overlayed-view-Bnwe7E75.d.ts} +1 -1
  217. package/dist/{with-rollup-bQRPc3y1.d.ts → with-rollup-JXTxc9cu.d.ts} +1 -1
  218. package/dist/{withdraw-accessible-JMX2TCPX.js → withdraw-accessible-5ALN3ZGM.js} +11 -11
  219. package/dist/withdraw-accessible-5ALN3ZGM.js.map +1 -0
  220. package/package.json +7 -3
  221. package/dist/api-JOXUNSKP.js +0 -20
  222. package/dist/chunk-CPXPHQGX.js.map +0 -1
  223. package/dist/chunk-KYY7L72M.js +0 -106
  224. package/dist/chunk-KYY7L72M.js.map +0 -1
  225. package/dist/chunk-OFBFAVLI.js.map +0 -1
  226. package/dist/chunk-TVRQ3RYH.js.map +0 -1
  227. package/dist/chunk-VAWY44JW.js.map +0 -1
  228. package/dist/chunk-ZPHDGUZZ.js.map +0 -1
  229. package/dist/executor-CBTNU5VZ.js +0 -9
  230. package/dist/executor-DJHNSTIR.js +0 -9
  231. package/dist/executor-FGISLQIN.js +0 -21
  232. package/dist/export-accessible-P7SLRLK3.js +0 -23
  233. package/dist/find-RNBG7LBY.js +0 -11
  234. package/dist/issue-W5QG53B5.js +0 -19
  235. package/dist/liberate-GMGCHIND.js +0 -24
  236. package/dist/noydb-KS2O2MRI.js +0 -60
  237. package/dist/register-K6DDSIXN.js +0 -21
  238. package/dist/registry-IMNMHWTM.js +0 -17
  239. package/dist/registry-K6VUQXKV.js +0 -19
  240. package/dist/registry-ZVO3T4M5.js +0 -9
  241. package/dist/storage-5E6YB2JY.js +0 -21
  242. /package/dist/{api-JOXUNSKP.js.map → api-OQ65LUSK.js.map} +0 -0
  243. /package/dist/{backup-MOB27UUN.js.map → backup-Y3RMFGVX.js.map} +0 -0
  244. /package/dist/{chunk-BMQOH7MM.js.map → chunk-26FSVNBL.js.map} +0 -0
  245. /package/dist/{chunk-HLUKZ36Q.js.map → chunk-3IMGBWP7.js.map} +0 -0
  246. /package/dist/{chunk-LPRPVCNY.js.map → chunk-3UUXDQPM.js.map} +0 -0
  247. /package/dist/{chunk-AF5ZRTZ4.js.map → chunk-47C4CI7R.js.map} +0 -0
  248. /package/dist/{chunk-P27Z66EB.js.map → chunk-4I4UNXHM.js.map} +0 -0
  249. /package/dist/{chunk-ULIHDPKL.js.map → chunk-55LSDABW.js.map} +0 -0
  250. /package/dist/{chunk-P5WXDYMD.js.map → chunk-5GQE5IDB.js.map} +0 -0
  251. /package/dist/{chunk-TLJOJBZD.js.map → chunk-5HZULLHE.js.map} +0 -0
  252. /package/dist/{chunk-PGFY7IRW.js.map → chunk-5UOPIPZC.js.map} +0 -0
  253. /package/dist/{chunk-6HNKCKFZ.js.map → chunk-65FW3ALF.js.map} +0 -0
  254. /package/dist/{chunk-ZKF6HH7V.js.map → chunk-6P5AJ2ZS.js.map} +0 -0
  255. /package/dist/{chunk-QNTEDPWP.js.map → chunk-6PALJTC2.js.map} +0 -0
  256. /package/dist/{chunk-GBTUANXF.js.map → chunk-6Z435B6N.js.map} +0 -0
  257. /package/dist/{chunk-Z3FZC5GV.js.map → chunk-73C4RPMX.js.map} +0 -0
  258. /package/dist/{chunk-VMJ5URU7.js.map → chunk-7A7LTSJR.js.map} +0 -0
  259. /package/dist/{chunk-OVO2RZAE.js.map → chunk-7AGLCOYE.js.map} +0 -0
  260. /package/dist/{chunk-XYYW64LB.js.map → chunk-7CZ6YXMO.js.map} +0 -0
  261. /package/dist/{chunk-RDHAGBEB.js.map → chunk-7KTL4RHZ.js.map} +0 -0
  262. /package/dist/{chunk-4K3MQ5S3.js.map → chunk-BASCPHNM.js.map} +0 -0
  263. /package/dist/{chunk-P2LDXRGP.js.map → chunk-C2ZKWL37.js.map} +0 -0
  264. /package/dist/{chunk-BKGIWGCX.js.map → chunk-C4NOLA5X.js.map} +0 -0
  265. /package/dist/{chunk-TB5RNNJ4.js.map → chunk-C6A2DPRE.js.map} +0 -0
  266. /package/dist/{chunk-SW56GSYC.js.map → chunk-CHK5VVMI.js.map} +0 -0
  267. /package/dist/{chunk-GOUNIHFA.js.map → chunk-CYWF3JJE.js.map} +0 -0
  268. /package/dist/{chunk-H7RYPVMJ.js.map → chunk-DBBP35OP.js.map} +0 -0
  269. /package/dist/{chunk-A5DYVMDR.js.map → chunk-E7MAS736.js.map} +0 -0
  270. /package/dist/{chunk-3Y4QLJ6K.js.map → chunk-EU7HDMT3.js.map} +0 -0
  271. /package/dist/{chunk-T65UZXR6.js.map → chunk-FCOZ7DEC.js.map} +0 -0
  272. /package/dist/{chunk-HBKDR7R3.js.map → chunk-GEK6UGOJ.js.map} +0 -0
  273. /package/dist/{chunk-7J7JRYXW.js.map → chunk-GGFT2XFF.js.map} +0 -0
  274. /package/dist/{chunk-HY6ZGGEC.js.map → chunk-HJZ3CTZ2.js.map} +0 -0
  275. /package/dist/{chunk-GXGK22QU.js.map → chunk-HU55NPHZ.js.map} +0 -0
  276. /package/dist/{chunk-U24XHXNK.js.map → chunk-I6JJ6VJS.js.map} +0 -0
  277. /package/dist/{chunk-3QRQOBS7.js.map → chunk-I7GTYPWF.js.map} +0 -0
  278. /package/dist/{chunk-N5YVZHCB.js.map → chunk-II6DLDZM.js.map} +0 -0
  279. /package/dist/{chunk-XJR3COJO.js.map → chunk-IVIGZTFH.js.map} +0 -0
  280. /package/dist/{chunk-Z7KI4WHR.js.map → chunk-LFGJG4XZ.js.map} +0 -0
  281. /package/dist/{chunk-ZKYMKF2S.js.map → chunk-ML5UP7YN.js.map} +0 -0
  282. /package/dist/{chunk-ZROMNP7Q.js.map → chunk-MOQ5M46U.js.map} +0 -0
  283. /package/dist/{chunk-GQOT6QJR.js.map → chunk-MT4YWJRW.js.map} +0 -0
  284. /package/dist/{chunk-P3V7JTB6.js.map → chunk-NL4HVTNO.js.map} +0 -0
  285. /package/dist/{chunk-GZZL5R73.js.map → chunk-OCVO2V63.js.map} +0 -0
  286. /package/dist/{chunk-VFRNWE5P.js.map → chunk-OLVIGEHQ.js.map} +0 -0
  287. /package/dist/{chunk-HMXLN43G.js.map → chunk-OWGAXPRE.js.map} +0 -0
  288. /package/dist/{chunk-T2EGAXPM.js.map → chunk-PAJCRV7O.js.map} +0 -0
  289. /package/dist/{chunk-5MRE3C4Q.js.map → chunk-PLQCXH75.js.map} +0 -0
  290. /package/dist/{chunk-RTS23VIJ.js.map → chunk-PYIUDUGS.js.map} +0 -0
  291. /package/dist/{chunk-5CY35H55.js.map → chunk-QQQE6QUO.js.map} +0 -0
  292. /package/dist/{chunk-TYGW5TOR.js.map → chunk-RIZQZKU6.js.map} +0 -0
  293. /package/dist/{chunk-VPCMJ5Z4.js.map → chunk-RLP65PI3.js.map} +0 -0
  294. /package/dist/{chunk-6RXPSMKR.js.map → chunk-RNYDHIQL.js.map} +0 -0
  295. /package/dist/{chunk-5W7AOFWA.js.map → chunk-RXUFMTD5.js.map} +0 -0
  296. /package/dist/{chunk-Z5PIUYNB.js.map → chunk-S55MJQUQ.js.map} +0 -0
  297. /package/dist/{chunk-O2DB4C3M.js.map → chunk-SXLMLECV.js.map} +0 -0
  298. /package/dist/{chunk-OPTFANOX.js.map → chunk-TSAT3E7Y.js.map} +0 -0
  299. /package/dist/{chunk-M66NAZA4.js.map → chunk-TWJVOYU2.js.map} +0 -0
  300. /package/dist/{chunk-43ISXURO.js.map → chunk-U7LV2DUN.js.map} +0 -0
  301. /package/dist/{chunk-FH52CDEW.js.map → chunk-UB3XHGFG.js.map} +0 -0
  302. /package/dist/{chunk-TCIUO62Z.js.map → chunk-UWZ7O4NR.js.map} +0 -0
  303. /package/dist/{chunk-K5P46KB3.js.map → chunk-UZZFV3O3.js.map} +0 -0
  304. /package/dist/{chunk-P3NGV5RV.js.map → chunk-V76PHWLE.js.map} +0 -0
  305. /package/dist/{chunk-UOEWDCUX.js.map → chunk-VFQOE76I.js.map} +0 -0
  306. /package/dist/{chunk-VRPBEOWU.js.map → chunk-VIWOGJ2O.js.map} +0 -0
  307. /package/dist/{chunk-5EWYUR5P.js.map → chunk-VK6OC22R.js.map} +0 -0
  308. /package/dist/{chunk-H5XRIJX3.js.map → chunk-WAW4VFS7.js.map} +0 -0
  309. /package/dist/{chunk-SEQ2JI3Y.js.map → chunk-WQAT24C2.js.map} +0 -0
  310. /package/dist/{chunk-NB47TXGP.js.map → chunk-XDWNF4BS.js.map} +0 -0
  311. /package/dist/{chunk-G7RDYYTE.js.map → chunk-XW5LZYV4.js.map} +0 -0
  312. /package/dist/{chunk-LIP6JWYK.js.map → chunk-YTCCC6NG.js.map} +0 -0
  313. /package/dist/{chunk-G4MGYGSS.js.map → chunk-ZRJBLWKQ.js.map} +0 -0
  314. /package/dist/{collection-facade-MKEBZDWW.js.map → collection-facade-5V3JS7SD.js.map} +0 -0
  315. /package/dist/{computed-BMMEFRFJ.js.map → computed-6FOFXQPE.js.map} +0 -0
  316. /package/dist/{config-drift-KGM7ZRW4.js.map → config-drift-SWZNEH5H.js.map} +0 -0
  317. /package/dist/{delegation-BQNIEHZE.js.map → delegation-AUY42TGU.js.map} +0 -0
  318. /package/dist/{enclave-YN6223OG.js.map → derive-FWSEWWI7.js.map} +0 -0
  319. /package/dist/{executor-CBTNU5VZ.js.map → enclave-UYZGSE2C.js.map} +0 -0
  320. /package/dist/{executor-DJHNSTIR.js.map → executor-EUPYHCLU.js.map} +0 -0
  321. /package/dist/{executor-FGISLQIN.js.map → executor-KZ4B3PRT.js.map} +0 -0
  322. /package/dist/{export-accessible-P7SLRLK3.js.map → executor-XWPD5PIM.js.map} +0 -0
  323. /package/dist/{extract-partition-RNVSFHAB.js.map → export-accessible-M54OI6FO.js.map} +0 -0
  324. /package/dist/{find-RNBG7LBY.js.map → extract-partition-MIHAL6PP.js.map} +0 -0
  325. /package/dist/{fanout-sidecar-WS22Q5WH.js.map → fanout-sidecar-SSEW7BQB.js.map} +0 -0
  326. /package/dist/{issue-W5QG53B5.js.map → find-OH4BEULF.js.map} +0 -0
  327. /package/dist/{ledger-KZWBKAG5.js.map → issue-PHWTGH2G.js.map} +0 -0
  328. /package/dist/{liberate-GMGCHIND.js.map → ledger-IWWY7IIC.js.map} +0 -0
  329. /package/dist/{link-set-UQEIYQAM.js.map → liberate-QDTNV7SM.js.map} +0 -0
  330. /package/dist/{noydb-KS2O2MRI.js.map → link-set-HJOC7GB7.js.map} +0 -0
  331. /package/dist/{policy-YIKUH4AD.js.map → noydb-Y5L74IDJ.js.map} +0 -0
  332. /package/dist/{public-envelope-MRN5YYZZ.js.map → policy-3ZKSGSRK.js.map} +0 -0
  333. /package/dist/{register-K6DDSIXN.js.map → public-envelope-6UBQ4IUY.js.map} +0 -0
  334. /package/dist/{registry-IMNMHWTM.js.map → register-OVONZ2MJ.js.map} +0 -0
  335. /package/dist/{registry-K6VUQXKV.js.map → registry-AIEYUOSG.js.map} +0 -0
  336. /package/dist/{registry-ZVO3T4M5.js.map → registry-D5J7SVJ2.js.map} +0 -0
  337. /package/dist/{request-withdrawal-EHALV66Y.js.map → registry-HSNQ4NBP.js.map} +0 -0
  338. /package/dist/{revoke-MHAUAESM.js.map → request-withdrawal-IHF64VIT.js.map} +0 -0
  339. /package/dist/{reveal-TBLTFWQ2.js.map → reveal-B77Q2BJW.js.map} +0 -0
  340. /package/dist/{signer-PQ74YXRY.js.map → revoke-BPPOUZPE.js.map} +0 -0
  341. /package/dist/{stale-7Q62KVI3.js.map → satellites/index.js.map} +0 -0
  342. /package/dist/{storage-5E6YB2JY.js.map → signer-MNQEL27B.js.map} +0 -0
  343. /package/dist/{withdraw-accessible-JMX2TCPX.js.map → stale-COBBJORL.js.map} +0 -0
  344. /package/dist/{verify-YB5LQHNA.js.map → verify-CAYGXYNO.js.map} +0 -0
  345. /package/dist/{walk-5C3GPKT2.js.map → walk-CVNXFUEF.js.map} +0 -0
@@ -1,5 +1,5 @@
1
- import { je as TeamStrategy, cT as NoydbStore, cF as UnlockedKeyring } from '../index-D4GQe1Rx.js';
2
- export { e1 as BundleRecipient, fz as EnrollAuthenticatorOptions, fA as EnrollAuthenticatorWrappingDEKsOptions, fB as EnrollAuthenticatorWrappingKEKOptions, gy as ListUsersOptions, h3 as NO_TEAM, hl as PaperRecoveryEntry, hx as PresenceHandle, h$ as RecoverPassphraseInput, i0 as RecoverPassphraseResult, i1 as RecoverUserOptions, i4 as RecoveryProof, ih as RotatePassphraseInput, iP as SlotRewrapCeremony, iQ as SlotRewrapContext, iZ as SyncEngine, j5 as SyncTransaction, jd as TeamNotEnabledError, jr as UpdateAuthenticatorOptions, jI as WrappedDeksBlob, jT as buildRecipientKeyringFile, jU as burnPaperRecoveryEntry, l7 as changeSecret, l8 as createOwnerKeyring, j_ as deriveMagicLinkContentKey, k2 as enrollAuthenticator, l9 as ensureCollectionDEK, k6 as evaluateExportCapability, k8 as evaluateImportCapability, kb as findAuthenticator, la as grant, kc as hasExportCapability, kd as hasImportCapability, kg as isMagicLinkGrantExpired, kp as listMagicLinkGrants, kq as listUsers, kr as listUsersWithEnvelopes, lb as loadKeyring, ku as loadPaperRecoveryEntries, kx as magicLinkGrantRecordId, ky as mintPaperRecoveryEntry, kA as mintWrappedDeksBlob, lc as persistKeyring, kF as readMagicLinkGrantRecord, km as recoverPassphrase, kH as recoverUser, kL as removeAuthenticator, ld as revoke, kR as revokeMagicLinkGrant, kn as rotatePassphrase, kT as savePaperRecoveryEntries, kX as unwrapDeksFromBlob, kY as unwrapDeksFromPaperEntry, k_ as unwrapMagicLinkGrant, le as updateAuthenticator, lf as updateKeyringIdentity, l6 as writeMagicLinkGrant } from '../index-D4GQe1Rx.js';
1
+ import { je as TeamStrategy, cT as NoydbStore, cF as UnlockedKeyring } from '../index-B-LKCpm6.js';
2
+ export { e1 as BundleRecipient, fz as EnrollAuthenticatorOptions, fA as EnrollAuthenticatorWrappingDEKsOptions, fB as EnrollAuthenticatorWrappingKEKOptions, gy as ListUsersOptions, h3 as NO_TEAM, hl as PaperRecoveryEntry, hx as PresenceHandle, h$ as RecoverPassphraseInput, i0 as RecoverPassphraseResult, i1 as RecoverUserOptions, i4 as RecoveryProof, ih as RotatePassphraseInput, iP as SlotRewrapCeremony, iQ as SlotRewrapContext, iZ as SyncEngine, j5 as SyncTransaction, jd as TeamNotEnabledError, jr as UpdateAuthenticatorOptions, jI as WrappedDeksBlob, jT as buildRecipientKeyringFile, jU as burnPaperRecoveryEntry, l7 as changeSecret, l8 as createOwnerKeyring, j_ as deriveMagicLinkContentKey, k2 as enrollAuthenticator, l9 as ensureCollectionDEK, k6 as evaluateExportCapability, k8 as evaluateImportCapability, kb as findAuthenticator, la as grant, kc as hasExportCapability, kd as hasImportCapability, kg as isMagicLinkGrantExpired, kp as listMagicLinkGrants, kq as listUsers, kr as listUsersWithEnvelopes, lb as loadKeyring, ku as loadPaperRecoveryEntries, kx as magicLinkGrantRecordId, ky as mintPaperRecoveryEntry, kA as mintWrappedDeksBlob, lc as persistKeyring, kF as readMagicLinkGrantRecord, km as recoverPassphrase, kH as recoverUser, kL as removeAuthenticator, ld as revoke, kR as revokeMagicLinkGrant, kn as rotatePassphrase, kT as savePaperRecoveryEntries, kX as unwrapDeksFromBlob, kY as unwrapDeksFromPaperEntry, k_ as unwrapMagicLinkGrant, le as updateAuthenticator, lf as updateKeyringIdentity, l6 as writeMagicLinkGrant } from '../index-B-LKCpm6.js';
3
3
  import '../subject-index-O75wKshW.js';
4
4
  import '../describe-C6iHNlqJ.js';
5
5
  import '../index-B9QdHytu.js';
@@ -19,6 +19,33 @@ import '@noy-db/attestation';
19
19
 
20
20
  declare function withTeam(): TeamStrategy;
21
21
 
22
+ /**
23
+ * Secret-bearing reserved collections — the `_`-prefixed reserved collections
24
+ * whose record CONTENTS are directly-usable secrets (transport OAuth tokens,
25
+ * connection strings, API keys), as opposed to the *operational* reserved
26
+ * collections (`_ledger`, `_history`, `_sync`, …) whose contents are metadata
27
+ * (collection names, record ids, ciphertext hashes).
28
+ *
29
+ * This distinction matters at two trust-boundary seams:
30
+ *
31
+ * 1. `vault.collection()` — a secret-bearing reserved name must never be
32
+ * reachable through the generic public collection handle. It is served
33
+ * ONLY by its dedicated, role-gated API (e.g. `_sync_credentials` →
34
+ * `getCredential`/`putCredential`, which enforce owner/admin access).
35
+ *
36
+ * 2. `grant()` DEK propagation — a sub-admin grantee (operator, viewer,
37
+ * client, custodian) must NOT receive a secret-bearing collection's DEK.
38
+ * Operational reserved DEKs still propagate to every role (grantees must
39
+ * write ledger/history entries on every mutation), but handing a
40
+ * sub-admin the `_sync_credentials` DEK would let them decrypt the firm's
41
+ * transport secrets — a plaintext leak, not a metadata leak.
42
+ *
43
+ * Kept dependency-free so both the kernel (`vault.ts`) and the team layer
44
+ * (`keyring.ts`) can import it without an import cycle.
45
+ */
46
+ /** Reserved collection holding per-adapter sync transport secrets. */
47
+ declare const SYNC_CREDENTIALS_COLLECTION = "_sync_credentials";
48
+
22
49
  /**
23
50
  * _sync_credentials reserved collection —
24
51
  *
@@ -58,8 +85,6 @@ declare function withTeam(): TeamStrategy;
58
85
  * against the caller's keyring role at call time.
59
86
  */
60
87
 
61
- /** The reserved collection name. Never collides with user collections. */
62
- declare const SYNC_CREDENTIALS_COLLECTION = "_sync_credentials";
63
88
  /**
64
89
  * An OAuth/auth token stored in `_sync_credentials`.
65
90
  *
@@ -1,12 +1,11 @@
1
1
  import {
2
- SYNC_CREDENTIALS_COLLECTION,
3
2
  credentialStatus,
4
3
  deleteCredential,
5
4
  getCredential,
6
5
  listCredentials,
7
6
  putCredential,
8
7
  withTeam
9
- } from "../chunk-TVRQ3RYH.js";
8
+ } from "../chunk-ZHK3F5RB.js";
10
9
  import {
11
10
  NO_TEAM,
12
11
  deriveMagicLinkContentKey,
@@ -24,7 +23,7 @@ import {
24
23
  unwrapMagicLinkGrant,
25
24
  updateAuthenticator,
26
25
  writeMagicLinkGrant
27
- } from "../chunk-K5P46KB3.js";
26
+ } from "../chunk-UZZFV3O3.js";
28
27
  import {
29
28
  burnPaperRecoveryEntry,
30
29
  loadPaperRecoveryEntries,
@@ -33,15 +32,16 @@ import {
33
32
  savePaperRecoveryEntries,
34
33
  unwrapDeksFromBlob,
35
34
  unwrapDeksFromPaperEntry
36
- } from "../chunk-LPRPVCNY.js";
35
+ } from "../chunk-3UUXDQPM.js";
37
36
  import {
38
37
  PresenceHandle,
39
38
  SyncEngine,
40
39
  SyncTransaction
41
- } from "../chunk-OFBFAVLI.js";
40
+ } from "../chunk-YXGIPYH4.js";
42
41
  import "../chunk-VQNJ7UZL.js";
43
- import "../chunk-BMQOH7MM.js";
42
+ import "../chunk-26FSVNBL.js";
44
43
  import {
44
+ SYNC_CREDENTIALS_COLLECTION,
45
45
  buildRecipientKeyringFile,
46
46
  changeSecret,
47
47
  createOwnerKeyring,
@@ -57,19 +57,19 @@ import {
57
57
  persistKeyring,
58
58
  revoke,
59
59
  updateKeyringIdentity
60
- } from "../chunk-VAWY44JW.js";
61
- import "../chunk-TB5RNNJ4.js";
62
- import "../chunk-OVO2RZAE.js";
60
+ } from "../chunk-WAL4MRBK.js";
61
+ import "../chunk-C6A2DPRE.js";
62
+ import "../chunk-7AGLCOYE.js";
63
63
  import "../chunk-QKVILR7N.js";
64
+ import "../chunk-5UOPIPZC.js";
65
+ import "../chunk-UWZ7O4NR.js";
64
66
  import "../chunk-LN22XH4B.js";
65
- import "../chunk-PGFY7IRW.js";
66
- import "../chunk-TCIUO62Z.js";
67
- import "../chunk-UOEWDCUX.js";
67
+ import "../chunk-VFQOE76I.js";
68
68
  import "../chunk-LP7BEXCT.js";
69
- import "../chunk-TLJOJBZD.js";
69
+ import "../chunk-5HZULLHE.js";
70
70
  import {
71
71
  TeamNotEnabledError
72
- } from "../chunk-U23JUUPX.js";
72
+ } from "../chunk-OJ64XMPJ.js";
73
73
  import "../chunk-PZ5AY32C.js";
74
74
  export {
75
75
  NO_TEAM,
@@ -1,4 +1,4 @@
1
- export { lm as NO_TIERS, ln as TiersContext, ji as TiersNotEnabledError, lo as TiersStrategy, lp as assertDeclaredTier, lq as assertTiersEnabled, lr as classifySealedShred, ls as demote, lt as elevate, lu as getAtTier, lv as listAtTier, lw as putAtTier, lx as withTiers } from '../index-D4GQe1Rx.js';
1
+ export { lm as NO_TIERS, ln as TiersContext, ji as TiersNotEnabledError, lo as TiersStrategy, lp as assertDeclaredTier, lq as assertTiersEnabled, lr as classifySealedShred, ls as demote, lt as elevate, lu as getAtTier, lv as listAtTier, lw as putAtTier, lx as withTiers } from '../index-B-LKCpm6.js';
2
2
  import '../subject-index-O75wKshW.js';
3
3
  import '../describe-C6iHNlqJ.js';
4
4
  import '../index-B9QdHytu.js';
@@ -9,19 +9,19 @@ import {
9
9
  listAtTier,
10
10
  putAtTier,
11
11
  withTiers
12
- } from "../chunk-VMJ5URU7.js";
13
- import "../chunk-BMQOH7MM.js";
14
- import "../chunk-OVO2RZAE.js";
12
+ } from "../chunk-7A7LTSJR.js";
13
+ import "../chunk-26FSVNBL.js";
14
+ import "../chunk-7AGLCOYE.js";
15
15
  import "../chunk-QKVILR7N.js";
16
+ import "../chunk-5UOPIPZC.js";
17
+ import "../chunk-UWZ7O4NR.js";
16
18
  import "../chunk-LN22XH4B.js";
17
- import "../chunk-PGFY7IRW.js";
18
- import "../chunk-TCIUO62Z.js";
19
- import "../chunk-UOEWDCUX.js";
19
+ import "../chunk-VFQOE76I.js";
20
20
  import "../chunk-LP7BEXCT.js";
21
- import "../chunk-TLJOJBZD.js";
21
+ import "../chunk-5HZULLHE.js";
22
22
  import {
23
23
  TiersNotEnabledError
24
- } from "../chunk-U23JUUPX.js";
24
+ } from "../chunk-OJ64XMPJ.js";
25
25
  import "../chunk-PZ5AY32C.js";
26
26
  export {
27
27
  NO_TIERS,
@@ -1,4 +1,4 @@
1
- export { dq as BundleVersionConflictError, f0 as ConflictError, cV as EncryptedEnvelope, gx as ListPageResult, h4 as NetworkError, ha as NoydbBundleStore, bX as NoydbPodStore, cT as NoydbStore, du as PodVersionConflictError, iW as StoreCapabilities, iX as StoreCapabilityError, iY as StoreTime, jm as TxOp, jB as VaultSnapshot } from '../index-D4GQe1Rx.js';
1
+ export { dq as BundleVersionConflictError, f0 as ConflictError, cV as EncryptedEnvelope, gx as ListPageResult, h4 as NetworkError, ha as NoydbBundleStore, bX as NoydbPodStore, cT as NoydbStore, du as PodVersionConflictError, iW as StoreCapabilities, iX as StoreCapabilityError, iY as StoreTime, jm as TxOp, jB as VaultSnapshot } from '../index-B-LKCpm6.js';
2
2
  import '../subject-index-O75wKshW.js';
3
3
  import '../describe-C6iHNlqJ.js';
4
4
  import '../index-B9QdHytu.js';
package/dist/to/index.js CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  NetworkError,
6
6
  PodVersionConflictError,
7
7
  StoreCapabilityError
8
- } from "../chunk-U23JUUPX.js";
8
+ } from "../chunk-OJ64XMPJ.js";
9
9
  import "../chunk-PZ5AY32C.js";
10
10
  export {
11
11
  BundleVersionConflictError,
@@ -1,4 +1,4 @@
1
- import { bJ as GuardStrategy, bP as GuardStrategyHandle, bK as GuardChange, bL as GuardContext } from './index-D4GQe1Rx.js';
1
+ import { bJ as GuardStrategy, bP as GuardStrategyHandle, bK as GuardChange, bL as GuardContext } from './index-B-LKCpm6.js';
2
2
 
3
3
  /**
4
4
  * Register a guard for a collection. Guards run on every `put()` /
@@ -1,5 +1,5 @@
1
- import { jj as TransactionInvariant, lh as TxStrategy } from '../index-D4GQe1Rx.js';
2
- export { li as AmendmentTxOptions, jl as TxCollection, e4 as TxContext, jn as TxVault, kS as runTransaction } from '../index-D4GQe1Rx.js';
1
+ import { jj as TransactionInvariant, lh as TxStrategy } from '../index-B-LKCpm6.js';
2
+ export { li as AmendmentTxOptions, jl as TxCollection, e4 as TxContext, jn as TxVault, kS as runTransaction } from '../index-B-LKCpm6.js';
3
3
  import '../subject-index-O75wKshW.js';
4
4
  import '../describe-C6iHNlqJ.js';
5
5
  import '../index-B9QdHytu.js';
package/dist/tx/index.js CHANGED
@@ -3,9 +3,9 @@ import {
3
3
  TxContext,
4
4
  TxVault,
5
5
  runTransaction
6
- } from "../chunk-T65UZXR6.js";
6
+ } from "../chunk-FCOZ7DEC.js";
7
7
  import "../chunk-ZJADGNYF.js";
8
- import "../chunk-U23JUUPX.js";
8
+ import "../chunk-OJ64XMPJ.js";
9
9
  import "../chunk-PZ5AY32C.js";
10
10
 
11
11
  // src/with-commit/tx/dry-run.ts
@@ -44,7 +44,7 @@ async function runDryRun(db, fn) {
44
44
  const gctx = { existing: before, vault: facade, userId: v.userId, role: v.role };
45
45
  try {
46
46
  await registry.runChecks(op.collectionName, after, gctx);
47
- const { GuardExecutor } = await import("../executor-DJHNSTIR.js");
47
+ const { GuardExecutor } = await import("../executor-KZ4B3PRT.js");
48
48
  for (const g of guards) {
49
49
  await GuardExecutor.checkFrozenFields(g, op.id, before, after);
50
50
  }
@@ -3,7 +3,7 @@ import {
3
3
  } from "../chunk-PY4KJPYU.js";
4
4
  import {
5
5
  FilenameSanitizationError
6
- } from "../chunk-U23JUUPX.js";
6
+ } from "../chunk-OJ64XMPJ.js";
7
7
  import "../chunk-PZ5AY32C.js";
8
8
 
9
9
  // src/kernel/util/sanitize-filename.ts
@@ -1,4 +1,4 @@
1
- import { dO as ClassifiedEntry, dL as ClassifiedFieldSpec, dP as ClassifiedGroup } from './index-D4GQe1Rx.js';
1
+ import { dO as ClassifiedEntry, dL as ClassifiedFieldSpec, dP as ClassifiedGroup } from './index-B-LKCpm6.js';
2
2
 
3
3
  /**
4
4
  * Configuration/write errors for classified fields. @module
@@ -1,4 +1,4 @@
1
- import { V as Vault, cE as DiffEntry } from './index-D4GQe1Rx.js';
1
+ import { V as Vault, cE as DiffEntry } from './index-B-LKCpm6.js';
2
2
 
3
3
  /**
4
4
  * Vault-level diff orchestrator.
@@ -2,10 +2,10 @@ import {
2
2
  blindedEqual,
3
3
  evaluateKofN,
4
4
  openVdigPayload
5
- } from "./chunk-PGFY7IRW.js";
5
+ } from "./chunk-5UOPIPZC.js";
6
6
  import {
7
7
  dualReadSealedSlot
8
- } from "./chunk-TCIUO62Z.js";
8
+ } from "./chunk-UWZ7O4NR.js";
9
9
  import {
10
10
  VDIG_ITERATIONS,
11
11
  normalizeForVerify,
@@ -14,11 +14,11 @@ import {
14
14
  import {
15
15
  base64ToBuffer,
16
16
  generateSalt
17
- } from "./chunk-TLJOJBZD.js";
17
+ } from "./chunk-5HZULLHE.js";
18
18
  import {
19
19
  ClassifiedConfigError,
20
20
  ClassifiedVerifyError
21
- } from "./chunk-U23JUUPX.js";
21
+ } from "./chunk-OJ64XMPJ.js";
22
22
  import "./chunk-PZ5AY32C.js";
23
23
 
24
24
  // src/kernel/enclave/classify/verify.ts
@@ -136,4 +136,4 @@ export {
136
136
  verifyDigestField,
137
137
  verifyTextField
138
138
  };
139
- //# sourceMappingURL=verify-YB5LQHNA.js.map
139
+ //# sourceMappingURL=verify-CAYGXYNO.js.map
@@ -3,19 +3,19 @@ import {
3
3
  } from "./chunk-TQ3REHVF.js";
4
4
  import {
5
5
  derivePersistedSchema
6
- } from "./chunk-ULIHDPKL.js";
6
+ } from "./chunk-55LSDABW.js";
7
7
  import {
8
8
  loadPersistedSchema
9
- } from "./chunk-CPXPHQGX.js";
10
- import "./chunk-OVO2RZAE.js";
9
+ } from "./chunk-BYS45GOJ.js";
10
+ import "./chunk-7AGLCOYE.js";
11
11
  import "./chunk-QKVILR7N.js";
12
+ import "./chunk-5UOPIPZC.js";
13
+ import "./chunk-UWZ7O4NR.js";
12
14
  import "./chunk-LN22XH4B.js";
13
- import "./chunk-PGFY7IRW.js";
14
- import "./chunk-TCIUO62Z.js";
15
- import "./chunk-UOEWDCUX.js";
15
+ import "./chunk-VFQOE76I.js";
16
16
  import "./chunk-LP7BEXCT.js";
17
- import "./chunk-TLJOJBZD.js";
18
- import "./chunk-U23JUUPX.js";
17
+ import "./chunk-5HZULLHE.js";
18
+ import "./chunk-OJ64XMPJ.js";
19
19
  import "./chunk-PZ5AY32C.js";
20
20
 
21
21
  // src/with-shape/introspection/walk.ts
@@ -238,4 +238,4 @@ function summariseAggregateOp(value) {
238
238
  export {
239
239
  dumpVaultSchema
240
240
  };
241
- //# sourceMappingURL=walk-5C3GPKT2.js.map
241
+ //# sourceMappingURL=walk-CVNXFUEF.js.map
@@ -1,6 +1,6 @@
1
1
  export { U as Unsubscribe, W as WriteEvent, a as WriteHook, b as WriteHookRegistry } from '../index-B9QdHytu.js';
2
- import { cF as UnlockedKeyring, cG as ExportFormat } from '../index-D4GQe1Rx.js';
3
- export { cH as BusHandler, cI as GateDeleteEvent, cJ as GateEventMap, cK as GateHandler, cL as GatePoint, cM as GatePutEvent, cN as LifecycleEventMap, cO as LifecyclePoint, cP as ServiceBus, cQ as SubsystemBus } from '../index-D4GQe1Rx.js';
2
+ import { cF as UnlockedKeyring, cG as ExportFormat } from '../index-B-LKCpm6.js';
3
+ export { cH as BusHandler, cI as GateDeleteEvent, cJ as GateEventMap, cK as GateHandler, cL as GatePoint, cM as GatePutEvent, cN as LifecycleEventMap, cO as LifecyclePoint, cP as ServiceBus, cQ as SubsystemBus } from '../index-B-LKCpm6.js';
4
4
  import '../subject-index-O75wKshW.js';
5
5
  import '../describe-C6iHNlqJ.js';
6
6
  import '@noy-db/attestation';
@@ -6,18 +6,18 @@ import {
6
6
  assertCanImport,
7
7
  canExport,
8
8
  canImport
9
- } from "../chunk-P3V7JTB6.js";
10
- import "../chunk-VAWY44JW.js";
11
- import "../chunk-TB5RNNJ4.js";
12
- import "../chunk-OVO2RZAE.js";
9
+ } from "../chunk-NL4HVTNO.js";
10
+ import "../chunk-WAL4MRBK.js";
11
+ import "../chunk-C6A2DPRE.js";
12
+ import "../chunk-7AGLCOYE.js";
13
13
  import "../chunk-QKVILR7N.js";
14
+ import "../chunk-5UOPIPZC.js";
15
+ import "../chunk-UWZ7O4NR.js";
14
16
  import "../chunk-LN22XH4B.js";
15
- import "../chunk-PGFY7IRW.js";
16
- import "../chunk-TCIUO62Z.js";
17
- import "../chunk-UOEWDCUX.js";
17
+ import "../chunk-VFQOE76I.js";
18
18
  import "../chunk-LP7BEXCT.js";
19
- import "../chunk-TLJOJBZD.js";
20
- import "../chunk-U23JUUPX.js";
19
+ import "../chunk-5HZULLHE.js";
20
+ import "../chunk-OJ64XMPJ.js";
21
21
  import "../chunk-PZ5AY32C.js";
22
22
  export {
23
23
  ServiceBus,
@@ -1,4 +1,4 @@
1
- import { cf as MaterializedViewStrategy, cg as MaterializedViewStrategyHandle } from './index-D4GQe1Rx.js';
1
+ import { cf as MaterializedViewStrategy, cg as MaterializedViewStrategyHandle } from './index-B-LKCpm6.js';
2
2
 
3
3
  /**
4
4
  * Register a materialized view: a declared query whose result is
@@ -1,4 +1,4 @@
1
- import { ch as OverlayedViewStrategy, cq as OverlayedViewStrategyHandle } from './index-D4GQe1Rx.js';
1
+ import { ch as OverlayedViewStrategy, cq as OverlayedViewStrategyHandle } from './index-B-LKCpm6.js';
2
2
 
3
3
  /**
4
4
  * Register a read-shadow overlay: bind an MV-owned base collection to
@@ -1,4 +1,4 @@
1
- import { c2 as DerivationStrategy, cb as DerivationStrategyHandle } from './index-D4GQe1Rx.js';
1
+ import { c2 as DerivationStrategy, cb as DerivationStrategyHandle } from './index-B-LKCpm6.js';
2
2
 
3
3
  /**
4
4
  * Register a deterministic derivation: one source collection → one or
@@ -4,19 +4,19 @@ import {
4
4
  freezeSnapshotOnly,
5
5
  randomId,
6
6
  withdrawAccessibleData
7
- } from "./chunk-TYGW5TOR.js";
8
- import "./chunk-P2LDXRGP.js";
9
- import "./chunk-EWR7HL3K.js";
10
- import "./chunk-3QRQOBS7.js";
11
- import "./chunk-OVO2RZAE.js";
7
+ } from "./chunk-RIZQZKU6.js";
8
+ import "./chunk-C2ZKWL37.js";
9
+ import "./chunk-C57J6AWN.js";
10
+ import "./chunk-I7GTYPWF.js";
11
+ import "./chunk-7AGLCOYE.js";
12
12
  import "./chunk-QKVILR7N.js";
13
+ import "./chunk-5UOPIPZC.js";
14
+ import "./chunk-UWZ7O4NR.js";
13
15
  import "./chunk-LN22XH4B.js";
14
- import "./chunk-PGFY7IRW.js";
15
- import "./chunk-TCIUO62Z.js";
16
- import "./chunk-UOEWDCUX.js";
16
+ import "./chunk-VFQOE76I.js";
17
17
  import "./chunk-LP7BEXCT.js";
18
- import "./chunk-TLJOJBZD.js";
19
- import "./chunk-U23JUUPX.js";
18
+ import "./chunk-5HZULLHE.js";
19
+ import "./chunk-OJ64XMPJ.js";
20
20
  import "./chunk-PZ5AY32C.js";
21
21
  export {
22
22
  FROZEN_SNAPSHOTS_COLLECTION,
@@ -25,4 +25,4 @@ export {
25
25
  randomId,
26
26
  withdrawAccessibleData
27
27
  };
28
- //# sourceMappingURL=withdraw-accessible-JMX2TCPX.js.map
28
+ //# sourceMappingURL=withdraw-accessible-5ALN3ZGM.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@noy-db/hub",
3
- "version": "0.3.0-pre.4",
3
+ "version": "0.3.0-pre.6",
4
4
  "description": "Zero-knowledge, offline-first, encrypted document store — core library with AES-256-GCM, PBKDF2, multi-user keyring, and sync engine",
5
5
  "license": "MIT",
6
6
  "author": "vLannaAi <vicio@lanna.ai>",
@@ -124,6 +124,10 @@
124
124
  "types": "./dist/classified/index.d.ts",
125
125
  "default": "./dist/classified/index.js"
126
126
  },
127
+ "./satellites": {
128
+ "types": "./dist/satellites/index.d.ts",
129
+ "default": "./dist/satellites/index.js"
130
+ },
127
131
  "./tiers": {
128
132
  "types": "./dist/tiers/index.d.ts",
129
133
  "default": "./dist/tiers/index.js"
@@ -196,14 +200,14 @@
196
200
  "node": ">=22.0.0"
197
201
  },
198
202
  "dependencies": {
199
- "@noy-db/attestation": "0.3.0-pre.4"
203
+ "@noy-db/attestation": "0.3.0-pre.6"
200
204
  },
201
205
  "devDependencies": {
202
206
  "@types/node": "^22.0.0",
203
207
  "esbuild": "^0.25.0",
204
208
  "zod": "^4.0.0",
205
209
  "zod-to-json-schema": "^3.25.2",
206
- "@noy-db/on-shamir": "0.3.0-pre.4"
210
+ "@noy-db/on-shamir": "0.3.0-pre.6"
207
211
  },
208
212
  "peerDependencies": {
209
213
  "zod-to-json-schema": "^3.25.0"
@@ -1,20 +0,0 @@
1
- import {
2
- UserApi,
3
- createUserApi
4
- } from "./chunk-A5DYVMDR.js";
5
- import "./chunk-TB5RNNJ4.js";
6
- import "./chunk-OVO2RZAE.js";
7
- import "./chunk-QKVILR7N.js";
8
- import "./chunk-LN22XH4B.js";
9
- import "./chunk-PGFY7IRW.js";
10
- import "./chunk-TCIUO62Z.js";
11
- import "./chunk-UOEWDCUX.js";
12
- import "./chunk-LP7BEXCT.js";
13
- import "./chunk-TLJOJBZD.js";
14
- import "./chunk-U23JUUPX.js";
15
- import "./chunk-PZ5AY32C.js";
16
- export {
17
- UserApi,
18
- createUserApi
19
- };
20
- //# sourceMappingURL=api-JOXUNSKP.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/with-shape/persisted-schemas/storage.ts"],"sourcesContent":["/**\n * Read / write the per-collection persisted-schema envelope. Mirrors the\n * standard noy-db record envelope shape and is **AES-GCM encrypted with\n * the collection's DEK** — the schema body (field names, enum values,\n * constraints) is sensitive metadata, so it gets the same encryption\n * envelope as the records it describes.\n *\n * Storage layout:\n *\n * <vault>/_schemas/<collection> → EncryptedEnvelope\n *\n * The DEK passed to {@link savePersistedSchema} / {@link loadPersistedSchema}\n * is the same key the collection uses for its records.\n *\n * @module\n */\n\nimport { encrypt, openEnvelopeJson, type EnclaveKey } from '../../kernel/enclave/index.js'\nimport { NOYDB_FORMAT_VERSION } from '../../kernel/types.js'\nimport type { NoydbStore, EncryptedEnvelope } from '../../kernel/types.js'\nimport type { PersistedSchemaEnvelope } from './types.js'\n\n/** Reserved collection name where persisted schemas live. */\nexport const SCHEMAS_COLLECTION = '_schemas' as const\n\n/**\n * Read and decrypt the persisted-schema envelope for one collection.\n * Returns `undefined` when no envelope has been written or when decryption\n * fails (e.g. wrong DEK passed). Tolerates corrupted records — JSON parse\n * failures surface as `undefined`, mirroring `_meta/handle`'s contract.\n */\nexport async function loadPersistedSchema(\n store: NoydbStore,\n vault: string,\n collection: string,\n dek: EnclaveKey,\n): Promise<PersistedSchemaEnvelope | undefined> {\n const envelope = await store.get(vault, SCHEMAS_COLLECTION, collection)\n if (!envelope) return undefined\n try {\n const plaintext = await openEnvelopeJson(envelope, dek)\n const parsed = JSON.parse(plaintext) as PersistedSchemaEnvelope\n if (parsed._noydb_schema !== 1) return undefined\n return parsed\n } catch {\n return undefined\n }\n}\n\n/**\n * Encrypt and persist a schema envelope for one collection. Always\n * overwrites any prior write (callers gate on hash equality before calling\n * to avoid no-op writes).\n */\nexport async function savePersistedSchema(\n store: NoydbStore,\n vault: string,\n collection: string,\n dek: EnclaveKey,\n payload: PersistedSchemaEnvelope,\n): Promise<void> {\n const json = JSON.stringify(payload)\n const { iv, data } = await encrypt(json, dek)\n const prior = await store.get(vault, SCHEMAS_COLLECTION, collection)\n const env: EncryptedEnvelope = {\n _noydb: NOYDB_FORMAT_VERSION,\n _v: (prior?._v ?? 0) + 1,\n _ts: new Date().toISOString(),\n _iv: iv,\n _data: data,\n }\n await store.put(vault, SCHEMAS_COLLECTION, collection, env)\n}\n"],"mappings":";;;;;;;;;;;AAuBO,IAAM,qBAAqB;AAQlC,eAAsB,oBACpB,OACA,OACA,YACA,KAC8C;AAC9C,QAAM,WAAW,MAAM,MAAM,IAAI,OAAO,oBAAoB,UAAU;AACtE,MAAI,CAAC,SAAU,QAAO;AACtB,MAAI;AACF,UAAM,YAAY,MAAM,iBAAiB,UAAU,GAAG;AACtD,UAAM,SAAS,KAAK,MAAM,SAAS;AACnC,QAAI,OAAO,kBAAkB,EAAG,QAAO;AACvC,WAAO;AAAA,EACT,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAOA,eAAsB,oBACpB,OACA,OACA,YACA,KACA,SACe;AACf,QAAM,OAAO,KAAK,UAAU,OAAO;AACnC,QAAM,EAAE,IAAI,KAAK,IAAI,MAAM,QAAQ,MAAM,GAAG;AAC5C,QAAM,QAAQ,MAAM,MAAM,IAAI,OAAO,oBAAoB,UAAU;AACnE,QAAM,MAAyB;AAAA,IAC7B,QAAQ;AAAA,IACR,KAAK,OAAO,MAAM,KAAK;AAAA,IACvB,MAAK,oBAAI,KAAK,GAAE,YAAY;AAAA,IAC5B,KAAK;AAAA,IACL,OAAO;AAAA,EACT;AACA,QAAM,MAAM,IAAI,OAAO,oBAAoB,YAAY,GAAG;AAC5D;","names":[]}
@@ -1,106 +0,0 @@
1
- import {
2
- canonicalize,
3
- derivePersistedSchema
4
- } from "./chunk-ULIHDPKL.js";
5
- import {
6
- loadPersistedSchema,
7
- savePersistedSchema
8
- } from "./chunk-CPXPHQGX.js";
9
-
10
- // src/with-shape/schema-update/delta.ts
11
- function computeSchemaDelta(stored, fresh, collection) {
12
- const a = stored;
13
- const b = fresh;
14
- const aProps = a.properties ?? {};
15
- const bProps = b.properties ?? {};
16
- const aReq = new Set(a.required ?? []);
17
- const bReq = new Set(b.required ?? []);
18
- const aKeys = Object.keys(aProps);
19
- const bKeys = Object.keys(bProps);
20
- const added = bKeys.filter((k) => !(k in aProps));
21
- const removed = aKeys.filter((k) => !(k in bProps));
22
- const changed = [];
23
- for (const k of bKeys) {
24
- if (!(k in aProps)) continue;
25
- const shapeChanged = canonicalize(aProps[k]) !== canonicalize(bProps[k]);
26
- const requiredChanged = aReq.has(k) !== bReq.has(k);
27
- if (shapeChanged || requiredChanged) {
28
- changed.push({ field: k, requiredChanged, shapeChanged });
29
- }
30
- }
31
- let kind;
32
- if (added.length === 0 && removed.length === 0 && changed.length === 0) {
33
- kind = "none";
34
- } else if (removed.length === 0 && changed.length === 0 && added.every((k) => !bReq.has(k))) {
35
- kind = "additive";
36
- } else {
37
- kind = "non-additive";
38
- }
39
- return { collection, kind, added, removed, changed };
40
- }
41
-
42
- // src/with-shape/schema-update/dispatch.ts
43
- async function evaluateStrategies(delta, strategies, ctx) {
44
- for (const strategy of strategies) {
45
- const decision = await strategy.onSchemaDelta(delta, ctx);
46
- if (decision.action !== "allow") return decision;
47
- }
48
- return { action: "allow" };
49
- }
50
-
51
- // src/with-shape/persisted-schemas/register.ts
52
- async function persistSchemaIfNeeded(opts) {
53
- const fresh = await derivePersistedSchema(opts.validator);
54
- const stored = await loadPersistedSchema(opts.store, opts.vault, opts.collectionName, opts.dek);
55
- if (stored && isEquivalent(stored, fresh)) {
56
- return { written: false, skipped: true, envelope: stored, decision: { action: "allow" } };
57
- }
58
- let decision = { action: "allow" };
59
- const strategies = opts.strategies ?? [];
60
- if (stored && strategies.length > 0 && stored.kind === fresh.kind && isPlainObject(stored.jsonSchema) && isPlainObject(fresh.jsonSchema)) {
61
- const delta = computeSchemaDelta(stored.jsonSchema, fresh.jsonSchema, opts.collectionName);
62
- decision = await evaluateStrategies(delta, strategies, { collection: opts.collectionName });
63
- }
64
- if (decision.action !== "allow") {
65
- return { written: false, skipped: false, envelope: stored ?? fresh, decision };
66
- }
67
- const toSave = stored?.classified !== void 0 ? { ...fresh, classified: stored.classified } : fresh;
68
- await savePersistedSchema(opts.store, opts.vault, opts.collectionName, opts.dek, toSave);
69
- return { written: true, skipped: false, envelope: toSave, decision };
70
- }
71
- async function persistClassifiedMarker(opts) {
72
- const stored = await loadPersistedSchema(opts.store, opts.vault, opts.collectionName, opts.dek);
73
- if (stored?.classified !== void 0 && markersEqual(stored.classified, opts.marker)) return;
74
- const payload = stored !== void 0 ? { ...stored, classified: opts.marker } : {
75
- _noydb_schema: 1,
76
- kind: "Unknown",
77
- jsonSchema: null,
78
- hash: null,
79
- derivedAt: (/* @__PURE__ */ new Date()).toISOString(),
80
- classified: opts.marker
81
- };
82
- await savePersistedSchema(opts.store, opts.vault, opts.collectionName, opts.dek, payload);
83
- }
84
- function markersEqual(a, b) {
85
- return sameSet(a.digestOnly, b.digestOnly) && sameSet(a.equatable, b.equatable);
86
- }
87
- function sameSet(a, b) {
88
- if (a.length !== b.length) return false;
89
- const s = new Set(a);
90
- return b.every((x) => s.has(x));
91
- }
92
- function isPlainObject(v) {
93
- return typeof v === "object" && v !== null && !Array.isArray(v);
94
- }
95
- function isEquivalent(a, b) {
96
- if (a.kind !== b.kind) return false;
97
- if (a.hash && b.hash) return a.hash === b.hash;
98
- if (a.hash === null && b.hash === null) return true;
99
- return false;
100
- }
101
-
102
- export {
103
- persistSchemaIfNeeded,
104
- persistClassifiedMarker
105
- };
106
- //# sourceMappingURL=chunk-KYY7L72M.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/with-shape/schema-update/delta.ts","../src/with-shape/schema-update/dispatch.ts","../src/with-shape/persisted-schemas/register.ts"],"sourcesContent":["/**\n * Classify the difference between two derived JSON Schemas.\n *\n * v1 ruleset — top-level object properties + required-ness:\n * - additive ⇔ only new OPTIONAL properties (no removals, no changed\n * properties, no new required field, no required-ness flip)\n * - non-additive ⇔ any removal, any shape/type change, any required-ness\n * flip, or a new REQUIRED property\n * Deeper rules (nested objects, union widening, type narrowing) are\n * deferred. Callers only invoke this with two object schemas.\n */\nimport { canonicalize } from '../persisted-schemas/canonicalize.js'\nimport type { SchemaDelta, FieldChange } from './types.js'\n\ninterface ObjectSchema {\n readonly properties?: Record<string, unknown>\n readonly required?: readonly string[]\n}\n\nexport function computeSchemaDelta(\n stored: object,\n fresh: object,\n collection: string,\n): SchemaDelta {\n const a = stored as ObjectSchema\n const b = fresh as ObjectSchema\n const aProps = a.properties ?? {}\n const bProps = b.properties ?? {}\n const aReq = new Set(a.required ?? [])\n const bReq = new Set(b.required ?? [])\n\n const aKeys = Object.keys(aProps)\n const bKeys = Object.keys(bProps)\n\n const added = bKeys.filter(k => !(k in aProps))\n const removed = aKeys.filter(k => !(k in bProps))\n\n const changed: FieldChange[] = []\n for (const k of bKeys) {\n if (!(k in aProps)) continue\n const shapeChanged = canonicalize(aProps[k]) !== canonicalize(bProps[k])\n const requiredChanged = aReq.has(k) !== bReq.has(k)\n if (shapeChanged || requiredChanged) {\n changed.push({ field: k, requiredChanged, shapeChanged })\n }\n }\n\n let kind: SchemaDelta['kind']\n if (added.length === 0 && removed.length === 0 && changed.length === 0) {\n kind = 'none'\n } else if (\n removed.length === 0 &&\n changed.length === 0 &&\n added.every(k => !bReq.has(k))\n ) {\n kind = 'additive'\n } else {\n kind = 'non-additive'\n }\n\n return { collection, kind, added, removed, changed }\n}\n","/** Ordered strategy evaluation: first non-`allow` decision wins. */\nimport type { SchemaDelta, SchemaUpdateStrategy, UpdateContext, UpdateDecision } from './types.js'\n\nexport async function evaluateStrategies(\n delta: SchemaDelta,\n strategies: readonly SchemaUpdateStrategy[],\n ctx: UpdateContext,\n): Promise<UpdateDecision> {\n for (const strategy of strategies) {\n const decision = await strategy.onSchemaDelta(delta, ctx)\n if (decision.action !== 'allow') return decision\n }\n return { action: 'allow' }\n}\n","/**\n * Orchestrate the derive → hash → skip-or-write cycle for a collection's\n * persisted JSON Schema. Called by the Vault at collection-registration\n * time when the developer opts in via `collection({ persistJsonSchema:\n * true })`.\n *\n * Skip semantics:\n *\n * - Zod validators: skip when the new hash equals the stored hash.\n * - Non-Zod (stub envelopes have hash=null): skip when the stored\n * envelope's `kind` matches the freshly-detected kind (since there's\n * no body to compare yet — a kind change is the only signal).\n *\n * @module\n */\n\nimport { derivePersistedSchema } from './derive.js'\nimport { loadPersistedSchema, savePersistedSchema } from './storage.js'\nimport { computeSchemaDelta } from '../schema-update/delta.js'\nimport { evaluateStrategies } from '../schema-update/dispatch.js'\nimport type { SchemaUpdateStrategy, UpdateDecision } from '../schema-update/types.js'\nimport type { NoydbStore, ClassifiedMarker } from '../../kernel/types.js'\nimport type { PersistedSchemaEnvelope } from './types.js'\nimport type { EnclaveKey } from '../../kernel/enclave/index.js'\n\nexport interface PersistSchemaResult {\n /** True when a fresh envelope was written to storage. */\n readonly written: boolean\n /** True when an existing envelope matched and the write was skipped. */\n readonly skipped: boolean\n /** The envelope that was either written or matched. */\n readonly envelope: PersistedSchemaEnvelope\n /** The update-strategy decision, present when strategies ran. */\n readonly decision?: UpdateDecision\n}\n\nexport async function persistSchemaIfNeeded(opts: {\n readonly store: NoydbStore\n readonly vault: string\n readonly collectionName: string\n readonly validator: unknown\n readonly dek: EnclaveKey\n readonly strategies?: readonly SchemaUpdateStrategy[]\n}): Promise<PersistSchemaResult> {\n const fresh = await derivePersistedSchema(opts.validator)\n const stored = await loadPersistedSchema(opts.store, opts.vault, opts.collectionName, opts.dek)\n\n if (stored && isEquivalent(stored, fresh)) {\n return { written: false, skipped: true, envelope: stored, decision: { action: 'allow' } }\n }\n\n // Changed (or first registration). Run update strategies only when we\n // have a comparable JSON-Schema baseline and strategies were registered.\n let decision: UpdateDecision = { action: 'allow' }\n const strategies = opts.strategies ?? []\n if (\n stored &&\n strategies.length > 0 &&\n stored.kind === fresh.kind &&\n isPlainObject(stored.jsonSchema) &&\n isPlainObject(fresh.jsonSchema)\n ) {\n const delta = computeSchemaDelta(stored.jsonSchema, fresh.jsonSchema, opts.collectionName)\n decision = await evaluateStrategies(delta, strategies, { collection: opts.collectionName })\n }\n\n if (decision.action !== 'allow') {\n // reject (or cutover): do NOT overwrite the baseline — the\n // old schema stays the source of truth until the change is resolved.\n return { written: false, skipped: false, envelope: stored ?? fresh, decision }\n }\n\n // Preserve a previously-persisted classified marker (C-A / R10) — the schema\n // derivation knows nothing about it, so a naive overwrite here would drop the\n // config-drift guard's cross-session signal.\n const toSave: PersistedSchemaEnvelope =\n stored?.classified !== undefined ? { ...fresh, classified: stored.classified } : fresh\n await savePersistedSchema(opts.store, opts.vault, opts.collectionName, opts.dek, toSave)\n return { written: true, skipped: false, envelope: toSave, decision }\n}\n\n/**\n * Persist (or refresh) the C-A / R10 classified marker into the collection's\n * `_schemas/<collection>` record, preserving any existing derived JSON-Schema\n * body. Idempotent — a no-op when an equivalent marker is already stored.\n * Independent of `persistJsonSchema`: called on the first classified write so a\n * later naive handle can detect the drift cross-session.\n */\nexport async function persistClassifiedMarker(opts: {\n readonly store: NoydbStore\n readonly vault: string\n readonly collectionName: string\n readonly dek: EnclaveKey\n readonly marker: ClassifiedMarker\n}): Promise<void> {\n const stored = await loadPersistedSchema(opts.store, opts.vault, opts.collectionName, opts.dek)\n if (stored?.classified !== undefined && markersEqual(stored.classified, opts.marker)) return\n const payload: PersistedSchemaEnvelope =\n stored !== undefined\n ? { ...stored, classified: opts.marker }\n : {\n _noydb_schema: 1,\n kind: 'Unknown',\n jsonSchema: null,\n hash: null,\n derivedAt: new Date().toISOString(),\n classified: opts.marker,\n }\n await savePersistedSchema(opts.store, opts.vault, opts.collectionName, opts.dek, payload)\n}\n\nfunction markersEqual(a: ClassifiedMarker, b: ClassifiedMarker): boolean {\n return sameSet(a.digestOnly, b.digestOnly) && sameSet(a.equatable, b.equatable)\n}\n\nfunction sameSet(a: readonly string[], b: readonly string[]): boolean {\n if (a.length !== b.length) return false\n const s = new Set(a)\n return b.every((x) => s.has(x))\n}\n\nfunction isPlainObject(v: unknown): v is object {\n return typeof v === 'object' && v !== null && !Array.isArray(v)\n}\n\nfunction isEquivalent(a: PersistedSchemaEnvelope, b: PersistedSchemaEnvelope): boolean {\n if (a.kind !== b.kind) return false\n // Zod path: real hashes — compare directly.\n if (a.hash && b.hash) return a.hash === b.hash\n // Stub path: both have hash=null. Kind equality is the only signal we have.\n if (a.hash === null && b.hash === null) return true\n // Mixed (one has a hash, the other doesn't) — treat as changed.\n return false\n}\n"],"mappings":"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","names":[]}