@noy-db/hub 0.2.0-pre.7 → 0.2.0-pre.8

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/dist/aggregate/index.cjs.map +1 -1
  2. package/dist/aggregate/index.js +2 -2
  3. package/dist/attestation/index.cjs.map +1 -1
  4. package/dist/attestation/index.d.cts +2 -2
  5. package/dist/attestation/index.d.ts +2 -2
  6. package/dist/attestation/index.js +5 -5
  7. package/dist/blobs/index.cjs.map +1 -1
  8. package/dist/blobs/index.d.cts +3 -3
  9. package/dist/blobs/index.d.ts +3 -3
  10. package/dist/blobs/index.js +4 -4
  11. package/dist/bundle/index.cjs +95 -15
  12. package/dist/bundle/index.cjs.map +1 -1
  13. package/dist/bundle/index.d.cts +4 -4
  14. package/dist/bundle/index.d.ts +4 -4
  15. package/dist/bundle/index.js +8 -8
  16. package/dist/{chunk-AYRTGXF3.js → chunk-22DWZL57.js} +62 -26
  17. package/dist/chunk-22DWZL57.js.map +1 -0
  18. package/dist/{chunk-4EOVWJL6.js → chunk-2GLDA55J.js} +2 -2
  19. package/dist/{chunk-CBHPW77B.js → chunk-2WUSG3IT.js} +2 -2
  20. package/dist/{chunk-WBUG3324.js → chunk-3BFJOWSU.js} +2 -2
  21. package/dist/{chunk-7IH5FDXD.js → chunk-3YPCK6JX.js} +5 -5
  22. package/dist/{chunk-SYOSRZN4.js → chunk-53XBRIRT.js} +4 -4
  23. package/dist/{chunk-UPBZ7NVY.js → chunk-5T22KDPN.js} +4 -4
  24. package/dist/{chunk-KK44CQ5B.js → chunk-5XHKQ56N.js} +2 -2
  25. package/dist/{chunk-3O5FNO5O.js → chunk-6774ZOQ7.js} +106 -50
  26. package/dist/chunk-6774ZOQ7.js.map +1 -0
  27. package/dist/chunk-6STK5TQP.js +139 -0
  28. package/dist/chunk-6STK5TQP.js.map +1 -0
  29. package/dist/{chunk-REQJJIPP.js → chunk-B6PB7JLN.js} +23 -1
  30. package/dist/{chunk-REQJJIPP.js.map → chunk-B6PB7JLN.js.map} +1 -1
  31. package/dist/{chunk-2TXMTYWZ.js → chunk-BVRYKATC.js} +3 -3
  32. package/dist/{chunk-6ILPGZXZ.js → chunk-DE6GKS6G.js} +2 -2
  33. package/dist/{chunk-TS4FQPDD.js → chunk-DFMLEQZB.js} +2 -2
  34. package/dist/{chunk-3XCXUJTM.js → chunk-DJHHA6XH.js} +2 -2
  35. package/dist/{chunk-LSY46G55.js → chunk-DL3HWOQ5.js} +3 -3
  36. package/dist/{chunk-6MXGU2PW.js → chunk-DO7C2TOG.js} +2 -2
  37. package/dist/{chunk-N4CDTRDH.js → chunk-DONMZAD2.js} +3 -3
  38. package/dist/{chunk-HNC55FLJ.js → chunk-F3GDRNUT.js} +3 -3
  39. package/dist/{chunk-VZOZ3DBN.js → chunk-H2X3ISXG.js} +3 -3
  40. package/dist/{chunk-XZCBBZLS.js → chunk-HNRHLRDC.js} +2 -2
  41. package/dist/{chunk-22ESLVUM.js → chunk-I5FOWO4J.js} +2 -2
  42. package/dist/{chunk-O3JCRQT3.js → chunk-JWRVQKRZ.js} +3 -3
  43. package/dist/{chunk-CSHY53CZ.js → chunk-K3DK3NU5.js} +2 -2
  44. package/dist/{chunk-BNUCCUES.js → chunk-ML236QKC.js} +2 -2
  45. package/dist/{chunk-GZIDTXC4.js → chunk-NONAAENK.js} +2 -2
  46. package/dist/{chunk-JZDA2SRB.js → chunk-O3VZPBZG.js} +4 -4
  47. package/dist/{chunk-PJKGXUMG.js → chunk-OQ6PIGHA.js} +2 -2
  48. package/dist/{chunk-QYO6I7KK.js → chunk-PE2FR4J3.js} +3 -3
  49. package/dist/{chunk-YAMTXW77.js → chunk-PP6W64Y3.js} +2 -2
  50. package/dist/{chunk-HNFXKQD7.js → chunk-PX35GA7L.js} +4 -4
  51. package/dist/{chunk-OXCFFRF3.js → chunk-QEILDE6R.js} +2 -2
  52. package/dist/{chunk-4YVVF6JN.js → chunk-QODLLGQ7.js} +4 -4
  53. package/dist/{chunk-ASFE2X62.js → chunk-RAZ4OVLL.js} +2 -2
  54. package/dist/{chunk-WM5GFORS.js → chunk-SYMWGEET.js} +2 -2
  55. package/dist/{chunk-SLJQIBT7.js → chunk-T7JEBOGN.js} +2 -2
  56. package/dist/{chunk-OA6HE2RW.js → chunk-TFBP23BX.js} +3 -3
  57. package/dist/{chunk-GI6S5ZF2.js → chunk-U26HQ6KJ.js} +2 -2
  58. package/dist/{chunk-WMKCAN4H.js → chunk-VTKGMEPP.js} +2 -2
  59. package/dist/{chunk-BRZFN354.js → chunk-WPLVTJ5D.js} +3 -3
  60. package/dist/{chunk-DCP4L4SH.js → chunk-XJFLDA7A.js} +2 -2
  61. package/dist/{chunk-BE5ZALMB.js → chunk-ZYWZWG6G.js} +4 -4
  62. package/dist/consent/index.cjs.map +1 -1
  63. package/dist/consent/index.d.cts +3 -3
  64. package/dist/consent/index.d.ts +3 -3
  65. package/dist/consent/index.js +3 -3
  66. package/dist/{crypto-TRZ5BJMY.js → crypto-HTZ4FJOP.js} +3 -3
  67. package/dist/{delegation-TLZTK2XW.js → delegation-RI54P6I5.js} +5 -5
  68. package/dist/derivations/index.cjs.map +1 -1
  69. package/dist/derivations/index.d.cts +4 -4
  70. package/dist/derivations/index.d.ts +4 -4
  71. package/dist/derivations/index.js +4 -4
  72. package/dist/{dev-unlock-L3z34v0J.d.cts → dev-unlock-M4VAWNq_.d.cts} +1 -1
  73. package/dist/{dev-unlock-ClAEZQC4.d.ts → dev-unlock-p3ysikWP.d.ts} +1 -1
  74. package/dist/executor-5PNY7LGW.js +8 -0
  75. package/dist/executor-B4QIYGZX.js +8 -0
  76. package/dist/executor-BWXXDQ7K.js +11 -0
  77. package/dist/guards/index.cjs.map +1 -1
  78. package/dist/guards/index.d.cts +4 -4
  79. package/dist/guards/index.d.ts +4 -4
  80. package/dist/guards/index.js +3 -3
  81. package/dist/{hash-M6-JI3Yu.d.cts → hash-BPsYPcv_.d.cts} +1 -1
  82. package/dist/{hash-B3lV6lw3.d.ts → hash-C1GtiOhR.d.ts} +1 -1
  83. package/dist/history/index.cjs.map +1 -1
  84. package/dist/history/index.d.cts +4 -4
  85. package/dist/history/index.d.ts +4 -4
  86. package/dist/history/index.js +4 -4
  87. package/dist/i18n/index.cjs +217 -22
  88. package/dist/i18n/index.cjs.map +1 -1
  89. package/dist/i18n/index.d.cts +3 -3
  90. package/dist/i18n/index.d.ts +3 -3
  91. package/dist/i18n/index.js +15 -4
  92. package/dist/i18n/index.js.map +1 -1
  93. package/dist/{index-vB43MAt4.d.cts → index-4fBVt8j9.d.cts} +21 -1
  94. package/dist/{index-CmWQyC4e.d.ts → index-D8I_pyJD.d.ts} +21 -1
  95. package/dist/index.cjs +286 -33
  96. package/dist/index.cjs.map +1 -1
  97. package/dist/index.d.cts +11 -11
  98. package/dist/index.d.ts +11 -11
  99. package/dist/index.js +48 -38
  100. package/dist/index.js.map +1 -1
  101. package/dist/indexing/index.cjs.map +1 -1
  102. package/dist/indexing/index.js +2 -2
  103. package/dist/issue-VGDPP4B5.js +12 -0
  104. package/dist/{ledger-SQVVE2DR.js → ledger-TMRZYNVJ.js} +4 -4
  105. package/dist/materialized-views/index.cjs.map +1 -1
  106. package/dist/materialized-views/index.d.cts +5 -5
  107. package/dist/materialized-views/index.d.ts +5 -5
  108. package/dist/materialized-views/index.js +6 -6
  109. package/dist/noydb-LZBH3XDK.js +34 -0
  110. package/dist/overlay-views/index.cjs.map +1 -1
  111. package/dist/overlay-views/index.d.cts +4 -4
  112. package/dist/overlay-views/index.d.ts +4 -4
  113. package/dist/overlay-views/index.js +4 -4
  114. package/dist/periods/index.cjs.map +1 -1
  115. package/dist/periods/index.d.cts +3 -3
  116. package/dist/periods/index.d.ts +3 -3
  117. package/dist/periods/index.js +4 -4
  118. package/dist/{public-envelope-BXPXMN3U.js → public-envelope-BW6OXORV.js} +3 -3
  119. package/dist/query/index.cjs.map +1 -1
  120. package/dist/query/index.d.cts +1 -1
  121. package/dist/query/index.d.ts +1 -1
  122. package/dist/query/index.js +3 -3
  123. package/dist/registry-3QP3YKQS.js +8 -0
  124. package/dist/{registry-4R4IURUM.js → registry-OJIOSBV6.js} +3 -3
  125. package/dist/registry-USRVT6YF.js +8 -0
  126. package/dist/{revoke-Y7UDOXGH.js → revoke-JCC7N56X.js} +5 -5
  127. package/dist/session/index.cjs.map +1 -1
  128. package/dist/session/index.d.cts +4 -4
  129. package/dist/session/index.d.ts +4 -4
  130. package/dist/session/index.js +3 -3
  131. package/dist/shadow/index.cjs.map +1 -1
  132. package/dist/shadow/index.d.cts +3 -3
  133. package/dist/shadow/index.d.ts +3 -3
  134. package/dist/shadow/index.js +2 -2
  135. package/dist/{signer-UD2ZSVDJ.js → signer-72QAUSVW.js} +4 -4
  136. package/dist/snapshots/index.cjs.map +1 -1
  137. package/dist/snapshots/index.d.cts +3 -3
  138. package/dist/snapshots/index.d.ts +3 -3
  139. package/dist/snapshots/index.js +3 -3
  140. package/dist/{stale-F4V5E7ZK.js → stale-6ZDBTQT7.js} +2 -2
  141. package/dist/store/index.cjs.map +1 -1
  142. package/dist/store/index.d.cts +3 -3
  143. package/dist/store/index.d.ts +3 -3
  144. package/dist/store/index.js +2 -2
  145. package/dist/sync/index.cjs.map +1 -1
  146. package/dist/sync/index.d.cts +2 -2
  147. package/dist/sync/index.d.ts +2 -2
  148. package/dist/sync/index.js +3 -3
  149. package/dist/team/index.cjs.map +1 -1
  150. package/dist/team/index.d.cts +3 -3
  151. package/dist/team/index.d.ts +3 -3
  152. package/dist/team/index.js +7 -7
  153. package/dist/tx/index.cjs.map +1 -1
  154. package/dist/tx/index.d.cts +3 -3
  155. package/dist/tx/index.d.ts +3 -3
  156. package/dist/tx/index.js +3 -3
  157. package/dist/{types-DT7cXRHq.d.ts → types-DGU60JDt.d.ts} +174 -5
  158. package/dist/{types-r-y7TIqj.d.cts → types-DjunxzJa.d.cts} +174 -5
  159. package/dist/{ulid-Dt55yn4s.d.ts → ulid-BFJkYRRW.d.ts} +1 -1
  160. package/dist/{ulid-BkW3mLlz.d.cts → ulid-DPeuPgi3.d.cts} +1 -1
  161. package/dist/util/index.cjs.map +1 -1
  162. package/dist/util/index.js +1 -1
  163. package/dist/{with-derivation-DB63Po2m.d.cts → with-derivation-Df0kMlED.d.cts} +1 -1
  164. package/dist/{with-derivation-D_Ids_H6.d.ts → with-derivation-DfOpKjFw.d.ts} +1 -1
  165. package/dist/{with-guard-BJwdc0s6.d.ts → with-guard-0KksDtSR.d.ts} +1 -1
  166. package/dist/{with-guard-BHThLppa.d.cts → with-guard-C6W5RVrH.d.cts} +1 -1
  167. package/dist/{with-materialized-view-D-CRVSDX.d.ts → with-materialized-view-BiasFcYx.d.ts} +1 -1
  168. package/dist/{with-materialized-view-BJmJ-FrO.d.cts → with-materialized-view-BmDKyHrm.d.cts} +1 -1
  169. package/dist/{with-overlayed-view-zePNtUSq.d.cts → with-overlayed-view-CA66vhHz.d.cts} +1 -1
  170. package/dist/{with-overlayed-view-CNf6GbDG.d.ts → with-overlayed-view-CQViuko_.d.ts} +1 -1
  171. package/package.json +5 -4
  172. package/dist/chunk-3O5FNO5O.js.map +0 -1
  173. package/dist/chunk-AYRTGXF3.js.map +0 -1
  174. package/dist/executor-HAVRTQN4.js +0 -11
  175. package/dist/executor-V3DKOADS.js +0 -8
  176. package/dist/executor-XO4M4243.js +0 -8
  177. package/dist/issue-EJKUQ6FA.js +0 -12
  178. package/dist/noydb-MK4UQ626.js +0 -34
  179. package/dist/registry-GPBLCHG7.js +0 -8
  180. package/dist/registry-ZON5HNIV.js +0 -8
  181. /package/dist/{chunk-4EOVWJL6.js.map → chunk-2GLDA55J.js.map} +0 -0
  182. /package/dist/{chunk-CBHPW77B.js.map → chunk-2WUSG3IT.js.map} +0 -0
  183. /package/dist/{chunk-WBUG3324.js.map → chunk-3BFJOWSU.js.map} +0 -0
  184. /package/dist/{chunk-7IH5FDXD.js.map → chunk-3YPCK6JX.js.map} +0 -0
  185. /package/dist/{chunk-SYOSRZN4.js.map → chunk-53XBRIRT.js.map} +0 -0
  186. /package/dist/{chunk-UPBZ7NVY.js.map → chunk-5T22KDPN.js.map} +0 -0
  187. /package/dist/{chunk-KK44CQ5B.js.map → chunk-5XHKQ56N.js.map} +0 -0
  188. /package/dist/{chunk-2TXMTYWZ.js.map → chunk-BVRYKATC.js.map} +0 -0
  189. /package/dist/{chunk-6ILPGZXZ.js.map → chunk-DE6GKS6G.js.map} +0 -0
  190. /package/dist/{chunk-TS4FQPDD.js.map → chunk-DFMLEQZB.js.map} +0 -0
  191. /package/dist/{chunk-3XCXUJTM.js.map → chunk-DJHHA6XH.js.map} +0 -0
  192. /package/dist/{chunk-LSY46G55.js.map → chunk-DL3HWOQ5.js.map} +0 -0
  193. /package/dist/{chunk-6MXGU2PW.js.map → chunk-DO7C2TOG.js.map} +0 -0
  194. /package/dist/{chunk-N4CDTRDH.js.map → chunk-DONMZAD2.js.map} +0 -0
  195. /package/dist/{chunk-HNC55FLJ.js.map → chunk-F3GDRNUT.js.map} +0 -0
  196. /package/dist/{chunk-VZOZ3DBN.js.map → chunk-H2X3ISXG.js.map} +0 -0
  197. /package/dist/{chunk-XZCBBZLS.js.map → chunk-HNRHLRDC.js.map} +0 -0
  198. /package/dist/{chunk-22ESLVUM.js.map → chunk-I5FOWO4J.js.map} +0 -0
  199. /package/dist/{chunk-O3JCRQT3.js.map → chunk-JWRVQKRZ.js.map} +0 -0
  200. /package/dist/{chunk-CSHY53CZ.js.map → chunk-K3DK3NU5.js.map} +0 -0
  201. /package/dist/{chunk-BNUCCUES.js.map → chunk-ML236QKC.js.map} +0 -0
  202. /package/dist/{chunk-GZIDTXC4.js.map → chunk-NONAAENK.js.map} +0 -0
  203. /package/dist/{chunk-JZDA2SRB.js.map → chunk-O3VZPBZG.js.map} +0 -0
  204. /package/dist/{chunk-PJKGXUMG.js.map → chunk-OQ6PIGHA.js.map} +0 -0
  205. /package/dist/{chunk-QYO6I7KK.js.map → chunk-PE2FR4J3.js.map} +0 -0
  206. /package/dist/{chunk-YAMTXW77.js.map → chunk-PP6W64Y3.js.map} +0 -0
  207. /package/dist/{chunk-HNFXKQD7.js.map → chunk-PX35GA7L.js.map} +0 -0
  208. /package/dist/{chunk-OXCFFRF3.js.map → chunk-QEILDE6R.js.map} +0 -0
  209. /package/dist/{chunk-4YVVF6JN.js.map → chunk-QODLLGQ7.js.map} +0 -0
  210. /package/dist/{chunk-ASFE2X62.js.map → chunk-RAZ4OVLL.js.map} +0 -0
  211. /package/dist/{chunk-WM5GFORS.js.map → chunk-SYMWGEET.js.map} +0 -0
  212. /package/dist/{chunk-SLJQIBT7.js.map → chunk-T7JEBOGN.js.map} +0 -0
  213. /package/dist/{chunk-OA6HE2RW.js.map → chunk-TFBP23BX.js.map} +0 -0
  214. /package/dist/{chunk-GI6S5ZF2.js.map → chunk-U26HQ6KJ.js.map} +0 -0
  215. /package/dist/{chunk-WMKCAN4H.js.map → chunk-VTKGMEPP.js.map} +0 -0
  216. /package/dist/{chunk-BRZFN354.js.map → chunk-WPLVTJ5D.js.map} +0 -0
  217. /package/dist/{chunk-DCP4L4SH.js.map → chunk-XJFLDA7A.js.map} +0 -0
  218. /package/dist/{chunk-BE5ZALMB.js.map → chunk-ZYWZWG6G.js.map} +0 -0
  219. /package/dist/{crypto-TRZ5BJMY.js.map → crypto-HTZ4FJOP.js.map} +0 -0
  220. /package/dist/{delegation-TLZTK2XW.js.map → delegation-RI54P6I5.js.map} +0 -0
  221. /package/dist/{executor-HAVRTQN4.js.map → executor-5PNY7LGW.js.map} +0 -0
  222. /package/dist/{executor-V3DKOADS.js.map → executor-B4QIYGZX.js.map} +0 -0
  223. /package/dist/{executor-XO4M4243.js.map → executor-BWXXDQ7K.js.map} +0 -0
  224. /package/dist/{issue-EJKUQ6FA.js.map → issue-VGDPP4B5.js.map} +0 -0
  225. /package/dist/{ledger-SQVVE2DR.js.map → ledger-TMRZYNVJ.js.map} +0 -0
  226. /package/dist/{noydb-MK4UQ626.js.map → noydb-LZBH3XDK.js.map} +0 -0
  227. /package/dist/{public-envelope-BXPXMN3U.js.map → public-envelope-BW6OXORV.js.map} +0 -0
  228. /package/dist/{registry-4R4IURUM.js.map → registry-3QP3YKQS.js.map} +0 -0
  229. /package/dist/{registry-GPBLCHG7.js.map → registry-OJIOSBV6.js.map} +0 -0
  230. /package/dist/{registry-ZON5HNIV.js.map → registry-USRVT6YF.js.map} +0 -0
  231. /package/dist/{revoke-Y7UDOXGH.js.map → revoke-JCC7N56X.js.map} +0 -0
  232. /package/dist/{signer-UD2ZSVDJ.js.map → signer-72QAUSVW.js.map} +0 -0
  233. /package/dist/{stale-F4V5E7ZK.js.map → stale-6ZDBTQT7.js.map} +0 -0
