@noy-db/hub 0.7.0-pre.13 → 0.7.0-pre.15

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 (233) hide show
  1. package/CHANGELOG.md +169 -0
  2. package/README.md +4 -3
  3. package/dist/{api-UE2XQKDN.js → api-JPZT6BDD.js} +1 -2
  4. package/dist/as/index.js +3 -4
  5. package/dist/as/index.js.map +1 -1
  6. package/dist/at/index.js +0 -1
  7. package/dist/attestation/index.js +6 -7
  8. package/dist/attestation/index.js.map +1 -1
  9. package/dist/{backup-R6A4VZRX.js → backup-AKWIMYWU.js} +1 -2
  10. package/dist/{backup-R6A4VZRX.js.map → backup-AKWIMYWU.js.map} +1 -1
  11. package/dist/blobs/index.js +0 -1
  12. package/dist/blobs/index.js.map +1 -1
  13. package/dist/broker/index.js +3 -4
  14. package/dist/broker/index.js.map +1 -1
  15. package/dist/by/index.js +0 -1
  16. package/dist/cargo/index.js +10 -11
  17. package/dist/{chunk-5FUULQ6F.js → chunk-2HVILGVR.js} +6 -6
  18. package/dist/{chunk-DJ3LNNZQ.js → chunk-3LK2XZCW.js} +2 -2
  19. package/dist/{chunk-PQKG5AHH.js → chunk-6X6SEMEE.js} +4 -2
  20. package/dist/{chunk-PQKG5AHH.js.map → chunk-6X6SEMEE.js.map} +1 -1
  21. package/dist/{chunk-E2MYJGSG.js → chunk-AMODH7AU.js} +2 -2
  22. package/dist/{chunk-B2ZSGYSF.js → chunk-B2KCRDJM.js} +3 -3
  23. package/dist/{chunk-TO3EQ7HF.js → chunk-BLN54W3L.js} +2 -2
  24. package/dist/{chunk-IHFXR2VQ.js → chunk-BOBFL5TW.js} +2 -2
  25. package/dist/{chunk-ZR2YMODS.js → chunk-EKZ6VZYF.js} +2 -2
  26. package/dist/{chunk-RTYJRFQO.js → chunk-EWPRPP3M.js} +1 -1
  27. package/dist/{chunk-VGICZPVE.js → chunk-FUJSIP4K.js} +2 -2
  28. package/dist/{chunk-BWXGSSFX.js → chunk-NJXX55QX.js} +79 -16
  29. package/dist/chunk-NJXX55QX.js.map +1 -0
  30. package/dist/{chunk-PKJ43CMD.js → chunk-NLOLF6LD.js} +2 -2
  31. package/dist/{chunk-COTPDJR5.js → chunk-OMB2ZKIT.js} +8 -8
  32. package/dist/{chunk-BMELYFHU.js → chunk-P3KOF624.js} +3 -3
  33. package/dist/{chunk-Y4MJQ2UG.js → chunk-QQ2YMQZU.js} +2 -2
  34. package/dist/{chunk-URHRIAV6.js → chunk-REDOOY2Q.js} +2 -2
  35. package/dist/chunk-REDOOY2Q.js.map +1 -0
  36. package/dist/{chunk-YCXICMOY.js → chunk-RJ7NN2UR.js} +2 -2
  37. package/dist/{chunk-PDD75NUZ.js → chunk-SMH6SRX7.js} +2 -2
  38. package/dist/{chunk-QHW35ZON.js → chunk-TGPST6FK.js} +2 -2
  39. package/dist/{chunk-BERJ4AWW.js → chunk-VGXZT72I.js} +2 -2
  40. package/dist/{chunk-ZVCC36XQ.js → chunk-WL36WA3O.js} +55 -55
  41. package/dist/{chunk-2Z47NMFK.js → chunk-WZW37ZHL.js} +2 -2
  42. package/dist/{chunk-SXCYYMVS.js → chunk-YINEDONN.js} +5 -5
  43. package/dist/{chunk-AJQY44CE.js → chunk-ZXLZ62R5.js} +3 -20
  44. package/dist/chunk-ZXLZ62R5.js.map +1 -0
  45. package/dist/classified/index.js +1 -2
  46. package/dist/{classified-marker-67HBIJMZ.js → classified-marker-OO65UYXN.js} +3 -5
  47. package/dist/{classified-marker-67HBIJMZ.js.map → classified-marker-OO65UYXN.js.map} +1 -1
  48. package/dist/{collection-facade-4ACKIDDY.js → collection-facade-VOWW732S.js} +3 -4
  49. package/dist/{computed-LSEZYRJS.js → computed-VPOKQK4N.js} +1 -2
  50. package/dist/consent/index.js +0 -1
  51. package/dist/consent/index.js.map +1 -1
  52. package/dist/cover/index.js +0 -1
  53. package/dist/crdt/index.js +0 -1
  54. package/dist/crdt/index.js.map +1 -1
  55. package/dist/custody/index.js +1 -2
  56. package/dist/{dead-filter-M3NZUWBZ.js → dead-filter-OMMVBAKZ.js} +2 -3
  57. package/dist/{dead-filter-M3NZUWBZ.js.map → dead-filter-OMMVBAKZ.js.map} +1 -1
  58. package/dist/debug/index.js +0 -1
  59. package/dist/debug/index.js.map +1 -1
  60. package/dist/{delegation-OLJUWTVA.js → delegation-VRYMQRCF.js} +1 -2
  61. package/dist/{delegation-OLJUWTVA.js.map → delegation-VRYMQRCF.js.map} +1 -1
  62. package/dist/derivations/index.js +3 -4
  63. package/dist/{derive-LY47HG7Q.js → derive-HHBRFS2U.js} +2 -3
  64. package/dist/directory/index.js +0 -1
  65. package/dist/{dispatch-MSTR5VBI.js → dispatch-DC3LQJ3S.js} +6 -7
  66. package/dist/{dispatch-MSTR5VBI.js.map → dispatch-DC3LQJ3S.js.map} +1 -1
  67. package/dist/{dispatch-PDP5TA73.js → dispatch-GGFBWQU7.js} +5 -7
  68. package/dist/{dispatch-PDP5TA73.js.map → dispatch-GGFBWQU7.js.map} +1 -1
  69. package/dist/{enclave-4YBQK77G.js → enclave-VM2YQONI.js} +1 -2
  70. package/dist/{executor-TOLPBHOC.js → executor-5NIMLSKZ.js} +1 -2
  71. package/dist/{executor-YDDC5XGY.js → executor-5XJNV5H5.js} +1 -2
  72. package/dist/{executor-MZJXBWNM.js → executor-AQVXV5GZ.js} +1 -2
  73. package/dist/{export-accessible-LGV6IAFX.js → export-accessible-2LOBM67T.js} +3 -4
  74. package/dist/{extract-partition-RYJZIKQZ.js → extract-partition-AZGSEMIF.js} +3 -4
  75. package/dist/{fanout-sidecar-TSFPXY5C.js → fanout-sidecar-HJIVUPTD.js} +1 -2
  76. package/dist/{fanout-sidecar-TSFPXY5C.js.map → fanout-sidecar-HJIVUPTD.js.map} +1 -1
  77. package/dist/{fence-watcher-ZVSMLKQD.js → fence-watcher-U2PW6JU5.js} +1 -3
  78. package/dist/{fence-watcher-ZVSMLKQD.js.map → fence-watcher-U2PW6JU5.js.map} +1 -1
  79. package/dist/{find-LC7P63MX.js → find-2ABFCZX4.js} +1 -2
  80. package/dist/forget/index.js +0 -1
  81. package/dist/forget/index.js.map +1 -1
  82. package/dist/guards/index.js +0 -1
  83. package/dist/history/index.js +0 -1
  84. package/dist/history/index.js.map +1 -1
  85. package/dist/i18n/index.js +0 -1
  86. package/dist/i18n/index.js.map +1 -1
  87. package/dist/index.js +26 -27
  88. package/dist/index.js.map +1 -1
  89. package/dist/indexing/index.js +0 -1
  90. package/dist/indexing/index.js.map +1 -1
  91. package/dist/introspection/index.js +2 -3
  92. package/dist/{issue-IOXM3RSJ.js → issue-RH4H733Z.js} +1 -2
  93. package/dist/{json-schema-I22JCYCG.js → json-schema-V3M5MUCM.js} +1 -3
  94. package/dist/{json-schema-I22JCYCG.js.map → json-schema-V3M5MUCM.js.map} +1 -1
  95. package/dist/kernel/collection-config.d.ts +34 -0
  96. package/dist/lazy/index.js +0 -1
  97. package/dist/{ledger-HXHIOD36.js → ledger-454SU3VE.js} +1 -2
  98. package/dist/{liberate-4APIV7FR.js → liberate-AAZSP2BT.js} +5 -6
  99. package/dist/{link-set-6RAHEKZN.js → link-set-67CAMUAL.js} +1 -2
  100. package/dist/{managed-secret-P3JQ7ZG4.js → managed-secret-NHRYG7CD.js} +1 -2
  101. package/dist/materialized-views/index.js +2 -3
  102. package/dist/{migrate-cek-25KNTS5U.js → migrate-cek-5ENH64AA.js} +1 -2
  103. package/dist/{migrate-cek-25KNTS5U.js.map → migrate-cek-5ENH64AA.js.map} +1 -1
  104. package/dist/money/index.js +0 -1
  105. package/dist/{noydb-2C6QQJ5S.js → noydb-F5CABCU4.js} +11 -12
  106. package/dist/overlay-views/index.js +0 -1
  107. package/dist/periods/index.js +1 -2
  108. package/dist/pod/index.js +12 -13
  109. package/dist/{pod-handle-6II7KFBR.js → pod-handle-S7AMCJIF.js} +2 -3
  110. package/dist/{pod-handle-6II7KFBR.js.map → pod-handle-S7AMCJIF.js.map} +1 -1
  111. package/dist/policy/index.js +0 -1
  112. package/dist/portability/index.js +6 -7
  113. package/dist/portability/index.js.map +1 -1
  114. package/dist/{post-register-BPJ36A6D.js → post-register-HIYY4Y5S.js} +4 -5
  115. package/dist/{post-register-BPJ36A6D.js.map → post-register-HIYY4Y5S.js.map} +1 -1
  116. package/dist/{purge-scope-FGNNLWHD.js → purge-scope-4HEFPDOW.js} +1 -3
  117. package/dist/{purge-scope-FGNNLWHD.js.map → purge-scope-4HEFPDOW.js.map} +1 -1
  118. package/dist/query/index.js +0 -1
  119. package/dist/{read-only-facade-CHCKSEPD.js → read-only-facade-BIGO37U3.js} +1 -2
  120. package/dist/reduce/index.js +0 -1
  121. package/dist/reduce/index.js.map +1 -1
  122. package/dist/{register-AEOOGKNO.js → register-7OJWAWT5.js} +3 -4
  123. package/dist/{registry-SKSOUXNF.js → registry-23WF3TGH.js} +1 -2
  124. package/dist/{registry-SHMGHEK4.js → registry-4AYVUNXK.js} +1 -2
  125. package/dist/{registry-I6FP4677.js → registry-5MVJGPXW.js} +1 -2
  126. package/dist/{registry-D2YXKRYC.js → registry-BOHIKFWG.js} +4 -5
  127. package/dist/{request-withdrawal-6HJT4ODF.js → request-withdrawal-P5EQATZ7.js} +5 -6
  128. package/dist/{reveal-DDQBDWPM.js → reveal-IMGQ2EE5.js} +1 -2
  129. package/dist/{reveal-DDQBDWPM.js.map → reveal-IMGQ2EE5.js.map} +1 -1
  130. package/dist/{revoke-U7U3FMXU.js → revoke-POHP4GPB.js} +1 -2
  131. package/dist/satellites/index.js +0 -1
  132. package/dist/schema-update/index.js +0 -1
  133. package/dist/sealed-record/index.js +3 -4
  134. package/dist/sealed-record/index.js.map +1 -1
  135. package/dist/search/index.js +1 -2
  136. package/dist/{seed-3RXT4VGN.js → seed-UYR6YG3V.js} +1 -2
  137. package/dist/{seed-3RXT4VGN.js.map → seed-UYR6YG3V.js.map} +1 -1
  138. package/dist/sequence/index.js +0 -1
  139. package/dist/session/index.js +0 -1
  140. package/dist/session/index.js.map +1 -1
  141. package/dist/shadow/index.js +0 -1
  142. package/dist/shadow/index.js.map +1 -1
  143. package/dist/share-link/index.js +0 -1
  144. package/dist/share-link/index.js.map +1 -1
  145. package/dist/{signer-7NK7TMWU.js → signer-5K3WDHOC.js} +1 -2
  146. package/dist/snapshots/index.js +1 -2
  147. package/dist/snapshots/index.js.map +1 -1
  148. package/dist/{stale-2CHKZTMK.js → stale-AU74OPUW.js} +2 -3
  149. package/dist/{storage-WP4M7IFO.js → storage-AVJA5BTW.js} +1 -2
  150. package/dist/store/index.js +0 -1
  151. package/dist/{store-coordination-provider-O2VUEMJH.js → store-coordination-provider-RX2CGWXV.js} +1 -2
  152. package/dist/{store-coordination-provider-O2VUEMJH.js.map → store-coordination-provider-RX2CGWXV.js.map} +1 -1
  153. package/dist/sync/index.js +0 -1
  154. package/dist/sync/index.js.map +1 -1
  155. package/dist/team/index.js +0 -1
  156. package/dist/tiers/index.js +1 -2
  157. package/dist/to/index.js +0 -1
  158. package/dist/to/index.js.map +1 -1
  159. package/dist/transactions/index.js +2 -3
  160. package/dist/transactions/index.js.map +1 -1
  161. package/dist/{ulid-VQW6ERQN.js → ulid-4MKXG325.js} +1 -2
  162. package/dist/util/index.js +0 -1
  163. package/dist/util/index.js.map +1 -1
  164. package/dist/{vault-diff-FE5J35NJ.js → vault-diff-C6WUJFNP.js} +1 -2
  165. package/dist/vault-head/index.js +0 -1
  166. package/dist/vault-head/index.js.map +1 -1
  167. package/dist/{verify-JBXCAGDL.js → verify-KOV2G5D6.js} +1 -2
  168. package/dist/{verify-JBXCAGDL.js.map → verify-KOV2G5D6.js.map} +1 -1
  169. package/dist/{walk-P3E6QSNC.js → walk-ERAJ5RHO.js} +3 -4
  170. package/dist/with-formula/derivations/registry.d.ts +6 -0
  171. package/dist/with-shape/introspection/describe.d.ts +2 -53
  172. package/dist/with-shape/introspection/field-meta.d.ts +86 -0
  173. package/dist/{withdraw-accessible-6Q7NE4EY.js → withdraw-accessible-42D32Z7G.js} +4 -5
  174. package/package.json +7 -3
  175. package/dist/chunk-AJQY44CE.js.map +0 -1
  176. package/dist/chunk-BWXGSSFX.js.map +0 -1
  177. package/dist/chunk-PZ5AY32C.js +0 -10
  178. package/dist/chunk-URHRIAV6.js.map +0 -1
  179. package/dist/withdraw-accessible-6Q7NE4EY.js.map +0 -1
  180. package/dist/zod-HAJM7LMS.js +0 -14763
  181. package/dist/zod-HAJM7LMS.js.map +0 -1
  182. /package/dist/{api-UE2XQKDN.js.map → api-JPZT6BDD.js.map} +0 -0
  183. /package/dist/{chunk-5FUULQ6F.js.map → chunk-2HVILGVR.js.map} +0 -0
  184. /package/dist/{chunk-DJ3LNNZQ.js.map → chunk-3LK2XZCW.js.map} +0 -0
  185. /package/dist/{chunk-E2MYJGSG.js.map → chunk-AMODH7AU.js.map} +0 -0
  186. /package/dist/{chunk-B2ZSGYSF.js.map → chunk-B2KCRDJM.js.map} +0 -0
  187. /package/dist/{chunk-TO3EQ7HF.js.map → chunk-BLN54W3L.js.map} +0 -0
  188. /package/dist/{chunk-IHFXR2VQ.js.map → chunk-BOBFL5TW.js.map} +0 -0
  189. /package/dist/{chunk-ZR2YMODS.js.map → chunk-EKZ6VZYF.js.map} +0 -0
  190. /package/dist/{chunk-RTYJRFQO.js.map → chunk-EWPRPP3M.js.map} +0 -0
  191. /package/dist/{chunk-VGICZPVE.js.map → chunk-FUJSIP4K.js.map} +0 -0
  192. /package/dist/{chunk-PKJ43CMD.js.map → chunk-NLOLF6LD.js.map} +0 -0
  193. /package/dist/{chunk-COTPDJR5.js.map → chunk-OMB2ZKIT.js.map} +0 -0
  194. /package/dist/{chunk-BMELYFHU.js.map → chunk-P3KOF624.js.map} +0 -0
  195. /package/dist/{chunk-Y4MJQ2UG.js.map → chunk-QQ2YMQZU.js.map} +0 -0
  196. /package/dist/{chunk-YCXICMOY.js.map → chunk-RJ7NN2UR.js.map} +0 -0
  197. /package/dist/{chunk-PDD75NUZ.js.map → chunk-SMH6SRX7.js.map} +0 -0
  198. /package/dist/{chunk-QHW35ZON.js.map → chunk-TGPST6FK.js.map} +0 -0
  199. /package/dist/{chunk-BERJ4AWW.js.map → chunk-VGXZT72I.js.map} +0 -0
  200. /package/dist/{chunk-ZVCC36XQ.js.map → chunk-WL36WA3O.js.map} +0 -0
  201. /package/dist/{chunk-2Z47NMFK.js.map → chunk-WZW37ZHL.js.map} +0 -0
  202. /package/dist/{chunk-SXCYYMVS.js.map → chunk-YINEDONN.js.map} +0 -0
  203. /package/dist/{chunk-PZ5AY32C.js.map → collection-facade-VOWW732S.js.map} +0 -0
  204. /package/dist/{collection-facade-4ACKIDDY.js.map → computed-VPOKQK4N.js.map} +0 -0
  205. /package/dist/{computed-LSEZYRJS.js.map → derive-HHBRFS2U.js.map} +0 -0
  206. /package/dist/{derive-LY47HG7Q.js.map → enclave-VM2YQONI.js.map} +0 -0
  207. /package/dist/{enclave-4YBQK77G.js.map → executor-5NIMLSKZ.js.map} +0 -0
  208. /package/dist/{executor-MZJXBWNM.js.map → executor-5XJNV5H5.js.map} +0 -0
  209. /package/dist/{executor-TOLPBHOC.js.map → executor-AQVXV5GZ.js.map} +0 -0
  210. /package/dist/{executor-YDDC5XGY.js.map → export-accessible-2LOBM67T.js.map} +0 -0
  211. /package/dist/{export-accessible-LGV6IAFX.js.map → extract-partition-AZGSEMIF.js.map} +0 -0
  212. /package/dist/{extract-partition-RYJZIKQZ.js.map → find-2ABFCZX4.js.map} +0 -0
  213. /package/dist/{find-LC7P63MX.js.map → issue-RH4H733Z.js.map} +0 -0
  214. /package/dist/{issue-IOXM3RSJ.js.map → ledger-454SU3VE.js.map} +0 -0
  215. /package/dist/{ledger-HXHIOD36.js.map → liberate-AAZSP2BT.js.map} +0 -0
  216. /package/dist/{liberate-4APIV7FR.js.map → link-set-67CAMUAL.js.map} +0 -0
  217. /package/dist/{link-set-6RAHEKZN.js.map → managed-secret-NHRYG7CD.js.map} +0 -0
  218. /package/dist/{managed-secret-P3JQ7ZG4.js.map → noydb-F5CABCU4.js.map} +0 -0
  219. /package/dist/{noydb-2C6QQJ5S.js.map → read-only-facade-BIGO37U3.js.map} +0 -0
  220. /package/dist/{read-only-facade-CHCKSEPD.js.map → register-7OJWAWT5.js.map} +0 -0
  221. /package/dist/{register-AEOOGKNO.js.map → registry-23WF3TGH.js.map} +0 -0
  222. /package/dist/{registry-D2YXKRYC.js.map → registry-4AYVUNXK.js.map} +0 -0
  223. /package/dist/{registry-I6FP4677.js.map → registry-5MVJGPXW.js.map} +0 -0
  224. /package/dist/{registry-SHMGHEK4.js.map → registry-BOHIKFWG.js.map} +0 -0
  225. /package/dist/{registry-SKSOUXNF.js.map → request-withdrawal-P5EQATZ7.js.map} +0 -0
  226. /package/dist/{request-withdrawal-6HJT4ODF.js.map → revoke-POHP4GPB.js.map} +0 -0
  227. /package/dist/{revoke-U7U3FMXU.js.map → signer-5K3WDHOC.js.map} +0 -0
  228. /package/dist/{signer-7NK7TMWU.js.map → stale-AU74OPUW.js.map} +0 -0
  229. /package/dist/{stale-2CHKZTMK.js.map → storage-AVJA5BTW.js.map} +0 -0
  230. /package/dist/{storage-WP4M7IFO.js.map → ulid-4MKXG325.js.map} +0 -0
  231. /package/dist/{ulid-VQW6ERQN.js.map → vault-diff-C6WUJFNP.js.map} +0 -0
  232. /package/dist/{vault-diff-FE5J35NJ.js.map → walk-ERAJ5RHO.js.map} +0 -0
  233. /package/dist/{walk-P3E6QSNC.js.map → withdraw-accessible-42D32Z7G.js.map} +0 -0
