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

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 +108 -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-BWXGSSFX.js → chunk-4SZMZAYN.js} +79 -16
  20. package/dist/chunk-4SZMZAYN.js.map +1 -0
  21. package/dist/{chunk-PQKG5AHH.js → chunk-6X6SEMEE.js} +4 -2
  22. package/dist/{chunk-PQKG5AHH.js.map → chunk-6X6SEMEE.js.map} +1 -1
  23. package/dist/{chunk-E2MYJGSG.js → chunk-AMODH7AU.js} +2 -2
  24. package/dist/{chunk-B2ZSGYSF.js → chunk-B2KCRDJM.js} +3 -3
  25. package/dist/{chunk-TO3EQ7HF.js → chunk-BLN54W3L.js} +2 -2
  26. package/dist/{chunk-IHFXR2VQ.js → chunk-BOBFL5TW.js} +2 -2
  27. package/dist/{chunk-ZVCC36XQ.js → chunk-DRB6IHPS.js} +55 -55
  28. package/dist/{chunk-AJQY44CE.js → chunk-EKVNVJVV.js} +3 -20
  29. package/dist/chunk-EKVNVJVV.js.map +1 -0
  30. package/dist/{chunk-ZR2YMODS.js → chunk-EKZ6VZYF.js} +2 -2
  31. package/dist/{chunk-RTYJRFQO.js → chunk-EWPRPP3M.js} +1 -1
  32. package/dist/{chunk-VGICZPVE.js → chunk-FUJSIP4K.js} +2 -2
  33. package/dist/{chunk-PKJ43CMD.js → chunk-NLOLF6LD.js} +2 -2
  34. package/dist/{chunk-SXCYYMVS.js → chunk-NOSRK3ZZ.js} +5 -5
  35. package/dist/{chunk-COTPDJR5.js → chunk-OMB2ZKIT.js} +8 -8
  36. package/dist/{chunk-Y4MJQ2UG.js → chunk-QQ2YMQZU.js} +2 -2
  37. package/dist/{chunk-URHRIAV6.js → chunk-REDOOY2Q.js} +2 -2
  38. package/dist/chunk-REDOOY2Q.js.map +1 -0
  39. package/dist/{chunk-YCXICMOY.js → chunk-RJ7NN2UR.js} +2 -2
  40. package/dist/{chunk-PDD75NUZ.js → chunk-SMH6SRX7.js} +2 -2
  41. package/dist/{chunk-QHW35ZON.js → chunk-TGPST6FK.js} +2 -2
  42. package/dist/{chunk-BMELYFHU.js → chunk-V2PNPF6J.js} +3 -3
  43. package/dist/{chunk-BERJ4AWW.js → chunk-VGXZT72I.js} +2 -2
  44. package/dist/{chunk-2Z47NMFK.js → chunk-WZW37ZHL.js} +2 -2
  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-Y53CQHZK.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-HDINK5QW.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-ZVCC36XQ.js.map → chunk-DRB6IHPS.js.map} +0 -0
  190. /package/dist/{chunk-ZR2YMODS.js.map → chunk-EKZ6VZYF.js.map} +0 -0
  191. /package/dist/{chunk-RTYJRFQO.js.map → chunk-EWPRPP3M.js.map} +0 -0
  192. /package/dist/{chunk-VGICZPVE.js.map → chunk-FUJSIP4K.js.map} +0 -0
  193. /package/dist/{chunk-PKJ43CMD.js.map → chunk-NLOLF6LD.js.map} +0 -0
  194. /package/dist/{chunk-SXCYYMVS.js.map → chunk-NOSRK3ZZ.js.map} +0 -0
  195. /package/dist/{chunk-COTPDJR5.js.map → chunk-OMB2ZKIT.js.map} +0 -0
  196. /package/dist/{chunk-Y4MJQ2UG.js.map → chunk-QQ2YMQZU.js.map} +0 -0
  197. /package/dist/{chunk-YCXICMOY.js.map → chunk-RJ7NN2UR.js.map} +0 -0
  198. /package/dist/{chunk-PDD75NUZ.js.map → chunk-SMH6SRX7.js.map} +0 -0
  199. /package/dist/{chunk-QHW35ZON.js.map → chunk-TGPST6FK.js.map} +0 -0
  200. /package/dist/{chunk-BMELYFHU.js.map → chunk-V2PNPF6J.js.map} +0 -0
  201. /package/dist/{chunk-BERJ4AWW.js.map → chunk-VGXZT72I.js.map} +0 -0
  202. /package/dist/{chunk-2Z47NMFK.js.map → chunk-WZW37ZHL.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-Y53CQHZK.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-HDINK5QW.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
@@ -201,7 +201,7 @@ var engineCtx = (ctx) => ({
201
201
  function withClassified() {
202
202
  return {
203
203
  async reveal(ctx, id, field) {
204
- const { revealSealedField } = await import("./reveal-DDQBDWPM.js");
204
+ const { revealSealedField } = await import("./reveal-IMGQ2EE5.js");
205
205
  const value = await revealSealedField({
206
206
  collection: ctx.collection,
207
207
  encrypted: ctx.encrypted,
@@ -213,26 +213,26 @@ function withClassified() {
213
213
  return value;
214
214
  },
215
215
  async verify(ctx, id, field, candidate) {
216
- const { verifyDigestField } = await import("./verify-JBXCAGDL.js");
216
+ const { verifyDigestField } = await import("./verify-KOV2G5D6.js");
217
217
  const verdict = await verifyDigestField(engineCtx(ctx), id, field, candidate, policyOf(ctx.spec));
218
218
  await ctx.onAccess?.("verify", id);
219
219
  return verdict;
220
220
  },
221
221
  async verifyText(ctx, id, field, candidate) {
222
- const { verifyTextField } = await import("./verify-JBXCAGDL.js");
222
+ const { verifyTextField } = await import("./verify-KOV2G5D6.js");
223
223
  const verdict = await verifyTextField(engineCtx(ctx), id, field, candidate, ctx.spec.verifyNormalize ?? "password");
224
224
  await ctx.onAccess?.("verify", id);
225
225
  return verdict;
226
226
  },
227
227
  async matchGroup(ctx, id, answers, opts) {
228
- const { matchGroupFields } = await import("./verify-JBXCAGDL.js");
228
+ const { matchGroupFields } = await import("./verify-KOV2G5D6.js");
229
229
  const members = (ctx.groupMembers ?? []).map((m) => ({ field: m.field, policy: policyOf(m.spec) }));
230
230
  const result = await matchGroupFields(engineCtx(ctx), id, answers, members, opts);
231
231
  await ctx.onAccess?.("verify", id);
232
232
  return result;
233
233
  },
234
234
  async computeTarget(ctx, field, candidate, costByte) {
235
- const { computeBidxTarget } = await import("./find-LC7P63MX.js");
235
+ const { computeBidxTarget } = await import("./find-2ABFCZX4.js");
236
236
  const dek = await ctx.getDEK();
237
237
  return computeBidxTarget(candidate, policyOf(ctx.spec).normalize, dek, ctx.collection, field, costByte);
238
238
  }
@@ -244,4 +244,4 @@ export {
244
244
  classified,
245
245
  withClassified
246
246
  };
247
- //# sourceMappingURL=chunk-5FUULQ6F.js.map
247
+ //# sourceMappingURL=chunk-2HVILGVR.js.map
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  assemblePodContainer,
6
6
  buildExtractedPartitionWrapper
7
- } from "./chunk-PKJ43CMD.js";
7
+ } from "./chunk-NLOLF6LD.js";
8
8
  import {
9
9
  BLOB_CHUNKS_COLLECTION,
10
10
  BLOB_COLLECTION,
@@ -494,4 +494,4 @@ export {
494
494
  extractPartition,
495
495
  extractPartitionCore
496
496
  };
497
- //# sourceMappingURL=chunk-DJ3LNNZQ.js.map
497
+ //# sourceMappingURL=chunk-3LK2XZCW.js.map
@@ -11,7 +11,7 @@ import {
11
11
  import {
12
12
  derivePersistedSchema,
13
13
  isZod4Schema
14
- } from "./chunk-URHRIAV6.js";
14
+ } from "./chunk-REDOOY2Q.js";
15
15
  import {
16
16
  loadPersistedSchema
17
17
  } from "./chunk-WWNYSV7S.js";
@@ -85,20 +85,6 @@ function resolveFieldMeta(key, inputs) {
85
85
  ...order !== void 0 ? { order } : {}
86
86
  };
87
87
  }
88
-
89
- // src/with-shape/introspection/describe.ts
90
- var ZOD_META_KEYS = /* @__PURE__ */ new Set([
91
- "label",
92
- "description",
93
- "unit",
94
- "semanticType",
95
- "sensitivity",
96
- "aggregate",
97
- "aliases",
98
- "displayFor",
99
- "group",
100
- "order"
101
- ]);
102
88
  function schemaFieldKeys(schema) {
103
89
  let s = schema;
104
90
  for (let depth = 0; depth < 10; depth++) {
@@ -122,6 +108,30 @@ function schemaFieldKeys(schema) {
122
108
  }
123
109
  return void 0;
124
110
  }
111
+ function validateFieldMetaAtRegistration(input) {
112
+ if (input.fieldMeta === void 0) return;
113
+ const validatorKeys = schemaFieldKeys(input.schema);
114
+ if (validatorKeys === void 0) return;
115
+ validateFieldMetaKeys(
116
+ input.collection,
117
+ input.fieldMeta,
118
+ /* @__PURE__ */ new Set([...validatorKeys, ...input.configKeys])
119
+ );
120
+ }
121
+
122
+ // src/with-shape/introspection/describe.ts
123
+ var ZOD_META_KEYS = /* @__PURE__ */ new Set([
124
+ "label",
125
+ "description",
126
+ "unit",
127
+ "semanticType",
128
+ "sensitivity",
129
+ "aggregate",
130
+ "aliases",
131
+ "displayFor",
132
+ "group",
133
+ "order"
134
+ ]);
125
135
  async function deriveZodFields(schema) {
126
136
  const envelope = await derivePersistedSchema(schema);
127
137
  if (!envelope.jsonSchema) return {};
@@ -896,6 +906,23 @@ function computedEntryParts(entry) {
896
906
  if (typeof entry === "function") return { fn: entry, mode: "materialized" };
897
907
  return { fn: entry.fn, ...entry.deps !== void 0 ? { deps: entry.deps } : {}, mode: entry.mode ?? "materialized" };
898
908
  }
909
+ function matchTargetFieldNames(opts) {
910
+ const declared = [];
911
+ const virtual = [];
912
+ for (const [field, entry] of Object.entries(opts.computed ?? {})) {
913
+ declared.push(field);
914
+ const parts = computedEntryParts(entry);
915
+ if (parts.mode === "virtual") virtual.push(field);
916
+ }
917
+ for (const [field, spec] of Object.entries(opts.viaFields ?? {})) {
918
+ declared.push(field);
919
+ const descriptors = spec.descriptors ?? [];
920
+ for (const d of descriptors) {
921
+ if (d._viaBrand === "computed" && d.mode === "virtual") virtual.push(field);
922
+ }
923
+ }
924
+ return { declared, virtual };
925
+ }
899
926
  function unifyComputedFields(opts, viaComputedFields) {
900
927
  return { ...opts.computed ?? {}, ...viaComputedFields ?? {} };
901
928
  }
@@ -1046,6 +1073,41 @@ function resolveCollectionConfig(opts) {
1046
1073
  `Collection "${opts.name}": embeddings are not supported on CRDT collections (L2). Use a non-CRDT collection for semantic search.`
1047
1074
  );
1048
1075
  }
1076
+ {
1077
+ const virtualFieldNames = matchTargetFieldNames({
1078
+ computed: opts.computed,
1079
+ viaFields: opts.viaFields
1080
+ }).virtual;
1081
+ if (virtualFieldNames.length > 0) {
1082
+ const virtualSet = new Set(virtualFieldNames);
1083
+ for (const reg of opts.materializedViewSource?.registry().mvsForSource(opts.name) ?? []) {
1084
+ const spec = reg.spec;
1085
+ const fields = spec.groupBy === void 0 ? [] : typeof spec.groupBy === "string" ? [spec.groupBy] : spec.groupBy;
1086
+ for (const f of fields) {
1087
+ if (!virtualSet.has(f)) continue;
1088
+ throw new ValidationError(
1089
+ `materialized view "${spec.name ?? reg.outputCollection}": groupBy names "${f}", which "${opts.name}" declares as a VIRTUAL computed field. Virtual fields are evaluated on read and never stored, so every row would bucket under an undefined key and the aggregate would be silently WRONG rather than an error. Declare it as \`mode: 'materialized'\` (stored) or group on a stored field.`
1090
+ );
1091
+ }
1092
+ }
1093
+ }
1094
+ }
1095
+ validateFieldMetaAtRegistration({
1096
+ collection: opts.name,
1097
+ schema: opts.schema,
1098
+ fieldMeta: opts.fieldMeta,
1099
+ configKeys: Object.keys({
1100
+ ...opts.moneyFields,
1101
+ ...opts.dictKeyFields,
1102
+ ...opts.declaredRefs,
1103
+ ...opts.computed,
1104
+ ...opts.i18nFields,
1105
+ ...opts.lookupFields,
1106
+ ...opts.blobFields,
1107
+ ...opts.classifiedFields,
1108
+ ...opts.viaFields
1109
+ })
1110
+ });
1049
1111
  if (opts.sensitive && opts.sensitive.length > 0 && opts.crdt) {
1050
1112
  throw new Error(
1051
1113
  `Collection "${opts.name}": sensitive (structural group-encryption) is not supported on CRDT collections \u2014 the CRDT write path bypasses per-field sealing, so the fields would be stored in the ordinary encrypted body with no \`_sealed\` slot and no per-field key. Use a non-CRDT collection for sealed fields.`
@@ -1579,6 +1641,7 @@ export {
1579
1641
  mergeViaFields,
1580
1642
  guardReconcileCollisions,
1581
1643
  computedEntryParts,
1644
+ matchTargetFieldNames,
1582
1645
  resolveVirtualMoneyFields,
1583
1646
  collectKnownFieldNames,
1584
1647
  resolveComputedEdges,
@@ -1586,4 +1649,4 @@ export {
1586
1649
  DEFAULT_POSTURE,
1587
1650
  ViaGraph
1588
1651
  };
1589
- //# sourceMappingURL=chunk-BWXGSSFX.js.map
1652
+ //# sourceMappingURL=chunk-4SZMZAYN.js.map