@@ -1,10 +1,10 @@
1
- import { aw as TxStrategy } from '../types-DT7cXRHq.js';
2
- export { ax as AmendmentTxOptions, ay as TxCollection, az as TxContext, aA as TxVault, aB as runTransaction } from '../types-DT7cXRHq.js';
1
+ import { aF as TxStrategy } from '../types-DGU60JDt.js';
2
+ export { aG as AmendmentTxOptions, aH as TxCollection, aI as TxContext, aJ as TxVault, aK as runTransaction } from '../types-DGU60JDt.js';
3
3
  import '../lazy-builder-7tIpFyWN.js';
4
4
  import '../predicate-BSAGEyu5.js';
5
5
  import '../strategy-DSTrsZ8t.js';
6
6
  import '../strategy-BSxFXGzb.js';
7
- import '../index-CmWQyC4e.js';
7
+ import '../index-D8I_pyJD.js';
8
8
  import '@noy-db/attestation';
9
9
 
10
10
  /**
package/dist/tx/index.js CHANGED
@@ -3,9 +3,9 @@ import {
3
3
  TxContext,
4
4
  TxVault,
5
5
  runTransaction
6
- } from "../chunk-OA6HE2RW.js";
6
+ } from "../chunk-TFBP23BX.js";
7
7
  import "../chunk-FZU343FL.js";
8
- import "../chunk-REQJJIPP.js";
8
+ import "../chunk-B6PB7JLN.js";
9
9
 
10
10
  // src/tx/dry-run.ts
11
11
  var SEP = " ";
@@ -43,7 +43,7 @@ async function runDryRun(db, fn) {
43
43
  const gctx = { existing: before, vault: facade, userId: v.userId, role: v.role };
44
44
  try {
45
45
  await registry.runChecks(op.collectionName, after, gctx);
46
- const { GuardExecutor } = await import("../executor-V3DKOADS.js");
46
+ const { GuardExecutor } = await import("../executor-5PNY7LGW.js");
47
47
  for (const g of guards) {
48
48
  await GuardExecutor.checkFrozenFields(g, op.id, before, after);
49
49
  }
@@ -1,7 +1,7 @@
1
1
  import { I as IndexStrategy, d as LazyQuery } from './lazy-builder-7tIpFyWN.js';
2
2
  import { b as AggregateSpec, A as AggregateStrategy } from './strategy-DSTrsZ8t.js';
3
3
  import { C as CrdtStrategy, a as CrdtMode, b as CrdtState } from './strategy-BSxFXGzb.js';
4
- import { N as NoydbError, Q as Query, av as RefRegistry, as as RefDescriptor, a6 as JoinableSource, ax as RefViolation, ay as ScanBuilder } from './index-CmWQyC4e.js';
4
+ import { N as NoydbError, Q as Query, aw as RefRegistry, at as RefDescriptor, a7 as JoinableSource, ay as RefViolation, az as ScanBuilder } from './index-D8I_pyJD.js';
5
5
  import { F as FieldClause, I as IndexDef, C as CollectionIndexes } from './predicate-BSAGEyu5.js';
6
6
  import { AttestationFieldSchema, RevocationList } from '@noy-db/attestation';
7
7
 
@@ -1644,6 +1644,51 @@ interface PeriodsStrategy {
1644
1644
  appendPeriodLedgerEntry(ledger: LedgerStore | null, actor: string, envelope: EncryptedEnvelope, periodName: string): Promise<void>;
1645
1645
  }
1646
1646
 
1647
+ /**
1648
+ * Per-layer i18n resolution policy.
1649
+ *
1650
+ * `onMissing` governs what happens when a multilingual field is resolved
1651
+ * to a target locale that is absent. It may be a single scalar policy or
1652
+ * a per-layer map, so a field can be lenient at the app read boundary but
1653
+ * strict inside a materialized view.
1654
+ *
1655
+ * Effective policy for layer `λ`:
1656
+ *
1657
+ * ```
1658
+ * explicit(λ) = typeof onMissing === 'object' ? onMissing[λ] : undefined
1659
+ * scalar = typeof onMissing === 'string' ? onMissing : undefined
1660
+ * policy(λ) = explicit(λ) ?? layerDefault(λ) ?? scalar ?? 'throw'
1661
+ * ```
1662
+ *
1663
+ * - `layerDefault('guard') = 'substitute'` — guards are lenient unless
1664
+ * EXPLICITLY overridden; they never inherit a scalar policy (a guard
1665
+ * reading a display value must not hard-fail on a missing locale).
1666
+ * - every other layer has no default, so it inherits the scalar, else
1667
+ * falls back to `'throw'` (today's behavior — zero breaking change).
1668
+ *
1669
+ * @public
1670
+ */
1671
+ type OnMissing = 'substitute' | 'null' | 'throw';
1672
+ /**
1673
+ * The contexts in which a multilingual field is resolved. Each can carry
1674
+ * its own `onMissing` policy.
1675
+ *
1676
+ * - `read` — ordinary app reads (`get`/`list`/query projection).
1677
+ * - `guard` — a guard callback reading a value.
1678
+ * - `join` — a joined record expanded onto a row.
1679
+ * - `mv` — materialized-view input.
1680
+ * - `derivation` — derivation input.
1681
+ * - `export` — bundle/public-envelope export.
1682
+ */
1683
+ type Layer = 'read' | 'guard' | 'join' | 'mv' | 'derivation' | 'export';
1684
+ /** Field-level policy: a single scalar, or a per-layer map. */
1685
+ type OnMissingPolicy = OnMissing | Partial<Record<Layer, OnMissing>>;
1686
+ /**
1687
+ * Resolve the effective `OnMissing` for a layer from a field's declared
1688
+ * policy. See module docs for the resolution rule.
1689
+ */
1690
+ declare function resolvePolicy(onMissing: OnMissingPolicy | undefined, layer: Layer): OnMissing;
1691
+
1647
1692
  /**
1648
1693
  * i18nText schema type —
1649
1694
  *
@@ -1685,6 +1730,37 @@ interface PeriodsStrategy {
1685
1730
  * Pluralization, RTL rendering, date/number formatting, per-locale CRDT
1686
1731
  * merging.
1687
1732
  */