@@ -25,7 +25,6 @@ import "./chunk-LP7BEXCT.js";
25
25
  import "./chunk-SL3JAAKN.js";
26
26
  import "./chunk-N4CHCXDL.js";
27
27
  import "./chunk-7O3Y4PPD.js";
28
- import "./chunk-PZ5AY32C.js";
29
28
  export {
30
29
  LEDGER_COLLECTION,
31
30
  LEDGER_DELTAS_COLLECTION,
@@ -39,4 +38,4 @@ export {
39
38
  parseIndex,
40
39
  sha256Hex
41
40
  };
42
- //# sourceMappingURL=ledger-HXHIOD36.js.map
41
+ //# sourceMappingURL=ledger-454SU3VE.js.map
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  liberateVault
3
- } from "./chunk-YCXICMOY.js";
4
- import "./chunk-QHW35ZON.js";
5
- import "./chunk-ZR2YMODS.js";
3
+ } from "./chunk-RJ7NN2UR.js";
4
+ import "./chunk-TGPST6FK.js";
5
+ import "./chunk-EKZ6VZYF.js";
6
6
  import "./chunk-JUBWUJY5.js";
7
- import "./chunk-PKJ43CMD.js";
7
+ import "./chunk-NLOLF6LD.js";
8
8
  import "./chunk-MLO75SFJ.js";
9
9
  import "./chunk-VNR2SNVJ.js";
10
10
  import "./chunk-YQWBEJCS.js";
@@ -18,8 +18,7 @@ import "./chunk-LP7BEXCT.js";
18
18
  import "./chunk-SL3JAAKN.js";
19
19
  import "./chunk-N4CHCXDL.js";
20
20
  import "./chunk-7O3Y4PPD.js";
21
- import "./chunk-PZ5AY32C.js";
22
21
  export {
23
22
  liberateVault
24
23
  };
25
- //# sourceMappingURL=liberate-4APIV7FR.js.map
24
+ //# sourceMappingURL=liberate-AAZSP2BT.js.map
@@ -18,7 +18,6 @@ import "./chunk-LP7BEXCT.js";
18
18
  import "./chunk-SL3JAAKN.js";
19
19
  import "./chunk-N4CHCXDL.js";
20
20
  import "./chunk-7O3Y4PPD.js";
21
- import "./chunk-PZ5AY32C.js";
22
21
  export {
23
22
  LINK_COLLECTION_PREFIX,
24
23
  LinkEndpointError,
@@ -28,4 +27,4 @@ export {
28
27
  linkCollectionName,
29
28
  linkRowKey
30
29
  };
31
- //# sourceMappingURL=link-set-6RAHEKZN.js.map
30
+ //# sourceMappingURL=link-set-67CAMUAL.js.map
@@ -19,7 +19,6 @@ import "./chunk-LP7BEXCT.js";
19
19
  import "./chunk-SL3JAAKN.js";
20
20
  import "./chunk-N4CHCXDL.js";
21
21
  import "./chunk-7O3Y4PPD.js";
22
- import "./chunk-PZ5AY32C.js";
23
22
  export {
24
23
  MemoryRecipientSealer,
25
24
  MemorySealer,
@@ -32,4 +31,4 @@ export {
32
31
  saveSealedSecret,
33
32
  sealRsaOaepTlv
34
33
  };
35
- //# sourceMappingURL=managed-secret-P3JQ7ZG4.js.map
34
+ //# sourceMappingURL=managed-secret-NHRYG7CD.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  withMaterializedView
3
- } from "../chunk-PQKG5AHH.js";
3
+ } from "../chunk-6X6SEMEE.js";
4
4
  import {
5
5
  MaterializedViewExecutor
6
6
  } from "../chunk-FFBYRWDJ.js";
@@ -16,7 +16,7 @@ import {
16
16
  isMVStale,
17
17
  markMVStale,
18
18
  resolveStaleMVOnRead
19
- } from "../chunk-E2MYJGSG.js";
19
+ } from "../chunk-AMODH7AU.js";
20
20
  import "../chunk-VXANTWBJ.js";
21
21
  import "../chunk-MGOXJIBV.js";
22
22
  import "../chunk-YPXNAP72.js";
@@ -44,7 +44,6 @@ import {
44
44
  MaterializedViewSourceUnknownError,
45
45
  MaterializedViewTooLargeError
46
46
  } from "../chunk-7O3Y4PPD.js";