1733
+
1734
+ /** Flatten an intersection into a single object literal for nicer hovers. */
1735
+ type Prettify<T> = {
1736
+ [K in keyof T]: T[K];
1737
+ } & {};
1738
+ /**
1739
+ * The stored shape of a multilingual field, inferred from its `required`
1740
+ * mode — so the compiler forces you to handle an absent optional locale
1741
+ * (`string | undefined`) instead of silently yielding `undefined`.
1742
+ *
1743
+ * Mirrors `i18nText({ languages, required })`:
1744
+ * - `'all'` (default) — every locale required: `{ th: string; en: string }`
1745
+ * - `'any'` — every locale optional: `{ th?: string; en?: string }`
1746
+ * (the "at least one present" guarantee is runtime-only — not expressible
1747
+ * in TypeScript — so each key is optional)
1748
+ * - `readonly L[]` — listed locales required, the rest optional:
1749
+ * `I18nMap<'th'|'en', ['th']>` → `{ th: string; en?: string }`
1750
+ *
1751
+ * @example
1752
+ * ```ts
1753
+ * type Lang = 'th' | 'en'
1754
+ * interface Contact {
1755
+ * name: I18nMap<Lang, 'any'> // { th?: string; en?: string }
1756
+ * legalName: I18nMap<Lang, ['th']> // { th: string; en?: string }
1757
+ * slug: I18nMap<Lang> // { th: string; en: string }
1758
+ * }
1759
+ * ```
1760
+ *
1761
+ * @public
1762
+ */
1763
+ type I18nMap<Langs extends string, Required extends 'all' | 'any' | readonly Langs[] = 'all'> = Required extends 'all' ? Record<Langs, string> : Required extends 'any' ? Partial<Record<Langs, string>> : Required extends readonly (infer R extends Langs)[] ? Prettify<Record<R, string> & Partial<Record<Exclude<Langs, R>, string>>> : never;
1688
1764
  /**
1689
1765
  * Options for `i18nText()`.
1690
1766
  *
@@ -1713,6 +1789,38 @@ interface I18nTextOptions {
1713
1789
  * before `put()` if a translator is configured. Default: `false`.
1714
1790
  */
1715
1791
  readonly autoTranslate?: boolean;
1792
+ /**
1793
+ * What to do when this field is resolved to a locale that is absent.
1794
+ * A single policy, or a per-layer map (read/guard/join/mv/derivation/
1795
+ * export). Default `'throw'` — today's behavior, zero breaking change.
1796
+ * See {@link OnMissingPolicy}.
1797
+ *
1798
+ * NOTE (current wiring): the `read` layer (`get`/`list`) is enforced.
1799
+ * Guard, derivation, mv, join and export reads currently resolve
1800
+ * through the same read path and so observe the `read`/scalar policy;
1801
+ * dedicated per-layer enforcement for those contexts is a tracked
1802
+ * follow-up (mv/join additionally require resolution to be injected
1803
+ * into the query/aggregate pipeline, which today reads raw maps).
1804
+ */
1805
+ readonly onMissing?: OnMissingPolicy;
1806
+ /**
1807
+ * Ordered preferred-substitute locales used when `onMissing` resolves
1808
+ * to `'substitute'` and the target locale is absent. `'any'` as an
1809
+ * element means "first non-empty value". A caller-supplied `fallback`
1810
+ * at read time takes precedence over this declared list.
1811
+ */
1812
+ readonly substitute?: readonly string[];
1813
+ /**
1814
+ * Per-locale script enforcement (write-time). `'auto'` infers the
1815
+ * allowed Unicode scripts per locale (asymmetric Latin tolerance); an
1816
+ * object overrides per slot. Absent ⇒ no check. See `./script.ts`.
1817
+ */
1818
+ readonly script?: 'auto' | Partial<Record<string, readonly string[]>>;
1819
+ /**
1820
+ * What to do when a slot's value contains characters outside its
1821
+ * allowed script set. Default `'reject'`.
1822
+ */
1823
+ readonly onScriptViolation?: 'reject' | 'filter' | 'warn';
1716
1824
  }
1717
1825
  /**
1718
1826
  * Descriptor returned by `i18nText()`. Attach to the collection's
@@ -1767,7 +1875,15 @@ declare function validateI18nTextValue(value: unknown, field: string, descriptor
1767
1875
  * @param field Field name used in `LocaleNotSpecifiedError` messages.
1768
1876
  * @returns The resolved string, OR the original map when `locale === 'raw'`.
1769
1877
  */
1878
+ /** Options for the policy-aware form of {@link resolveI18nText}. */
1879
+ interface ResolveI18nOptions {
1880
+ /** Effective policy for the resolution layer. Default `'throw'`. */
1881
+ readonly policy?: OnMissing;
1882
+ /** Declared substitute chain; applied only under policy `'substitute'`. */
1883
+ readonly substitute?: readonly string[];
1884
+ }
1770
1885
  declare function resolveI18nText(value: Record<string, string>, locale: string, fallback?: string | readonly string[], field?: string): string | Record<string, string>;
1886
+ declare function resolveI18nText(value: Record<string, string>, locale: string, fallback: string | readonly string[] | undefined, field: string | undefined, opts: ResolveI18nOptions): string | Record<string, string> | null;
1771
1887
  /**
1772
1888
  * Return all leaf values at `path`, expanding `[].` array wildcards.
1773
1889
  *
@@ -1799,8 +1915,12 @@ declare function setAtPathInPlace(obj: Record<string, unknown>, path: string, va
1799
1915
  * @param i18nFields Map of field path → `I18nTextDescriptor`.
1800
1916
  * @param locale The requested locale (or `'raw'`).
1801
1917
  * @param fallback Fallback chain (optional).
1918
+ * @param layer Resolution layer (default `'read'`). Each field's
1919
+ * `onMissing` policy is resolved for this layer, so the
1920
+ * same record resolves leniently on a get but strictly
1921
+ * inside an mv/derivation.
1802
1922
  */
1803
- declare function applyI18nLocale(record: Record<string, unknown>, i18nFields: Record<string, I18nTextDescriptor>, locale: string, fallback?: string | readonly string[]): Record<string, unknown>;
1923
+ declare function applyI18nLocale(record: Record<string, unknown>, i18nFields: Record<string, I18nTextDescriptor>, locale: string, fallback?: string | readonly string[], layer?: Layer): Record<string, unknown>;
1804
1924
 
1805
1925
  type EventHandler<T> = (data: T) => void;
1806
1926
  /** Typed event emitter for NOYDB events. */
@@ -2325,6 +2445,16 @@ interface DictKeyDescriptor<Keys extends string = string> {
2325
2445
  readonly name: string;
2326
2446
  /** Declared valid keys. When set, `put()` rejects keys not in this set. */
2327
2447
  readonly keys: readonly Keys[] | undefined;
2448
+ /**
2449
+ * What to do when a label is missing for the resolved locale. Mirrors
2450
+ * `i18nText`'s `onMissing`. Default behavior (when unset) preserves the
2451
+ * legacy contract: a missing label is omitted (scalar) or `null`
2452
+ * (array element) — i.e. `'null'`. Set `'substitute'` to walk the
2453
+ * declared `substitute` chain, or `'throw'` to raise.
2454
+ */
2455
+ readonly onMissing?: OnMissingPolicy;
2456
+ /** Ordered preferred-substitute locales for label resolution. */
2457
+ readonly substitute?: readonly string[];
2328
2458
  }
2329
2459
  /**
2330
2460
  * Create a `DictKeyDescriptor` for a dictionary-backed enum field.
@@ -2343,7 +2473,10 @@ interface DictKeyDescriptor<Keys extends string = string> {
2343
2473
  * })
2344
2474
  * ```
2345
2475
  */
2346
- declare function dictKey<Keys extends string>(name: string, keys?: readonly Keys[]): DictKeyDescriptor<Keys>;
2476
+ declare function dictKey<Keys extends string>(name: string, keys?: readonly Keys[], opts?: {
2477
+ onMissing?: OnMissingPolicy;
2478
+ substitute?: readonly string[];
2479
+ }): DictKeyDescriptor<Keys>;
2347
2480
  /** Runtime predicate for detecting a DictKeyDescriptor. */
2348
2481
  declare function isDictKeyDescriptor(x: unknown): x is DictKeyDescriptor;
2349
2482
  /**
@@ -2487,6 +2620,32 @@ declare class DictionaryHandle<Keys extends string = string> {
2487
2620
  resolveLabel(key: string, locale: string, fallback?: string | readonly string[]): Promise<string | undefined>;
2488
2621
  }
2489
2622
 
2623
+ /**
2624
+ * Infer the allowed Unicode scripts for a BCP-47 locale, with asymmetric
2625
+ * Latin tolerance. A script subtag (`th-Latn`) wins over the base
2626
+ * language. Unknown locales default to `['Latin']`.
2627
+ */
2628
+ declare function inferScripts(locale: string): readonly string[];
2629
+ /** A non-fatal script violation recorded under `'filter'`/`'warn'` modes. */
2630
+ interface ScriptWarning {
2631
+ readonly field: string;
2632
+ readonly locale: string;
2633
+ readonly expected: readonly string[];
2634
+ readonly sample: string;
2635
+ }
2636
+ /**
2637
+ * Enforce a field's script constraint over an i18nText value map.
2638
+ *
2639
+ * - No `script` option ⇒ returns the value unchanged.
2640
+ * - `onScriptViolation: 'reject'` (default) ⇒ throws {@link ScriptViolationError}.
2641
+ * - `'filter'` ⇒ returns a copy with disallowed characters stripped + warnings.
2642
+ * - `'warn'` ⇒ returns the value unchanged + warnings.
2643
+ */
2644
+ declare function enforceScript(value: Record<string, unknown>, field: string, descriptor: I18nTextDescriptor): {
2645
+ value: Record<string, unknown>;
2646
+ warnings: ScriptWarning[];
2647
+ };
2648
+
2490
2649
  /**
2491
2650
  * Strategy seam for the optional i18n (multi-locale + dictionary)
2492
2651
  * subsystem. Core imports `I18nStrategy` type-only + `NO_I18N` stub;
@@ -2548,13 +2707,23 @@ interface I18nStrategy {
2548
2707
  * return a new object. Returns the input unchanged under
2549
2708
  * `NO_I18N`.
2550
2709
  */
2551
- applyI18nLocale(record: Record<string, unknown>, fields: Record<string, I18nTextDescriptor>, locale: string, fallback?: string | readonly string[]): Record<string, unknown>;
2710
+ applyI18nLocale(record: Record<string, unknown>, fields: Record<string, I18nTextDescriptor>, locale: string, fallback?: string | readonly string[], layer?: Layer): Record<string, unknown>;
2552
2711
  /**
2553
2712
  * Validate that an i18nText field's value satisfies its descriptor
2554
2713
  * (required locales present, etc.). Throws under `NO_I18N` —
2555
2714
  * declaring i18nFields without opting in is a misconfiguration.
2556
2715
  */
2557
2716
  validateI18nTextValue(value: unknown, field: string, descriptor: I18nTextDescriptor): void;
2717
+ /**
2718
+ * Enforce per-locale script constraints over an i18nText value map
2719
+ * (write-time). Returns the (possibly filtered) value plus any
2720
+ * non-fatal warnings. Returns the value unchanged when the field has
2721
+ * no `script` option, or under `NO_I18N`.
2722
+ */
2723
+ enforceScript(value: Record<string, unknown>, field: string, descriptor: I18nTextDescriptor): {
2724
+ value: Record<string, unknown>;
2725
+ warnings: ScriptWarning[];
2726
+ };
2558
2727
  /**
2559
2728
  * Construct a typed `DictionaryHandle` for the named dictionary.
2560
2729
  * Throws under `NO_I18N`.
@@ -12604,4 +12773,4 @@ interface DeleteManyResult {
12604
12773
  }>;
12605
12774
  }
12606
12775
 
12607
- export { type ConsentStrategy as $, type BlobFieldPolicy as A, type BlobStrategy as B, type BlobFieldsConfig as C, DICT_COLLECTION_PREFIX as D, type BlobObject as E, type BlobPutOptions as F, type BlobResponseOptions as G, BlobSet as H, type I18nStrategy as I, type BlobStrategyOpenArgs as J, type CompactRunOptions as K, type CompactionContext as L, type CompactionResult as M, DEFAULT_CHUNK_SIZE as N, EXPORT_AUDIT_COLLECTION as O, PolicyEnforcer as P, ExportBlobsAbortedError as Q, type ExportBlobsAuditEntry as R, type SessionStrategy as S, type ExportBlobsHandle as T, type ExportBlobsOptions as U, type ExportedBlob as V, type SlotInfo as W, type SlotRecord as X, type VersionRecord as Y, createExportBlobsHandle as Z, runCompaction as _, type DictEntry as a, type DiffEntry as a$, CONSENT_AUDIT_COLLECTION as a0, type ConsentAuditEntry as a1, type ConsentAuditFilter as a2, type ConsentContext as a3, type ConsentOp as a4, loadConsentEntries as a5, writeConsentEntry as a6, type PeriodsStrategy as a7, type CarryForwardContext as a8, type ClosePeriodOptions as a9, TxVault as aA, runTransaction as aB, type DerivationStrategy as aC, type DerivationContext as aD, type ArrayOutputSpec as aE, DerivationRegistry as aF, type DerivationStrategyHandle as aG, type DerivedFromMeta as aH, type OutputSpec as aI, type RecordOutputSpec as aJ, type MaterializedViewStrategy as aK, type MaterializedViewStrategyHandle as aL, type OverlayedViewStrategy as aM, Collection as aN, OverlayedViewRegistry as aO, type OverlayedViewStrategyHandle as aP, type SyncStrategy as aQ, type Role as aR, type UnlockedKeyring as aS, type HistoryStrategy as aT, type NoydbStore as aU, type HistoryOptions as aV, type EncryptedEnvelope as aW, type PruneOptions as aX, type AppendInput as aY, type ChangeType as aZ, CollectionInstant as a_, type OpenPeriodOptions as aa, PERIODS_COLLECTION as ab, type PeriodRecord as ac, type ReadOnlyCollection as ad, appendPeriodLedgerEntry as ae, assertTsWritable as af, chainAnchor as ag, loadPeriods as ah, validatePeriodName as ai, type GuardStrategy as aj, type GuardChange as ak, type GuardContext as al, GuardRegistry as am, type GuardStrategyHandle as an, ReadOnlyVaultFacade as ao, type ShadowStrategy as ap, CollectionFrame as aq, VaultFrame as ar, type NoydbBundleStore as as, type RetentionPolicy as at, type SnapshotStrategy as au, type SnapshotMeta as av, type TxStrategy as aw, type AmendmentTxOptions as ax, TxCollection as ay, TxContext as az, type DictKeyDescriptor as b, type DerivationDescriptor as b$, type JsonPatch as b0, type JsonPatchOp as b1, type LedgerEntry as b2, LedgerStore as b3, type VaultEngine as b4, VaultInstant as b5, type VerifyResult as b6, applyPatch as b7, canonicalJson as b8, computePatch as b9, type SchemaUpdateStrategy as bA, type TransformFn as bB, type PersistedSchemaEnvelope as bC, type UpdateDecision as bD, type DirectoryConfig as bE, type UserVisibility as bF, type AccessibleVault as bG, type AffectedDocument as bH, BUNDLE_STORE_POLICY as bI, type BuiltInGateName as bJ, type CacheOptions as bK, type CacheStats as bL, type ChangeEvent as bM, type CollectionChangeEvent as bN, type CollectionConflictResolver as bO, type CollectionDescriptor as bP, type CollectionStats as bQ, type Conflict as bR, type ConflictPolicy as bS, type ConflictStrategy as bT, type CrossTierAccessEvent as bU, DEFAULT_PUBLIC_ENVELOPE_SCHEMA as bV, DELEGATIONS_COLLECTION as bW, type DeepPartial as bX, type DeepPartialOrNull as bY, type DelegationToken as bZ, type DeleteManyResult as b_, diff as ba, formatDiff as bb, hashEntry as bc, paddedIndex as bd, parseIndex as be, sha256Hex as bf, type PublicEnvelope as bg, type SealingKeyProvider as bh, type BundleRecipient as bi, type RecipientSealer as bj, type RecipientHint as bk, Vault as bl, type RecoveryEnrollmentInput as bm, type ShamirRecoveryProvider as bn, type MVQueryContext as bo, type RegisteredMV as bp, MaterializedViewRegistry as bq, type MaterializedFromMeta as br, type MaterializedViewOutput as bs, type UnionSource as bt, type UserEnvelope as bu, type GateName as bv, type GatePolicy as bw, type VaultPolicy as bx, type ActiveTier as by, type FactorProof as bz, DictionaryHandle as c, type PassphrasePolicy as c$, type DirtyEntry as c0, type DryRunResult as c1, type DumpSchemaOptions as c2, ELEVATION_AUDIT_COLLECTION as c3, ElevatedHandle as c4, type EnrollAuthenticatorOptions as c5, type EnrollAuthenticatorWrappingDEKsOptions as c6, type EnrollAuthenticatorWrappingKEKOptions as c7, type EnrollRecoveryResult as c8, type ExportCapability as c9, type ListAccessibleVaultsOptions as cA, type ListPageResult as cB, type ListUsersOptions as cC, type LiveUserEnvelope as cD, type LocaleReadOptions as cE, Lru as cF, type LruOptions as cG, type LruStats as cH, MAGIC_LINK_CONTENT_INFO_PREFIX as cI, MAGIC_LINK_GRANTS_COLLECTION as cJ, MAGIC_LINK_KEK_INFO_PREFIX as cK, type MagicLinkGrantPayload as cL, type MagicLinkGrantRecord as cM, type MaterializedViewDescriptor as cN, MemoryRecipientSealer as cO, MemorySealingKeyProvider as cP, NOYDB_BACKUP_VERSION as cQ, NOYDB_FORMAT_VERSION as cR, NOYDB_KEYRING_VERSION as cS, NOYDB_SYNC_VERSION as cT, Noydb as cU, type NoydbEventMap as cV, type NoydbOptions as cW, type OverlayViewDescriptor as cX, PUBLIC_ENVELOPE_FIELDS as cY, type PaperRecoveryDoc as cZ, type PaperRecoveryEntry as c_, type ExportChunk as ca, type ExportFormat as cb, type ExportStreamOptions as cc, type FactorKind as cd, type FactorProofBundle as ce, type FactorRequirement as cf, type FenceDoc as cg, type FenceState as ch, type FieldChange as ci, type FieldDescriptor as cj, type FieldSource as ck, type GhostRecord as cl, type GrantOptions as cm, type GuardViolation as cn, type HistoryConfig as co, type HistoryEntry as cp, INDEXED_STORE_POLICY as cq, type ImportCapability as cr, type InferOutput as cs, type InternalCollectionStats as ct, type IssueDelegationOptions as cu, type IssueMagicLinkGrantOptions as cv, type KeyringAuthenticator as cw, type KeyringAuthenticatorWrappingDEKs as cx, type KeyringAuthenticatorWrappingKEK as cy, type KeyringFile as cz, type DictionaryOptions as d, type SyncTransactionResult as d$, type PassphraseValidationResult as d0, type Permission as d1, type Permissions as d2, type PersistedSchemaKind as d3, type PlaintextTranslatorContext as d4, type PlaintextTranslatorFn as d5, PresenceHandle as d6, type PresencePeer as d7, type PublicEnvelopeField as d8, type PublicEnvelopeSchema as d9, type RotateRecoveryResult as dA, SEALED_PASSPHRASE_RECORD_ID as dB, type SchemaDelta as dC, type SchemaIntrospection as dD, type SealedEnvelope as dE, type SealedPassphrase as dF, type SessionPolicy as dG, type SetPublicEnvelopeInput as dH, type ShamirRecoveryDoc as dI, type ShamirRecoveryEntry as dJ, type SlotRewrapCeremony as dK, type SlotRewrapContext as dL, type StandardSchemaV1 as dM, type StandardSchemaV1Issue as dN, type StandardSchemaV1SyncResult as dO, type StoreAuth as dP, type StoreAuthKind as dQ, type StoreCapabilities as dR, SyncEngine as dS, type SyncMetadata as dT, type SyncPolicy as dU, SyncScheduler as dV, type SyncSchedulerStatus as dW, type SyncStatus as dX, type SyncTarget as dY, type SyncTargetRole as dZ, SyncTransaction as d_, type PublicEnvelopeText as da, type PullMode as db, type PullOptions as dc, type PullPolicy as dd, type PullResult as de, type PushMode as df, type PushOptions as dg, type PushPolicy as dh, type PushResult as di, type PutManyItemOptions as dj, type PutManyOptions as dk, type PutManyResult as dl, type QueryAcrossOptions as dm, type QueryAcrossResult as dn, type QuickUnlockState as dp, QuickUnlockStore as dq, type ReAuthOperation as dr, type RecoverPassphraseInput as ds, type RecoverPassphraseResult as dt, type RecoverUserOptions as du, type RecoveryProof as dv, type ResolvedPublicEnvelopeSchema as dw, type RevokeOptions as dx, type RotatePassphraseInput as dy, type RotateRecoveryOptions as dz, type I18nTextDescriptor as e, recoverUser as e$, type TabChannel as e0, type TabCoordinationOptions as e1, type TabLockManager as e2, type TabPresence as e3, type TabRole as e4, type TierMode as e5, type TranslatorAuditEntry as e6, type TxOp as e7, USER_ENVELOPE_COLLECTION as e8, USER_ENVELOPE_MAX_BYTES as e9, deriveMagicLinkContentKey as eA, enrollAuthenticator as eB, estimateEntropy as eC, evaluateExportCapability as eD, evaluateImportCapability as eE, findAuthenticator as eF, hasExportCapability as eG, hasImportCapability as eH, hasRecoveryEnrolled as eI, isMagicLinkGrantExpired as eJ, isPublicEnvelope as eK, issueDelegation as eL, recoverPassphrase as eM, rotatePassphrase as eN, listMagicLinkGrants as eO, listUsers as eP, listUsersWithEnvelopes as eQ, loadActiveDelegations as eR, loadPaperRecoveryEntries as eS, loadSealedPassphrase as eT, loadShamirRecoveryEntries as eU, magicLinkGrantRecordId as eV, mintPaperRecoveryEntry as eW, mintShamirRecoveryEntry as eX, mintWrappedDeksBlob as eY, parseSealedEnvelope as eZ, readMagicLinkGrantRecord as e_, type Unsubscribe as ea, type UpdateAuthenticatorOptions as eb, type UpdateContext as ec, type UpdateUserOptions as ed, UserApi as ee, type UserEnvelopeCheckGate as ef, UserEnvelopeOversizedError as eg, type UserEnvelopePresented as eh, type UserInfo as ei, type VaultBackup as ej, type VaultPolicyOnDisk as ek, type VaultSchemaSnapshot as el, type VaultSnapshot as em, type WarningRules as en, WeakPassphraseError as eo, type WeakPassphraseReason as ep, type WrappedDeksBlob as eq, type WriteConflict as er, type WriteEvent as es, type WriteHook as et, type WriteQueue as eu, assertStrongPassphrase as ev, buildRecipientKeyringFile as ew, burnPaperRecoveryEntry as ex, createNoydb as ey, createStore as ez, type I18nTextOptions as f, removeAuthenticator as f0, resolveSchema as f1, revokeDelegation as f2, revokeMagicLinkGrant as f3, savePaperRecoveryEntries as f4, saveSealedPassphrase as f5, saveShamirRecoveryEntries as f6, unwrapDeksFromBlob as f7, unwrapDeksFromPaperEntry as f8, unwrapDeksFromShamirEntry as f9, unwrapMagicLinkGrant as fa, validatePassphrase as fb, validatePublicEnvelopeInput as fc, validateSchemaInput as fd, validateSchemaOutput as fe, writeMagicLinkGrant as ff, changeSecret as fg, createOwnerKeyring as fh, ensureCollectionDEK as fi, grant as fj, loadKeyring as fk, persistKeyring as fl, revoke as fm, updateAuthenticator as fn, updateKeyringIdentity as fo, applyI18nLocale as g, dictCollectionName as h, dictKey as i, getAtPath as j, i18nText as k, isDictCollectionName as l, isDictKeyDescriptor as m, isI18nTextDescriptor as n, createEnforcer as o, validateSessionPolicy as p, BLOB_CHUNKS_COLLECTION as q, resolveI18nText as r, setAtPathInPlace as s, BLOB_COLLECTION as t, BLOB_EVICTION_AUDIT_COLLECTION as u, validateI18nTextValue as v, BLOB_INDEX_COLLECTION as w, BLOB_SLOTS_PREFIX as x, BLOB_VERSIONS_PREFIX as y, type BlobEvictionEntry as z };
12776
+ export { type ExportBlobsAuditEntry as $, BLOB_COLLECTION as A, type BlobStrategy as B, BLOB_EVICTION_AUDIT_COLLECTION as C, DICT_COLLECTION_PREFIX as D, BLOB_INDEX_COLLECTION as E, BLOB_SLOTS_PREFIX as F, BLOB_VERSIONS_PREFIX as G, type BlobEvictionEntry as H, type I18nStrategy as I, type BlobFieldPolicy as J, type BlobFieldsConfig as K, type Layer as L, type BlobObject as M, type BlobPutOptions as N, type OnMissing as O, PolicyEnforcer as P, type BlobResponseOptions as Q, type ResolveI18nOptions as R, type ScriptWarning as S, BlobSet as T, type BlobStrategyOpenArgs as U, type CompactRunOptions as V, type CompactionContext as W, type CompactionResult as X, DEFAULT_CHUNK_SIZE as Y, EXPORT_AUDIT_COLLECTION as Z, ExportBlobsAbortedError as _, type DictEntry as a, type UnlockedKeyring as a$, type ExportBlobsHandle as a0, type ExportBlobsOptions as a1, type ExportedBlob as a2, type SlotInfo as a3, type SlotRecord as a4, type VersionRecord as a5, createExportBlobsHandle as a6, runCompaction as a7, type ConsentStrategy as a8, CONSENT_AUDIT_COLLECTION as a9, VaultFrame as aA, type NoydbBundleStore as aB, type RetentionPolicy as aC, type SnapshotStrategy as aD, type SnapshotMeta as aE, type TxStrategy as aF, type AmendmentTxOptions as aG, TxCollection as aH, TxContext as aI, TxVault as aJ, runTransaction as aK, type DerivationStrategy as aL, type DerivationContext as aM, type ArrayOutputSpec as aN, DerivationRegistry as aO, type DerivationStrategyHandle as aP, type DerivedFromMeta as aQ, type OutputSpec as aR, type RecordOutputSpec as aS, type MaterializedViewStrategy as aT, type MaterializedViewStrategyHandle as aU, type OverlayedViewStrategy as aV, Collection as aW, OverlayedViewRegistry as aX, type OverlayedViewStrategyHandle as aY, type SyncStrategy as aZ, type Role as a_, type ConsentAuditEntry as aa, type ConsentAuditFilter as ab, type ConsentContext as ac, type ConsentOp as ad, loadConsentEntries as ae, writeConsentEntry as af, type PeriodsStrategy as ag, type CarryForwardContext as ah, type ClosePeriodOptions as ai, type OpenPeriodOptions as aj, PERIODS_COLLECTION as ak, type PeriodRecord as al, type ReadOnlyCollection as am, appendPeriodLedgerEntry as an, assertTsWritable as ao, chainAnchor as ap, loadPeriods as aq, validatePeriodName as ar, type GuardStrategy as as, type GuardChange as at, type GuardContext as au, GuardRegistry as av, type GuardStrategyHandle as aw, ReadOnlyVaultFacade as ax, type ShadowStrategy as ay, CollectionFrame as az, type DictKeyDescriptor as b, type ConflictPolicy as b$, type HistoryStrategy as b0, type NoydbStore as b1, type HistoryOptions as b2, type EncryptedEnvelope as b3, type PruneOptions as b4, type AppendInput as b5, type ChangeType as b6, CollectionInstant as b7, type DiffEntry as b8, type JsonPatch as b9, type MaterializedFromMeta as bA, type MaterializedViewOutput as bB, type UnionSource as bC, type UserEnvelope as bD, type GateName as bE, type GatePolicy as bF, type VaultPolicy as bG, type ActiveTier as bH, type FactorProof as bI, type SchemaUpdateStrategy as bJ, type TransformFn as bK, type PersistedSchemaEnvelope as bL, type UpdateDecision as bM, type DirectoryConfig as bN, type UserVisibility as bO, type AccessibleVault as bP, type AffectedDocument as bQ, BUNDLE_STORE_POLICY as bR, type BuiltInGateName as bS, type CacheOptions as bT, type CacheStats as bU, type ChangeEvent as bV, type CollectionChangeEvent as bW, type CollectionConflictResolver as bX, type CollectionDescriptor as bY, type CollectionStats as bZ, type Conflict as b_, type JsonPatchOp as ba, type LedgerEntry as bb, LedgerStore as bc, type VaultEngine as bd, VaultInstant as be, type VerifyResult as bf, applyPatch as bg, canonicalJson as bh, computePatch as bi, diff as bj, formatDiff as bk, hashEntry as bl, paddedIndex as bm, parseIndex as bn, sha256Hex as bo, type PublicEnvelope as bp, type SealingKeyProvider as bq, type BundleRecipient as br, type RecipientSealer as bs, type RecipientHint as bt, Vault as bu, type RecoveryEnrollmentInput as bv, type ShamirRecoveryProvider as bw, type MVQueryContext as bx, type RegisteredMV as by, MaterializedViewRegistry as bz, DictionaryHandle as c, NOYDB_KEYRING_VERSION as c$, type ConflictStrategy as c0, type CrossTierAccessEvent as c1, DEFAULT_PUBLIC_ENVELOPE_SCHEMA as c2, DELEGATIONS_COLLECTION as c3, type DeepPartial as c4, type DeepPartialOrNull as c5, type DelegationToken as c6, type DeleteManyResult as c7, type DerivationDescriptor as c8, type DirtyEntry as c9, type ImportCapability as cA, type InferOutput as cB, type InternalCollectionStats as cC, type IssueDelegationOptions as cD, type IssueMagicLinkGrantOptions as cE, type KeyringAuthenticator as cF, type KeyringAuthenticatorWrappingDEKs as cG, type KeyringAuthenticatorWrappingKEK as cH, type KeyringFile as cI, type ListAccessibleVaultsOptions as cJ, type ListPageResult as cK, type ListUsersOptions as cL, type LiveUserEnvelope as cM, type LocaleReadOptions as cN, Lru as cO, type LruOptions as cP, type LruStats as cQ, MAGIC_LINK_CONTENT_INFO_PREFIX as cR, MAGIC_LINK_GRANTS_COLLECTION as cS, MAGIC_LINK_KEK_INFO_PREFIX as cT, type MagicLinkGrantPayload as cU, type MagicLinkGrantRecord as cV, type MaterializedViewDescriptor as cW, MemoryRecipientSealer as cX, MemorySealingKeyProvider as cY, NOYDB_BACKUP_VERSION as cZ, NOYDB_FORMAT_VERSION as c_, type DryRunResult as ca, type DumpSchemaOptions as cb, ELEVATION_AUDIT_COLLECTION as cc, ElevatedHandle as cd, type EnrollAuthenticatorOptions as ce, type EnrollAuthenticatorWrappingDEKsOptions as cf, type EnrollAuthenticatorWrappingKEKOptions as cg, type EnrollRecoveryResult as ch, type ExportCapability as ci, type ExportChunk as cj, type ExportFormat as ck, type ExportStreamOptions as cl, type FactorKind as cm, type FactorProofBundle as cn, type FactorRequirement as co, type FenceDoc as cp, type FenceState as cq, type FieldChange as cr, type FieldDescriptor as cs, type FieldSource as ct, type GhostRecord as cu, type GrantOptions as cv, type GuardViolation as cw, type HistoryConfig as cx, type HistoryEntry as cy, INDEXED_STORE_POLICY as cz, type DictionaryOptions as d, SyncEngine as d$, NOYDB_SYNC_VERSION as d0, Noydb as d1, type NoydbEventMap as d2, type NoydbOptions as d3, type OverlayViewDescriptor as d4, PUBLIC_ENVELOPE_FIELDS as d5, type PaperRecoveryDoc as d6, type PaperRecoveryEntry as d7, type PassphrasePolicy as d8, type PassphraseValidationResult as d9, type ReAuthOperation as dA, type RecoverPassphraseInput as dB, type RecoverPassphraseResult as dC, type RecoverUserOptions as dD, type RecoveryProof as dE, type ResolvedPublicEnvelopeSchema as dF, type RevokeOptions as dG, type RotatePassphraseInput as dH, type RotateRecoveryOptions as dI, type RotateRecoveryResult as dJ, SEALED_PASSPHRASE_RECORD_ID as dK, type SchemaDelta as dL, type SchemaIntrospection as dM, type SealedEnvelope as dN, type SealedPassphrase as dO, type SessionPolicy as dP, type SetPublicEnvelopeInput as dQ, type ShamirRecoveryDoc as dR, type ShamirRecoveryEntry as dS, type SlotRewrapCeremony as dT, type SlotRewrapContext as dU, type StandardSchemaV1 as dV, type StandardSchemaV1Issue as dW, type StandardSchemaV1SyncResult as dX, type StoreAuth as dY, type StoreAuthKind as dZ, type StoreCapabilities as d_, type Permission as da, type Permissions as db, type PersistedSchemaKind as dc, type PlaintextTranslatorContext as dd, type PlaintextTranslatorFn as de, PresenceHandle as df, type PresencePeer as dg, type PublicEnvelopeField as dh, type PublicEnvelopeSchema as di, type PublicEnvelopeText as dj, type PullMode as dk, type PullOptions as dl, type PullPolicy as dm, type PullResult as dn, type PushMode as dp, type PushOptions as dq, type PushPolicy as dr, type PushResult as ds, type PutManyItemOptions as dt, type PutManyOptions as du, type PutManyResult as dv, type QueryAcrossOptions as dw, type QueryAcrossResult as dx, type QuickUnlockState as dy, QuickUnlockStore as dz, type I18nMap as e, loadPaperRecoveryEntries as e$, type SyncMetadata as e0, type SyncPolicy as e1, SyncScheduler as e2, type SyncSchedulerStatus as e3, type SyncStatus as e4, type SyncTarget as e5, type SyncTargetRole as e6, SyncTransaction as e7, type SyncTransactionResult as e8, type TabChannel as e9, type WriteConflict as eA, type WriteEvent as eB, type WriteHook as eC, type WriteQueue as eD, assertStrongPassphrase as eE, buildRecipientKeyringFile as eF, burnPaperRecoveryEntry as eG, createNoydb as eH, createStore as eI, deriveMagicLinkContentKey as eJ, enrollAuthenticator as eK, estimateEntropy as eL, evaluateExportCapability as eM, evaluateImportCapability as eN, findAuthenticator as eO, hasExportCapability as eP, hasImportCapability as eQ, hasRecoveryEnrolled as eR, isMagicLinkGrantExpired as eS, isPublicEnvelope as eT, issueDelegation as eU, recoverPassphrase as eV, rotatePassphrase as eW, listMagicLinkGrants as eX, listUsers as eY, listUsersWithEnvelopes as eZ, loadActiveDelegations as e_, type TabCoordinationOptions as ea, type TabLockManager as eb, type TabPresence as ec, type TabRole as ed, type TierMode as ee, type TranslatorAuditEntry as ef, type TxOp as eg, USER_ENVELOPE_COLLECTION as eh, USER_ENVELOPE_MAX_BYTES as ei, type Unsubscribe as ej, type UpdateAuthenticatorOptions as ek, type UpdateContext as el, type UpdateUserOptions as em, UserApi as en, type UserEnvelopeCheckGate as eo, UserEnvelopeOversizedError as ep, type UserEnvelopePresented as eq, type UserInfo as er, type VaultBackup as es, type VaultPolicyOnDisk as et, type VaultSchemaSnapshot as eu, type VaultSnapshot as ev, type WarningRules as ew, WeakPassphraseError as ex, type WeakPassphraseReason as ey, type WrappedDeksBlob as ez, type I18nTextDescriptor as f, loadSealedPassphrase as f0, loadShamirRecoveryEntries as f1, magicLinkGrantRecordId as f2, mintPaperRecoveryEntry as f3, mintShamirRecoveryEntry as f4, mintWrappedDeksBlob as f5, parseSealedEnvelope as f6, readMagicLinkGrantRecord as f7, recoverUser as f8, removeAuthenticator as f9, resolveSchema as fa, revokeDelegation as fb, revokeMagicLinkGrant as fc, savePaperRecoveryEntries as fd, saveSealedPassphrase as fe, saveShamirRecoveryEntries as ff, unwrapDeksFromBlob as fg, unwrapDeksFromPaperEntry as fh, unwrapDeksFromShamirEntry as fi, unwrapMagicLinkGrant as fj, validatePassphrase as fk, validatePublicEnvelopeInput as fl, validateSchemaInput as fm, validateSchemaOutput as fn, writeMagicLinkGrant as fo, changeSecret as fp, createOwnerKeyring as fq, ensureCollectionDEK as fr, grant as fs, loadKeyring as ft, persistKeyring as fu, revoke as fv, updateAuthenticator as fw, updateKeyringIdentity as fx, type I18nTextOptions as g, type OnMissingPolicy as h, applyI18nLocale as i, dictCollectionName as j, dictKey as k, enforceScript as l, getAtPath as m, i18nText as n, inferScripts as o, isDictCollectionName as p, isDictKeyDescriptor as q, isI18nTextDescriptor as r, resolveI18nText as s, resolvePolicy as t, setAtPathInPlace as u, validateI18nTextValue as v, type SessionStrategy as w, createEnforcer as x, validateSessionPolicy as y, BLOB_CHUNKS_COLLECTION as z };
@@ -1,7 +1,7 @@
1
1
  import { I as IndexStrategy, d as LazyQuery } from './lazy-builder-wY4pMCEe.cjs';
2
2
  import { b as AggregateSpec, A as AggregateStrategy } from './strategy-DSTrsZ8t.cjs';
3
3
  import { C as CrdtStrategy, a as CrdtMode, b as CrdtState } from './strategy-BSxFXGzb.cjs';
4
- import { N as NoydbError, Q as Query, av as RefRegistry, as as RefDescriptor, a6 as JoinableSource, ax as RefViolation, ay as ScanBuilder } from './index-vB43MAt4.cjs';
4
+ import { N as NoydbError, Q as Query, aw as RefRegistry, at as RefDescriptor, a7 as JoinableSource, ay as RefViolation, az as ScanBuilder } from './index-4fBVt8j9.cjs';
5
5
  import { F as FieldClause, I as IndexDef, C as CollectionIndexes } from './predicate-BSAGEyu5.cjs';
6
6
  import { AttestationFieldSchema, RevocationList } from '@noy-db/attestation';
7
7
 
@@ -1644,6 +1644,51 @@ interface PeriodsStrategy {
1644
1644
  appendPeriodLedgerEntry(ledger: LedgerStore | null, actor: string, envelope: EncryptedEnvelope, periodName: string): Promise<void>;
1645
1645
  }
1646
1646
 
1647
+ /**
1648
+ * Per-layer i18n resolution policy.
1649
+ *
1650
+ * `onMissing` governs what happens when a multilingual field is resolved
1651
+ * to a target locale that is absent. It may be a single scalar policy or
1652
+ * a per-layer map, so a field can be lenient at the app read boundary but
1653
+ * strict inside a materialized view.
1654
+ *
1655
+ * Effective policy for layer `λ`:
1656
+ *
1657
+ * ```
1658
+ * explicit(λ) = typeof onMissing === 'object' ? onMissing[λ] : undefined
1659
+ * scalar = typeof onMissing === 'string' ? onMissing : undefined
1660
+ * policy(λ) = explicit(λ) ?? layerDefault(λ) ?? scalar ?? 'throw'
1661
+ * ```
1662
+ *
1663
+ * - `layerDefault('guard') = 'substitute'` — guards are lenient unless
1664
+ * EXPLICITLY overridden; they never inherit a scalar policy (a guard
1665
+ * reading a display value must not hard-fail on a missing locale).
1666
+ * - every other layer has no default, so it inherits the scalar, else
1667
+ * falls back to `'throw'` (today's behavior — zero breaking change).
1668
+ *
1669
+ * @public
1670
+ */
1671
+ type OnMissing = 'substitute' | 'null' | 'throw';
1672
+ /**
1673
+ * The contexts in which a multilingual field is resolved. Each can carry
1674
+ * its own `onMissing` policy.
1675
+ *
1676
+ * - `read` — ordinary app reads (`get`/`list`/query projection).
1677
+ * - `guard` — a guard callback reading a value.
1678
+ * - `join` — a joined record expanded onto a row.
1679
+ * - `mv` — materialized-view input.
1680
+ * - `derivation` — derivation input.
1681
+ * - `export` — bundle/public-envelope export.
1682
+ */
1683
+ type Layer = 'read' | 'guard' | 'join' | 'mv' | 'derivation' | 'export';
1684
+ /** Field-level policy: a single scalar, or a per-layer map. */
1685
+ type OnMissingPolicy = OnMissing | Partial<Record<Layer, OnMissing>>;
1686
+ /**
1687
+ * Resolve the effective `OnMissing` for a layer from a field's declared
1688
+ * policy. See module docs for the resolution rule.
1689
+ */
1690
+ declare function resolvePolicy(onMissing: OnMissingPolicy | undefined, layer: Layer): OnMissing;
1691
+
1647
1692
  /**
1648
1693
  * i18nText schema type —
1649
1694
  *
@@ -1685,6 +1730,37 @@ interface PeriodsStrategy {
1685
1730
  * Pluralization, RTL rendering, date/number formatting, per-locale CRDT
1686
1731
  * merging.
1687
1732
  */