47
- import "../chunk-PZ5AY32C.js";
48
47
  export {
49
48
  MaterializedViewConfigError,
50
49
  MaterializedViewCycleError,
@@ -1,7 +1,6 @@
1
1
  import {
2
2
  SatelliteConfigError
3
3
  } from "./chunk-7O3Y4PPD.js";
4
- import "./chunk-PZ5AY32C.js";
5
4
 
6
5
  // src/with-shape/satellites/migrate-cek.ts
7
6
  async function migrateSatelliteCek(name, coll) {
@@ -16,4 +15,4 @@ async function migrateSatelliteCek(name, coll) {
16
15
  export {
17
16
  migrateSatelliteCek
18
17
  };
19
- //# sourceMappingURL=migrate-cek-25KNTS5U.js.map
18
+ //# sourceMappingURL=migrate-cek-5ENH64AA.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/with-shape/satellites/migrate-cek.ts"],"sourcesContent":["/**\n * Satellite per-record-CEK migration (#599) — the R-S7 retro-coverage\n * unblock.\n *\n * R-S7 (`declare.ts:89-91`) correctly refuses declaring/redeclaring a\n * satellite of a forget-covered base without `perRecordKeys: true` — but\n * `perRecordKeys` is construction-only (`kernel/collection.ts:402`), so an\n * app that shipped a satellite BEFORE its base gained forget coverage has\n * no way past the refusal: the existing records must be re-encrypted under\n * fresh per-record CEKs before the satellite can reopen in\n * `perRecordKeys: true` mode, and the only re-encrypt primitive\n * (`Collection._applyCutoverTransform`) needs the collection already\n * constructed in that mode — chicken-and-egg.\n *\n * The break: `Vault.migrateSatellitePerRecordKeys` (`kernel/vault.ts`)\n * opens the satellite collection via `vault.collection(name, {\n * perRecordKeys: true })` WITHOUT `satelliteOf` — that never enters\n * `declareSatellite`, so R-S7's gate (which only fires on the `satelliteOf`\n * declaration path) never runs for the migration pass. R-S7 stays fully\n * enforced for every NORMAL `satelliteOf` declaration; this module and its\n * call-site never touch `declare.ts`.\n *\n * `migrateSatelliteCek` then reuses `_applyCutoverTransform` verbatim (an\n * identity transform — no field/shape change, only the encryption wrapper\n * changes) rather than duplicating its mint-or-reuse-CEK logic\n * (`resolveRecordCek`/`resolveStableCek`, `collection.ts:2537-2545`): a\n * record with no `_cek` yet gets a freshly minted per-record CEK; a record\n * that already carries `_cek` (already migrated, e.g. a prior interrupted\n * run) reuses its existing CEK unchanged. That mint-or-reuse discrimination\n * is what makes re-running this after a mid-migration failure safe for\n * free — no separate resumability marker needed, no double-mint, no\n * plaintext write, no shared-DEK write.\n *\n * **Mode-assertion guard (review Important 1):** `perRecordKeys` is\n * construction-only and the vault's collection cache is first-wins with no\n * mismatch guard. If `coll`'s name was already opened THIS SESSION without\n * `perRecordKeys` (e.g. an incidental bare `vault.collection(name)` call\n * before the migration ran), `vault.collection(name, { perRecordKeys: true\n * })` cache-HITS that instance instead of constructing a fresh one — the\n * returned handle is silently NOT in per-record-CEK mode. Without a check,\n * `_applyCutoverTransform` would then pass `cek: undefined` for every\n * record (`this.perRecordCek` false) and RE-ENCRYPT EVERY RECORD UNDER THE\n * SHARED COLLECTION DEK while still reporting `{ migrated: N }` as success\n * — a security migration that silently mints nothing. `migrateSatelliteCek`\n * reads the opened handle's own `getConfig()` (the same accessor\n * `dumpSchema()` uses) to confirm `perRecordKeys` is genuinely `true`\n * before walking, and throws `SatelliteConfigError` instead of proceeding\n * if not.\n *\n * **No-quiesce precondition (review Important 2):** `_applyCutoverTransform`\n * is documented as fence-phase-only (`collection.ts:2517-2522`) — the\n * generic schema-cutover caller (`Vault.runSchemaCutover` →\n * `SchemaFenceController`) always runs it under the vault-wide schema fence,\n * which blocks concurrent writes. This migration does NOT fence: it calls\n * `_applyCutoverTransform` directly, with no fence and CAS-less\n * (`adapter.put` with no `expectedVersion`) writes. A concurrent write to\n * the same satellite collection racing the walk's `await`s can be\n * clobbered by (or clobber) a migration write. Callers MUST run this before\n * the collection serves traffic — e.g. at v2 boot, before declaring the\n * pair, before any client can write — or otherwise ensure the vault is\n * quiescent for this collection for the duration of the call.\n */\nimport { SatelliteConfigError } from '../../kernel/errors.js'\n\n/** The narrow slice of `Collection` the migration pass needs (mirrors `fanout.ts`'s `CollectionHandle` narrowing). */\nexport interface SatelliteCekMigrationTarget {\n /** Public config snapshot (`Collection.getConfig()`) — used to confirm the handle is genuinely in per-record-CEK mode before walking. */\n getConfig(): { readonly perRecordKeys?: boolean } | undefined\n _applyCutoverTransform(transform: (doc: Record<string, unknown>) => Record<string, unknown>): Promise<number>\n}\n\nexport interface SatelliteCekMigrationResult {\n /** Records touched by this call (both freshly minted and already-migrated re-touches on a resumed run). */\n readonly migrated: number\n}\n\n/**\n * Re-encrypt every record in `coll` under a per-record CEK. `coll` must be\n * a collection handle already opened with `perRecordKeys: true` — see the\n * file header for how the caller gets one past R-S7. Throws\n * `SatelliteConfigError` (does NOT proceed) if `coll` is not genuinely in\n * per-record-CEK mode — see the file header's mode-assertion note.\n * Idempotent/resumable: safe to call again after a partial failure. NOT\n * fenced against concurrent writers — see the file header's no-quiesce\n * precondition; run this before the collection serves traffic.\n *\n * @param name The satellite collection's name — used only for the error\n * message below; identical to what the caller passed to `vault.collection()`.\n */\nexport async function migrateSatelliteCek(name: string, coll: SatelliteCekMigrationTarget): Promise<SatelliteCekMigrationResult> {\n if (coll.getConfig()?.perRecordKeys !== true) {\n throw new SatelliteConfigError(\n `migrateSatellitePerRecordKeys: collection \"${name}\" was already opened this session without ` +\n `perRecordKeys (construction-only); migrate before its first open, or restart the session.`,\n )\n }\n // Ledger reason (review Minor): the walk below reuses _applyCutoverTransform's\n // hardcoded 'schema:coordinated-cutover' ledger reason — it has no reason/label\n // param, and this migration is not itself a schema cutover. Not threaded through\n // (would touch collection.ts's own ceilinged surface for a cosmetic label);\n // flagged here so the audit trail's shared reason string is documented, not silent.\n const migrated = await coll._applyCutoverTransform((doc) => doc)\n return { migrated }\n}\n"],"mappings":";;;;;;AAyFA,eAAsB,oBAAoB,MAAc,MAAyE;AAC/H,MAAI,KAAK,UAAU,GAAG,kBAAkB,MAAM;AAC5C,UAAM,IAAI;AAAA,MACR,8CAA8C,IAAI;AAAA,IAEpD;AAAA,EACF;AAMA,QAAM,WAAW,MAAM,KAAK,uBAAuB,CAAC,QAAQ,GAAG;AAC/D,SAAO,EAAE,SAAS;AACpB;","names":[]}
1
+ {"version":3,"sources":["../src/with-shape/satellites/migrate-cek.ts"],"sourcesContent":["/**\n * Satellite per-record-CEK migration (#599) — the R-S7 retro-coverage\n * unblock.\n *\n * R-S7 (`declare.ts:89-91`) correctly refuses declaring/redeclaring a\n * satellite of a forget-covered base without `perRecordKeys: true` — but\n * `perRecordKeys` is construction-only (`kernel/collection.ts:402`), so an\n * app that shipped a satellite BEFORE its base gained forget coverage has\n * no way past the refusal: the existing records must be re-encrypted under\n * fresh per-record CEKs before the satellite can reopen in\n * `perRecordKeys: true` mode, and the only re-encrypt primitive\n * (`Collection._applyCutoverTransform`) needs the collection already\n * constructed in that mode — chicken-and-egg.\n *\n * The break: `Vault.migrateSatellitePerRecordKeys` (`kernel/vault.ts`)\n * opens the satellite collection via `vault.collection(name, {\n * perRecordKeys: true })` WITHOUT `satelliteOf` — that never enters\n * `declareSatellite`, so R-S7's gate (which only fires on the `satelliteOf`\n * declaration path) never runs for the migration pass. R-S7 stays fully\n * enforced for every NORMAL `satelliteOf` declaration; this module and its\n * call-site never touch `declare.ts`.\n *\n * `migrateSatelliteCek` then reuses `_applyCutoverTransform` verbatim (an\n * identity transform — no field/shape change, only the encryption wrapper\n * changes) rather than duplicating its mint-or-reuse-CEK logic\n * (`resolveRecordCek`/`resolveStableCek`, `collection.ts:2537-2545`): a\n * record with no `_cek` yet gets a freshly minted per-record CEK; a record\n * that already carries `_cek` (already migrated, e.g. a prior interrupted\n * run) reuses its existing CEK unchanged. That mint-or-reuse discrimination\n * is what makes re-running this after a mid-migration failure safe for\n * free — no separate resumability marker needed, no double-mint, no\n * plaintext write, no shared-DEK write.\n *\n * **Mode-assertion guard (review Important 1):** `perRecordKeys` is\n * construction-only and the vault's collection cache is first-wins with no\n * mismatch guard. If `coll`'s name was already opened THIS SESSION without\n * `perRecordKeys` (e.g. an incidental bare `vault.collection(name)` call\n * before the migration ran), `vault.collection(name, { perRecordKeys: true\n * })` cache-HITS that instance instead of constructing a fresh one — the\n * returned handle is silently NOT in per-record-CEK mode. Without a check,\n * `_applyCutoverTransform` would then pass `cek: undefined` for every\n * record (`this.perRecordCek` false) and RE-ENCRYPT EVERY RECORD UNDER THE\n * SHARED COLLECTION DEK while still reporting `{ migrated: N }` as success\n * — a security migration that silently mints nothing. `migrateSatelliteCek`\n * reads the opened handle's own `getConfig()` (the same accessor\n * `dumpSchema()` uses) to confirm `perRecordKeys` is genuinely `true`\n * before walking, and throws `SatelliteConfigError` instead of proceeding\n * if not.\n *\n * **No-quiesce precondition (review Important 2):** `_applyCutoverTransform`\n * is documented as fence-phase-only (`collection.ts:2517-2522`) — the\n * generic schema-cutover caller (`Vault.runSchemaCutover` →\n * `SchemaFenceController`) always runs it under the vault-wide schema fence,\n * which blocks concurrent writes. This migration does NOT fence: it calls\n * `_applyCutoverTransform` directly, with no fence and CAS-less\n * (`adapter.put` with no `expectedVersion`) writes. A concurrent write to\n * the same satellite collection racing the walk's `await`s can be\n * clobbered by (or clobber) a migration write. Callers MUST run this before\n * the collection serves traffic — e.g. at v2 boot, before declaring the\n * pair, before any client can write — or otherwise ensure the vault is\n * quiescent for this collection for the duration of the call.\n */\nimport { SatelliteConfigError } from '../../kernel/errors.js'\n\n/** The narrow slice of `Collection` the migration pass needs (mirrors `fanout.ts`'s `CollectionHandle` narrowing). */\nexport interface SatelliteCekMigrationTarget {\n /** Public config snapshot (`Collection.getConfig()`) — used to confirm the handle is genuinely in per-record-CEK mode before walking. */\n getConfig(): { readonly perRecordKeys?: boolean } | undefined\n _applyCutoverTransform(transform: (doc: Record<string, unknown>) => Record<string, unknown>): Promise<number>\n}\n\nexport interface SatelliteCekMigrationResult {\n /** Records touched by this call (both freshly minted and already-migrated re-touches on a resumed run). */\n readonly migrated: number\n}\n\n/**\n * Re-encrypt every record in `coll` under a per-record CEK. `coll` must be\n * a collection handle already opened with `perRecordKeys: true` — see the\n * file header for how the caller gets one past R-S7. Throws\n * `SatelliteConfigError` (does NOT proceed) if `coll` is not genuinely in\n * per-record-CEK mode — see the file header's mode-assertion note.\n * Idempotent/resumable: safe to call again after a partial failure. NOT\n * fenced against concurrent writers — see the file header's no-quiesce\n * precondition; run this before the collection serves traffic.\n *\n * @param name The satellite collection's name — used only for the error\n * message below; identical to what the caller passed to `vault.collection()`.\n */\nexport async function migrateSatelliteCek(name: string, coll: SatelliteCekMigrationTarget): Promise<SatelliteCekMigrationResult> {\n if (coll.getConfig()?.perRecordKeys !== true) {\n throw new SatelliteConfigError(\n `migrateSatellitePerRecordKeys: collection \"${name}\" was already opened this session without ` +\n `perRecordKeys (construction-only); migrate before its first open, or restart the session.`,\n )\n }\n // Ledger reason (review Minor): the walk below reuses _applyCutoverTransform's\n // hardcoded 'schema:coordinated-cutover' ledger reason — it has no reason/label\n // param, and this migration is not itself a schema cutover. Not threaded through\n // (would touch collection.ts's own ceilinged surface for a cosmetic label);\n // flagged here so the audit trail's shared reason string is documented, not silent.\n const migrated = await coll._applyCutoverTransform((doc) => doc)\n return { migrated }\n}\n"],"mappings":";;;;;AAyFA,eAAsB,oBAAoB,MAAc,MAAyE;AAC/H,MAAI,KAAK,UAAU,GAAG,kBAAkB,MAAM;AAC5C,UAAM,IAAI;AAAA,MACR,8CAA8C,IAAI;AAAA,IAEpD;AAAA,EACF;AAMA,QAAM,WAAW,MAAM,KAAK,uBAAuB,CAAC,QAAQ,GAAG;AAC/D,SAAO,EAAE,SAAS;AACpB;","names":[]}
@@ -17,7 +17,6 @@ import {
17
17
  import "../chunk-NSITFOCJ.js";
18
18
  import "../chunk-UXVWEX5L.js";
19
19
  import "../chunk-7O3Y4PPD.js";
20
- import "../chunk-PZ5AY32C.js";
21
20
  export {
22
21
  MoneyCurrencyError,
23
22
  MoneyPrecisionError,
@@ -1,30 +1,30 @@
1
1
  import {
2
2
  Noydb,
3
3
  createNoydb
4
- } from "./chunk-ZVCC36XQ.js";
5
- import "./chunk-PDD75NUZ.js";
4
+ } from "./chunk-WL36WA3O.js";
6
5
  import "./chunk-EPFF7LOX.js";
7
6
  import "./chunk-QIZPZMUI.js";
8
7
  import "./chunk-TUFM4UZP.js";
8
+ import "./chunk-SMH6SRX7.js";
9
9
  import "./chunk-GM4IM7TC.js";
10
- import "./chunk-IHFXR2VQ.js";
10
+ import "./chunk-BOBFL5TW.js";
11
11
  import "./chunk-GYGLAVCX.js";
12
12
  import "./chunk-6LJY7X5A.js";
13
13
  import "./chunk-Q7HZX3IF.js";
14
- import "./chunk-RTYJRFQO.js";
14
+ import "./chunk-EWPRPP3M.js";
15
15
  import "./chunk-BZ3534YM.js";
16
16
  import "./chunk-NQKIUNW5.js";
17
17
  import "./chunk-JUBWUJY5.js";
18
18
  import "./chunk-VTFVLCUH.js";
19
19
  import "./chunk-RXLYKVTF.js";
20
20
  import "./chunk-MMOZQTXV.js";
21
- import "./chunk-Y4MJQ2UG.js";
22
- import "./chunk-BWXGSSFX.js";
21
+ import "./chunk-QQ2YMQZU.js";
22
+ import "./chunk-NJXX55QX.js";
23
23
  import "./chunk-TFMM5DBB.js";
24
24
  import "./chunk-RTBJ5IOO.js";
25
25
  import "./chunk-KCUIMITG.js";
26
26
  import "./chunk-VYYM3MEN.js";
27
- import "./chunk-URHRIAV6.js";
27
+ import "./chunk-REDOOY2Q.js";
28
28
  import "./chunk-Y2NBBT6K.js";
29
29
  import "./chunk-WWNYSV7S.js";
30
30
  import "./chunk-MGOXJIBV.js";
@@ -32,14 +32,14 @@ import "./chunk-YPXNAP72.js";
32
32
  import "./chunk-SKGMN35F.js";
33
33
  import "./chunk-T7IR4N2S.js";
34
34
  import "./chunk-PEOZ34EM.js";
35
- import "./chunk-BERJ4AWW.js";
35
+ import "./chunk-VGXZT72I.js";
36
36
  import "./chunk-GHVIKOHT.js";
37
37
  import "./chunk-FAHMLERK.js";
38
38
  import "./chunk-SMY5X46Z.js";
39
39
  import "./chunk-DZFQVICS.js";
40
- import "./chunk-TO3EQ7HF.js";
40
+ import "./chunk-BLN54W3L.js";
41
41
  import "./chunk-5D2ALSM5.js";
42
- import "./chunk-COTPDJR5.js";
42
+ import "./chunk-OMB2ZKIT.js";
43
43
  import "./chunk-AURFOK3D.js";
44
44
  import "./chunk-6YXCPL4T.js";
45
45
  import "./chunk-7MG2LHO5.js";
@@ -83,9 +83,8 @@ import "./chunk-LP7BEXCT.js";
83
83
  import "./chunk-SL3JAAKN.js";
84
84
  import "./chunk-N4CHCXDL.js";
85
85
  import "./chunk-7O3Y4PPD.js";
86
- import "./chunk-PZ5AY32C.js";
87
86
  export {
88
87
  Noydb,
89
88
  createNoydb
90
89
  };
91
- //# sourceMappingURL=noydb-2C6QQJ5S.js.map
90
+ //# sourceMappingURL=noydb-F5CABCU4.js.map
@@ -13,7 +13,6 @@ import {
13
13
  OverlayIdMismatchError,
14
14
  OverlayNameCollisionError
15
15
  } from "../chunk-7O3Y4PPD.js";
16
- import "../chunk-PZ5AY32C.js";
17
16
  export {
18
17
  OverlayBaseIsVirtualError,
19
18
  OverlayCollectionUnavailableError,
@@ -11,7 +11,7 @@ import {
11
11
  samePartition,
12
12
  validatePeriodName,
13
13
  withPeriods
14
- } from "../chunk-BERJ4AWW.js";
14
+ } from "../chunk-VGXZT72I.js";
15
15
  import "../chunk-GHVIKOHT.js";
16
16
  import {
17
17
  PERIODS_COLLECTION,
@@ -33,7 +33,6 @@ import "../chunk-LP7BEXCT.js";
33
33
  import "../chunk-SL3JAAKN.js";
34
34
  import "../chunk-N4CHCXDL.js";
35
35
  import "../chunk-7O3Y4PPD.js";
36
- import "../chunk-PZ5AY32C.js";
37
36
  export {
38
37
  NO_PERIODS,
39
38
  PERIODS_COLLECTION,
package/dist/pod/index.js CHANGED
@@ -5,9 +5,8 @@ import {
5
5
  signRedirect,
6
6
  verifyRedirect,
7
7
  wrapPodStore
8
- } from "../chunk-BMELYFHU.js";
9
- import "../chunk-ZVCC36XQ.js";
10
- import "../chunk-PDD75NUZ.js";
8
+ } from "../chunk-P3KOF624.js";
9
+ import "../chunk-WL36WA3O.js";
11
10
  import {
12
11
  deriveSchemaManifest,
13
12
  loadSchemaManifestEntry
@@ -18,25 +17,26 @@ import {
18
17
  } from "../chunk-EPFF7LOX.js";
19
18
  import "../chunk-QIZPZMUI.js";
20
19
  import "../chunk-TUFM4UZP.js";
20
+ import "../chunk-SMH6SRX7.js";
21
21
  import "../chunk-GM4IM7TC.js";
22
- import "../chunk-IHFXR2VQ.js";
22
+ import "../chunk-BOBFL5TW.js";
23
23
  import "../chunk-GYGLAVCX.js";
24
24
  import "../chunk-6LJY7X5A.js";
25
25
  import "../chunk-Q7HZX3IF.js";
26
- import "../chunk-RTYJRFQO.js";
26
+ import "../chunk-EWPRPP3M.js";
27
27
  import "../chunk-BZ3534YM.js";
28
28
  import "../chunk-NQKIUNW5.js";
29
29
  import "../chunk-JUBWUJY5.js";
30
30
  import "../chunk-VTFVLCUH.js";
31
31
  import "../chunk-RXLYKVTF.js";
32
32
  import "../chunk-MMOZQTXV.js";
33
- import "../chunk-Y4MJQ2UG.js";
34
- import "../chunk-BWXGSSFX.js";
33
+ import "../chunk-QQ2YMQZU.js";
34
+ import "../chunk-NJXX55QX.js";
35
35
  import "../chunk-TFMM5DBB.js";
36
36
  import "../chunk-RTBJ5IOO.js";
37
37
  import "../chunk-KCUIMITG.js";
38
38
  import "../chunk-VYYM3MEN.js";
39
- import "../chunk-URHRIAV6.js";
39
+ import "../chunk-REDOOY2Q.js";
40
40
  import "../chunk-Y2NBBT6K.js";
41
41
  import "../chunk-WWNYSV7S.js";
42
42
  import "../chunk-MGOXJIBV.js";
@@ -44,7 +44,7 @@ import "../chunk-YPXNAP72.js";
44
44
  import "../chunk-SKGMN35F.js";
45
45
  import "../chunk-T7IR4N2S.js";
46
46
  import "../chunk-PEOZ34EM.js";
47
- import "../chunk-BERJ4AWW.js";
47
+ import "../chunk-VGXZT72I.js";
48
48
  import "../chunk-GHVIKOHT.js";
49
49
  import "../chunk-FAHMLERK.js";
50
50
  import "../chunk-SMY5X46Z.js";
@@ -72,11 +72,11 @@ import {
72
72
  verifyPodHeader,
73
73
  verifyRecord,
74
74
  writePod
75
- } from "../chunk-PKJ43CMD.js";
75
+ } from "../chunk-NLOLF6LD.js";
76
76
  import "../chunk-MLO75SFJ.js";
77
- import "../chunk-TO3EQ7HF.js";
77
+ import "../chunk-BLN54W3L.js";
78
78
  import "../chunk-5D2ALSM5.js";
79
- import "../chunk-COTPDJR5.js";
79
+ import "../chunk-OMB2ZKIT.js";
80
80
  import "../chunk-AURFOK3D.js";
81
81
  import "../chunk-6YXCPL4T.js";
82
82
  import "../chunk-7MG2LHO5.js";
@@ -136,7 +136,6 @@ import {
136
136
  RedirectLoopError,
137
137
  RedirectUnreachableError
138
138
  } from "../chunk-7O3Y4PPD.js";
139
- import "../chunk-PZ5AY32C.js";
140
139
  export {
141
140
  BackupCorruptedError,
142
141
  BackupLedgerError,
@@ -9,7 +9,6 @@ import "./chunk-LP7BEXCT.js";
9
9
  import "./chunk-SL3JAAKN.js";
10
10
  import "./chunk-N4CHCXDL.js";
11
11
  import "./chunk-7O3Y4PPD.js";
12
- import "./chunk-PZ5AY32C.js";
13
12
 
14
13
  // src/with-pod/pod-handle.ts
15
14
  async function buildPodHandle(adapter, name) {
@@ -26,7 +25,7 @@ async function buildPodHandle(adapter, name) {
26
25
  } catch {
27
26
  }
28
27
  }
29
- const { generateULID } = await import("./ulid-VQW6ERQN.js");
28
+ const { generateULID } = await import("./ulid-4MKXG325.js");
30
29
  const handle = generateULID();
31
30
  const envelope = buildRecordEnvelope(
32
31
  { collection: "_meta", id: "handle", version: 1 },
@@ -38,4 +37,4 @@ async function buildPodHandle(adapter, name) {
38
37
  export {
39
38
  buildPodHandle
40
39
  };
41
- //# sourceMappingURL=pod-handle-6II7KFBR.js.map
40
+ //# sourceMappingURL=pod-handle-S7AMCJIF.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/with-pod/pod-handle.ts"],"sourcesContent":["/**\n * Vault bundle handle — the stable opaque ULID identifying a vault\n * across `.noydb` exports.\n *\n * Behaviour is byte-identical to the inline `Vault.getPodHandle`\n * method this function replaced. `Vault` keeps the public method as\n * a thin delegator.\n *\n * Internal — reached through `vault.getPodHandle()`.\n */\nimport type { NoydbStore, EncryptedEnvelope } from '../kernel/types.js'\nimport { buildRecordEnvelope } from '../kernel/enclave/index.js'\n\n/**\n * Return the stable opaque bundle handle for the given vault adapter,\n * generating and persisting a fresh ULID on first call.\n *\n * See {@link import('../kernel/vault.js').Vault.getPodHandle} for\n * the full rationale and storage-path documentation.\n */\nexport async function buildPodHandle(adapter: NoydbStore, name: string): Promise<string> {\n const existing = await adapter.get(name, '_meta', 'handle')\n if (existing) {\n try {\n const parsed = JSON.parse(existing._data) as unknown\n if (parsed !== null && typeof parsed === 'object' && 'handle' in parsed) {\n const handle = (parsed as { handle: unknown }).handle\n if (typeof handle === 'string' && /^[0-9A-HJKMNP-TV-Z]{26}$/.test(handle)) {\n return handle\n }\n }\n } catch {\n // Fall through to regenerate — corrupted handle envelope\n // is treated as missing, not as an error. The new handle\n // overwrites the bad one.\n }\n }\n const { generateULID } = await import('./ulid.js')\n const handle = generateULID()\n const envelope: EncryptedEnvelope = buildRecordEnvelope(\n { collection: '_meta', id: 'handle', version: 1 },\n { iv: '', data: JSON.stringify({ handle }) },\n )\n await adapter.put(name, '_meta', 'handle', envelope)\n return handle\n}\n"],"mappings":";;;;;;;;;;;;;;AAoBA,eAAsB,eAAe,SAAqB,MAA+B;AACvF,QAAM,WAAW,MAAM,QAAQ,IAAI,MAAM,SAAS,QAAQ;AAC1D,MAAI,UAAU;AACZ,QAAI;AACF,YAAM,SAAS,KAAK,MAAM,SAAS,KAAK;AACxC,UAAI,WAAW,QAAQ,OAAO,WAAW,YAAY,YAAY,QAAQ;AACvE,cAAMA,UAAU,OAA+B;AAC/C,YAAI,OAAOA,YAAW,YAAY,2BAA2B,KAAKA,OAAM,GAAG;AACzE,iBAAOA;AAAA,QACT;AAAA,MACF;AAAA,IACF,QAAQ;AAAA,IAIR;AAAA,EACF;AACA,QAAM,EAAE,aAAa,IAAI,MAAM,OAAO,oBAAW;AACjD,QAAM,SAAS,aAAa;AAC5B,QAAM,WAA8B;AAAA,IAClC,EAAE,YAAY,SAAS,IAAI,UAAU,SAAS,EAAE;AAAA,IAChD,EAAE,IAAI,IAAI,MAAM,KAAK,UAAU,EAAE,OAAO,CAAC,EAAE;AAAA,EAC7C;AACA,QAAM,QAAQ,IAAI,MAAM,SAAS,UAAU,QAAQ;AACnD,SAAO;AACT;","names":["handle"]}
1
+ {"version":3,"sources":["../src/with-pod/pod-handle.ts"],"sourcesContent":["/**\n * Vault bundle handle — the stable opaque ULID identifying a vault\n * across `.noydb` exports.\n *\n * Behaviour is byte-identical to the inline `Vault.getPodHandle`\n * method this function replaced. `Vault` keeps the public method as\n * a thin delegator.\n *\n * Internal — reached through `vault.getPodHandle()`.\n */\nimport type { NoydbStore, EncryptedEnvelope } from '../kernel/types.js'\nimport { buildRecordEnvelope } from '../kernel/enclave/index.js'\n\n/**\n * Return the stable opaque bundle handle for the given vault adapter,\n * generating and persisting a fresh ULID on first call.\n *\n * See {@link import('../kernel/vault.js').Vault.getPodHandle} for\n * the full rationale and storage-path documentation.\n */\nexport async function buildPodHandle(adapter: NoydbStore, name: string): Promise<string> {\n const existing = await adapter.get(name, '_meta', 'handle')\n if (existing) {\n try {\n const parsed = JSON.parse(existing._data) as unknown\n if (parsed !== null && typeof parsed === 'object' && 'handle' in parsed) {\n const handle = (parsed as { handle: unknown }).handle\n if (typeof handle === 'string' && /^[0-9A-HJKMNP-TV-Z]{26}$/.test(handle)) {\n return handle\n }\n }\n } catch {\n // Fall through to regenerate — corrupted handle envelope\n // is treated as missing, not as an error. The new handle\n // overwrites the bad one.\n }\n }\n const { generateULID } = await import('./ulid.js')\n const handle = generateULID()\n const envelope: EncryptedEnvelope = buildRecordEnvelope(\n { collection: '_meta', id: 'handle', version: 1 },\n { iv: '', data: JSON.stringify({ handle }) },\n )\n await adapter.put(name, '_meta', 'handle', envelope)\n return handle\n}\n"],"mappings":";;;;;;;;;;;;;AAoBA,eAAsB,eAAe,SAAqB,MAA+B;AACvF,QAAM,WAAW,MAAM,QAAQ,IAAI,MAAM,SAAS,QAAQ;AAC1D,MAAI,UAAU;AACZ,QAAI;AACF,YAAM,SAAS,KAAK,MAAM,SAAS,KAAK;AACxC,UAAI,WAAW,QAAQ,OAAO,WAAW,YAAY,YAAY,QAAQ;AACvE,cAAMA,UAAU,OAA+B;AAC/C,YAAI,OAAOA,YAAW,YAAY,2BAA2B,KAAKA,OAAM,GAAG;AACzE,iBAAOA;AAAA,QACT;AAAA,MACF;AAAA,IACF,QAAQ;AAAA,IAIR;AAAA,EACF;AACA,QAAM,EAAE,aAAa,IAAI,MAAM,OAAO,oBAAW;AACjD,QAAM,SAAS,aAAa;AAC5B,QAAM,WAA8B;AAAA,IAClC,EAAE,YAAY,SAAS,IAAI,UAAU,SAAS,EAAE;AAAA,IAChD,EAAE,IAAI,IAAI,MAAM,KAAK,UAAU,EAAE,OAAO,CAAC,EAAE;AAAA,EAC7C;AACA,QAAM,QAAQ,IAAI,MAAM,SAAS,UAAU,QAAQ;AACnD,SAAO;AACT;","names":["handle"]}
@@ -27,7 +27,6 @@ import {
27
27
  RecoveryNotEnrolledError,
28
28
  RecoveryProfileNotImplementedError
29
29
  } from "../chunk-7O3Y4PPD.js";
30
- import "../chunk-PZ5AY32C.js";
31
30
  export {
32
31
  DEFAULT_FRESHNESS_MS,
33
32
  META_COLLECTION,
@@ -4,33 +4,32 @@ import {
4
4
  import {
5
5
  PortabilityNotEnabledError
6
6
  } from "../chunk-7O3Y4PPD.js";
7
- import "../chunk-PZ5AY32C.js";
8
7
 
9
8
  // src/with-audit/portability/active.ts
10
9
  function withPortability() {
11
10
  return {
12
11
  async exportAccessibleData(vault, opts) {
13
- const { exportAccessibleData } = await import("../export-accessible-LGV6IAFX.js");
12
+ const { exportAccessibleData } = await import("../export-accessible-2LOBM67T.js");
14
13
  return exportAccessibleData(vault, opts);
15
14
  },
16
15
  async withdrawAccessibleData(vault, opts) {
17
- const { withdrawAccessibleData } = await import("../withdraw-accessible-6Q7NE4EY.js");
16
+ const { withdrawAccessibleData } = await import("../withdraw-accessible-42D32Z7G.js");
18
17
  return withdrawAccessibleData(vault, opts);
19
18
  },
20
19
  async requestWithdrawal(vault, opts) {
21
- const { requestWithdrawal } = await import("../request-withdrawal-6HJT4ODF.js");
20
+ const { requestWithdrawal } = await import("../request-withdrawal-P5EQATZ7.js");
22
21
  return requestWithdrawal(vault, opts);
23
22
  },
24
23
  async listWithdrawalRequests(vault, opts) {
25
- const { listWithdrawalRequests } = await import("../request-withdrawal-6HJT4ODF.js");
24
+ const { listWithdrawalRequests } = await import("../request-withdrawal-P5EQATZ7.js");
26
25
  return listWithdrawalRequests(vault, opts);
27
26
  },
28
27
  async approveWithdrawal(vault, requestId, opts) {
29
- const { approveWithdrawal } = await import("../request-withdrawal-6HJT4ODF.js");
28
+ const { approveWithdrawal } = await import("../request-withdrawal-P5EQATZ7.js");
30
29
  return approveWithdrawal(vault, requestId, opts);
31
30
  },
32
31
  async rejectWithdrawal(vault, requestId, opts) {
33
- const { rejectWithdrawal } = await import("../request-withdrawal-6HJT4ODF.js");
32
+ const { rejectWithdrawal } = await import("../request-withdrawal-P5EQATZ7.js");
34
33
  return rejectWithdrawal(vault, requestId, opts);
35
34
  }
36
35
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/with-audit/portability/active.ts"],"sourcesContent":["/**\n * Enable the portability capability.\n * Pass to `createNoydb({ portabilityStrategy: withPortability() })` to make a\n * vault's `user.exportMyAccessibleData` / `user.unilateralWithdrawal` /\n * `user.requestWithdrawal` / `user.listWithdrawalRequests` /\n * `user.approveWithdrawal` / `user.rejectWithdrawal` methods live. The\n * export/withdraw/request engines are dynamically imported here, so they stay\n * reachable only via opt-in.\n */\nimport type { PortabilityStrategy } from './strategy.js'\n\nexport function withPortability(): PortabilityStrategy {\n return {\n async exportAccessibleData(vault, opts) {\n const { exportAccessibleData } = await import('./export-accessible.js')\n return exportAccessibleData(vault, opts)\n },\n async withdrawAccessibleData(vault, opts) {\n const { withdrawAccessibleData } = await import('./withdraw-accessible.js')\n return withdrawAccessibleData(vault, opts)\n },\n async requestWithdrawal(vault, opts) {\n const { requestWithdrawal } = await import('./request-withdrawal.js')\n return requestWithdrawal(vault, opts)\n },\n async listWithdrawalRequests(vault, opts) {\n const { listWithdrawalRequests } = await import('./request-withdrawal.js')\n return listWithdrawalRequests(vault, opts)\n },\n async approveWithdrawal(vault, requestId, opts) {\n const { approveWithdrawal } = await import('./request-withdrawal.js')\n return approveWithdrawal(vault, requestId, opts)\n },\n async rejectWithdrawal(vault, requestId, opts) {\n const { rejectWithdrawal } = await import('./request-withdrawal.js')\n return rejectWithdrawal(vault, requestId, opts)\n },\n }\n}\n"],"mappings":";;;;;;;;;AAWO,SAAS,kBAAuC;AACrD,SAAO;AAAA,IACL,MAAM,qBAAqB,OAAO,MAAM;AACtC,YAAM,EAAE,qBAAqB,IAAI,MAAM,OAAO,kCAAwB;AACtE,aAAO,qBAAqB,OAAO,IAAI;AAAA,IACzC;AAAA,IACA,MAAM,uBAAuB,OAAO,MAAM;AACxC,YAAM,EAAE,uBAAuB,IAAI,MAAM,OAAO,oCAA0B;AAC1E,aAAO,uBAAuB,OAAO,IAAI;AAAA,IAC3C;AAAA,IACA,MAAM,kBAAkB,OAAO,MAAM;AACnC,YAAM,EAAE,kBAAkB,IAAI,MAAM,OAAO,mCAAyB;AACpE,aAAO,kBAAkB,OAAO,IAAI;AAAA,IACtC;AAAA,IACA,MAAM,uBAAuB,OAAO,MAAM;AACxC,YAAM,EAAE,uBAAuB,IAAI,MAAM,OAAO,mCAAyB;AACzE,aAAO,uBAAuB,OAAO,IAAI;AAAA,IAC3C;AAAA,IACA,MAAM,kBAAkB,OAAO,WAAW,MAAM;AAC9C,YAAM,EAAE,kBAAkB,IAAI,MAAM,OAAO,mCAAyB;AACpE,aAAO,kBAAkB,OAAO,WAAW,IAAI;AAAA,IACjD;AAAA,IACA,MAAM,iBAAiB,OAAO,WAAW,MAAM;AAC7C,YAAM,EAAE,iBAAiB,IAAI,MAAM,OAAO,mCAAyB;AACnE,aAAO,iBAAiB,OAAO,WAAW,IAAI;AAAA,IAChD;AAAA,EACF;AACF;","names":[]}
1
+ {"version":3,"sources":["../../src/with-audit/portability/active.ts"],"sourcesContent":["/**\n * Enable the portability capability.\n * Pass to `createNoydb({ portabilityStrategy: withPortability() })` to make a\n * vault's `user.exportMyAccessibleData` / `user.unilateralWithdrawal` /\n * `user.requestWithdrawal` / `user.listWithdrawalRequests` /\n * `user.approveWithdrawal` / `user.rejectWithdrawal` methods live. The\n * export/withdraw/request engines are dynamically imported here, so they stay\n * reachable only via opt-in.\n */\nimport type { PortabilityStrategy } from './strategy.js'\n\nexport function withPortability(): PortabilityStrategy {\n return {\n async exportAccessibleData(vault, opts) {\n const { exportAccessibleData } = await import('./export-accessible.js')\n return exportAccessibleData(vault, opts)\n },\n async withdrawAccessibleData(vault, opts) {\n const { withdrawAccessibleData } = await import('./withdraw-accessible.js')\n return withdrawAccessibleData(vault, opts)\n },\n async requestWithdrawal(vault, opts) {\n const { requestWithdrawal } = await import('./request-withdrawal.js')\n return requestWithdrawal(vault, opts)\n },\n async listWithdrawalRequests(vault, opts) {\n const { listWithdrawalRequests } = await import('./request-withdrawal.js')\n return listWithdrawalRequests(vault, opts)\n },\n async approveWithdrawal(vault, requestId, opts) {\n const { approveWithdrawal } = await import('./request-withdrawal.js')\n return approveWithdrawal(vault, requestId, opts)\n },\n async rejectWithdrawal(vault, requestId, opts) {\n const { rejectWithdrawal } = await import('./request-withdrawal.js')\n return rejectWithdrawal(vault, requestId, opts)\n },\n }\n}\n"],"mappings":";;;;;;;;AAWO,SAAS,kBAAuC;AACrD,SAAO;AAAA,IACL,MAAM,qBAAqB,OAAO,MAAM;AACtC,YAAM,EAAE,qBAAqB,IAAI,MAAM,OAAO,kCAAwB;AACtE,aAAO,qBAAqB,OAAO,IAAI;AAAA,IACzC;AAAA,IACA,MAAM,uBAAuB,OAAO,MAAM;AACxC,YAAM,EAAE,uBAAuB,IAAI,MAAM,OAAO,oCAA0B;AAC1E,aAAO,uBAAuB,OAAO,IAAI;AAAA,IAC3C;AAAA,IACA,MAAM,kBAAkB,OAAO,MAAM;AACnC,YAAM,EAAE,kBAAkB,IAAI,MAAM,OAAO,mCAAyB;AACpE,aAAO,kBAAkB,OAAO,IAAI;AAAA,IACtC;AAAA,IACA,MAAM,uBAAuB,OAAO,MAAM;AACxC,YAAM,EAAE,uBAAuB,IAAI,MAAM,OAAO,mCAAyB;AACzE,aAAO,uBAAuB,OAAO,IAAI;AAAA,IAC3C;AAAA,IACA,MAAM,kBAAkB,OAAO,WAAW,MAAM;AAC9C,YAAM,EAAE,kBAAkB,IAAI,MAAM,OAAO,mCAAyB;AACpE,aAAO,kBAAkB,OAAO,WAAW,IAAI;AAAA,IACjD;AAAA,IACA,MAAM,iBAAiB,OAAO,WAAW,MAAM;AAC7C,YAAM,EAAE,iBAAiB,IAAI,MAAM,OAAO,mCAAyB;AACnE,aAAO,iBAAiB,OAAO,WAAW,IAAI;AAAA,IAChD;AAAA,EACF;AACF;","names":[]}
@@ -4,7 +4,6 @@ import {
4
4
  import {
5
5
  SatelliteConfigError
6
6
  } from "./chunk-7O3Y4PPD.js";
7
- import "./chunk-PZ5AY32C.js";
8
7
 
9
8
  // src/with-shape/satellites/marker.ts
10
9
  async function ensureSatelliteMarker(store, vaultName, spec, dek) {
@@ -14,7 +13,7 @@ async function ensureSatelliteMarker(store, vaultName, spec, dek) {
14
13
  joined: spec.joined,
15
14
  epoch: (/* @__PURE__ */ new Date()).toISOString()
16
15
  };
17
- const { loadPersistedSchema } = await import("./storage-WP4M7IFO.js");
16
+ const { loadPersistedSchema } = await import("./storage-AVJA5BTW.js");
18
17
  const persisted = await loadPersistedSchema(store, vaultName, spec.satellite, dek);
19
18
  const prior = persisted?.satellite;
20
19
  if (prior) {
@@ -25,7 +24,7 @@ async function ensureSatelliteMarker(store, vaultName, spec, dek) {
25
24
  }
26
25
  return;
27
26
  }
28
- const { persistSatelliteMarker } = await import("./register-AEOOGKNO.js");
27
+ const { persistSatelliteMarker } = await import("./register-7OJWAWT5.js");
29
28
  await persistSatelliteMarker({ store, vault: vaultName, collectionName: spec.satellite, dek, marker: next });
30
29
  }
31
30
 
@@ -39,7 +38,7 @@ async function postRegister(store, vaultName, spec, getDEK, baseSchema, registry
39
38
  }
40
39
  if (baseSchema !== void 0) {
41
40
  try {
42
- const { derivePersistedSchema } = await import("./derive-LY47HG7Q.js");
41
+ const { derivePersistedSchema } = await import("./derive-HHBRFS2U.js");
43
42
  const envelope = await derivePersistedSchema(baseSchema);
44
43
  const properties = envelope.jsonSchema?.["properties"];
45
44
  const baseFields = Object.keys(properties ?? {});
@@ -57,4 +56,4 @@ async function postRegister(store, vaultName, spec, getDEK, baseSchema, registry
57
56
  export {
58
57
  postRegister
59
58
  };
60
- //# sourceMappingURL=post-register-BPJ36A6D.js.map
59
+ //# sourceMappingURL=post-register-HIYY4Y5S.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/with-shape/satellites/marker.ts","../src/with-shape/satellites/post-register.ts"],"sourcesContent":["import type { NoydbStore } from '../../kernel/types.js'\nimport type { EnclaveKey } from '../../kernel/enclave/index.js'\nimport { SatelliteConfigError } from '../../kernel/errors.js'\nimport { hashFields } from './validate.js'\nimport type { PairingMarker, SatelliteSpec } from './types.js'\n\n/**\n * Persist-or-reconcile the pairing marker in `_schemas/<satellite>`.\n * First declaration writes { base, fieldsHash, joined }; later declarations\n * must match exactly or are refused (R-S9). Lazy imports keep the satellite\n * spine tree-shakeable (config-drift.ts pattern).\n */\nexport async function ensureSatelliteMarker(\n store: NoydbStore, vaultName: string, spec: SatelliteSpec, dek: EnclaveKey,\n): Promise<void> {\n // #597: `epoch` only matters the first time this marker is ever persisted —\n // when a `prior` marker already exists below we return without ever using\n // it, so re-declaring a LIVE collection never mints (or compares) a new\n // epoch; the persisted one is carried forward untouched. Stamped here as a\n // timestamp (mirrors `derivedAt` in persisted-schemas/register.ts) rather\n // than a counter, since there's nothing to count from yet.\n const next: PairingMarker = {\n base: spec.base, fieldsHash: hashFields(spec.fields), joined: spec.joined,\n epoch: new Date().toISOString(),\n }\n const { loadPersistedSchema } = await import('../persisted-schemas/storage.js')\n const persisted = await loadPersistedSchema(store, vaultName, spec.satellite, dek)\n const prior = persisted?.satellite\n if (prior) {\n if (prior.base !== next.base || prior.fieldsHash !== next.fieldsHash || (prior.joined ?? null) !== (next.joined ?? null)) {\n throw new SatelliteConfigError(\n `R-S9: satellite \"${spec.satellite}\" re-declared divergently from its persisted pairing marker ` +\n `(persisted base=\"${prior.base}\" fieldsHash=${prior.fieldsHash}; declared base=\"${next.base}\" fieldsHash=${next.fieldsHash}). ` +\n `Evolve the marker deliberately, don't redeclare.`,\n )\n }\n return\n }\n const { persistSatelliteMarker } = await import('../persisted-schemas/register.js')\n await persistSatelliteMarker({ store, vault: vaultName, collectionName: spec.satellite, dek, marker: next })\n}\n","import type { NoydbStore } from '../../kernel/types.js'\nimport type { EnclaveKey } from '../../kernel/enclave/index.js'\nimport type { SatelliteSpec } from './types.js'\nimport type { SatelliteRegistry } from './registry.js'\nimport { ensureSatelliteMarker } from './marker.js'\n\n/** Async post-registration: R-S9 marker reconcile + R-S1/R-S5 derivable-schema cross-check. Failures poison, never throw. */\nexport async function postRegister(\n store: NoydbStore, vaultName: string, spec: SatelliteSpec,\n getDEK: (collectionName: string) => Promise<EnclaveKey>,\n baseSchema: unknown, registry: SatelliteRegistry,\n): Promise<void> {\n try {\n await ensureSatelliteMarker(store, vaultName, spec, await getDEK(spec.satellite))\n } catch (err) {\n registry.poison(spec.satellite, (err as Error).message); return\n }\n if (baseSchema !== undefined) {\n try {\n const { derivePersistedSchema } = await import('../persisted-schemas/derive.js')\n const envelope = await derivePersistedSchema(baseSchema)\n const properties = (envelope.jsonSchema as Record<string, unknown> | null)?.['properties'] as Record<string, unknown> | undefined\n const baseFields: string[] = Object.keys(properties ?? {})\n const overlap = spec.fields.filter(f => baseFields.includes(f))\n if (overlap.length > 0) {\n registry.poison(spec.satellite,\n `R-S1: satellite \"${spec.satellite}\" fields overlap the base schema: ${overlap.join(', ')} — routing must be unambiguous.`)\n }\n } catch { /* non-derivable validator → cross-check unavailable, by design (spec R-S5) */ }\n }\n}\n"],"mappings":";;;;;;;;;AAYA,eAAsB,sBACpB,OAAmB,WAAmB,MAAqB,KAC5C;AAOf,QAAM,OAAsB;AAAA,IAC1B,MAAM,KAAK;AAAA,IAAM,YAAY,WAAW,KAAK,MAAM;AAAA,IAAG,QAAQ,KAAK;AAAA,IACnE,QAAO,oBAAI,KAAK,GAAE,YAAY;AAAA,EAChC;AACA,QAAM,EAAE,oBAAoB,IAAI,MAAM,OAAO,uBAAiC;AAC9E,QAAM,YAAY,MAAM,oBAAoB,OAAO,WAAW,KAAK,WAAW,GAAG;AACjF,QAAM,QAAQ,WAAW;AACzB,MAAI,OAAO;AACT,QAAI,MAAM,SAAS,KAAK,QAAQ,MAAM,eAAe,KAAK,eAAe,MAAM,UAAU,WAAW,KAAK,UAAU,OAAO;AACxH,YAAM,IAAI;AAAA,QACR,oBAAoB,KAAK,SAAS,gFACd,MAAM,IAAI,gBAAgB,MAAM,UAAU,oBAAoB,KAAK,IAAI,gBAAgB,KAAK,UAAU;AAAA,MAE5H;AAAA,IACF;AACA;AAAA,EACF;AACA,QAAM,EAAE,uBAAuB,IAAI,MAAM,OAAO,wBAAkC;AAClF,QAAM,uBAAuB,EAAE,OAAO,OAAO,WAAW,gBAAgB,KAAK,WAAW,KAAK,QAAQ,KAAK,CAAC;AAC7G;;;ACjCA,eAAsB,aACpB,OAAmB,WAAmB,MACtC,QACA,YAAqB,UACN;AACf,MAAI;AACF,UAAM,sBAAsB,OAAO,WAAW,MAAM,MAAM,OAAO,KAAK,SAAS,CAAC;AAAA,EAClF,SAAS,KAAK;AACZ,aAAS,OAAO,KAAK,WAAY,IAAc,OAAO;AAAG;AAAA,EAC3D;AACA,MAAI,eAAe,QAAW;AAC5B,QAAI;AACF,YAAM,EAAE,sBAAsB,IAAI,MAAM,OAAO,sBAAgC;AAC/E,YAAM,WAAW,MAAM,sBAAsB,UAAU;AACvD,YAAM,aAAc,SAAS,aAAgD,YAAY;AACzF,YAAM,aAAuB,OAAO,KAAK,cAAc,CAAC,CAAC;AACzD,YAAM,UAAU,KAAK,OAAO,OAAO,OAAK,WAAW,SAAS,CAAC,CAAC;AAC9D,UAAI,QAAQ,SAAS,GAAG;AACtB,iBAAS;AAAA,UAAO,KAAK;AAAA,UACnB,oBAAoB,KAAK,SAAS,qCAAqC,QAAQ,KAAK,IAAI,CAAC;AAAA,QAAiC;AAAA,MAC9H;AAAA,IACF,QAAQ;AAAA,IAAiF;AAAA,EAC3F;AACF;","names":[]}
1
+ {"version":3,"sources":["../src/with-shape/satellites/marker.ts","../src/with-shape/satellites/post-register.ts"],"sourcesContent":["import type { NoydbStore } from '../../kernel/types.js'\nimport type { EnclaveKey } from '../../kernel/enclave/index.js'\nimport { SatelliteConfigError } from '../../kernel/errors.js'\nimport { hashFields } from './validate.js'\nimport type { PairingMarker, SatelliteSpec } from './types.js'\n\n/**\n * Persist-or-reconcile the pairing marker in `_schemas/<satellite>`.\n * First declaration writes { base, fieldsHash, joined }; later declarations\n * must match exactly or are refused (R-S9). Lazy imports keep the satellite\n * spine tree-shakeable (config-drift.ts pattern).\n */\nexport async function ensureSatelliteMarker(\n store: NoydbStore, vaultName: string, spec: SatelliteSpec, dek: EnclaveKey,\n): Promise<void> {\n // #597: `epoch` only matters the first time this marker is ever persisted —\n // when a `prior` marker already exists below we return without ever using\n // it, so re-declaring a LIVE collection never mints (or compares) a new\n // epoch; the persisted one is carried forward untouched. Stamped here as a\n // timestamp (mirrors `derivedAt` in persisted-schemas/register.ts) rather\n // than a counter, since there's nothing to count from yet.\n const next: PairingMarker = {\n base: spec.base, fieldsHash: hashFields(spec.fields), joined: spec.joined,\n epoch: new Date().toISOString(),\n }\n const { loadPersistedSchema } = await import('../persisted-schemas/storage.js')\n const persisted = await loadPersistedSchema(store, vaultName, spec.satellite, dek)\n const prior = persisted?.satellite\n if (prior) {\n if (prior.base !== next.base || prior.fieldsHash !== next.fieldsHash || (prior.joined ?? null) !== (next.joined ?? null)) {\n throw new SatelliteConfigError(\n `R-S9: satellite \"${spec.satellite}\" re-declared divergently from its persisted pairing marker ` +\n `(persisted base=\"${prior.base}\" fieldsHash=${prior.fieldsHash}; declared base=\"${next.base}\" fieldsHash=${next.fieldsHash}). ` +\n `Evolve the marker deliberately, don't redeclare.`,\n )\n }\n return\n }\n const { persistSatelliteMarker } = await import('../persisted-schemas/register.js')\n await persistSatelliteMarker({ store, vault: vaultName, collectionName: spec.satellite, dek, marker: next })\n}\n","import type { NoydbStore } from '../../kernel/types.js'\nimport type { EnclaveKey } from '../../kernel/enclave/index.js'\nimport type { SatelliteSpec } from './types.js'\nimport type { SatelliteRegistry } from './registry.js'\nimport { ensureSatelliteMarker } from './marker.js'\n\n/** Async post-registration: R-S9 marker reconcile + R-S1/R-S5 derivable-schema cross-check. Failures poison, never throw. */\nexport async function postRegister(\n store: NoydbStore, vaultName: string, spec: SatelliteSpec,\n getDEK: (collectionName: string) => Promise<EnclaveKey>,\n baseSchema: unknown, registry: SatelliteRegistry,\n): Promise<void> {\n try {\n await ensureSatelliteMarker(store, vaultName, spec, await getDEK(spec.satellite))\n } catch (err) {\n registry.poison(spec.satellite, (err as Error).message); return\n }\n if (baseSchema !== undefined) {\n try {\n const { derivePersistedSchema } = await import('../persisted-schemas/derive.js')\n const envelope = await derivePersistedSchema(baseSchema)\n const properties = (envelope.jsonSchema as Record<string, unknown> | null)?.['properties'] as Record<string, unknown> | undefined\n const baseFields: string[] = Object.keys(properties ?? {})\n const overlap = spec.fields.filter(f => baseFields.includes(f))\n if (overlap.length > 0) {\n registry.poison(spec.satellite,\n `R-S1: satellite \"${spec.satellite}\" fields overlap the base schema: ${overlap.join(', ')} — routing must be unambiguous.`)\n }\n } catch { /* non-derivable validator → cross-check unavailable, by design (spec R-S5) */ }\n }\n}\n"],"mappings":";;;;;;;;AAYA,eAAsB,sBACpB,OAAmB,WAAmB,MAAqB,KAC5C;AAOf,QAAM,OAAsB;AAAA,IAC1B,MAAM,KAAK;AAAA,IAAM,YAAY,WAAW,KAAK,MAAM;AAAA,IAAG,QAAQ,KAAK;AAAA,IACnE,QAAO,oBAAI,KAAK,GAAE,YAAY;AAAA,EAChC;AACA,QAAM,EAAE,oBAAoB,IAAI,MAAM,OAAO,uBAAiC;AAC9E,QAAM,YAAY,MAAM,oBAAoB,OAAO,WAAW,KAAK,WAAW,GAAG;AACjF,QAAM,QAAQ,WAAW;AACzB,MAAI,OAAO;AACT,QAAI,MAAM,SAAS,KAAK,QAAQ,MAAM,eAAe,KAAK,eAAe,MAAM,UAAU,WAAW,KAAK,UAAU,OAAO;AACxH,YAAM,IAAI;AAAA,QACR,oBAAoB,KAAK,SAAS,gFACd,MAAM,IAAI,gBAAgB,MAAM,UAAU,oBAAoB,KAAK,IAAI,gBAAgB,KAAK,UAAU;AAAA,MAE5H;AAAA,IACF;AACA;AAAA,EACF;AACA,QAAM,EAAE,uBAAuB,IAAI,MAAM,OAAO,wBAAkC;AAClF,QAAM,uBAAuB,EAAE,OAAO,OAAO,WAAW,gBAAgB,KAAK,WAAW,KAAK,QAAQ,KAAK,CAAC;AAC7G;;;ACjCA,eAAsB,aACpB,OAAmB,WAAmB,MACtC,QACA,YAAqB,UACN;AACf,MAAI;AACF,UAAM,sBAAsB,OAAO,WAAW,MAAM,MAAM,OAAO,KAAK,SAAS,CAAC;AAAA,EAClF,SAAS,KAAK;AACZ,aAAS,OAAO,KAAK,WAAY,IAAc,OAAO;AAAG;AAAA,EAC3D;AACA,MAAI,eAAe,QAAW;AAC5B,QAAI;AACF,YAAM,EAAE,sBAAsB,IAAI,MAAM,OAAO,sBAAgC;AAC/E,YAAM,WAAW,MAAM,sBAAsB,UAAU;AACvD,YAAM,aAAc,SAAS,aAAgD,YAAY;AACzF,YAAM,aAAuB,OAAO,KAAK,cAAc,CAAC,CAAC;AACzD,YAAM,UAAU,KAAK,OAAO,OAAO,OAAK,WAAW,SAAS,CAAC,CAAC;AAC9D,UAAI,QAAQ,SAAS,GAAG;AACtB,iBAAS;AAAA,UAAO,KAAK;AAAA,UACnB,oBAAoB,KAAK,SAAS,qCAAqC,QAAQ,KAAK,IAAI,CAAC;AAAA,QAAiC;AAAA,MAC9H;AAAA,IACF,QAAQ;AAAA,IAAiF;AAAA,EAC3F;AACF;","names":[]}
@@ -1,5 +1,3 @@
1
- import "./chunk-PZ5AY32C.js";
2
-
3
1
  // src/with-audit/forget/purge-scope.ts
4
2
  function partitionSealedCekKeys(keys, prefix, scopedPurge, declared) {
5
3
  const matches = keys.filter((key) => key.startsWith(prefix));
@@ -21,4 +19,4 @@ export {
21
19
  residueNoticesFromMap,
22
20
  shouldSkipBlobScan
23
21
  };
24
- //# sourceMappingURL=purge-scope-FGNNLWHD.js.map
22
+ //# sourceMappingURL=purge-scope-4HEFPDOW.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/with-audit/forget/purge-scope.ts"],"sourcesContent":["/**\n * #633 — scoped-purge partitioning for the opt-in `scopedPurge` forget-strategy\n * knob (`strategy.ts`'s `SubjectDeclaration.scopedPurge`). Pure helpers only —\n * no store I/O, no `Vault`/`Collection` imports — kept out of `kernel/vault.ts`\n * (exact zero-slack `kernel-surface` ceiling) and free of any circular-import\n * risk with the kernel spine.\n *\n * The two `forget()` purge sites (`_sealed_cek` listing, blob shred) stay\n * UNCONDITIONAL by default (byte-identical to pre-#633 behavior); when\n * `scopedPurge` is `true`, each site calls into this module to decide what to\n * purge vs. what to leave in place + report as residue, keyed off a\n * per-collection declaration signal the caller (vault.ts) resolves itself:\n * - sealed-CEK arm: `coll._via?.hasAtRestHooks === true` — the classified\n * via binding's at-rest hooks (the \"richer\" declaration; a bare\n * `sensitive` collection with NO classified binder does not count — it can\n * still call `sealRecordToHost()` ad hoc, which is exactly the\n * under-approximation #633 calls out).\n * - blob arm: `this.blobFieldsRegistry.has(ref.collection)` — a collection\n * can call `.blob(id)` regardless of this declaration (same\n * under-approximation), which is why the default stays unconditional.\n *\n * @module\n */\nimport type { ScopedPurgeResidueReason } from './strategy.js'\n\n/**\n * Partitions an already-fetched vault-wide `_sealed_cek` key listing into\n * keys to purge vs. a skipped count, for ONE ref's `<collection>/<id>/`\n * prefix. No new store call — `keys` is the SAME listing the unconditional\n * path already fetched. Default parity: when `scopedPurge` is false, or\n * `declared` is true, every matching key is returned for purge and\n * `skippedCount` is 0 — byte-identical to the unconditional behavior.\n */\nexport function partitionSealedCekKeys(\n keys: readonly string[],\n prefix: string,\n scopedPurge: boolean,\n declared: boolean,\n): { readonly toPurge: readonly string[]; readonly skippedCount: number } {\n const matches = keys.filter((key) => key.startsWith(prefix))\n if (!scopedPurge || declared) return { toPurge: matches, skippedCount: 0 }\n return { toPurge: [], skippedCount: matches.length }\n}\n\n/**\n * True when the blob arm should skip `ref.collection` entirely — no\n * `.blob(id).shredAllForRecord()` call AND no `_blob_slots_<collection>`\n * residue-detection `list()` call either (the perf win: scoped mode never\n * pays for a per-collection scan on a collection that never declared\n * `blobFields`).\n */\nexport function shouldSkipBlobScan(scopedPurge: boolean, declared: boolean): boolean {\n return scopedPurge && !declared\n}\n\n/** Adds `count` (if positive) to `collection`'s running total in `map` — the\n * per-collection residue accumulator both purge sites share. */\nexport function bumpResidueCount(map: Map<string, number>, collection: string, count: number): void {\n if (count > 0) map.set(collection, (map.get(collection) ?? 0) + count)\n}\n\n/** Flattens an accumulated per-collection count map into `ForgetResult.scopedPurgeResidue` notices\n * tagged with `reason`. Empty map → empty array (the unconditional-default case). */\nexport function residueNoticesFromMap(\n map: ReadonlyMap<string, number>,\n reason: ScopedPurgeResidueReason,\n): { readonly reason: ScopedPurgeResidueReason; readonly collection: string; readonly count: number }[] {\n return [...map].map(([collection, count]) => ({ reason, collection, count }))\n}\n"],"mappings":";;;AAiCO,SAAS,uBACd,MACA,QACA,aACA,UACwE;AACxE,QAAM,UAAU,KAAK,OAAO,CAAC,QAAQ,IAAI,WAAW,MAAM,CAAC;AAC3D,MAAI,CAAC,eAAe,SAAU,QAAO,EAAE,SAAS,SAAS,cAAc,EAAE;AACzE,SAAO,EAAE,SAAS,CAAC,GAAG,cAAc,QAAQ,OAAO;AACrD;AASO,SAAS,mBAAmB,aAAsB,UAA4B;AACnF,SAAO,eAAe,CAAC;AACzB;AAIO,SAAS,iBAAiB,KAA0B,YAAoB,OAAqB;AAClG,MAAI,QAAQ,EAAG,KAAI,IAAI,aAAa,IAAI,IAAI,UAAU,KAAK,KAAK,KAAK;AACvE;AAIO,SAAS,sBACd,KACA,QACsG;AACtG,SAAO,CAAC,GAAG,GAAG,EAAE,IAAI,CAAC,CAAC,YAAY,KAAK,OAAO,EAAE,QAAQ,YAAY,MAAM,EAAE;AAC9E;","names":[]}
1
+ {"version":3,"sources":["../src/with-audit/forget/purge-scope.ts"],"sourcesContent":["/**\n * #633 — scoped-purge partitioning for the opt-in `scopedPurge` forget-strategy\n * knob (`strategy.ts`'s `SubjectDeclaration.scopedPurge`). Pure helpers only —\n * no store I/O, no `Vault`/`Collection` imports — kept out of `kernel/vault.ts`\n * (exact zero-slack `kernel-surface` ceiling) and free of any circular-import\n * risk with the kernel spine.\n *\n * The two `forget()` purge sites (`_sealed_cek` listing, blob shred) stay\n * UNCONDITIONAL by default (byte-identical to pre-#633 behavior); when\n * `scopedPurge` is `true`, each site calls into this module to decide what to\n * purge vs. what to leave in place + report as residue, keyed off a\n * per-collection declaration signal the caller (vault.ts) resolves itself:\n * - sealed-CEK arm: `coll._via?.hasAtRestHooks === true` — the classified\n * via binding's at-rest hooks (the \"richer\" declaration; a bare\n * `sensitive` collection with NO classified binder does not count — it can\n * still call `sealRecordToHost()` ad hoc, which is exactly the\n * under-approximation #633 calls out).\n * - blob arm: `this.blobFieldsRegistry.has(ref.collection)` — a collection\n * can call `.blob(id)` regardless of this declaration (same\n * under-approximation), which is why the default stays unconditional.\n *\n * @module\n */\nimport type { ScopedPurgeResidueReason } from './strategy.js'\n\n/**\n * Partitions an already-fetched vault-wide `_sealed_cek` key listing into\n * keys to purge vs. a skipped count, for ONE ref's `<collection>/<id>/`\n * prefix. No new store call — `keys` is the SAME listing the unconditional\n * path already fetched. Default parity: when `scopedPurge` is false, or\n * `declared` is true, every matching key is returned for purge and\n * `skippedCount` is 0 — byte-identical to the unconditional behavior.\n */\nexport function partitionSealedCekKeys(\n keys: readonly string[],\n prefix: string,\n scopedPurge: boolean,\n declared: boolean,\n): { readonly toPurge: readonly string[]; readonly skippedCount: number } {\n const matches = keys.filter((key) => key.startsWith(prefix))\n if (!scopedPurge || declared) return { toPurge: matches, skippedCount: 0 }\n return { toPurge: [], skippedCount: matches.length }\n}\n\n/**\n * True when the blob arm should skip `ref.collection` entirely — no\n * `.blob(id).shredAllForRecord()` call AND no `_blob_slots_<collection>`\n * residue-detection `list()` call either (the perf win: scoped mode never\n * pays for a per-collection scan on a collection that never declared\n * `blobFields`).\n */\nexport function shouldSkipBlobScan(scopedPurge: boolean, declared: boolean): boolean {\n return scopedPurge && !declared\n}\n\n/** Adds `count` (if positive) to `collection`'s running total in `map` — the\n * per-collection residue accumulator both purge sites share. */\nexport function bumpResidueCount(map: Map<string, number>, collection: string, count: number): void {\n if (count > 0) map.set(collection, (map.get(collection) ?? 0) + count)\n}\n\n/** Flattens an accumulated per-collection count map into `ForgetResult.scopedPurgeResidue` notices\n * tagged with `reason`. Empty map → empty array (the unconditional-default case). */\nexport function residueNoticesFromMap(\n map: ReadonlyMap<string, number>,\n reason: ScopedPurgeResidueReason,\n): { readonly reason: ScopedPurgeResidueReason; readonly collection: string; readonly count: number }[] {\n return [...map].map(([collection, count]) => ({ reason, collection, count }))\n}\n"],"mappings":";AAiCO,SAAS,uBACd,MACA,QACA,aACA,UACwE;AACxE,QAAM,UAAU,KAAK,OAAO,CAAC,QAAQ,IAAI,WAAW,MAAM,CAAC;AAC3D,MAAI,CAAC,eAAe,SAAU,QAAO,EAAE,SAAS,SAAS,cAAc,EAAE;AACzE,SAAO,EAAE,SAAS,CAAC,GAAG,cAAc,QAAQ,OAAO;AACrD;AASO,SAAS,mBAAmB,aAAsB,UAA4B;AACnF,SAAO,eAAe,CAAC;AACzB;AAIO,SAAS,iBAAiB,KAA0B,YAAoB,OAAqB;AAClG,MAAI,QAAQ,EAAG,KAAI,IAAI,aAAa,IAAI,IAAI,UAAU,KAAK,KAAK,KAAK;AACvE;AAIO,SAAS,sBACd,KACA,QACsG;AACtG,SAAO,CAAC,GAAG,GAAG,EAAE,IAAI,CAAC,CAAC,YAAY,KAAK,OAAO,EAAE,QAAQ,YAAY,MAAM,EAAE;AAC9E;","names":[]}
@@ -30,7 +30,6 @@ import {
30
30
  IndexWriteFailureError,
31
31
  JoinTooLargeError
32
32
  } from "../chunk-7O3Y4PPD.js";
33
- import "../chunk-PZ5AY32C.js";
34
33
  export {
35
34
  CollectionIndexes,
36
35
  CrossJoinSourceUnknownError,
@@ -1,8 +1,7 @@
1
1
  import {
2
2
  ReadOnlyVaultFacade
3
3
  } from "./chunk-JK733I5V.js";
4
- import "./chunk-PZ5AY32C.js";
5
4
  export {
6
5
  ReadOnlyVaultFacade
7
6
  };
8
- //# sourceMappingURL=read-only-facade-CHCKSEPD.js.map
7
+ //# sourceMappingURL=read-only-facade-BIGO37U3.js.map
@@ -29,7 +29,6 @@ import "../chunk-NSITFOCJ.js";
29
29
  import "../chunk-TRGTKX5E.js";
30
30
  import "../chunk-UXVWEX5L.js";
31
31
  import "../chunk-7O3Y4PPD.js";
32
- import "../chunk-PZ5AY32C.js";
33
32
 
34
33
  // src/with-lookup/reduce/active.ts
35
34
  function withReduce() {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/with-lookup/reduce/active.ts"],"sourcesContent":["/**\n * Active aggregate strategy factory. Calling `withReduce()` returns\n * an `ReduceStrategy` whose methods construct real `Reduction` /\n * `GroupedQuery` instances and run the streaming reducer protocol.\n *\n * This module is only reachable through the `@noy-db/hub/reduce`\n * subpath — a consumer that never imports the subpath ships none of\n * this (ESM tree-shaking + hub's `\"sideEffects\": false`).\n */\n\nimport { Reduction, reduceRecords } from './reduction.js'\nimport type { ReduceSpec, ReduceResult } from './reduction.js'\nimport { GroupedQuery, GroupedQueryN } from './groupby.js'\nimport type { ReduceStrategy } from './strategy.js'\n\n/**\n * Build the default aggregate strategy. Pass into\n * `createNoydb({ reduceStrategy: withReduce() })` to light up\n * `.aggregate()` and `.groupBy()` on `Query` and `ScanBuilder`.\n *\n * @example\n * ```ts\n * import { createNoydb } from '@noy-db/hub'\n * import { withReduce, sum, count } from '@noy-db/hub/reduce'\n *\n * const db = await createNoydb({\n * store, user, secret,\n * reduceStrategy: withReduce(),\n * })\n *\n * const totals = invoices.query()\n * .where('status', '==', 'paid')\n * .groupBy('clientId')\n * .aggregate({ amount: sum('amount'), n: count() })\n * .run()\n * ```\n */\nexport function withReduce(): ReduceStrategy {\n return {\n aggregate(executeRecords, spec, upstreams) {\n return new Reduction(executeRecords, spec as unknown as ReduceSpec, upstreams) as unknown as Reduction<ReduceResult<typeof spec>>\n },\n groupBy(executeRecords, field, upstreams, dictLabelResolver, via) {\n return new GroupedQuery(executeRecords, field, upstreams, dictLabelResolver, via)\n },\n groupByN(executeRecords, fields, upstreams, via) {\n return new GroupedQueryN(executeRecords, fields, upstreams, undefined, via)\n },\n async scanAggregate(iter, spec) {\n const collected: unknown[] = []\n for await (const record of iter) collected.push(record)\n return reduceRecords(collected, spec as unknown as ReduceSpec) as unknown as ReduceResult<typeof spec>\n },\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCO,SAAS,aAA6B;AAC3C,SAAO;AAAA,IACL,UAAU,gBAAgB,MAAM,WAAW;AACzC,aAAO,IAAI,UAAU,gBAAgB,MAA+B,SAAS;AAAA,IAC/E;AAAA,IACA,QAAQ,gBAAgB,OAAO,WAAW,mBAAmB,KAAK;AAChE,aAAO,IAAI,aAAa,gBAAgB,OAAO,WAAW,mBAAmB,GAAG;AAAA,IAClF;AAAA,IACA,SAAS,gBAAgB,QAAQ,WAAW,KAAK;AAC/C,aAAO,IAAI,cAAc,gBAAgB,QAAQ,WAAW,QAAW,GAAG;AAAA,IAC5E;AAAA,IACA,MAAM,cAAc,MAAM,MAAM;AAC9B,YAAM,YAAuB,CAAC;AAC9B,uBAAiB,UAAU,KAAM,WAAU,KAAK,MAAM;AACtD,aAAO,cAAc,WAAW,IAA6B;AAAA,IAC/D;AAAA,EACF;AACF;","names":[]}
1
+ {"version":3,"sources":["../../src/with-lookup/reduce/active.ts"],"sourcesContent":["/**\n * Active aggregate strategy factory. Calling `withReduce()` returns\n * an `ReduceStrategy` whose methods construct real `Reduction` /\n * `GroupedQuery` instances and run the streaming reducer protocol.\n *\n * This module is only reachable through the `@noy-db/hub/reduce`\n * subpath — a consumer that never imports the subpath ships none of\n * this (ESM tree-shaking + hub's `\"sideEffects\": false`).\n */\n\nimport { Reduction, reduceRecords } from './reduction.js'\nimport type { ReduceSpec, ReduceResult } from './reduction.js'\nimport { GroupedQuery, GroupedQueryN } from './groupby.js'\nimport type { ReduceStrategy } from './strategy.js'\n\n/**\n * Build the default aggregate strategy. Pass into\n * `createNoydb({ reduceStrategy: withReduce() })` to light up\n * `.aggregate()` and `.groupBy()` on `Query` and `ScanBuilder`.\n *\n * @example\n * ```ts\n * import { createNoydb } from '@noy-db/hub'\n * import { withReduce, sum, count } from '@noy-db/hub/reduce'\n *\n * const db = await createNoydb({\n * store, user, secret,\n * reduceStrategy: withReduce(),\n * })\n *\n * const totals = invoices.query()\n * .where('status', '==', 'paid')\n * .groupBy('clientId')\n * .aggregate({ amount: sum('amount'), n: count() })\n * .run()\n * ```\n */\nexport function withReduce(): ReduceStrategy {\n return {\n aggregate(executeRecords, spec, upstreams) {\n return new Reduction(executeRecords, spec as unknown as ReduceSpec, upstreams) as unknown as Reduction<ReduceResult<typeof spec>>\n },\n groupBy(executeRecords, field, upstreams, dictLabelResolver, via) {\n return new GroupedQuery(executeRecords, field, upstreams, dictLabelResolver, via)\n },\n groupByN(executeRecords, fields, upstreams, via) {\n return new GroupedQueryN(executeRecords, fields, upstreams, undefined, via)\n },\n async scanAggregate(iter, spec) {\n const collected: unknown[] = []\n for await (const record of iter) collected.push(record)\n return reduceRecords(collected, spec as unknown as ReduceSpec) as unknown as ReduceResult<typeof spec>\n },\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCO,SAAS,aAA6B;AAC3C,SAAO;AAAA,IACL,UAAU,gBAAgB,MAAM,WAAW;AACzC,aAAO,IAAI,UAAU,gBAAgB,MAA+B,SAAS;AAAA,IAC/E;AAAA,IACA,QAAQ,gBAAgB,OAAO,WAAW,mBAAmB,KAAK;AAChE,aAAO,IAAI,aAAa,gBAAgB,OAAO,WAAW,mBAAmB,GAAG;AAAA,IAClF;AAAA,IACA,SAAS,gBAAgB,QAAQ,WAAW,KAAK;AAC/C,aAAO,IAAI,cAAc,gBAAgB,QAAQ,WAAW,QAAW,GAAG;AAAA,IAC5E;AAAA,IACA,MAAM,cAAc,MAAM,MAAM;AAC9B,YAAM,YAAuB,CAAC;AAC9B,uBAAiB,UAAU,KAAM,WAAU,KAAK,MAAM;AACtD,aAAO,cAAc,WAAW,IAA6B;AAAA,IAC/D;AAAA,EACF;AACF;","names":[]}
@@ -2,12 +2,12 @@ import {
2
2
  persistClassifiedMarker,
3
3
  persistSatelliteMarker,
4
4
  persistSchemaIfNeeded
5
- } from "./chunk-2Z47NMFK.js";
5
+ } from "./chunk-WZW37ZHL.js";
6
6
  import "./chunk-ZVF37PKE.js";
7
7
  import "./chunk-BBWVXF57.js";
8
8
  import "./chunk-EPFF7LOX.js";
9
9
  import "./chunk-GM4IM7TC.js";
10
- import "./chunk-URHRIAV6.js";
10
+ import "./chunk-REDOOY2Q.js";
11
11
  import "./chunk-Y2NBBT6K.js";
12
12
  import "./chunk-WWNYSV7S.js";
13
13
  import "./chunk-GHVIKOHT.js";
@@ -23,10 +23,9 @@ import "./chunk-LP7BEXCT.js";
23
23
  import "./chunk-SL3JAAKN.js";
24
24
  import "./chunk-N4CHCXDL.js";
25
25
  import "./chunk-7O3Y4PPD.js";
26
- import "./chunk-PZ5AY32C.js";
27
26
  export {
28
27
  persistClassifiedMarker,
29
28
  persistSatelliteMarker,
30
29
  persistSchemaIfNeeded
31
30
  };
32
- //# sourceMappingURL=register-AEOOGKNO.js.map
31
+ //# sourceMappingURL=register-7OJWAWT5.js.map
@@ -2,8 +2,7 @@ import {
2
2
  OverlayedViewRegistry
3
3
  } from "./chunk-Q2PU57HC.js";
4
4
  import "./chunk-7O3Y4PPD.js";
5
- import "./chunk-PZ5AY32C.js";
6
5
  export {
7
6
  OverlayedViewRegistry
8
7
  };
9
- //# sourceMappingURL=registry-SKSOUXNF.js.map
8
+ //# sourceMappingURL=registry-23WF3TGH.js.map
@@ -2,8 +2,7 @@ import {
2
2
  GuardRegistry
3
3
  } from "./chunk-DGOZ4UZD.js";
4
4
  import "./chunk-7O3Y4PPD.js";
5
- import "./chunk-PZ5AY32C.js";
6
5
  export {
7
6
  GuardRegistry
8
7
  };
9
- //# sourceMappingURL=registry-SHMGHEK4.js.map
8
+ //# sourceMappingURL=registry-4AYVUNXK.js.map