1733
+
1734
+ /** Flatten an intersection into a single object literal for nicer hovers. */
1735
+ type Prettify<T> = {
1736
+ [K in keyof T]: T[K];
1737
+ } & {};
1738
+ /**
1739
+ * The stored shape of a multilingual field, inferred from its `required`
1740
+ * mode — so the compiler forces you to handle an absent optional locale
1741
+ * (`string | undefined`) instead of silently yielding `undefined`.
1742
+ *
1743
+ * Mirrors `i18nText({ languages, required })`:
1744
+ * - `'all'` (default) — every locale required: `{ th: string; en: string }`
1745
+ * - `'any'` — every locale optional: `{ th?: string; en?: string }`
1746
+ * (the "at least one present" guarantee is runtime-only — not expressible
1747
+ * in TypeScript — so each key is optional)
1748
+ * - `readonly L[]` — listed locales required, the rest optional:
1749
+ * `I18nMap<'th'|'en', ['th']>` → `{ th: string; en?: string }`
1750
+ *
1751
+ * @example
1752
+ * ```ts
1753
+ * type Lang = 'th' | 'en'
1754
+ * interface Contact {
1755
+ * name: I18nMap<Lang, 'any'> // { th?: string; en?: string }
1756
+ * legalName: I18nMap<Lang, ['th']> // { th: string; en?: string }
1757
+ * slug: I18nMap<Lang> // { th: string; en: string }
1758
+ * }
1759
+ * ```
1760
+ *
1761
+ * @public
1762
+ */
1763
+ type I18nMap<Langs extends string, Required extends 'all' | 'any' | readonly Langs[] = 'all'> = Required extends 'all' ? Record<Langs, string> : Required extends 'any' ? Partial<Record<Langs, string>> : Required extends readonly (infer R extends Langs)[] ? Prettify<Record<R, string> & Partial<Record<Exclude<Langs, R>, string>>> : never;
1688
1764
  /**
1689
1765
  * Options for `i18nText()`.
1690
1766
  *
@@ -1713,6 +1789,38 @@ interface I18nTextOptions {
1713
1789
  * before `put()` if a translator is configured. Default: `false`.
1714
1790
  */
1715
1791
  readonly autoTranslate?: boolean;
1792
+ /**
1793
+ * What to do when this field is resolved to a locale that is absent.
1794
+ * A single policy, or a per-layer map (read/guard/join/mv/derivation/
1795
+ * export). Default `'throw'` — today's behavior, zero breaking change.
1796
+ * See {@link OnMissingPolicy}.
1797
+ *
1798
+ * NOTE (current wiring): the `read` layer (`get`/`list`) is enforced.
1799
+ * Guard, derivation, mv, join and export reads currently resolve
1800
+ * through the same read path and so observe the `read`/scalar policy;
1801
+ * dedicated per-layer enforcement for those contexts is a tracked
1802
+ * follow-up (mv/join additionally require resolution to be injected
1803
+ * into the query/aggregate pipeline, which today reads raw maps).
1804
+ */
1805
+ readonly onMissing?: OnMissingPolicy;
1806
+ /**
1807
+ * Ordered preferred-substitute locales used when `onMissing` resolves
1808
+ * to `'substitute'` and the target locale is absent. `'any'` as an
1809
+ * element means "first non-empty value". A caller-supplied `fallback`
1810
+ * at read time takes precedence over this declared list.
1811
+ */
1812
+ readonly substitute?: readonly string[];
1813
+ /**
1814
+ * Per-locale script enforcement (write-time). `'auto'` infers the
1815
+ * allowed Unicode scripts per locale (asymmetric Latin tolerance); an
1816
+ * object overrides per slot. Absent ⇒ no check. See `./script.ts`.
1817
+ */
1818
+ readonly script?: 'auto' | Partial<Record<string, readonly string[]>>;
1819
+ /**
1820
+ * What to do when a slot's value contains characters outside its
1821
+ * allowed script set. Default `'reject'`.
1822
+ */
1823
+ readonly onScriptViolation?: 'reject' | 'filter' | 'warn';
1716
1824
  }
1717
1825
  /**
1718
1826
  * Descriptor returned by `i18nText()`. Attach to the collection's
@@ -1767,7 +1875,15 @@ declare function validateI18nTextValue(value: unknown, field: string, descriptor
1767
1875
  * @param field Field name used in `LocaleNotSpecifiedError` messages.
1768
1876
  * @returns The resolved string, OR the original map when `locale === 'raw'`.
1769
1877
  */
1878
+ /** Options for the policy-aware form of {@link resolveI18nText}. */
1879
+ interface ResolveI18nOptions {
1880
+ /** Effective policy for the resolution layer. Default `'throw'`. */
1881
+ readonly policy?: OnMissing;
1882
+ /** Declared substitute chain; applied only under policy `'substitute'`. */
1883
+ readonly substitute?: readonly string[];
1884
+ }
1770
1885
  declare function resolveI18nText(value: Record<string, string>, locale: string, fallback?: string | readonly string[], field?: string): string | Record<string, string>;
1886
+ declare function resolveI18nText(value: Record<string, string>, locale: string, fallback: string | readonly string[] | undefined, field: string | undefined, opts: ResolveI18nOptions): string | Record<string, string> | null;
1771
1887
  /**
1772
1888
  * Return all leaf values at `path`, expanding `[].` array wildcards.
1773
1889
  *
@@ -1799,8 +1915,12 @@ declare function setAtPathInPlace(obj: Record<string, unknown>, path: string, va
1799
1915
  * @param i18nFields Map of field path → `I18nTextDescriptor`.
1800
1916
  * @param locale The requested locale (or `'raw'`).
1801
1917
  * @param fallback Fallback chain (optional).
1918
+ * @param layer Resolution layer (default `'read'`). Each field's
1919
+ * `onMissing` policy is resolved for this layer, so the
1920
+ * same record resolves leniently on a get but strictly
1921
+ * inside an mv/derivation.
1802
1922
  */
1803
- declare function applyI18nLocale(record: Record<string, unknown>, i18nFields: Record<string, I18nTextDescriptor>, locale: string, fallback?: string | readonly string[]): Record<string, unknown>;
1923
+ declare function applyI18nLocale(record: Record<string, unknown>, i18nFields: Record<string, I18nTextDescriptor>, locale: string, fallback?: string | readonly string[], layer?: Layer): Record<string, unknown>;
1804
1924
 
1805
1925
  type EventHandler<T> = (data: T) => void;
1806
1926
  /** Typed event emitter for NOYDB events. */
@@ -2325,6 +2445,16 @@ interface DictKeyDescriptor<Keys extends string = string> {
2325
2445
  readonly name: string;
2326
2446
  /** Declared valid keys. When set, `put()` rejects keys not in this set. */
2327
2447
  readonly keys: readonly Keys[] | undefined;
2448
+ /**
2449
+ * What to do when a label is missing for the resolved locale. Mirrors
2450
+ * `i18nText`'s `onMissing`. Default behavior (when unset) preserves the
2451
+ * legacy contract: a missing label is omitted (scalar) or `null`
2452
+ * (array element) — i.e. `'null'`. Set `'substitute'` to walk the
2453
+ * declared `substitute` chain, or `'throw'` to raise.
2454
+ */
2455
+ readonly onMissing?: OnMissingPolicy;
2456
+ /** Ordered preferred-substitute locales for label resolution. */
2457
+ readonly substitute?: readonly string[];
2328
2458
  }
2329
2459
  /**
2330
2460
  * Create a `DictKeyDescriptor` for a dictionary-backed enum field.
@@ -2343,7 +2473,10 @@ interface DictKeyDescriptor<Keys extends string = string> {
2343
2473
  * })
2344
2474
  * ```
2345
2475
  */
2346
- declare function dictKey<Keys extends string>(name: string, keys?: readonly Keys[]): DictKeyDescriptor<Keys>;
2476
+ declare function dictKey<Keys extends string>(name: string, keys?: readonly Keys[], opts?: {
2477
+ onMissing?: OnMissingPolicy;
2478
+ substitute?: readonly string[];
2479
+ }): DictKeyDescriptor<Keys>;
2347
2480
  /** Runtime predicate for detecting a DictKeyDescriptor. */
2348
2481
  declare function isDictKeyDescriptor(x: unknown): x is DictKeyDescriptor;
2349
2482
  /**
@@ -2487,6 +2620,32 @@ declare class DictionaryHandle<Keys extends string = string> {
2487
2620
  resolveLabel(key: string, locale: string, fallback?: string | readonly string[]): Promise<string | undefined>;
2488
2621
  }
2489
2622
 
2623
+ /**
2624
+ * Infer the allowed Unicode scripts for a BCP-47 locale, with asymmetric
2625
+ * Latin tolerance. A script subtag (`th-Latn`) wins over the base
2626
+ * language. Unknown locales default to `['Latin']`.
2627
+ */
2628
+ declare function inferScripts(locale: string): readonly string[];
2629
+ /** A non-fatal script violation recorded under `'filter'`/`'warn'` modes. */
2630
+ interface ScriptWarning {
2631
+ readonly field: string;
2632
+ readonly locale: string;
2633
+ readonly expected: readonly string[];
2634
+ readonly sample: string;
2635
+ }
2636
+ /**
2637
+ * Enforce a field's script constraint over an i18nText value map.
2638
+ *
2639
+ * - No `script` option ⇒ returns the value unchanged.
2640
+ * - `onScriptViolation: 'reject'` (default) ⇒ throws {@link ScriptViolationError}.
2641
+ * - `'filter'` ⇒ returns a copy with disallowed characters stripped + warnings.
2642
+ * - `'warn'` ⇒ returns the value unchanged + warnings.
2643
+ */
2644
+ declare function enforceScript(value: Record<string, unknown>, field: string, descriptor: I18nTextDescriptor): {
2645
+ value: Record<string, unknown>;
2646
+ warnings: ScriptWarning[];
2647
+ };
2648
+
2490
2649
  /**
2491
2650
  * Strategy seam for the optional i18n (multi-locale + dictionary)
2492
2651
  * subsystem. Core imports `I18nStrategy` type-only + `NO_I18N` stub;
@@ -2548,13 +2707,23 @@ interface I18nStrategy {
2548
2707
  * return a new object. Returns the input unchanged under
2549
2708
  * `NO_I18N`.
2550
2709
  */
2551
- applyI18nLocale(record: Record<string, unknown>, fields: Record<string, I18nTextDescriptor>, locale: string, fallback?: string | readonly string[]): Record<string, unknown>;
2710
+ applyI18nLocale(record: Record<string, unknown>, fields: Record<string, I18nTextDescriptor>, locale: string, fallback?: string | readonly string[], layer?: Layer): Record<string, unknown>;
2552
2711
  /**
2553
2712
  * Validate that an i18nText field's value satisfies its descriptor
2554
2713
  * (required locales present, etc.). Throws under `NO_I18N` —
2555
2714
  * declaring i18nFields without opting in is a misconfiguration.
2556
2715
  */
2557
2716
  validateI18nTextValue(value: unknown, field: string, descriptor: I18nTextDescriptor): void;
2717
+ /**
2718
+ * Enforce per-locale script constraints over an i18nText value map
2719
+ * (write-time). Returns the (possibly filtered) value plus any
2720
+ * non-fatal warnings. Returns the value unchanged when the field has
2721
+ * no `script` option, or under `NO_I18N`.
2722
+ */
2723
+ enforceScript(value: Record<string, unknown>, field: string, descriptor: I18nTextDescriptor): {
2724
+ value: Record<string, unknown>;
2725
+ warnings: ScriptWarning[];
2726
+ };
2558
2727
  /**
2559
2728
  * Construct a typed `DictionaryHandle` for the named dictionary.
2560
2729
  * Throws under `NO_I18N`.
@@ -12604,4 +12773,4 @@ interface DeleteManyResult {
12604
12773
  }>;
12605
12774
  }
12606
12775
 
12607
- export { type ConsentStrategy as $, type BlobFieldPolicy as A, type BlobStrategy as B, type BlobFieldsConfig as C, DICT_COLLECTION_PREFIX as D, type BlobObject as E, type BlobPutOptions as F, type BlobResponseOptions as G, BlobSet as H, type I18nStrategy as I, type BlobStrategyOpenArgs as J, type CompactRunOptions as K, type CompactionContext as L, type CompactionResult as M, DEFAULT_CHUNK_SIZE as N, EXPORT_AUDIT_COLLECTION as O, PolicyEnforcer as P, ExportBlobsAbortedError as Q, type ExportBlobsAuditEntry as R, type SessionStrategy as S, type ExportBlobsHandle as T, type ExportBlobsOptions as U, type ExportedBlob as V, type SlotInfo as W, type SlotRecord as X, type VersionRecord as Y, createExportBlobsHandle as Z, runCompaction as _, type DictEntry as a, type DiffEntry as a$, CONSENT_AUDIT_COLLECTION as a0, type ConsentAuditEntry as a1, type ConsentAuditFilter as a2, type ConsentContext as a3, type ConsentOp as a4, loadConsentEntries as a5, writeConsentEntry as a6, type PeriodsStrategy as a7, type CarryForwardContext as a8, type ClosePeriodOptions as a9, TxVault as aA, runTransaction as aB, type DerivationStrategy as aC, type DerivationContext as aD, type ArrayOutputSpec as aE, DerivationRegistry as aF, type DerivationStrategyHandle as aG, type DerivedFromMeta as aH, type OutputSpec as aI, type RecordOutputSpec as aJ, type MaterializedViewStrategy as aK, type MaterializedViewStrategyHandle as aL, type OverlayedViewStrategy as aM, Collection as aN, OverlayedViewRegistry as aO, type OverlayedViewStrategyHandle as aP, type SyncStrategy as aQ, type Role as aR, type UnlockedKeyring as aS, type HistoryStrategy as aT, type NoydbStore as aU, type HistoryOptions as aV, type EncryptedEnvelope as aW, type PruneOptions as aX, type AppendInput as aY, type ChangeType as aZ, CollectionInstant as a_, type OpenPeriodOptions as aa, PERIODS_COLLECTION as ab, type PeriodRecord as ac, type ReadOnlyCollection as ad, appendPeriodLedgerEntry as ae, assertTsWritable as af, chainAnchor as ag, loadPeriods as ah, validatePeriodName as ai, type GuardStrategy as aj, type GuardChange as ak, type GuardContext as al, GuardRegistry as am, type GuardStrategyHandle as an, ReadOnlyVaultFacade as ao, type ShadowStrategy as ap, CollectionFrame as aq, VaultFrame as ar, type NoydbBundleStore as as, type RetentionPolicy as at, type SnapshotStrategy as au, type SnapshotMeta as av, type TxStrategy as aw, type AmendmentTxOptions as ax, TxCollection as ay, TxContext as az, type DictKeyDescriptor as b, type DerivationDescriptor as b$, type JsonPatch as b0, type JsonPatchOp as b1, type LedgerEntry as b2, LedgerStore as b3, type VaultEngine as b4, VaultInstant as b5, type VerifyResult as b6, applyPatch as b7, canonicalJson as b8, computePatch as b9, type SchemaUpdateStrategy as bA, type TransformFn as bB, type PersistedSchemaEnvelope as bC, type UpdateDecision as bD, type DirectoryConfig as bE, type UserVisibility as bF, type AccessibleVault as bG, type AffectedDocument as bH, BUNDLE_STORE_POLICY as bI, type BuiltInGateName as bJ, type CacheOptions as bK, type CacheStats as bL, type ChangeEvent as bM, type CollectionChangeEvent as bN, type CollectionConflictResolver as bO, type CollectionDescriptor as bP, type CollectionStats as bQ, type Conflict as bR, type ConflictPolicy as bS, type ConflictStrategy as bT, type CrossTierAccessEvent as bU, DEFAULT_PUBLIC_ENVELOPE_SCHEMA as bV, DELEGATIONS_COLLECTION as bW, type DeepPartial as bX, type DeepPartialOrNull as bY, type DelegationToken as bZ, type DeleteManyResult as b_, diff as ba, formatDiff as bb, hashEntry as bc, paddedIndex as bd, parseIndex as be, sha256Hex as bf, type PublicEnvelope as bg, type SealingKeyProvider as bh, type BundleRecipient as bi, type RecipientSealer as bj, type RecipientHint as bk, Vault as bl, type RecoveryEnrollmentInput as bm, type ShamirRecoveryProvider as bn, type MVQueryContext as bo, type RegisteredMV as bp, MaterializedViewRegistry as bq, type MaterializedFromMeta as br, type MaterializedViewOutput as bs, type UnionSource as bt, type UserEnvelope as bu, type GateName as bv, type GatePolicy as bw, type VaultPolicy as bx, type ActiveTier as by, type FactorProof as bz, DictionaryHandle as c, type PassphrasePolicy as c$, type DirtyEntry as c0, type DryRunResult as c1, type DumpSchemaOptions as c2, ELEVATION_AUDIT_COLLECTION as c3, ElevatedHandle as c4, type EnrollAuthenticatorOptions as c5, type EnrollAuthenticatorWrappingDEKsOptions as c6, type EnrollAuthenticatorWrappingKEKOptions as c7, type EnrollRecoveryResult as c8, type ExportCapability as c9, type ListAccessibleVaultsOptions as cA, type ListPageResult as cB, type ListUsersOptions as cC, type LiveUserEnvelope as cD, type LocaleReadOptions as cE, Lru as cF, type LruOptions as cG, type LruStats as cH, MAGIC_LINK_CONTENT_INFO_PREFIX as cI, MAGIC_LINK_GRANTS_COLLECTION as cJ, MAGIC_LINK_KEK_INFO_PREFIX as cK, type MagicLinkGrantPayload as cL, type MagicLinkGrantRecord as cM, type MaterializedViewDescriptor as cN, MemoryRecipientSealer as cO, MemorySealingKeyProvider as cP, NOYDB_BACKUP_VERSION as cQ, NOYDB_FORMAT_VERSION as cR, NOYDB_KEYRING_VERSION as cS, NOYDB_SYNC_VERSION as cT, Noydb as cU, type NoydbEventMap as cV, type NoydbOptions as cW, type OverlayViewDescriptor as cX, PUBLIC_ENVELOPE_FIELDS as cY, type PaperRecoveryDoc as cZ, type PaperRecoveryEntry as c_, type ExportChunk as ca, type ExportFormat as cb, type ExportStreamOptions as cc, type FactorKind as cd, type FactorProofBundle as ce, type FactorRequirement as cf, type FenceDoc as cg, type FenceState as ch, type FieldChange as ci, type FieldDescriptor as cj, type FieldSource as ck, type GhostRecord as cl, type GrantOptions as cm, type GuardViolation as cn, type HistoryConfig as co, type HistoryEntry as cp, INDEXED_STORE_POLICY as cq, type ImportCapability as cr, type InferOutput as cs, type InternalCollectionStats as ct, type IssueDelegationOptions as cu, type IssueMagicLinkGrantOptions as cv, type KeyringAuthenticator as cw, type KeyringAuthenticatorWrappingDEKs as cx, type KeyringAuthenticatorWrappingKEK as cy, type KeyringFile as cz, type DictionaryOptions as d, type SyncTransactionResult as d$, type PassphraseValidationResult as d0, type Permission as d1, type Permissions as d2, type PersistedSchemaKind as d3, type PlaintextTranslatorContext as d4, type PlaintextTranslatorFn as d5, PresenceHandle as d6, type PresencePeer as d7, type PublicEnvelopeField as d8, type PublicEnvelopeSchema as d9, type RotateRecoveryResult as dA, SEALED_PASSPHRASE_RECORD_ID as dB, type SchemaDelta as dC, type SchemaIntrospection as dD, type SealedEnvelope as dE, type SealedPassphrase as dF, type SessionPolicy as dG, type SetPublicEnvelopeInput as dH, type ShamirRecoveryDoc as dI, type ShamirRecoveryEntry as dJ, type SlotRewrapCeremony as dK, type SlotRewrapContext as dL, type StandardSchemaV1 as dM, type StandardSchemaV1Issue as dN, type StandardSchemaV1SyncResult as dO, type StoreAuth as dP, type StoreAuthKind as dQ, type StoreCapabilities as dR, SyncEngine as dS, type SyncMetadata as dT, type SyncPolicy as dU, SyncScheduler as dV, type SyncSchedulerStatus as dW, type SyncStatus as dX, type SyncTarget as dY, type SyncTargetRole as dZ, SyncTransaction as d_, type PublicEnvelopeText as da, type PullMode as db, type PullOptions as dc, type PullPolicy as dd, type PullResult as de, type PushMode as df, type PushOptions as dg, type PushPolicy as dh, type PushResult as di, type PutManyItemOptions as dj, type PutManyOptions as dk, type PutManyResult as dl, type QueryAcrossOptions as dm, type QueryAcrossResult as dn, type QuickUnlockState as dp, QuickUnlockStore as dq, type ReAuthOperation as dr, type RecoverPassphraseInput as ds, type RecoverPassphraseResult as dt, type RecoverUserOptions as du, type RecoveryProof as dv, type ResolvedPublicEnvelopeSchema as dw, type RevokeOptions as dx, type RotatePassphraseInput as dy, type RotateRecoveryOptions as dz, type I18nTextDescriptor as e, recoverUser as e$, type TabChannel as e0, type TabCoordinationOptions as e1, type TabLockManager as e2, type TabPresence as e3, type TabRole as e4, type TierMode as e5, type TranslatorAuditEntry as e6, type TxOp as e7, USER_ENVELOPE_COLLECTION as e8, USER_ENVELOPE_MAX_BYTES as e9, deriveMagicLinkContentKey as eA, enrollAuthenticator as eB, estimateEntropy as eC, evaluateExportCapability as eD, evaluateImportCapability as eE, findAuthenticator as eF, hasExportCapability as eG, hasImportCapability as eH, hasRecoveryEnrolled as eI, isMagicLinkGrantExpired as eJ, isPublicEnvelope as eK, issueDelegation as eL, recoverPassphrase as eM, rotatePassphrase as eN, listMagicLinkGrants as eO, listUsers as eP, listUsersWithEnvelopes as eQ, loadActiveDelegations as eR, loadPaperRecoveryEntries as eS, loadSealedPassphrase as eT, loadShamirRecoveryEntries as eU, magicLinkGrantRecordId as eV, mintPaperRecoveryEntry as eW, mintShamirRecoveryEntry as eX, mintWrappedDeksBlob as eY, parseSealedEnvelope as eZ, readMagicLinkGrantRecord as e_, type Unsubscribe as ea, type UpdateAuthenticatorOptions as eb, type UpdateContext as ec, type UpdateUserOptions as ed, UserApi as ee, type UserEnvelopeCheckGate as ef, UserEnvelopeOversizedError as eg, type UserEnvelopePresented as eh, type UserInfo as ei, type VaultBackup as ej, type VaultPolicyOnDisk as ek, type VaultSchemaSnapshot as el, type VaultSnapshot as em, type WarningRules as en, WeakPassphraseError as eo, type WeakPassphraseReason as ep, type WrappedDeksBlob as eq, type WriteConflict as er, type WriteEvent as es, type WriteHook as et, type WriteQueue as eu, assertStrongPassphrase as ev, buildRecipientKeyringFile as ew, burnPaperRecoveryEntry as ex, createNoydb as ey, createStore as ez, type I18nTextOptions as f, removeAuthenticator as f0, resolveSchema as f1, revokeDelegation as f2, revokeMagicLinkGrant as f3, savePaperRecoveryEntries as f4, saveSealedPassphrase as f5, saveShamirRecoveryEntries as f6, unwrapDeksFromBlob as f7, unwrapDeksFromPaperEntry as f8, unwrapDeksFromShamirEntry as f9, unwrapMagicLinkGrant as fa, validatePassphrase as fb, validatePublicEnvelopeInput as fc, validateSchemaInput as fd, validateSchemaOutput as fe, writeMagicLinkGrant as ff, changeSecret as fg, createOwnerKeyring as fh, ensureCollectionDEK as fi, grant as fj, loadKeyring as fk, persistKeyring as fl, revoke as fm, updateAuthenticator as fn, updateKeyringIdentity as fo, applyI18nLocale as g, dictCollectionName as h, dictKey as i, getAtPath as j, i18nText as k, isDictCollectionName as l, isDictKeyDescriptor as m, isI18nTextDescriptor as n, createEnforcer as o, validateSessionPolicy as p, BLOB_CHUNKS_COLLECTION as q, resolveI18nText as r, setAtPathInPlace as s, BLOB_COLLECTION as t, BLOB_EVICTION_AUDIT_COLLECTION as u, validateI18nTextValue as v, BLOB_INDEX_COLLECTION as w, BLOB_SLOTS_PREFIX as x, BLOB_VERSIONS_PREFIX as y, type BlobEvictionEntry as z };
12776
+ export { type ExportBlobsAuditEntry as $, BLOB_COLLECTION as A, type BlobStrategy as B, BLOB_EVICTION_AUDIT_COLLECTION as C, DICT_COLLECTION_PREFIX as D, BLOB_INDEX_COLLECTION as E, BLOB_SLOTS_PREFIX as F, BLOB_VERSIONS_PREFIX as G, type BlobEvictionEntry as H, type I18nStrategy as I, type BlobFieldPolicy as J, type BlobFieldsConfig as K, type Layer as L, type BlobObject as M, type BlobPutOptions as N, type OnMissing as O, PolicyEnforcer as P, type BlobResponseOptions as Q, type ResolveI18nOptions as R, type ScriptWarning as S, BlobSet as T, type BlobStrategyOpenArgs as U, type CompactRunOptions as V, type CompactionContext as W, type CompactionResult as X, DEFAULT_CHUNK_SIZE as Y, EXPORT_AUDIT_COLLECTION as Z, ExportBlobsAbortedError as _, type DictEntry as a, type UnlockedKeyring as a$, type ExportBlobsHandle as a0, type ExportBlobsOptions as a1, type ExportedBlob as a2, type SlotInfo as a3, type SlotRecord as a4, type VersionRecord as a5, createExportBlobsHandle as a6, runCompaction as a7, type ConsentStrategy as a8, CONSENT_AUDIT_COLLECTION as a9, VaultFrame as aA, type NoydbBundleStore as aB, type RetentionPolicy as aC, type SnapshotStrategy as aD, type SnapshotMeta as aE, type TxStrategy as aF, type AmendmentTxOptions as aG, TxCollection as aH, TxContext as aI, TxVault as aJ, runTransaction as aK, type DerivationStrategy as aL, type DerivationContext as aM, type ArrayOutputSpec as aN, DerivationRegistry as aO, type DerivationStrategyHandle as aP, type DerivedFromMeta as aQ, type OutputSpec as aR, type RecordOutputSpec as aS, type MaterializedViewStrategy as aT, type MaterializedViewStrategyHandle as aU, type OverlayedViewStrategy as aV, Collection as aW, OverlayedViewRegistry as aX, type OverlayedViewStrategyHandle as aY, type SyncStrategy as aZ, type Role as a_, type ConsentAuditEntry as aa, type ConsentAuditFilter as ab, type ConsentContext as ac, type ConsentOp as ad, loadConsentEntries as ae, writeConsentEntry as af, type PeriodsStrategy as ag, type CarryForwardContext as ah, type ClosePeriodOptions as ai, type OpenPeriodOptions as aj, PERIODS_COLLECTION as ak, type PeriodRecord as al, type ReadOnlyCollection as am, appendPeriodLedgerEntry as an, assertTsWritable as ao, chainAnchor as ap, loadPeriods as aq, validatePeriodName as ar, type GuardStrategy as as, type GuardChange as at, type GuardContext as au, GuardRegistry as av, type GuardStrategyHandle as aw, ReadOnlyVaultFacade as ax, type ShadowStrategy as ay, CollectionFrame as az, type DictKeyDescriptor as b, type ConflictPolicy as b$, type HistoryStrategy as b0, type NoydbStore as b1, type HistoryOptions as b2, type EncryptedEnvelope as b3, type PruneOptions as b4, type AppendInput as b5, type ChangeType as b6, CollectionInstant as b7, type DiffEntry as b8, type JsonPatch as b9, type MaterializedFromMeta as bA, type MaterializedViewOutput as bB, type UnionSource as bC, type UserEnvelope as bD, type GateName as bE, type GatePolicy as bF, type VaultPolicy as bG, type ActiveTier as bH, type FactorProof as bI, type SchemaUpdateStrategy as bJ, type TransformFn as bK, type PersistedSchemaEnvelope as bL, type UpdateDecision as bM, type DirectoryConfig as bN, type UserVisibility as bO, type AccessibleVault as bP, type AffectedDocument as bQ, BUNDLE_STORE_POLICY as bR, type BuiltInGateName as bS, type CacheOptions as bT, type CacheStats as bU, type ChangeEvent as bV, type CollectionChangeEvent as bW, type CollectionConflictResolver as bX, type CollectionDescriptor as bY, type CollectionStats as bZ, type Conflict as b_, type JsonPatchOp as ba, type LedgerEntry as bb, LedgerStore as bc, type VaultEngine as bd, VaultInstant as be, type VerifyResult as bf, applyPatch as bg, canonicalJson as bh, computePatch as bi, diff as bj, formatDiff as bk, hashEntry as bl, paddedIndex as bm, parseIndex as bn, sha256Hex as bo, type PublicEnvelope as bp, type SealingKeyProvider as bq, type BundleRecipient as br, type RecipientSealer as bs, type RecipientHint as bt, Vault as bu, type RecoveryEnrollmentInput as bv, type ShamirRecoveryProvider as bw, type MVQueryContext as bx, type RegisteredMV as by, MaterializedViewRegistry as bz, DictionaryHandle as c, NOYDB_KEYRING_VERSION as c$, type ConflictStrategy as c0, type CrossTierAccessEvent as c1, DEFAULT_PUBLIC_ENVELOPE_SCHEMA as c2, DELEGATIONS_COLLECTION as c3, type DeepPartial as c4, type DeepPartialOrNull as c5, type DelegationToken as c6, type DeleteManyResult as c7, type DerivationDescriptor as c8, type DirtyEntry as c9, type ImportCapability as cA, type InferOutput as cB, type InternalCollectionStats as cC, type IssueDelegationOptions as cD, type IssueMagicLinkGrantOptions as cE, type KeyringAuthenticator as cF, type KeyringAuthenticatorWrappingDEKs as cG, type KeyringAuthenticatorWrappingKEK as cH, type KeyringFile as cI, type ListAccessibleVaultsOptions as cJ, type ListPageResult as cK, type ListUsersOptions as cL, type LiveUserEnvelope as cM, type LocaleReadOptions as cN, Lru as cO, type LruOptions as cP, type LruStats as cQ, MAGIC_LINK_CONTENT_INFO_PREFIX as cR, MAGIC_LINK_GRANTS_COLLECTION as cS, MAGIC_LINK_KEK_INFO_PREFIX as cT, type MagicLinkGrantPayload as cU, type MagicLinkGrantRecord as cV, type MaterializedViewDescriptor as cW, MemoryRecipientSealer as cX, MemorySealingKeyProvider as cY, NOYDB_BACKUP_VERSION as cZ, NOYDB_FORMAT_VERSION as c_, type DryRunResult as ca, type DumpSchemaOptions as cb, ELEVATION_AUDIT_COLLECTION as cc, ElevatedHandle as cd, type EnrollAuthenticatorOptions as ce, type EnrollAuthenticatorWrappingDEKsOptions as cf, type EnrollAuthenticatorWrappingKEKOptions as cg, type EnrollRecoveryResult as ch, type ExportCapability as ci, type ExportChunk as cj, type ExportFormat as ck, type ExportStreamOptions as cl, type FactorKind as cm, type FactorProofBundle as cn, type FactorRequirement as co, type FenceDoc as cp, type FenceState as cq, type FieldChange as cr, type FieldDescriptor as cs, type FieldSource as ct, type GhostRecord as cu, type GrantOptions as cv, type GuardViolation as cw, type HistoryConfig as cx, type HistoryEntry as cy, INDEXED_STORE_POLICY as cz, type DictionaryOptions as d, SyncEngine as d$, NOYDB_SYNC_VERSION as d0, Noydb as d1, type NoydbEventMap as d2, type NoydbOptions as d3, type OverlayViewDescriptor as d4, PUBLIC_ENVELOPE_FIELDS as d5, type PaperRecoveryDoc as d6, type PaperRecoveryEntry as d7, type PassphrasePolicy as d8, type PassphraseValidationResult as d9, type ReAuthOperation as dA, type RecoverPassphraseInput as dB, type RecoverPassphraseResult as dC, type RecoverUserOptions as dD, type RecoveryProof as dE, type ResolvedPublicEnvelopeSchema as dF, type RevokeOptions as dG, type RotatePassphraseInput as dH, type RotateRecoveryOptions as dI, type RotateRecoveryResult as dJ, SEALED_PASSPHRASE_RECORD_ID as dK, type SchemaDelta as dL, type SchemaIntrospection as dM, type SealedEnvelope as dN, type SealedPassphrase as dO, type SessionPolicy as dP, type SetPublicEnvelopeInput as dQ, type ShamirRecoveryDoc as dR, type ShamirRecoveryEntry as dS, type SlotRewrapCeremony as dT, type SlotRewrapContext as dU, type StandardSchemaV1 as dV, type StandardSchemaV1Issue as dW, type StandardSchemaV1SyncResult as dX, type StoreAuth as dY, type StoreAuthKind as dZ, type StoreCapabilities as d_, type Permission as da, type Permissions as db, type PersistedSchemaKind as dc, type PlaintextTranslatorContext as dd, type PlaintextTranslatorFn as de, PresenceHandle as df, type PresencePeer as dg, type PublicEnvelopeField as dh, type PublicEnvelopeSchema as di, type PublicEnvelopeText as dj, type PullMode as dk, type PullOptions as dl, type PullPolicy as dm, type PullResult as dn, type PushMode as dp, type PushOptions as dq, type PushPolicy as dr, type PushResult as ds, type PutManyItemOptions as dt, type PutManyOptions as du, type PutManyResult as dv, type QueryAcrossOptions as dw, type QueryAcrossResult as dx, type QuickUnlockState as dy, QuickUnlockStore as dz, type I18nMap as e, loadPaperRecoveryEntries as e$, type SyncMetadata as e0, type SyncPolicy as e1, SyncScheduler as e2, type SyncSchedulerStatus as e3, type SyncStatus as e4, type SyncTarget as e5, type SyncTargetRole as e6, SyncTransaction as e7, type SyncTransactionResult as e8, type TabChannel as e9, type WriteConflict as eA, type WriteEvent as eB, type WriteHook as eC, type WriteQueue as eD, assertStrongPassphrase as eE, buildRecipientKeyringFile as eF, burnPaperRecoveryEntry as eG, createNoydb as eH, createStore as eI, deriveMagicLinkContentKey as eJ, enrollAuthenticator as eK, estimateEntropy as eL, evaluateExportCapability as eM, evaluateImportCapability as eN, findAuthenticator as eO, hasExportCapability as eP, hasImportCapability as eQ, hasRecoveryEnrolled as eR, isMagicLinkGrantExpired as eS, isPublicEnvelope as eT, issueDelegation as eU, recoverPassphrase as eV, rotatePassphrase as eW, listMagicLinkGrants as eX, listUsers as eY, listUsersWithEnvelopes as eZ, loadActiveDelegations as e_, type TabCoordinationOptions as ea, type TabLockManager as eb, type TabPresence as ec, type TabRole as ed, type TierMode as ee, type TranslatorAuditEntry as ef, type TxOp as eg, USER_ENVELOPE_COLLECTION as eh, USER_ENVELOPE_MAX_BYTES as ei, type Unsubscribe as ej, type UpdateAuthenticatorOptions as ek, type UpdateContext as el, type UpdateUserOptions as em, UserApi as en, type UserEnvelopeCheckGate as eo, UserEnvelopeOversizedError as ep, type UserEnvelopePresented as eq, type UserInfo as er, type VaultBackup as es, type VaultPolicyOnDisk as et, type VaultSchemaSnapshot as eu, type VaultSnapshot as ev, type WarningRules as ew, WeakPassphraseError as ex, type WeakPassphraseReason as ey, type WrappedDeksBlob as ez, type I18nTextDescriptor as f, loadSealedPassphrase as f0, loadShamirRecoveryEntries as f1, magicLinkGrantRecordId as f2, mintPaperRecoveryEntry as f3, mintShamirRecoveryEntry as f4, mintWrappedDeksBlob as f5, parseSealedEnvelope as f6, readMagicLinkGrantRecord as f7, recoverUser as f8, removeAuthenticator as f9, resolveSchema as fa, revokeDelegation as fb, revokeMagicLinkGrant as fc, savePaperRecoveryEntries as fd, saveSealedPassphrase as fe, saveShamirRecoveryEntries as ff, unwrapDeksFromBlob as fg, unwrapDeksFromPaperEntry as fh, unwrapDeksFromShamirEntry as fi, unwrapMagicLinkGrant as fj, validatePassphrase as fk, validatePublicEnvelopeInput as fl, validateSchemaInput as fm, validateSchemaOutput as fn, writeMagicLinkGrant as fo, changeSecret as fp, createOwnerKeyring as fq, ensureCollectionDEK as fr, grant as fs, loadKeyring as ft, persistKeyring as fu, revoke as fv, updateAuthenticator as fw, updateKeyringIdentity as fx, type I18nTextOptions as g, type OnMissingPolicy as h, applyI18nLocale as i, dictCollectionName as j, dictKey as k, enforceScript as l, getAtPath as m, i18nText as n, inferScripts as o, isDictCollectionName as p, isDictKeyDescriptor as q, isI18nTextDescriptor as r, resolveI18nText as s, resolvePolicy as t, setAtPathInPlace as u, validateI18nTextValue as v, type SessionStrategy as w, createEnforcer as x, validateSessionPolicy as y, BLOB_CHUNKS_COLLECTION as z };