@noy-db/hub 0.3.0-pre.9 → 0.3.0

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 (958) hide show
  1. package/dist/aggregate/index.js +5 -5
  2. package/dist/api-ZGS6LCOF.js +20 -0
  3. package/dist/as/index.js +11 -11
  4. package/dist/attestation/index.js +18 -18
  5. package/dist/backup-BJ57IKAO.js +242 -0
  6. package/dist/backup-BJ57IKAO.js.map +1 -0
  7. package/dist/blobs/index.js +13 -11
  8. package/dist/blobs/index.js.map +1 -1
  9. package/dist/broker/index.js +92 -0
  10. package/dist/broker/index.js.map +1 -0
  11. package/dist/bundle/index.js +25 -22
  12. package/dist/bundle/index.js.map +1 -1
  13. package/dist/by/index.js +2 -2
  14. package/dist/cargo/index.js +31 -32
  15. package/dist/chunk-2NVOWNI3.js +167 -0
  16. package/dist/chunk-2NVOWNI3.js.map +1 -0
  17. package/dist/chunk-3B5VVCNY.js +71 -0
  18. package/dist/chunk-3LQ2YKO4.js +230 -0
  19. package/dist/chunk-3QCRBHCY.js +54 -0
  20. package/dist/chunk-454JXE57.js +1697 -0
  21. package/dist/chunk-454JXE57.js.map +1 -0
  22. package/dist/chunk-4CTHCN4J.js +480 -0
  23. package/dist/chunk-4CTHCN4J.js.map +1 -0
  24. package/dist/chunk-4GPE63GU.js +111 -0
  25. package/dist/chunk-4GPE63GU.js.map +1 -0
  26. package/dist/chunk-4JBYV75E.js +150 -0
  27. package/dist/chunk-4NXKCLLQ.js +97 -0
  28. package/dist/chunk-4VNQOLML.js +29 -0
  29. package/dist/chunk-4VNQOLML.js.map +1 -0
  30. package/dist/chunk-5M5DVGV7.js +69 -0
  31. package/dist/chunk-5O3XF4DV.js +150 -0
  32. package/dist/chunk-5O3XF4DV.js.map +1 -0
  33. package/dist/chunk-5YOLBEQ6.js +30 -0
  34. package/dist/chunk-6CRIV7DE.js +129 -0
  35. package/dist/chunk-6JTIAGHD.js +621 -0
  36. package/dist/chunk-6JTIAGHD.js.map +1 -0
  37. package/dist/chunk-6QTNZJBS.js +255 -0
  38. package/dist/chunk-6T2SCQRU.js +86 -0
  39. package/dist/chunk-7DSTRQIJ.js +45 -0
  40. package/dist/chunk-AUSTCW2X.js +589 -0
  41. package/dist/chunk-B3HJYUOF.js +209 -0
  42. package/dist/chunk-BDVFPG6Y.js +164 -0
  43. package/dist/chunk-BIOUI4HL.js +1554 -0
  44. package/dist/chunk-BIOUI4HL.js.map +1 -0
  45. package/dist/chunk-CAF6WOK7.js +36 -0
  46. package/dist/chunk-CDUQTA3Z.js +381 -0
  47. package/dist/chunk-CDUQTA3Z.js.map +1 -0
  48. package/dist/chunk-CIE2BASH.js +404 -0
  49. package/dist/chunk-CRI4OUV4.js +42 -0
  50. package/dist/chunk-DLG74CNB.js +91 -0
  51. package/dist/chunk-E5ZQT5KX.js +30 -0
  52. package/dist/chunk-E5ZQT5KX.js.map +1 -0
  53. package/dist/chunk-EQO2UVP4.js +247 -0
  54. package/dist/chunk-EQO2UVP4.js.map +1 -0
  55. package/dist/chunk-ERJ7FU55.js +367 -0
  56. package/dist/chunk-EVVGJDRQ.js +205 -0
  57. package/dist/chunk-EVX47VBM.js +74 -0
  58. package/dist/chunk-EVX47VBM.js.map +1 -0
  59. package/dist/chunk-EXK7QRWF.js +59 -0
  60. package/dist/chunk-EYZ6IQ6X.js +202 -0
  61. package/dist/chunk-F64IRYG3.js +45 -0
  62. package/dist/chunk-FHS2HQSH.js +823 -0
  63. package/dist/chunk-FM3G3NOY.js +206 -0
  64. package/dist/chunk-FM3G3NOY.js.map +1 -0
  65. package/dist/chunk-FUG4SFN3.js +36 -0
  66. package/dist/chunk-FUG4SFN3.js.map +1 -0
  67. package/dist/chunk-GKEWXIV5.js +80 -0
  68. package/dist/chunk-GTGPO5KW.js +59 -0
  69. package/dist/chunk-HB3RFQSC.js +95 -0
  70. package/dist/chunk-HDMEGAQE.js +957 -0
  71. package/dist/chunk-HDMEGAQE.js.map +1 -0
  72. package/dist/chunk-HDQIIUPH.js +135 -0
  73. package/dist/chunk-HDQIIUPH.js.map +1 -0
  74. package/dist/chunk-HTJQYHZP.js +344 -0
  75. package/dist/chunk-HTJQYHZP.js.map +1 -0
  76. package/dist/chunk-I6GALP6E.js +99 -0
  77. package/dist/chunk-IGJCYUT5.js +99 -0
  78. package/dist/chunk-IGJCYUT5.js.map +1 -0
  79. package/dist/chunk-IL6POWCW.js +130 -0
  80. package/dist/chunk-IU6SNYX6.js +117 -0
  81. package/dist/chunk-J2ZX2XUV.js +778 -0
  82. package/dist/chunk-JIF24JPM.js +495 -0
  83. package/dist/chunk-JIF24JPM.js.map +1 -0
  84. package/dist/chunk-JK733I5V.js +23 -0
  85. package/dist/chunk-JK733I5V.js.map +1 -0
  86. package/dist/chunk-JKJOGPZN.js +29 -0
  87. package/dist/chunk-JNAI2HN2.js +32 -0
  88. package/dist/chunk-JNAI2HN2.js.map +1 -0
  89. package/dist/chunk-JZUV47FZ.js +41 -0
  90. package/dist/chunk-K5IMOGHB.js +30 -0
  91. package/dist/chunk-KPZS5QAQ.js +151 -0
  92. package/dist/chunk-KPZS5QAQ.js.map +1 -0
  93. package/dist/chunk-KSKBRKGJ.js +291 -0
  94. package/dist/chunk-KSKBRKGJ.js.map +1 -0
  95. package/dist/chunk-LASZKVMO.js +382 -0
  96. package/dist/chunk-LXEXBTKL.js +515 -0
  97. package/dist/chunk-LXEXBTKL.js.map +1 -0
  98. package/dist/chunk-M4CV6BRT.js +524 -0
  99. package/dist/chunk-M4CV6BRT.js.map +1 -0
  100. package/dist/chunk-MEFJPTZ4.js +371 -0
  101. package/dist/chunk-MEFJPTZ4.js.map +1 -0
  102. package/dist/chunk-MV43JSJF.js +265 -0
  103. package/dist/chunk-MV43JSJF.js.map +1 -0
  104. package/dist/chunk-NJ4EOKMB.js +392 -0
  105. package/dist/chunk-NJ4EOKMB.js.map +1 -0
  106. package/dist/chunk-NR5LT5RY.js +135 -0
  107. package/dist/chunk-NWSGI5C7.js +261 -0
  108. package/dist/chunk-OSDB5WW3.js +739 -0
  109. package/dist/chunk-OSDB5WW3.js.map +1 -0
  110. package/dist/chunk-PN2XMATY.js +37 -0
  111. package/dist/chunk-PN2XMATY.js.map +1 -0
  112. package/dist/chunk-Q5VNKNE5.js +70 -0
  113. package/dist/chunk-QLWMEXCT.js +21 -0
  114. package/dist/chunk-QRB7NAOJ.js +123 -0
  115. package/dist/chunk-R4ROFEYC.js +74 -0
  116. package/dist/chunk-RCVJZMFE.js +164 -0
  117. package/dist/chunk-RCVJZMFE.js.map +1 -0
  118. package/dist/chunk-RIX4V2TB.js +367 -0
  119. package/dist/chunk-RYCTDFUX.js +40 -0
  120. package/dist/chunk-RZ5SVOYR.js +155 -0
  121. package/dist/chunk-SLFHQTTW.js +99 -0
  122. package/dist/chunk-SNZ6URZZ.js +2782 -0
  123. package/dist/chunk-SNZ6URZZ.js.map +1 -0
  124. package/dist/chunk-T2FFWNPK.js +75 -0
  125. package/dist/chunk-UNFPPVNI.js +23 -0
  126. package/dist/chunk-VFUPHI2Z.js +333 -0
  127. package/dist/chunk-VFUPHI2Z.js.map +1 -0
  128. package/dist/chunk-VLFCJYTL.js +235 -0
  129. package/dist/chunk-VN3DBQAU.js +124 -0
  130. package/dist/chunk-VYYM3MEN.js +98 -0
  131. package/dist/chunk-VYYM3MEN.js.map +1 -0
  132. package/dist/chunk-VZRODIM3.js +49 -0
  133. package/dist/chunk-W22IKJE2.js +94 -0
  134. package/dist/chunk-X3YYQWOQ.js +155 -0
  135. package/dist/chunk-X7QBD67R.js +14405 -0
  136. package/dist/chunk-X7QBD67R.js.map +1 -0
  137. package/dist/chunk-XDYREZWE.js +1128 -0
  138. package/dist/chunk-XDYREZWE.js.map +1 -0
  139. package/dist/chunk-XWZVFISC.js +720 -0
  140. package/dist/chunk-XWZVFISC.js.map +1 -0
  141. package/dist/chunk-YFXZEAYK.js +85 -0
  142. package/dist/chunk-ZAJAVEXY.js +50 -0
  143. package/dist/chunk-ZICD77GM.js +34 -0
  144. package/dist/chunk-ZJ2AK4V7.js +38 -0
  145. package/dist/chunk-ZUODRVHY.js +14 -0
  146. package/dist/classified/index.js +5 -5
  147. package/dist/classified-marker-CZKA6ITE.js +28 -0
  148. package/dist/classified-marker-CZKA6ITE.js.map +1 -0
  149. package/dist/collection-facade-TLWIPI76.js +44 -0
  150. package/dist/computed-ZIQTYTDI.js +11 -0
  151. package/dist/consent/index.js +9 -9
  152. package/dist/crdt/index.js +1 -1
  153. package/dist/dead-filter-ESOBZZP5.js +28 -0
  154. package/dist/delegation-W7ZV2322.js +25 -0
  155. package/dist/derivations/index.js +12 -12
  156. package/dist/derive-H2BJTLUI.js +21 -0
  157. package/dist/enclave-AP3I5W7O.js +141 -0
  158. package/dist/executor-KGWTNEQD.js +9 -0
  159. package/dist/executor-OVEXR6RT.js +9 -0
  160. package/dist/executor-UNEH5ZYH.js +25 -0
  161. package/dist/export-accessible-PCMXSUZS.js +23 -0
  162. package/dist/extract-partition-SWHFSYJO.js +38 -0
  163. package/dist/fanout-sidecar-A765THMX.js +74 -0
  164. package/dist/find-N6345CNT.js +11 -0
  165. package/dist/forget/index.js +10 -10
  166. package/dist/forget/index.js.map +1 -1
  167. package/dist/guards/index.js +6 -6
  168. package/dist/history/index.js +14 -11
  169. package/dist/history/index.js.map +1 -1
  170. package/dist/i18n/index.js +21 -19
  171. package/dist/i18n/index.js.map +1 -1
  172. package/dist/index.d.ts +307 -1493
  173. package/dist/index.js +309 -190
  174. package/dist/index.js.map +1 -1
  175. package/dist/indexing/index.js +7 -7
  176. package/dist/indexing/index.js.map +1 -1
  177. package/dist/issue-5OKB6I2R.js +19 -0
  178. package/dist/kernel/best-effort-revert.d.ts +52 -0
  179. package/dist/kernel/cache/index.d.ts +10 -0
  180. package/dist/kernel/cache/lru.d.ts +97 -0
  181. package/dist/kernel/cache/policy.d.ts +32 -0
  182. package/dist/kernel/collection-config.d.ts +809 -0
  183. package/dist/kernel/collection.d.ts +1522 -0
  184. package/dist/kernel/constants.d.ts +18 -0
  185. package/dist/kernel/debug.d.ts +25 -0
  186. package/dist/kernel/enclave/broker/proof.d.ts +154 -0
  187. package/dist/kernel/enclave/classify/bidx.d.ts +77 -0
  188. package/dist/kernel/enclave/classify/compare.d.ts +10 -0
  189. package/dist/kernel/enclave/classify/digest.d.ts +8 -0
  190. package/dist/kernel/enclave/classify/find.d.ts +36 -0
  191. package/dist/kernel/enclave/classify/kofn.d.ts +7 -0
  192. package/dist/kernel/enclave/classify/normalize.d.ts +7 -0
  193. package/dist/kernel/enclave/classify/reveal.d.ts +10 -0
  194. package/dist/kernel/enclave/classify/vdig.d.ts +39 -0
  195. package/dist/kernel/enclave/classify/verify.d.ts +36 -0
  196. package/dist/kernel/enclave/classify/write.d.ts +8 -0
  197. package/dist/kernel/enclave/crypto.d.ts +263 -0
  198. package/dist/kernel/enclave/index.d.ts +79 -0
  199. package/dist/kernel/enclave/record-keys/deterministic.d.ts +55 -0
  200. package/dist/kernel/enclave/record-keys/envelope-body.d.ts +79 -0
  201. package/dist/kernel/enclave/record-keys/lifecycle.d.ts +107 -0
  202. package/dist/kernel/enclave/record-keys/record-codec.d.ts +328 -0
  203. package/dist/kernel/enclave/record-keys/sealed-slot.d.ts +14 -0
  204. package/dist/kernel/enclave/record-keys/sealed-slots.d.ts +123 -0
  205. package/dist/kernel/enclave/record-keys/sealing.d.ts +70 -0
  206. package/dist/kernel/enclave/record-keys/tombstone.d.ts +57 -0
  207. package/dist/kernel/env-check.d.ts +1 -0
  208. package/dist/kernel/errors.d.ts +1922 -0
  209. package/dist/kernel/events.d.ts +11 -0
  210. package/dist/kernel/lazy-count.d.ts +13 -0
  211. package/dist/kernel/memory-store.d.ts +17 -0
  212. package/dist/kernel/mutation.d.ts +14 -0
  213. package/dist/kernel/noydb.d.ts +826 -0
  214. package/dist/kernel/paths.d.ts +25 -0
  215. package/dist/kernel/query/builder.d.ts +520 -0
  216. package/dist/kernel/query/index.d.ts +31 -0
  217. package/dist/kernel/query/join.d.ts +205 -0
  218. package/dist/kernel/query/live.d.ts +111 -0
  219. package/dist/kernel/query/predicate.d.ts +139 -0
  220. package/dist/kernel/query/scan-builder.d.ts +334 -0
  221. package/dist/kernel/refs.d.ts +205 -0
  222. package/dist/kernel/schema.d.ts +134 -0
  223. package/dist/kernel/sync-policy.d.ts +188 -0
  224. package/dist/kernel/tier-visibility.d.ts +54 -0
  225. package/dist/kernel/types.d.ts +3239 -0
  226. package/dist/kernel/util/discriminant.d.ts +58 -0
  227. package/dist/kernel/util/index.d.ts +14 -0
  228. package/dist/kernel/util/sanitize-filename.d.ts +75 -0
  229. package/dist/kernel/validation.d.ts +130 -0
  230. package/dist/kernel/vault.d.ts +1740 -0
  231. package/dist/kernel/via/compose.d.ts +144 -0
  232. package/dist/kernel/via/dispatch.d.ts +195 -0
  233. package/dist/kernel/via/graph-wiring.d.ts +145 -0
  234. package/dist/kernel/via/graph.d.ts +166 -0
  235. package/dist/kernel/via/index.d.ts +200 -0
  236. package/dist/kernel/via/pipeline.d.ts +266 -0
  237. package/dist/kernel/via/reconcile.d.ts +153 -0
  238. package/dist/kernel/via/taint-binding.d.ts +66 -0
  239. package/dist/kernel/write-queue.d.ts +46 -0
  240. package/dist/ledger-GFBKVPV4.js +42 -0
  241. package/dist/legacy/bundle.d.ts +30 -0
  242. package/dist/legacy/kernel.d.ts +33 -0
  243. package/dist/liberate-3VDOT4KO.js +24 -0
  244. package/dist/link-set-Z7Q2ASFX.js +31 -0
  245. package/dist/materialized-views/index.js +19 -17
  246. package/dist/noydb-ZCJOYBDI.js +68 -0
  247. package/dist/on/index.js +9 -9
  248. package/dist/overlay-views/index.js +4 -4
  249. package/dist/periods/index.js +12 -12
  250. package/dist/pod/index.js +11 -11
  251. package/dist/policy-Z3RUAIY2.js +41 -0
  252. package/dist/port/as/index.d.ts +26 -0
  253. package/dist/port/at/index.d.ts +18 -0
  254. package/dist/port/by/default-provider.d.ts +9 -0
  255. package/dist/port/by/index.d.ts +17 -0
  256. package/dist/port/by/types.d.ts +86 -0
  257. package/dist/port/in/index.d.ts +21 -0
  258. package/dist/port/on/index.d.ts +27 -0
  259. package/dist/port/to/index.d.ts +19 -0
  260. package/dist/port/ui/index.d.ts +21 -0
  261. package/dist/port/with/blob-strategy.d.ts +98 -0
  262. package/dist/port/with/broker-strategy.d.ts +84 -0
  263. package/dist/port/with/capabilities.d.ts +31 -0
  264. package/dist/port/with/classified-marker.d.ts +9 -0
  265. package/dist/port/with/classified-strategy.d.ts +62 -0
  266. package/dist/port/with/computed-strategy.d.ts +19 -0
  267. package/dist/port/with/i18n-strategy.d.ts +175 -0
  268. package/dist/port/with/index.d.ts +18 -0
  269. package/dist/port/with/lazy-strategy.d.ts +48 -0
  270. package/dist/port/with/lookup-strategy.d.ts +129 -0
  271. package/dist/port/with/service-bus.d.ts +156 -0
  272. package/dist/port/with/team-strategy.d.ts +36 -0
  273. package/dist/port/with/write-hooks.d.ts +34 -0
  274. package/dist/portability/index.js +8 -8
  275. package/dist/post-register-JTH76BLY.js +60 -0
  276. package/dist/post-register-JTH76BLY.js.map +1 -0
  277. package/dist/public-envelope-B4KNWVUA.js +32 -0
  278. package/dist/purge-scope-FGNNLWHD.js +24 -0
  279. package/dist/purge-scope-FGNNLWHD.js.map +1 -0
  280. package/dist/query/index.js +7 -7
  281. package/dist/read-only-facade-CHCKSEPD.js +8 -0
  282. package/dist/register-VAHONCID.js +23 -0
  283. package/dist/registry-7MLVD3VO.js +19 -0
  284. package/dist/registry-EPKPD5SM.js +18 -0
  285. package/dist/registry-P5T7PS2U.js +9 -0
  286. package/dist/request-withdrawal-TI3A5WPS.js +31 -0
  287. package/dist/reveal-DIBHLUZX.js +38 -0
  288. package/dist/reveal-DIBHLUZX.js.map +1 -0
  289. package/dist/revoke-FDRD6GRW.js +24 -0
  290. package/dist/satellites/index.js +1 -1
  291. package/dist/sealed-record/index.js +12 -12
  292. package/dist/seed-Q6M2IZFL.js +231 -0
  293. package/dist/seed-Q6M2IZFL.js.map +1 -0
  294. package/dist/session/index.js +9 -9
  295. package/dist/shadow/index.js +2 -2
  296. package/dist/signer-MUWEIUI6.js +25 -0
  297. package/dist/snapshots/index.js +10 -10
  298. package/dist/stale-OSQ7J3AA.js +29 -0
  299. package/dist/storage-MVFCGEQE.js +23 -0
  300. package/dist/store-coordination-provider-64OEZFGS.js +142 -0
  301. package/dist/sync/index.js +9 -9
  302. package/dist/team/index.js +15 -15
  303. package/dist/tiers/index.js +14 -10
  304. package/dist/to/index.js +1 -2
  305. package/dist/tx/index.js +3 -3
  306. package/dist/util/index.js +1 -1
  307. package/dist/verify-ZASTRNPR.js +140 -0
  308. package/dist/verify-ZASTRNPR.js.map +1 -0
  309. package/dist/via/blob/active.d.ts +34 -0
  310. package/dist/via/blob/binding.d.ts +86 -0
  311. package/dist/via/blob/index.d.ts +34 -0
  312. package/dist/via/classified/active.d.ts +3 -0
  313. package/dist/via/classified/binding.d.ts +83 -0
  314. package/dist/via/classified/config-drift.d.ts +34 -0
  315. package/dist/via/classified/descriptor.d.ts +66 -0
  316. package/dist/via/classified/errors.d.ts +19 -0
  317. package/dist/via/classified/guards.d.ts +23 -0
  318. package/dist/via/classified/index.d.ts +11 -0
  319. package/dist/via/classified/presets.d.ts +65 -0
  320. package/dist/via/classified/resolve.d.ts +9 -0
  321. package/dist/via/classified/strategy.d.ts +11 -0
  322. package/dist/via/classified/validators.d.ts +3 -0
  323. package/dist/via/classified/write.d.ts +4 -0
  324. package/dist/via/computed/binding.d.ts +34 -0
  325. package/dist/via/computed/descriptor.d.ts +35 -0
  326. package/dist/via/i18n/active.d.ts +28 -0
  327. package/dist/via/i18n/binding.d.ts +36 -0
  328. package/dist/via/i18n/core.d.ts +267 -0
  329. package/dist/via/i18n/densify.d.ts +24 -0
  330. package/dist/via/i18n/dictionary.d.ts +200 -0
  331. package/dist/via/i18n/index.d.ts +21 -0
  332. package/dist/via/i18n/policy.d.ts +44 -0
  333. package/dist/via/i18n/script.d.ts +26 -0
  334. package/dist/via/i18n/strategy.d.ts +13 -0
  335. package/dist/via/lookup/active.d.ts +19 -0
  336. package/dist/via/lookup/binding.d.ts +99 -0
  337. package/dist/via/lookup/descriptor.d.ts +123 -0
  338. package/dist/via/lookup/handle.d.ts +220 -0
  339. package/dist/via/lookup/index.d.ts +17 -0
  340. package/dist/via/lookup/registry.d.ts +228 -0
  341. package/dist/via/lookup/snapshot.d.ts +67 -0
  342. package/dist/via/money/arith.d.ts +68 -0
  343. package/dist/via/money/binding.d.ts +21 -0
  344. package/dist/via/money/branded.d.ts +61 -0
  345. package/dist/via/money/descriptor.d.ts +73 -0
  346. package/dist/via/money/fixed-point.d.ts +51 -0
  347. package/dist/via/money/index.d.ts +15 -0
  348. package/dist/via/money/iso4217.d.ts +6 -0
  349. package/dist/via/money/money-reducer.d.ts +33 -0
  350. package/dist/via/money/normalize.d.ts +105 -0
  351. package/dist/via/money/paths.d.ts +61 -0
  352. package/dist/via/money/where.d.ts +127 -0
  353. package/dist/walk-SVNDIZ62.js +241 -0
  354. package/dist/with/index.js +11 -11
  355. package/dist/with-audit/attestation/active.d.ts +10 -0
  356. package/dist/with-audit/attestation/index.d.ts +16 -0
  357. package/dist/with-audit/attestation/issue.d.ts +29 -0
  358. package/dist/with-audit/attestation/revoke.d.ts +15 -0
  359. package/dist/with-audit/attestation/signer.d.ts +33 -0
  360. package/dist/with-audit/attestation/strategy.d.ts +44 -0
  361. package/dist/with-audit/attestation/vault-facade.d.ts +62 -0
  362. package/dist/with-audit/consent/active.d.ts +14 -0
  363. package/dist/with-audit/consent/consent.d.ts +114 -0
  364. package/dist/with-audit/consent/index.d.ts +14 -0
  365. package/dist/with-audit/consent/strategy.d.ts +36 -0
  366. package/dist/with-audit/forget/active.d.ts +31 -0
  367. package/dist/with-audit/forget/index.d.ts +28 -0
  368. package/dist/with-audit/forget/purge-scope.d.ts +54 -0
  369. package/dist/with-audit/forget/strategy.d.ts +199 -0
  370. package/dist/with-audit/forget/subject-index.d.ts +83 -0
  371. package/dist/with-audit/guards/executor.d.ts +26 -0
  372. package/dist/with-audit/guards/immutable-guard.d.ts +63 -0
  373. package/dist/with-audit/guards/index.d.ts +10 -0
  374. package/dist/with-audit/guards/read-only-facade.d.ts +31 -0
  375. package/dist/with-audit/guards/registry.d.ts +83 -0
  376. package/dist/with-audit/guards/transition-guard.d.ts +82 -0
  377. package/dist/with-audit/guards/types.d.ts +134 -0
  378. package/dist/with-audit/guards/with-guard.d.ts +15 -0
  379. package/dist/with-audit/periods/active.d.ts +11 -0
  380. package/dist/with-audit/periods/index.d.ts +18 -0
  381. package/dist/with-audit/periods/periods.d.ts +417 -0
  382. package/dist/with-audit/periods/strategy.d.ts +32 -0
  383. package/dist/with-audit/periods/vault-facade.d.ts +95 -0
  384. package/dist/with-audit/portability/active.d.ts +11 -0
  385. package/dist/with-audit/portability/export-accessible.d.ts +46 -0
  386. package/dist/with-audit/portability/index.d.ts +18 -0
  387. package/dist/with-audit/portability/request-withdrawal.d.ts +85 -0
  388. package/dist/with-audit/portability/strategy.d.ts +31 -0
  389. package/dist/with-audit/portability/withdraw-accessible.d.ts +82 -0
  390. package/dist/with-audit/sealed-record/active.d.ts +9 -0
  391. package/dist/with-audit/sealed-record/index.d.ts +55 -0
  392. package/dist/with-audit/sealed-record/strategy.d.ts +34 -0
  393. package/dist/with-audit/sealed-record/types.d.ts +27 -0
  394. package/dist/with-audit/tiers/active.d.ts +9 -0
  395. package/dist/with-audit/tiers/index.d.ts +394 -0
  396. package/dist/with-audit/tiers/strategy.d.ts +36 -0
  397. package/dist/with-cargo/active.d.ts +11 -0
  398. package/dist/with-cargo/adopt-partition.d.ts +81 -0
  399. package/dist/with-cargo/decrypt-partition.d.ts +19 -0
  400. package/dist/with-cargo/describe-extraction.d.ts +41 -0
  401. package/dist/with-cargo/extract-partition.d.ts +155 -0
  402. package/dist/with-cargo/index.d.ts +33 -0
  403. package/dist/with-cargo/strategy.d.ts +30 -0
  404. package/dist/with-cargo/vault-diff.d.ts +144 -0
  405. package/dist/with-cargo/walk-closure.d.ts +67 -0
  406. package/dist/with-commit/crdt/active.d.ts +25 -0
  407. package/dist/with-commit/crdt/crdt.d.ts +42 -0
  408. package/dist/with-commit/crdt/index.d.ts +16 -0
  409. package/dist/with-commit/crdt/strategy.d.ts +25 -0
  410. package/dist/with-commit/history/active.d.ts +40 -0
  411. package/dist/with-commit/history/diff.d.ts +23 -0
  412. package/dist/with-commit/history/history.d.ts +73 -0
  413. package/dist/with-commit/history/index.d.ts +30 -0
  414. package/dist/with-commit/history/ledger/constants.d.ts +37 -0
  415. package/dist/with-commit/history/ledger/entry.d.ts +195 -0
  416. package/dist/with-commit/history/ledger/hash.d.ts +30 -0
  417. package/dist/with-commit/history/ledger/index.d.ts +19 -0
  418. package/dist/with-commit/history/ledger/patch.d.ts +99 -0
  419. package/dist/with-commit/history/ledger/store.d.ts +356 -0
  420. package/dist/with-commit/history/strategy.d.ts +136 -0
  421. package/dist/with-commit/history/time-machine.d.ts +202 -0
  422. package/dist/with-commit/numbering/descriptor.d.ts +27 -0
  423. package/dist/with-commit/numbering/index.d.ts +69 -0
  424. package/dist/with-commit/sequence/active.d.ts +10 -0
  425. package/dist/with-commit/sequence/index.d.ts +150 -0
  426. package/dist/with-commit/sequence/strategy.d.ts +26 -0
  427. package/dist/with-commit/tx/active.d.ts +27 -0
  428. package/dist/with-commit/tx/dry-run.d.ts +29 -0
  429. package/dist/with-commit/tx/elevated-handle.d.ts +59 -0
  430. package/dist/with-commit/tx/index.d.ts +13 -0
  431. package/dist/with-commit/tx/invariants.d.ts +68 -0
  432. package/dist/with-commit/tx/strategy.d.ts +23 -0
  433. package/dist/with-commit/tx/transaction.d.ts +212 -0
  434. package/dist/with-fork/archive/engine.d.ts +71 -0
  435. package/dist/with-fork/archive/index.d.ts +23 -0
  436. package/dist/with-fork/shadow/active.d.ts +6 -0
  437. package/dist/with-fork/shadow/index.d.ts +14 -0
  438. package/dist/with-fork/shadow/strategy.d.ts +28 -0
  439. package/dist/with-fork/shadow/vault-frame.d.ts +93 -0
  440. package/dist/with-fork/snapshots/active.d.ts +20 -0
  441. package/dist/with-fork/snapshots/engine.d.ts +36 -0
  442. package/dist/with-fork/snapshots/index.d.ts +5 -0
  443. package/dist/with-fork/snapshots/noydb-facade.d.ts +64 -0
  444. package/dist/with-fork/snapshots/policy.d.ts +23 -0
  445. package/dist/with-fork/snapshots/scheduler.d.ts +34 -0
  446. package/dist/with-fork/snapshots/strategy.d.ts +48 -0
  447. package/dist/with-formula/computed/index.d.ts +48 -0
  448. package/dist/with-formula/computed/lazy.d.ts +13 -0
  449. package/dist/with-formula/derivations/executor.d.ts +61 -0
  450. package/dist/with-formula/derivations/fanout-sidecar.d.ts +75 -0
  451. package/dist/with-formula/derivations/index.d.ts +6 -0
  452. package/dist/with-formula/derivations/registry.d.ts +67 -0
  453. package/dist/with-formula/derivations/stale.d.ts +39 -0
  454. package/dist/with-formula/derivations/strategy-hash.d.ts +1 -0
  455. package/dist/with-formula/derivations/types.d.ts +248 -0
  456. package/dist/with-formula/derivations/with-derivation.d.ts +10 -0
  457. package/dist/with-formula/derivations/with-rollup.d.ts +34 -0
  458. package/dist/with-formula/materialized-views/dependency-analyzer.d.ts +58 -0
  459. package/dist/with-formula/materialized-views/executor.d.ts +80 -0
  460. package/dist/with-formula/materialized-views/index.d.ts +11 -0
  461. package/dist/with-formula/materialized-views/query-hash.d.ts +23 -0
  462. package/dist/with-formula/materialized-views/registry.d.ts +99 -0
  463. package/dist/with-formula/materialized-views/stale.d.ts +113 -0
  464. package/dist/with-formula/materialized-views/types.d.ts +318 -0
  465. package/dist/with-formula/materialized-views/with-materialized-view.d.ts +24 -0
  466. package/dist/with-formula/overlay-views/index.d.ts +5 -0
  467. package/dist/with-formula/overlay-views/registry.d.ts +42 -0
  468. package/dist/with-formula/overlay-views/types.d.ts +97 -0
  469. package/dist/with-formula/overlay-views/virtual-collection.d.ts +90 -0
  470. package/dist/with-formula/overlay-views/with-overlayed-view.d.ts +9 -0
  471. package/dist/with-lookup/aggregate/active.d.ts +33 -0
  472. package/dist/with-lookup/aggregate/aggregation.d.ts +166 -0
  473. package/dist/with-lookup/aggregate/canonical-key.d.ts +16 -0
  474. package/dist/with-lookup/aggregate/groupby.d.ts +280 -0
  475. package/dist/with-lookup/aggregate/index.d.ts +23 -0
  476. package/dist/with-lookup/aggregate/reducers.d.ts +257 -0
  477. package/dist/with-lookup/aggregate/strategy.d.ts +59 -0
  478. package/dist/with-lookup/embeddings/cosine.d.ts +2 -0
  479. package/dist/with-lookup/embeddings/descriptor.d.ts +8 -0
  480. package/dist/with-lookup/embeddings/index.d.ts +4 -0
  481. package/dist/with-lookup/embeddings/vec-id.d.ts +47 -0
  482. package/dist/with-lookup/embeddings/vector-set.d.ts +19 -0
  483. package/dist/with-lookup/indexing/active.d.ts +30 -0
  484. package/dist/with-lookup/indexing/collection-facade.d.ts +157 -0
  485. package/dist/with-lookup/indexing/eager-indexes.d.ts +122 -0
  486. package/dist/with-lookup/indexing/index.d.ts +27 -0
  487. package/dist/with-lookup/indexing/lazy-builder.d.ts +102 -0
  488. package/dist/with-lookup/indexing/persisted-indexes.d.ts +229 -0
  489. package/dist/with-lookup/indexing/strategy.d.ts +56 -0
  490. package/dist/with-lookup/indexing/unique-constraints.d.ts +74 -0
  491. package/dist/with-lookup/search/active.d.ts +10 -0
  492. package/dist/with-lookup/search/build-docs.d.ts +15 -0
  493. package/dist/with-lookup/search/collection-facade.d.ts +163 -0
  494. package/dist/with-lookup/search/fuse.d.ts +22 -0
  495. package/dist/with-lookup/search/index-store.d.ts +19 -0
  496. package/dist/with-lookup/search/index.d.ts +19 -0
  497. package/dist/with-lookup/search/inverted-index.d.ts +47 -0
  498. package/dist/with-lookup/search/persisted-index-store.d.ts +121 -0
  499. package/dist/with-lookup/search/retrieve-types.d.ts +29 -0
  500. package/dist/with-lookup/search/scan.d.ts +28 -0
  501. package/dist/with-lookup/search/segment.d.ts +15 -0
  502. package/dist/with-lookup/search/serialize.d.ts +4 -0
  503. package/dist/with-lookup/search/snippet.d.ts +5 -0
  504. package/dist/with-lookup/search/strategy.d.ts +41 -0
  505. package/dist/with-lookup/search/tokenize.d.ts +12 -0
  506. package/dist/with-party/auth-introspection/index.d.ts +44 -0
  507. package/dist/with-party/broker/active.d.ts +23 -0
  508. package/dist/with-party/broker/index.d.ts +28 -0
  509. package/dist/with-party/broker/seed.d.ts +77 -0
  510. package/dist/with-party/custody/active.d.ts +10 -0
  511. package/dist/with-party/custody/index.d.ts +69 -0
  512. package/dist/with-party/custody/liberate.d.ts +64 -0
  513. package/dist/with-party/custody/strategy.d.ts +48 -0
  514. package/dist/with-party/directory/index.d.ts +11 -0
  515. package/dist/with-party/directory/public-envelope/index.d.ts +12 -0
  516. package/dist/with-party/directory/public-envelope/schema.d.ts +24 -0
  517. package/dist/with-party/directory/public-envelope/storage.d.ts +59 -0
  518. package/dist/with-party/directory/public-envelope/types.d.ts +80 -0
  519. package/dist/with-party/directory/storage.d.ts +33 -0
  520. package/dist/with-party/directory/types.d.ts +43 -0
  521. package/dist/with-party/directory/user-envelope/api.d.ts +201 -0
  522. package/dist/with-party/directory/user-envelope/index.d.ts +12 -0
  523. package/dist/with-party/directory/user-envelope/storage.d.ts +54 -0
  524. package/dist/with-party/directory/visibility.d.ts +47 -0
  525. package/dist/with-party/policy/engine.d.ts +60 -0
  526. package/dist/with-party/policy/index.d.ts +15 -0
  527. package/dist/with-party/policy/noydb-facade.d.ts +39 -0
  528. package/dist/with-party/policy/presets.d.ts +38 -0
  529. package/dist/with-party/policy/storage.d.ts +31 -0
  530. package/dist/with-party/session/active.d.ts +34 -0
  531. package/dist/with-party/session/dev-unlock.d.ts +128 -0
  532. package/dist/with-party/session/index.d.ts +23 -0
  533. package/dist/with-party/session/session-policy.d.ts +92 -0
  534. package/dist/with-party/session/session.d.ts +131 -0
  535. package/dist/with-party/session/strategy.d.ts +42 -0
  536. package/dist/with-party/session/unlock-state.d.ts +47 -0
  537. package/dist/with-party/sync/index.d.ts +31 -0
  538. package/dist/with-party/tab-coordination.d.ts +73 -0
  539. package/dist/with-party/tab-write-relay.d.ts +39 -0
  540. package/dist/with-party/team/active.d.ts +13 -0
  541. package/dist/with-party/team/authenticators.d.ts +95 -0
  542. package/dist/with-party/team/deed.d.ts +97 -0
  543. package/dist/with-party/team/delegation.d.ts +88 -0
  544. package/dist/with-party/team/index.d.ts +38 -0
  545. package/dist/with-party/team/keyring.d.ts +318 -0
  546. package/dist/with-party/team/magic-link-grant.d.ts +152 -0
  547. package/dist/with-party/team/managed-passphrase.d.ts +280 -0
  548. package/dist/with-party/team/noydb-facade.d.ts +484 -0
  549. package/dist/with-party/team/peer-recover.d.ts +81 -0
  550. package/dist/with-party/team/presence.d.ts +81 -0
  551. package/dist/with-party/team/recovery.d.ts +191 -0
  552. package/dist/with-party/team/reserved-secret-collections.d.ts +41 -0
  553. package/dist/with-party/team/rotate-recover.d.ts +275 -0
  554. package/dist/with-party/team/shamir-recovery-provider.d.ts +15 -0
  555. package/dist/with-party/team/strategy.d.ts +9 -0
  556. package/dist/with-party/team/sync-active.d.ts +33 -0
  557. package/dist/with-party/team/sync-credentials.d.ts +113 -0
  558. package/dist/with-party/team/sync-strategy.d.ts +67 -0
  559. package/dist/with-party/team/sync-transaction.d.ts +39 -0
  560. package/dist/with-party/team/sync.d.ts +174 -0
  561. package/dist/with-party/team/tiers.d.ts +39 -0
  562. package/dist/with-party/team/wrapped-deks.d.ts +86 -0
  563. package/dist/with-pod/backup.d.ts +74 -0
  564. package/dist/with-pod/bundle.d.ts +414 -0
  565. package/dist/with-pod/format.d.ts +203 -0
  566. package/dist/with-pod/index.d.ts +20 -0
  567. package/dist/with-pod/pod-store.d.ts +54 -0
  568. package/dist/with-pod/ulid.d.ts +64 -0
  569. package/dist/with-shape/blobs/blob-compaction.d.ts +170 -0
  570. package/dist/with-shape/blobs/blob-intent.d.ts +153 -0
  571. package/dist/with-shape/blobs/blob-set.d.ts +1286 -0
  572. package/dist/with-shape/blobs/export-blobs.d.ts +110 -0
  573. package/dist/with-shape/blobs/import-external.d.ts +50 -0
  574. package/dist/with-shape/blobs/mime-magic.d.ts +48 -0
  575. package/dist/with-shape/blobs/object-projection.d.ts +70 -0
  576. package/dist/with-shape/introspection/describe.d.ts +237 -0
  577. package/dist/with-shape/introspection/field-meta.d.ts +61 -0
  578. package/dist/with-shape/introspection/fields.d.ts +14 -0
  579. package/dist/with-shape/introspection/index.d.ts +12 -0
  580. package/dist/with-shape/introspection/json-schema.d.ts +13 -0
  581. package/dist/with-shape/introspection/meta.d.ts +22 -0
  582. package/dist/with-shape/introspection/projection.d.ts +13 -0
  583. package/dist/with-shape/introspection/types.d.ts +154 -0
  584. package/dist/with-shape/introspection/walk.d.ts +50 -0
  585. package/dist/with-shape/links/lazy-handle.d.ts +36 -0
  586. package/dist/with-shape/links/link-set.d.ts +67 -0
  587. package/dist/with-shape/links/names.d.ts +65 -0
  588. package/dist/with-shape/links/vault-facade.d.ts +211 -0
  589. package/dist/with-shape/persisted-schemas/canonicalize.d.ts +11 -0
  590. package/dist/with-shape/persisted-schemas/derive.d.ts +29 -0
  591. package/dist/with-shape/persisted-schemas/index.d.ts +21 -0
  592. package/dist/with-shape/persisted-schemas/register.d.ts +66 -0
  593. package/dist/with-shape/persisted-schemas/storage.d.ts +61 -0
  594. package/dist/with-shape/persisted-schemas/types.d.ts +54 -0
  595. package/dist/with-shape/satellites/dead-filter.d.ts +21 -0
  596. package/dist/with-shape/satellites/declare.d.ts +60 -0
  597. package/dist/with-shape/satellites/existence.d.ts +5 -0
  598. package/dist/with-shape/satellites/fanout.d.ts +38 -0
  599. package/dist/with-shape/satellites/forget.d.ts +47 -0
  600. package/dist/with-shape/satellites/index.d.ts +3 -0
  601. package/dist/with-shape/satellites/joined.d.ts +19 -0
  602. package/dist/with-shape/satellites/marker.d.ts +10 -0
  603. package/dist/with-shape/satellites/migrate-cek.d.ts +26 -0
  604. package/dist/with-shape/satellites/post-register.d.ts +6 -0
  605. package/dist/with-shape/satellites/proxy.d.ts +37 -0
  606. package/dist/with-shape/satellites/raw-target.d.ts +14 -0
  607. package/dist/with-shape/satellites/registry.d.ts +19 -0
  608. package/dist/with-shape/satellites/types.d.ts +37 -0
  609. package/dist/with-shape/satellites/validate.d.ts +17 -0
  610. package/dist/with-shape/schema-update/client-registry.d.ts +35 -0
  611. package/dist/with-shape/schema-update/cutover.d.ts +5 -0
  612. package/dist/with-shape/schema-update/delta.d.ts +2 -0
  613. package/dist/with-shape/schema-update/dispatch.d.ts +3 -0
  614. package/dist/with-shape/schema-update/fence-controller.d.ts +62 -0
  615. package/dist/with-shape/schema-update/fence-watcher.d.ts +37 -0
  616. package/dist/with-shape/schema-update/fence.d.ts +15 -0
  617. package/dist/with-shape/schema-update/gate.d.ts +16 -0
  618. package/dist/with-shape/schema-update/index.d.ts +6 -0
  619. package/dist/with-shape/schema-update/store-coordination-provider.d.ts +29 -0
  620. package/dist/with-shape/schema-update/strategies.d.ts +12 -0
  621. package/dist/with-shape/schema-update/types.d.ts +53 -0
  622. package/dist/with-store/index.d.ts +15 -0
  623. package/dist/with-store/lazy/active.d.ts +12 -0
  624. package/dist/with-store/lazy/index.d.ts +14 -0
  625. package/dist/with-store/lazy/strategy.d.ts +9 -0
  626. package/dist/with-store/route-store.d.ts +259 -0
  627. package/dist/with-store/store-middleware.d.ts +189 -0
  628. package/dist/withdraw-accessible-WZIEVWSR.js +28 -0
  629. package/package.json +47 -55
  630. package/dist/adapter/index.d.ts +0 -4
  631. package/dist/adapter/index.js +0 -15
  632. package/dist/aggregate/index.d.ts +0 -41
  633. package/dist/api-HV4PDUWF.js +0 -20
  634. package/dist/as/index.d.ts +0 -6
  635. package/dist/at/index.d.ts +0 -4
  636. package/dist/attestation/index.d.ts +0 -19
  637. package/dist/backup-ODXO7OGA.js +0 -225
  638. package/dist/backup-ODXO7OGA.js.map +0 -1
  639. package/dist/blobs/index.d.ts +0 -43
  640. package/dist/bundle/index.d.ts +0 -121
  641. package/dist/bundle-DlSxo31R.d.ts +0 -548
  642. package/dist/by/index.d.ts +0 -1
  643. package/dist/cargo/index.d.ts +0 -8
  644. package/dist/chunk-2644KEGW.js +0 -247
  645. package/dist/chunk-2644KEGW.js.map +0 -1
  646. package/dist/chunk-2HVUKRNE.js +0 -21
  647. package/dist/chunk-2KOSJTMU.js +0 -69
  648. package/dist/chunk-2UQ4RMHV.js +0 -167
  649. package/dist/chunk-2UQ4RMHV.js.map +0 -1
  650. package/dist/chunk-2XE6LIXT.js +0 -515
  651. package/dist/chunk-2XE6LIXT.js.map +0 -1
  652. package/dist/chunk-34RRRIC3.js +0 -71
  653. package/dist/chunk-3C5CKXFI.js +0 -621
  654. package/dist/chunk-3C5CKXFI.js.map +0 -1
  655. package/dist/chunk-3I4KYWNP.js +0 -30
  656. package/dist/chunk-42KVY3OC.js +0 -86
  657. package/dist/chunk-4C4WBS4V.js +0 -13822
  658. package/dist/chunk-4C4WBS4V.js.map +0 -1
  659. package/dist/chunk-4G3IT7J7.js +0 -280
  660. package/dist/chunk-4G3IT7J7.js.map +0 -1
  661. package/dist/chunk-4RQ62VSR.js +0 -53
  662. package/dist/chunk-4RQ62VSR.js.map +0 -1
  663. package/dist/chunk-4ZSGSRBI.js +0 -1221
  664. package/dist/chunk-4ZSGSRBI.js.map +0 -1
  665. package/dist/chunk-5GAX2QOH.js +0 -132
  666. package/dist/chunk-5GAX2QOH.js.map +0 -1
  667. package/dist/chunk-5SAZMBW7.js +0 -202
  668. package/dist/chunk-5TZZUL5X.js +0 -30
  669. package/dist/chunk-6CU3FN74.js +0 -777
  670. package/dist/chunk-6G2SCQYS.js +0 -29
  671. package/dist/chunk-6G2SCQYS.js.map +0 -1
  672. package/dist/chunk-6MWUANRF.js +0 -29
  673. package/dist/chunk-6S7T6WC4.js +0 -111
  674. package/dist/chunk-6S7T6WC4.js.map +0 -1
  675. package/dist/chunk-6ULCYCMU.js +0 -74
  676. package/dist/chunk-7HAPHVRJ.js +0 -1695
  677. package/dist/chunk-7HAPHVRJ.js.map +0 -1
  678. package/dist/chunk-7IZQTCTR.js +0 -382
  679. package/dist/chunk-7ZANJ6JZ.js +0 -265
  680. package/dist/chunk-7ZANJ6JZ.js.map +0 -1
  681. package/dist/chunk-A2APWS32.js +0 -150
  682. package/dist/chunk-A2APWS32.js.map +0 -1
  683. package/dist/chunk-A4MAD6PO.js +0 -99
  684. package/dist/chunk-ANDBBA2P.js +0 -36
  685. package/dist/chunk-ANDBBA2P.js.map +0 -1
  686. package/dist/chunk-AUR7MRHA.js +0 -404
  687. package/dist/chunk-AYGZMQP5.js +0 -75
  688. package/dist/chunk-BGIZAFY7.js +0 -1
  689. package/dist/chunk-CJEMA2Z6.js +0 -230
  690. package/dist/chunk-CTSFKDGA.js +0 -40
  691. package/dist/chunk-CU62BBRB.js +0 -1465
  692. package/dist/chunk-CU62BBRB.js.map +0 -1
  693. package/dist/chunk-CWCCYH34.js +0 -23
  694. package/dist/chunk-DEYAO3N6.js +0 -589
  695. package/dist/chunk-DFIBOSOQ.js +0 -85
  696. package/dist/chunk-E5AHO65E.js +0 -150
  697. package/dist/chunk-FC3XK5JT.js +0 -99
  698. package/dist/chunk-FGOGS7CE.js +0 -662
  699. package/dist/chunk-FGOGS7CE.js.map +0 -1
  700. package/dist/chunk-GX2BYNCT.js +0 -117
  701. package/dist/chunk-GZ2MOPVX.js +0 -291
  702. package/dist/chunk-GZ2MOPVX.js.map +0 -1
  703. package/dist/chunk-H57P2SJB.js +0 -126
  704. package/dist/chunk-H57P2SJB.js.map +0 -1
  705. package/dist/chunk-HBTT7YQX.js +0 -94
  706. package/dist/chunk-HOCEGVGQ.js +0 -36
  707. package/dist/chunk-ICV32FPK.js +0 -50
  708. package/dist/chunk-IIP5WFVT.js +0 -462
  709. package/dist/chunk-IIP5WFVT.js.map +0 -1
  710. package/dist/chunk-IUKGIB2Q.js +0 -91
  711. package/dist/chunk-IWTYFS3D.js +0 -129
  712. package/dist/chunk-JC5R7P44.js +0 -355
  713. package/dist/chunk-JC5R7P44.js.map +0 -1
  714. package/dist/chunk-K2WCO3NX.js +0 -1
  715. package/dist/chunk-KBBWY46Y.js +0 -14
  716. package/dist/chunk-KBF5GSGX.js +0 -367
  717. package/dist/chunk-KCG3BHFG.js +0 -99
  718. package/dist/chunk-KCG3BHFG.js.map +0 -1
  719. package/dist/chunk-KNXN47MO.js +0 -155
  720. package/dist/chunk-KWLD2D75.js +0 -38
  721. package/dist/chunk-KXKLKJW4.js +0 -49
  722. package/dist/chunk-KYC4LIEU.js +0 -123
  723. package/dist/chunk-LEOXZY36.js +0 -130
  724. package/dist/chunk-M5I354EE.js +0 -235
  725. package/dist/chunk-MK2BSS44.js +0 -34
  726. package/dist/chunk-MSVY7ULZ.js +0 -70
  727. package/dist/chunk-NNWK3PSY.js +0 -135
  728. package/dist/chunk-NSZ6J5DF.js +0 -59
  729. package/dist/chunk-NUEFXLZU.js +0 -59
  730. package/dist/chunk-NYVQCZ54.js +0 -261
  731. package/dist/chunk-OQAODTYR.js +0 -45
  732. package/dist/chunk-OV4CMJGR.js +0 -164
  733. package/dist/chunk-PEDZFFKW.js +0 -41
  734. package/dist/chunk-PF3FQCCF.js +0 -164
  735. package/dist/chunk-PF3FQCCF.js.map +0 -1
  736. package/dist/chunk-Q2KVKTC2.js +0 -823
  737. package/dist/chunk-QJR3W3MF.js +0 -23
  738. package/dist/chunk-QJR3W3MF.js.map +0 -1
  739. package/dist/chunk-QTXQ6RNZ.js +0 -255
  740. package/dist/chunk-RJ5522XX.js +0 -453
  741. package/dist/chunk-RJ5522XX.js.map +0 -1
  742. package/dist/chunk-RMUXPHIH.js +0 -930
  743. package/dist/chunk-RMUXPHIH.js.map +0 -1
  744. package/dist/chunk-S6AQXDN4.js +0 -155
  745. package/dist/chunk-SSFC3IYA.js +0 -275
  746. package/dist/chunk-SSFC3IYA.js.map +0 -1
  747. package/dist/chunk-SZCHEDML.js +0 -209
  748. package/dist/chunk-TDPEJINP.js +0 -188
  749. package/dist/chunk-TDPEJINP.js.map +0 -1
  750. package/dist/chunk-TQ3REHVF.js +0 -95
  751. package/dist/chunk-TQ3REHVF.js.map +0 -1
  752. package/dist/chunk-UNJU345Q.js +0 -32
  753. package/dist/chunk-UNJU345Q.js.map +0 -1
  754. package/dist/chunk-V7RNIND6.js +0 -265
  755. package/dist/chunk-V7RNIND6.js.map +0 -1
  756. package/dist/chunk-VJ3NQK4K.js +0 -205
  757. package/dist/chunk-WNA6T3MA.js +0 -686
  758. package/dist/chunk-WNA6T3MA.js.map +0 -1
  759. package/dist/chunk-WVCQ75OK.js +0 -124
  760. package/dist/chunk-X66MXMR5.js +0 -42
  761. package/dist/chunk-XHD3L3JO.js +0 -930
  762. package/dist/chunk-XHD3L3JO.js.map +0 -1
  763. package/dist/chunk-XJK2WIYN.js +0 -430
  764. package/dist/chunk-XJK2WIYN.js.map +0 -1
  765. package/dist/chunk-XQ7UYPVN.js +0 -95
  766. package/dist/chunk-Y2OCKFZ3.js +0 -80
  767. package/dist/chunk-YBFOBRTO.js +0 -367
  768. package/dist/chunk-YLN33ADH.js +0 -97
  769. package/dist/chunk-Z5YFRMG5.js +0 -45
  770. package/dist/chunk-ZWQFOXBR.js +0 -54
  771. package/dist/classified/index.d.ts +0 -16
  772. package/dist/classified-marker-IO5EBW7Q.js +0 -24
  773. package/dist/classified-marker-IO5EBW7Q.js.map +0 -1
  774. package/dist/collection-facade-3RAXG2OU.js +0 -38
  775. package/dist/computed-R62HGCO4.js +0 -11
  776. package/dist/consent/index.d.ts +0 -22
  777. package/dist/crdt/index.d.ts +0 -33
  778. package/dist/dead-filter-VNA4M3GP.js +0 -28
  779. package/dist/decrypt-partition-IHtxEnTi.d.ts +0 -21
  780. package/dist/delegation-ZKII5UBI.js +0 -25
  781. package/dist/derivations/index.d.ts +0 -69
  782. package/dist/derive-5D2C3WG4.js +0 -21
  783. package/dist/describe/index.d.ts +0 -4
  784. package/dist/describe/index.js +0 -1
  785. package/dist/dev-unlock-DDTafVO6.d.ts +0 -263
  786. package/dist/discriminant-BN9REW3o.d.ts +0 -60
  787. package/dist/enclave-EUBEJGPG.js +0 -125
  788. package/dist/executor-IL7SRNUZ.js +0 -23
  789. package/dist/executor-OUA2Y6YC.js +0 -9
  790. package/dist/executor-WAEI6PDV.js +0 -9
  791. package/dist/export-accessible-O55RKAGC.js +0 -23
  792. package/dist/extract-partition-VBGCBA6Q.js +0 -36
  793. package/dist/fanout-sidecar-CI5BCMQM.js +0 -74
  794. package/dist/find-FISGUWSK.js +0 -11
  795. package/dist/forget/index.d.ts +0 -36
  796. package/dist/guards/index.d.ts +0 -34
  797. package/dist/hash-DBkZfIBW.d.ts +0 -72
  798. package/dist/history/index.d.ts +0 -60
  799. package/dist/i18n/index.d.ts +0 -56
  800. package/dist/in/index.d.ts +0 -4
  801. package/dist/index-B9QdHytu.d.ts +0 -123
  802. package/dist/index-CyclmyDr.d.ts +0 -122
  803. package/dist/index-DzhNI2vE.d.ts +0 -23260
  804. package/dist/indexing/index.d.ts +0 -38
  805. package/dist/issue-EQAWIYFQ.js +0 -19
  806. package/dist/kernel/index.d.ts +0 -31
  807. package/dist/kernel/index.js +0 -60
  808. package/dist/lazy/index.d.ts +0 -20
  809. package/dist/ledger-AJA2SR3C.js +0 -42
  810. package/dist/liberate-SEGR4JLY.js +0 -24
  811. package/dist/link-set-YBAC2DQT.js +0 -31
  812. package/dist/materialized-views/index.d.ts +0 -182
  813. package/dist/mime-magic-CbV1quyp.d.ts +0 -103
  814. package/dist/noydb-AMEOU456.js +0 -65
  815. package/dist/on/index.d.ts +0 -4
  816. package/dist/overlay-views/index.d.ts +0 -97
  817. package/dist/periods/index.d.ts +0 -19
  818. package/dist/pod/index.d.ts +0 -62
  819. package/dist/policy-SDGRWVIL.js +0 -41
  820. package/dist/portability/index.d.ts +0 -19
  821. package/dist/post-register-MROIUA5O.js +0 -55
  822. package/dist/post-register-MROIUA5O.js.map +0 -1
  823. package/dist/public-envelope-J5PLQOW2.js +0 -32
  824. package/dist/query/index.d.ts +0 -4
  825. package/dist/read-only-facade-UCYNRE56.js +0 -8
  826. package/dist/register-OVJKW7BS.js +0 -23
  827. package/dist/registry-5RJSK5AJ.js +0 -9
  828. package/dist/registry-DQRNTWRL.js +0 -18
  829. package/dist/registry-LTGLERS7.js +0 -19
  830. package/dist/request-withdrawal-27O77D2V.js +0 -31
  831. package/dist/reveal-LT3I2K4P.js +0 -38
  832. package/dist/reveal-LT3I2K4P.js.map +0 -1
  833. package/dist/revoke-4N45G7D2.js +0 -24
  834. package/dist/revoke-4N45G7D2.js.map +0 -1
  835. package/dist/satellites/index.d.ts +0 -4
  836. package/dist/sealed-record/index.d.ts +0 -68
  837. package/dist/session/index.d.ts +0 -43
  838. package/dist/shadow/index.d.ts +0 -14
  839. package/dist/signer-XJCOV7JD.js +0 -25
  840. package/dist/signer-XJCOV7JD.js.map +0 -1
  841. package/dist/snapshots/index.d.ts +0 -25
  842. package/dist/stale-IYYXEH3U.js +0 -14
  843. package/dist/stale-IYYXEH3U.js.map +0 -1
  844. package/dist/storage-Y44CAPE6.js +0 -23
  845. package/dist/storage-Y44CAPE6.js.map +0 -1
  846. package/dist/store-coordination-provider-WKGAE2WI.js +0 -142
  847. package/dist/subject-index-CyOgGMJL.d.ts +0 -380
  848. package/dist/sync/index.d.ts +0 -40
  849. package/dist/team/index.d.ts +0 -154
  850. package/dist/tiers/index.d.ts +0 -4
  851. package/dist/to/index.d.ts +0 -4
  852. package/dist/transition-guard-BOUkzQU4.d.ts +0 -165
  853. package/dist/tx/index.d.ts +0 -34
  854. package/dist/ui/index.d.ts +0 -4
  855. package/dist/ulid-DRH25k3y.d.ts +0 -66
  856. package/dist/util/index.d.ts +0 -79
  857. package/dist/validators-B3SalxlJ.d.ts +0 -101
  858. package/dist/vault-diff-Dt9NkLzw.d.ts +0 -147
  859. package/dist/verify-GH6CWVSW.js +0 -139
  860. package/dist/verify-GH6CWVSW.js.map +0 -1
  861. package/dist/walk-76UCFXYV.js +0 -241
  862. package/dist/with/index.d.ts +0 -37
  863. package/dist/with-materialized-view-BP33v1Z6.d.ts +0 -27
  864. package/dist/with-overlayed-view-DntFpOKN.d.ts +0 -12
  865. package/dist/with-rollup-ClCHO6-4.d.ts +0 -47
  866. package/dist/withdraw-accessible-6J2UH3IN.js +0 -28
  867. package/dist/withdraw-accessible-6J2UH3IN.js.map +0 -1
  868. /package/dist/{adapter/index.js.map → api-ZGS6LCOF.js.map} +0 -0
  869. /package/dist/{chunk-34RRRIC3.js.map → chunk-3B5VVCNY.js.map} +0 -0
  870. /package/dist/{chunk-CJEMA2Z6.js.map → chunk-3LQ2YKO4.js.map} +0 -0
  871. /package/dist/{chunk-ZWQFOXBR.js.map → chunk-3QCRBHCY.js.map} +0 -0
  872. /package/dist/{chunk-E5AHO65E.js.map → chunk-4JBYV75E.js.map} +0 -0
  873. /package/dist/{chunk-YLN33ADH.js.map → chunk-4NXKCLLQ.js.map} +0 -0
  874. /package/dist/{chunk-2KOSJTMU.js.map → chunk-5M5DVGV7.js.map} +0 -0
  875. /package/dist/{chunk-3I4KYWNP.js.map → chunk-5YOLBEQ6.js.map} +0 -0
  876. /package/dist/{chunk-IWTYFS3D.js.map → chunk-6CRIV7DE.js.map} +0 -0
  877. /package/dist/{chunk-QTXQ6RNZ.js.map → chunk-6QTNZJBS.js.map} +0 -0
  878. /package/dist/{chunk-42KVY3OC.js.map → chunk-6T2SCQRU.js.map} +0 -0
  879. /package/dist/{chunk-Z5YFRMG5.js.map → chunk-7DSTRQIJ.js.map} +0 -0
  880. /package/dist/{chunk-DEYAO3N6.js.map → chunk-AUSTCW2X.js.map} +0 -0
  881. /package/dist/{chunk-SZCHEDML.js.map → chunk-B3HJYUOF.js.map} +0 -0
  882. /package/dist/{chunk-OV4CMJGR.js.map → chunk-BDVFPG6Y.js.map} +0 -0
  883. /package/dist/{chunk-HOCEGVGQ.js.map → chunk-CAF6WOK7.js.map} +0 -0
  884. /package/dist/{chunk-AUR7MRHA.js.map → chunk-CIE2BASH.js.map} +0 -0
  885. /package/dist/{chunk-X66MXMR5.js.map → chunk-CRI4OUV4.js.map} +0 -0
  886. /package/dist/{chunk-IUKGIB2Q.js.map → chunk-DLG74CNB.js.map} +0 -0
  887. /package/dist/{chunk-YBFOBRTO.js.map → chunk-ERJ7FU55.js.map} +0 -0
  888. /package/dist/{chunk-VJ3NQK4K.js.map → chunk-EVVGJDRQ.js.map} +0 -0
  889. /package/dist/{chunk-NSZ6J5DF.js.map → chunk-EXK7QRWF.js.map} +0 -0
  890. /package/dist/{chunk-5SAZMBW7.js.map → chunk-EYZ6IQ6X.js.map} +0 -0
  891. /package/dist/{chunk-OQAODTYR.js.map → chunk-F64IRYG3.js.map} +0 -0
  892. /package/dist/{chunk-Q2KVKTC2.js.map → chunk-FHS2HQSH.js.map} +0 -0
  893. /package/dist/{chunk-Y2OCKFZ3.js.map → chunk-GKEWXIV5.js.map} +0 -0
  894. /package/dist/{chunk-NUEFXLZU.js.map → chunk-GTGPO5KW.js.map} +0 -0
  895. /package/dist/{chunk-XQ7UYPVN.js.map → chunk-HB3RFQSC.js.map} +0 -0
  896. /package/dist/{chunk-FC3XK5JT.js.map → chunk-I6GALP6E.js.map} +0 -0
  897. /package/dist/{chunk-LEOXZY36.js.map → chunk-IL6POWCW.js.map} +0 -0
  898. /package/dist/{chunk-GX2BYNCT.js.map → chunk-IU6SNYX6.js.map} +0 -0
  899. /package/dist/{chunk-6CU3FN74.js.map → chunk-J2ZX2XUV.js.map} +0 -0
  900. /package/dist/{chunk-6MWUANRF.js.map → chunk-JKJOGPZN.js.map} +0 -0
  901. /package/dist/{chunk-PEDZFFKW.js.map → chunk-JZUV47FZ.js.map} +0 -0
  902. /package/dist/{chunk-5TZZUL5X.js.map → chunk-K5IMOGHB.js.map} +0 -0
  903. /package/dist/{chunk-7IZQTCTR.js.map → chunk-LASZKVMO.js.map} +0 -0
  904. /package/dist/{chunk-NNWK3PSY.js.map → chunk-NR5LT5RY.js.map} +0 -0
  905. /package/dist/{chunk-NYVQCZ54.js.map → chunk-NWSGI5C7.js.map} +0 -0
  906. /package/dist/{chunk-MSVY7ULZ.js.map → chunk-Q5VNKNE5.js.map} +0 -0
  907. /package/dist/{chunk-2HVUKRNE.js.map → chunk-QLWMEXCT.js.map} +0 -0
  908. /package/dist/{chunk-KYC4LIEU.js.map → chunk-QRB7NAOJ.js.map} +0 -0
  909. /package/dist/{chunk-6ULCYCMU.js.map → chunk-R4ROFEYC.js.map} +0 -0
  910. /package/dist/{chunk-KBF5GSGX.js.map → chunk-RIX4V2TB.js.map} +0 -0
  911. /package/dist/{chunk-CTSFKDGA.js.map → chunk-RYCTDFUX.js.map} +0 -0
  912. /package/dist/{chunk-S6AQXDN4.js.map → chunk-RZ5SVOYR.js.map} +0 -0
  913. /package/dist/{chunk-A4MAD6PO.js.map → chunk-SLFHQTTW.js.map} +0 -0
  914. /package/dist/{chunk-AYGZMQP5.js.map → chunk-T2FFWNPK.js.map} +0 -0
  915. /package/dist/{chunk-CWCCYH34.js.map → chunk-UNFPPVNI.js.map} +0 -0
  916. /package/dist/{chunk-M5I354EE.js.map → chunk-VLFCJYTL.js.map} +0 -0
  917. /package/dist/{chunk-WVCQ75OK.js.map → chunk-VN3DBQAU.js.map} +0 -0
  918. /package/dist/{chunk-KXKLKJW4.js.map → chunk-VZRODIM3.js.map} +0 -0
  919. /package/dist/{chunk-HBTT7YQX.js.map → chunk-W22IKJE2.js.map} +0 -0
  920. /package/dist/{chunk-KNXN47MO.js.map → chunk-X3YYQWOQ.js.map} +0 -0
  921. /package/dist/{chunk-DFIBOSOQ.js.map → chunk-YFXZEAYK.js.map} +0 -0
  922. /package/dist/{chunk-ICV32FPK.js.map → chunk-ZAJAVEXY.js.map} +0 -0
  923. /package/dist/{chunk-MK2BSS44.js.map → chunk-ZICD77GM.js.map} +0 -0
  924. /package/dist/{chunk-KWLD2D75.js.map → chunk-ZJ2AK4V7.js.map} +0 -0
  925. /package/dist/{chunk-KBBWY46Y.js.map → chunk-ZUODRVHY.js.map} +0 -0
  926. /package/dist/{api-HV4PDUWF.js.map → collection-facade-TLWIPI76.js.map} +0 -0
  927. /package/dist/{chunk-BGIZAFY7.js.map → computed-ZIQTYTDI.js.map} +0 -0
  928. /package/dist/{dead-filter-VNA4M3GP.js.map → dead-filter-ESOBZZP5.js.map} +0 -0
  929. /package/dist/{chunk-K2WCO3NX.js.map → delegation-W7ZV2322.js.map} +0 -0
  930. /package/dist/{collection-facade-3RAXG2OU.js.map → derive-H2BJTLUI.js.map} +0 -0
  931. /package/dist/{computed-R62HGCO4.js.map → enclave-AP3I5W7O.js.map} +0 -0
  932. /package/dist/{delegation-ZKII5UBI.js.map → executor-KGWTNEQD.js.map} +0 -0
  933. /package/dist/{derive-5D2C3WG4.js.map → executor-OVEXR6RT.js.map} +0 -0
  934. /package/dist/{describe/index.js.map → executor-UNEH5ZYH.js.map} +0 -0
  935. /package/dist/{enclave-EUBEJGPG.js.map → export-accessible-PCMXSUZS.js.map} +0 -0
  936. /package/dist/{executor-IL7SRNUZ.js.map → extract-partition-SWHFSYJO.js.map} +0 -0
  937. /package/dist/{fanout-sidecar-CI5BCMQM.js.map → fanout-sidecar-A765THMX.js.map} +0 -0
  938. /package/dist/{executor-OUA2Y6YC.js.map → find-N6345CNT.js.map} +0 -0
  939. /package/dist/{executor-WAEI6PDV.js.map → issue-5OKB6I2R.js.map} +0 -0
  940. /package/dist/{export-accessible-O55RKAGC.js.map → ledger-GFBKVPV4.js.map} +0 -0
  941. /package/dist/{extract-partition-VBGCBA6Q.js.map → liberate-3VDOT4KO.js.map} +0 -0
  942. /package/dist/{find-FISGUWSK.js.map → link-set-Z7Q2ASFX.js.map} +0 -0
  943. /package/dist/{issue-EQAWIYFQ.js.map → noydb-ZCJOYBDI.js.map} +0 -0
  944. /package/dist/{kernel/index.js.map → policy-Z3RUAIY2.js.map} +0 -0
  945. /package/dist/{ledger-AJA2SR3C.js.map → public-envelope-B4KNWVUA.js.map} +0 -0
  946. /package/dist/{liberate-SEGR4JLY.js.map → read-only-facade-CHCKSEPD.js.map} +0 -0
  947. /package/dist/{link-set-YBAC2DQT.js.map → register-VAHONCID.js.map} +0 -0
  948. /package/dist/{noydb-AMEOU456.js.map → registry-7MLVD3VO.js.map} +0 -0
  949. /package/dist/{policy-SDGRWVIL.js.map → registry-EPKPD5SM.js.map} +0 -0
  950. /package/dist/{public-envelope-J5PLQOW2.js.map → registry-P5T7PS2U.js.map} +0 -0
  951. /package/dist/{read-only-facade-UCYNRE56.js.map → request-withdrawal-TI3A5WPS.js.map} +0 -0
  952. /package/dist/{register-OVJKW7BS.js.map → revoke-FDRD6GRW.js.map} +0 -0
  953. /package/dist/{registry-5RJSK5AJ.js.map → signer-MUWEIUI6.js.map} +0 -0
  954. /package/dist/{registry-DQRNTWRL.js.map → stale-OSQ7J3AA.js.map} +0 -0
  955. /package/dist/{registry-LTGLERS7.js.map → storage-MVFCGEQE.js.map} +0 -0
  956. /package/dist/{store-coordination-provider-WKGAE2WI.js.map → store-coordination-provider-64OEZFGS.js.map} +0 -0
  957. /package/dist/{walk-76UCFXYV.js.map → walk-SVNDIZ62.js.map} +0 -0
  958. /package/dist/{request-withdrawal-27O77D2V.js.map → withdraw-accessible-WZIEVWSR.js.map} +0 -0
package/dist/index.d.ts CHANGED
@@ -1,1507 +1,321 @@
1
- import { ep as SearchStrategy, eq as SequenceStrategy, er as ViaDescriptor, es as CustodyStrategy, d0 as EncryptedEnvelope, et as CollectionDescription, eu as SchemaUpdateStrategy, ev as TransformFn, c_ as NoydbStore, ew as PersistedSchemaEnvelope, dr as EnclaveKey, ex as UpdateDecision, ey as NoydbError, e7 as PublicEnvelope, ez as UserEnvelope, eA as VaultUserApi, eB as UserApiDeps, c1 as RequestWithdrawalOptions, c2 as RequestWithdrawalResult, c6 as WithdrawalRequestStatus, c5 as WithdrawalRequest, bY as ApproveWithdrawalOptions, c4 as WithdrawResult, c0 as RejectWithdrawalOptions, c3 as WithdrawAccessibleOptions, bZ as ExportAccessibleOptions, eC as DeepPartialOrNull, eD as UserEnvelopePresented, eE as Unsubscribe, eF as LiveUserEnvelope, eG as RoundingMode, c8 as UnlockedKeyring, eH as VaultPolicy, eI as ActiveTier, eJ as FactorProof, eK as GateName, eL as PolicyDenyReason, eM as GatePolicy } from './index-DzhNI2vE.js';
2
- export { eN as AccessibleVault, eO as AffectedDocument, aa as AggregateResult, ab as AggregateSpec, ac as Aggregation, ad as AggregationUpstream, eP as AlreadyElevatedError, bf as AmendmentForbiddenError, d2 as AppendInput, eQ as ArchivePolicy, eR as ArchiveResult, eS as ArchiveRunOptions, eT as ArchiveStrategy, bz as ArrayOutputSpec, dG as AttestationError, dH as AttestationNotEnabledError, e as BLOB_CHUNKS_COLLECTION, f as BLOB_COLLECTION, h as BLOB_INDEX_COLLECTION, i as BLOB_SLOTS_PREFIX, j as BLOB_VERSIONS_PREFIX, eU as BUNDLE_STORE_POLICY, dt as BackupCorruptedError, du as BackupLedgerError, n as BlobObject, o as BlobPutOptions, p as BlobResponseOptions, q as BlobSet, eV as BuiltInGateName, dv as BundleIntegrityError, e8 as BundleRecipient, dw as BundleSealMismatchError, dx as BundleVersionConflictError, aN as CONSENT_AUDIT_COLLECTION, eW as CacheOptions, eX as CacheStats, eY as CargoNotEnabledError, eZ as CargoStrategy, e_ as ChangeEvent, d3 as ChangeType, dU as ClassifiedConfigError, dV as ClassifiedEntry, dS as ClassifiedFieldSpec, dW as ClassifiedGroup, dX as ClassifiedList, e$ as ClassifiedNotEnabledError, dZ as ClassifiedRevealError, d$ as ClassifiedRotationError, e0 as ClassifiedStorage, e1 as ClassifiedVerdict, e3 as ClassifiedVerifyError, f0 as Clause, aW as ClosePeriodOptions, bN as Collection, f1 as CollectionChangeEvent, f2 as CollectionConfig, f3 as CollectionConflictResolver, f4 as CollectionDescriptor, bo as CollectionFrame, U as CollectionIndexes, d4 as CollectionInstant, f5 as CollectionMeta, f6 as CollectionStats, f7 as ComputedFieldEntry, f8 as ComputedFieldError, f9 as ComputedFields, fa as ComputedFn, fb as Conflict, fc as ConflictError, fd as ConflictPolicy, fe as ConflictStrategy, aO as ConsentAuditEntry, aP as ConsentAuditFilter, aQ as ConsentContext, aR as ConsentOp, aD as CrdtMode, aE as CrdtState, ff as CrossJoinSourceUnknownError, fg as CrossJoinTooLargeError, fh as CrossTierAccessEvent, fi as CustodyApi, fj as CustodyHost, fk as CustodyNotEnabledError, D as DEFAULT_CHUNK_SIZE, fl as DEFAULT_CROSS_JOIN_MAX_ROWS, fm as DEFAULT_JOIN_MAX_ROWS, fn as DEFAULT_PUBLIC_ENVELOPE_SCHEMA, fo as DELEGATIONS_COLLECTION, cl as DICT_COLLECTION_PREFIX, fp as DanglingReferenceError, fq as DataResidencyError, fr as DebugPlaintextError, fs as DebugReservedFieldError, ft as DecryptionError, fu as DeepPartial, fv as DeferredNumberingConfig, fw as DelegationTargetMissingError, fx as DelegationToken, fy as DeleteManyResult, bA as DerivationCapExceededError, bB as DerivationCycleError, bC as DerivationDepthError, fz as DerivationDescriptor, bD as DerivationOutputShapeError, bE as DerivationOutputUnknownError, fA as DerivationSkippedFrozen, bx as DerivationStrategy, bG as DerivationStrategyHandle, bH as DerivedFromMeta, fB as DescribeOptions, fC as DescribedField, cm as DictEntry, cn as DictKeyDescriptor, co as DictKeyInUseError, cp as DictKeyMissingError, cq as DictionaryHandle, cr as DictionaryOptions, c7 as DiffEntry, fD as DirectoryDisabledError, fE as DirtyEntry, fF as DryRunResult, fG as DumpSchemaOptions, fH as ELEVATION_AUDIT_COLLECTION, fI as ElevatedHandle, fJ as ElevationExpiredError, fK as EmbeddingDescriptor, fL as EmbeddingDimMismatchError, fM as EmbeddingModelMismatchError, fN as EnclaveNotSupportedError, fO as EnrollAuthenticatorOptions, fP as EnrollAuthenticatorWrappingDEKsOptions, fQ as EnrollAuthenticatorWrappingKEKOptions, fR as EnrollRecoveryResult, fS as ErasureEnforcement, fT as ExportCapability, fU as ExportCapabilityError, fV as ExportChunk, c9 as ExportFormat, fW as ExportStreamOptions, fX as FactorKind, fY as FactorProofBundle, fZ as FactorRequirement, f_ as FenceDoc, f$ as FenceState, g0 as FieldChange, g1 as FieldClause, g2 as FieldDescriptor, bg as FieldFrozenError, g3 as FieldMeta, g4 as FieldNotQueryableError, g5 as FieldSource, g6 as FilenameSanitizationError, g7 as FilterClause, g8 as ForgetStrategyNotConfiguredError, g9 as FormattedSequenceHandle, ga as FrozenSnapshotRef, ae as GROUPBY_MAX_CARDINALITY, af as GROUPBY_WARN_CARDINALITY, gb as GhostRecord, gc as GrantCustodianOptions, gd as GrantOptions, ge as GroupCardinalityError, gf as GroupClause, ag as GroupedAggregation, ah as GroupedQuery, ai as GroupedQueryN, aj as GroupedRow, ak as GroupedRowN, bd as GuardChange, be as GuardContext, bc as GuardStrategy, bi as GuardStrategyHandle, gg as GuardViolation, W as HashIndex, gh as HistoryConfig, gi as HistoryEntry, c$ as HistoryOptions, cs as I18nMap, ct as I18nTextDescriptor, cu as I18nTextOptions, gj as INDEXED_STORE_POLICY, bj as IllegalTransitionError, gk as ImportCapability, gl as ImportCapabilityError, Y as IndexDef, gm as IndexFieldName, gn as IndexRequiredError, go as IndexWriteFailureError, gp as InferOutput, gq as InternalCollectionStats, gr as InvalidKeyError, bk as InvariantError, gs as IssueDelegationOptions, gt as IssueMagicLinkGrantOptions, gu as JoinContext, gv as JoinLeg, gw as JoinStrategy, gx as JoinTooLargeError, gy as JoinableSource, d5 as JsonPatch, d6 as JsonPatchOp, gz as KeyringAuthenticator, gA as KeyringAuthenticatorWrappingDEKs, gB as KeyringAuthenticatorWrappingKEK, gC as KeyringCorruptError, gD as KeyringExpiredError, gE as KeyringFile, cv as Layer, gF as LazyStrategy, gG as LedgerContentionError, d7 as LedgerStore, gH as LiberateOptions, gI as LiberateResult, gJ as LinkIntegrityError, gK as LinkOnDelete, gL as LinkRow, gM as LinkSetHandle, gN as LinkSpec, gO as ListAccessibleVaultsOptions, gP as ListPageResult, gQ as ListUsersOptions, al as LiveAggregation, gR as LiveQuery, gS as LiveUpstream, cw as LocaleNotSpecifiedError, gT as LocaleReadOptions, gU as LookupDescriptor, gV as Lru, gW as LruOptions, gX as LruStats, aF as LwwMapState, gY as MAGIC_LINK_CONTENT_INFO_PREFIX, gZ as MAGIC_LINK_GRANTS_COLLECTION, g_ as MAGIC_LINK_KEK_INFO_PREFIX, g$ as MagicLinkGrantPayload, h0 as MagicLinkGrantRecord, h1 as ManagedRecoveryNotEnrolledError, eh as MaterializedFromMeta, ei as MaterializedViewConfigError, ej as MaterializedViewCycleError, h2 as MaterializedViewDescriptor, ek as MaterializedViewOutput, el as MaterializedViewSourceUnknownError, bK as MaterializedViewStrategy, bL as MaterializedViewStrategyHandle, em as MaterializedViewTooLargeError, h3 as MemoryRecipientSealer, h4 as MemorySealingKeyProvider, h5 as MigrationRequiredError, cx as MissingTranslationError, h6 as MoneyCurrencyError, h7 as MoneyDescriptor, h8 as MoneyOptions, h9 as MoneyOptionsFixed, ha as MoneyOptionsMulti, hb as MoneyPrecisionError, hc as MoneyString, hd as MoneyUnsupportedError, he as NOYDB_BACKUP_VERSION, hf as NOYDB_FORMAT_VERSION, hg as NOYDB_KEYRING_VERSION, hh as NOYDB_SYNC_VERSION, hi as NO_CARGO, hj as NO_CUSTODY, hk as NO_SEARCH, hl as NO_SEQUENCE, hm as NO_TEAM, hn as NetworkError, ho as NextOptions, hp as NoAccessError, hq as NonAdditiveSchemaChangeError, hr as NotFoundError, hs as Noydb, ht as NoydbBundleStore, hu as NoydbEventMap, hv as NoydbOptions, bq as NoydbPodStore, hw as NumberingAssignment, hx as NumberingUncertaintyError, O as ObjectListEntry, A as ObjectMeta, F as ObjectProjection, G as ObjectUrlOptions, hy as OnDelete, cy as OnMissing, cz as OnMissingPolicy, aX as OpenPeriodOptions, hz as Operator, hA as OrderBy, bI as OutputSpec, bO as OverlayBaseIsVirtualError, bP as OverlayCollectionUnavailableError, bQ as OverlayFieldMergeMode, bR as OverlayFieldMergeRule, bS as OverlayIdMismatchError, bT as OverlayNameCollisionError, hB as OverlayViewDescriptor, bM as OverlayedViewStrategy, bV as OverlayedViewStrategyHandle, aY as PERIODS_COLLECTION, hC as POD_STORE_POLICY, hD as PUBLIC_ENVELOPE_FIELDS, hE as PaperRecoveryDoc, hF as PaperRecoveryEntry, hG as PassphrasePolicy, hH as PassphraseValidationResult, hI as PathEscapeError, hJ as PeriodClosedError, b2 as PeriodRecord, hK as Permission, hL as PermissionDeniedError, hM as Permissions, hN as PersistedSchemaKind, hO as PlaintextTranslatorContext, hP as PlaintextTranslatorFn, dB as PodVersionConflictError, hQ as PolicyDeniedError, P as PolicyEnforcer, b$ as PortabilityNotEnabledError, hR as PresenceHandle, hS as PresencePeer, hT as PrivilegeEscalationError, d1 as PruneOptions, hU as PublicEnvelopeField, hV as PublicEnvelopeSchema, hW as PublicEnvelopeText, hX as PullMode, hY as PullOptions, hZ as PullPolicy, h_ as PullResult, h$ as PushMode, i0 as PushOptions, i1 as PushPolicy, i2 as PushResult, i3 as PutManyItemOptions, i4 as PutManyOptions, i5 as PutManyResult, H as PutObjectOptions, I as PutUrlOptions, ef as Query, i6 as QueryAcrossOptions, i7 as QueryAcrossResult, i8 as QueryField, i9 as QueryPlan, ia as QuerySource, ib as QuickUnlockState, ic as QuickUnlockStore, id as QuiesceTimeoutError, ie as ReAuthOperation, ig as ReadOnlyAtInstantError, ih as ReadOnlyError, ii as ReadOnlyFrameError, ea as RecipientHint, e9 as RecipientSealer, ij as RecordCekNotFoundError, bm as RecordLockedError, bJ as RecordOutputSpec, ik as RecoverPassphraseInput, il as RecoverPassphraseResult, im as RecoverUserOptions, io as RecoveryNotEnrolledError, ip as RecoveryProfileNotImplementedError, iq as RecoveryProof, am as Reducer, an as ReducerBuilder, ao as ReducerOptions, ir as RefDescriptor, is as RefIntegrityError, it as RefMode, iu as RefRegistry, iv as RefScopeError, iw as RefViolation, cA as ReservedCollectionNameError, ix as ReservedVaultNameError, cB as ResolveI18nOptions, iy as ResolvedPublicEnvelopeSchema, br as RetentionPolicy, iz as RetrieveHit, iA as RetrieveOptions, iB as RevokeOptions, aG as RgaState, cY as Role, iC as RotatePassphraseInput, iD as RotateRecoveryOptions, iE as RotateRecoveryResult, iF as SEALED_PASSPHRASE_RECORD_ID, iG as ScanBuilder, iH as ScanPageProvider, iI as SchemaDelta, iJ as SchemaFenceError, iK as SchemaIntrospection, iL as SchemaLockedError, iM as SchemaUpdateError, iN as SchemaValidationError, cC as ScriptViolationError, cD as ScriptWarning, iO as Sealed, iP as SealedEnvelope, iQ as SealedHandle, iR as SealedPassphrase, dj as SealedRecordExpiredError, dk as SealedRecordMismatchError, dl as SealedRecordNotEnabledError, iS as SealedView, dn as SealingKeyProvider, iT as SearchEntry, iU as SearchNotEnabledError, iV as SearchOptions, iW as SearchResult, iX as SemanticType, iY as SequenceContentionError, iZ as SequenceHandle, i_ as SequenceNotEnabledError, i$ as SequenceOfflineError, j0 as SequenceOptions, j1 as SequenceStore, j2 as SequenceStoreOptions, a as SessionExpiredError, b as SessionNotFoundError, j3 as SessionPolicy, c as SessionPolicyError, j4 as SetPublicEnvelopeInput, j5 as ShamirRecoveryDoc, j6 as ShamirRecoveryEntry, dq as ShamirRecoveryProvider, j7 as ShardProvisioningError, J as SlotInfo, K as SlotRecord, j8 as SlotRewrapCeremony, j9 as SlotRewrapContext, bu as SnapshotMeta, bw as SnapshotNotFoundError, ja as StandardSchemaV1, jb as StandardSchemaV1Issue, jc as StandardSchemaV1SyncResult, cE as StaticDictDescriptor, cF as StaticDictReadonlyError, jd as StoreAuth, je as StoreAuthKind, jf as StoreCapabilities, jg as StoreCapabilityError, jh as StoreTime, ji as SyncEngine, jj as SyncMetadata, jk as SyncPolicy, jl as SyncScheduler, jm as SyncSchedulerStatus, jn as SyncStatus, jo as SyncTarget, jp as SyncTargetRole, jq as SyncTransaction, jr as SyncTransactionResult, js as TabChannel, jt as TabCoordinationOptions, ju as TabLockManager, jv as TabPresence, jw as TabRole, jx as TamperedError, jy as TeamNotEnabledError, jz as TeamStrategy, jA as TierDemoteDeniedError, jB as TierMode, jC as TierNotGrantedError, jD as TiersNotEnabledError, jE as TransactionInvariant, jF as TranslatorAuditEntry, cG as TranslatorNotConfiguredError, jG as TxCollection, eb as TxContext, jH as TxOp, jI as TxVault, en as UnionArmJoin, eo as UnionSource, jJ as UniqueConstraintError, cH as UnknownDictCodeError, jK as UnknownLookupKeyError, jL as UnknownShardError, jM as UnsupportedIndexOptionError, jN as UpdateAuthenticatorOptions, jO as UpdateContext, jP as UpdateUserOptions, jQ as UserEnvelopeCheckGate, jR as UserEnvelopeOversizedError, jS as UserInfo, jT as ValidationError, V as Vault, jU as VaultBackup, d8 as VaultEngine, bp as VaultFrame, d9 as VaultInstant, jV as VaultMeta, jW as VaultPolicyOnDisk, jX as VaultSchemaSnapshot, jY as VaultSnapshot, jZ as VaultTemplateNotFoundError, da as VerifyResult, L as VersionRecord, j_ as ViaFieldSpec, j$ as ViaPosture, k0 as Vocabulary, k1 as WarningRules, k2 as WeakPassphraseError, k3 as WeakPassphraseReason, k4 as WithArchiveOptions, k5 as WithdrawalRequestError, k6 as WrappedDeksBlob, k7 as WriteConflict, k8 as WriteQueue, aH as YjsState, k9 as aesGcmOpen, cI as applyI18nLocale, ka as applyJoins, db as applyPatch, kb as approveWithdrawal, kc as asMoney, kd as assertStrongPassphrase, ap as avg, ke as base64ToBuffer, kf as bufferToBase64, kg as buildLiveQuery, kh as buildRecipientKeyringFile, ki as burnPaperRecoveryEntry, kj as compileSequenceFormat, dc as computePatch, ar as count, d as createEnforcer, kk as createNoydb, kl as createStore, km as decryptBytes, kn as decryptDeterministic, ko as deriveMagicLinkContentKey, kp as derivePresenceKey, kq as dict, cJ as dictCollectionName, cK as dictKey, dd as diff, kr as encryptBytes, ks as encryptDeterministic, cL as enforceScript, kt as enrollAuthenticator, ku as enum, ku as enumOf, kv as estimateEntropy, kw as evalComputedFields, kx as evaluateClause, ky as evaluateExportCapability, kz as evaluateFieldClause, kA as evaluateImportCapability, kB as executePlan, kC as exportAccessibleData, kD as findAuthenticator, de as formatDiff, as as groupAndReduce, kE as hasExportCapability, kF as hasImportCapability, kG as hasRecoveryEnrolled, cM as i18nText, cN as inferScripts, e5 as isClassifiedFieldSpec, e6 as isClassifiedGroup, cO as isDictCollectionName, cP as isDictKeyDescriptor, cQ as isI18nTextDescriptor, kH as isLinkCollectionName, kI as isMagicLinkGrantExpired, kJ as isMoneyDescriptor, kK as isMoneyString, kL as isPublicEnvelope, kM as isRefArray, cR as isStaticDictDescriptor, kN as isViaFieldSpec, kO as issueDelegation, kP as keyringRecoverPassphrase, kQ as keyringRotatePassphrase, kR as liberateVault, kS as listMagicLinkGrants, kT as listUsers, kU as listUsersWithEnvelopes, kV as listWithdrawalRequests, kW as loadActiveDelegations, kX as loadPaperRecoveryEntries, kY as loadSealedPassphrase, kZ as loadShamirRecoveryEntries, k_ as lookup, k$ as magicLinkGrantRecordId, at as max, N as memoryObjectProjection, aK as mergeCrdtStates, au as min, l0 as mintPaperRecoveryEntry, l1 as mintShamirRecoveryEntry, l2 as mintWrappedDeksBlob, l3 as money, av as moneyMax, aw as moneyMin, l4 as moneyNumber, ax as moneySum, l5 as parseRsaOaepTlv, l6 as parseSealedEnvelope, l7 as readMagicLinkGrantRecord, l8 as readPath, l9 as recoverUser, ay as reduceRecords, az as reducerBuilder, la as ref, lb as refArray, lc as rejectWithdrawal, ld as removeAuthenticator, le as requestWithdrawal, lf as resetJoinWarnings, aL as resolveCrdtSnapshot, cT as resolveI18nText, cU as resolvePolicy, lg as resolvePublicEnvelopeSchema, lh as resolveSequenceKey, li as revokeDelegation, lj as revokeMagicLinkGrant, lk as runTransaction, ll as savePaperRecoveryEntries, lm as saveSealedPassphrase, ln as saveShamirRecoveryEntries, lo as sealRsaOaepTlv, cV as staticDict, aB as sum, lp as unwrapDeksFromBlob, lq as unwrapDeksFromPaperEntry, lr as unwrapDeksFromShamirEntry, ls as unwrapMagicLinkGrant, cX as validateI18nTextValue, lt as validatePassphrase, lu as validatePublicEnvelopeInput, lv as validateSchemaInput, lw as validateSchemaOutput, v as validateSessionPolicy, lx as via, ly as withArchive, lz as withDeferredNumbering, lA as withdrawAccessibleData, lB as writeMagicLinkGrant } from './index-DzhNI2vE.js';
3
- export { I as ImportExternalOptions, a as ImportExternalResult, b as ImportableCollection, d as detectMagic, c as detectMimeType, i as importExternalObjects, e as isPreCompressed } from './mime-magic-CbV1quyp.js';
4
- export { WrapBundleStoreOptions, WrapPodStoreOptions, WrappedBundleNoydbStore, WrappedPodNoydbStore, createBundleStore, createPodStore, wrapBundleStore, wrapPodStore } from './pod/index.js';
5
- export { W as WriteEvent, a as WriteHook } from './index-B9QdHytu.js';
6
- export { D as DEED_RECORD_ID, a as DeedMarker, S as STATE_VAULT_NAME, U as USER_ENVELOPE_COLLECTION, b as USER_ENVELOPE_MAX_BYTES, c as createDeedOwner, i as isDeedVault, l as loadDeedMarker, w as withCargo } from './index-CyclmyDr.js';
7
- export { A as AutoCredential, q as AutoCredentialKind, d as CompressionAlgo, f as NOYDB_BUNDLE_FORMAT_VERSION, g as NOYDB_BUNDLE_MAGIC, h as NOYDB_BUNDLE_PREFIX_BYTES, i as NoydbBundleHeader, j as NoydbBundleReadResult, N as NoydbPodHeader, R as ReadNoydbBundleOptions, k as WriteNoydbBundleOptions, W as WritePodOptions, s as hasNoydbBundleMagic, m as readNoydbBundle, n as readNoydbBundleHeader, t as readNoydbBundlePublicEnvelope, r as readPod, a as readPodHeader, o as resetBrotliSupportCache, p as writeNoydbBundle, w as writePod } from './bundle-DlSxo31R.js';
8
- export { g as generateULID, i as isULID } from './ulid-DRH25k3y.js';
9
- export { D as DecryptedRecord, d as decryptExtractedPartition } from './decrypt-partition-IHtxEnTi.js';
10
- export { L as LedgerEntry, d as canonicalJson, h as hashEntry, p as paddedIndex, e as parseIndex, s as sha256Hex } from './subject-index-CyOgGMJL.js';
11
- export { SYNC_CREDENTIALS_COLLECTION, SyncCredential, credentialStatus, deleteCredential, getCredential, listCredentials, putCredential, withTeam } from './team/index.js';
12
- export { withLazy } from './lazy/index.js';
13
- export { TransactionStrategyOptions } from './tx/index.js';
14
- export { I as ImmutableGuardConfig, T as TransitionGuardConfig, i as immutableGuard, t as transitionGuard, w as withGuard } from './transition-guard-BOUkzQU4.js';
15
- export { w as withDerivation, a as withRollup } from './with-rollup-ClCHO6-4.js';
16
- export { w as withMaterializedView } from './with-materialized-view-BP33v1Z6.js';
17
- export { w as withOverlayedView } from './with-overlayed-view-DntFpOKN.js';
18
- export { C as ClassifiedNeverStoredError, a as ClassifiedValidationError, c as classified, l as luhnCheck, r as resolveClassifiedFields } from './validators-B3SalxlJ.js';
19
- export { C as CreateSessionOptions, a as CreateSessionResult, D as DevUnlockOptions, S as SessionToken, b as activeSessionCount, c as clearDevUnlock, d as createSession, e as enableDevUnlock, i as isDevUnlockActive, f as isSessionAlive, l as loadDevUnlock, r as resolveSession, g as revokeAllSessions, h as revokeSession } from './dev-unlock-DDTafVO6.js';
20
- export { i as isDiscriminant } from './discriminant-BN9REW3o.js';
21
- export { FuseOptions, fuseRetrieval } from './kernel/index.js';
22
- export { D as DiffCandidate, a as DiffOptions, V as VaultDiff, b as VaultDiffEntry, c as VaultDiffModifiedEntry, d as diffVault } from './vault-diff-Dt9NkLzw.js';
23
- export { L as LEDGER_COLLECTION, a as LEDGER_DELTAS_COLLECTION, e as envelopePayloadHash } from './hash-DBkZfIBW.js';
24
- import '@noy-db/attestation';
25
-
26
1
  /**
27
- * Cache policy helpers parse human-friendly byte budgets into raw numbers.
2
+ * **@noy-db/hub**zero-knowledge, offline-first, encrypted document store.
28
3
  *
29
- * Accepted shapes (case-insensitive on suffix):
30
- * number — interpreted as raw bytes
31
- * '1024' — string of digits, raw bytes
32
- * '50KB' — kilobytes (×1024)
33
- * '50MB' — megabytes (×1024²)
34
- * '1GB' — gigabytes (×1024³)
4
+ * ## What it is
35
5
  *
36
- * Decimals are accepted (`'1.5GB'` 1610612736 bytes).
6
+ * A TypeScript library that encrypts every record with AES-256-GCM before it
7
+ * reaches any storage backend. The store (file, DynamoDB, S3, IndexedDB, …)
8
+ * only ever sees ciphertext — it has no way to read or tamper with your data
9
+ * without the user's passphrase.
37
10
  *
38
- * Anything else throws better to fail loud at construction time than
39
- * to silently treat a typo as 0 bytes (which would evict everything).
40
- */
41
- /** Parse a byte budget into a positive integer number of bytes. */
42
- declare function parseBytes(input: number | string): number;
43
- /**
44
- * Estimate the in-memory byte size of a decrypted record.
45
- *
46
- * Uses `JSON.stringify().length` as a stand-in for actual heap usage.
47
- * It's a deliberate approximation: real V8 heap size includes pointer
48
- * overhead, hidden classes, and string interning that we can't measure
49
- * from JavaScript. The JSON length is a stable, monotonic proxy that
50
- * costs O(record size) per insert — fine when records are typically
51
- * < 1 KB and the cache eviction is the slow path anyway.
52
- *
53
- * Returns `0` (and the caller must treat it as 1 for accounting) if
54
- * stringification throws on circular references; this is documented
55
- * but in practice records always come from JSON-decoded envelopes.
56
- */
57
- declare function estimateRecordBytes(record: unknown): number;
58
-
59
- /**
60
- * Default text tokenizer for scan-mode search.
61
- *
62
- * NFKC-normalize → lowercase → split on Unicode letter/number runs. This is a
63
- * word-boundary tokenizer: it does **not** segment scripts written without
64
- * inter-word spaces (Thai, Lao, Khmer, CJK) — those collapse to one token per
65
- * run. For such data, a dictionary/ICU segmenter is the right `tokenizer`
66
- * (the engine takes one as a parameter); substring/`contains` matching is the
67
- * pragmatic fallback until then.
68
- */
69
- type Tokenizer = (text: string) => string[];
70
- declare const tokenize: Tokenizer;
71
-
72
- /**
73
- * Enable the search / retrieval capability.
74
- * Pass to `createNoydb({ searchStrategy: withSearch() })` to make a collection's
75
- * `search` / `retrieve` / `similarTo` / `warmIndex` / `flushIndex` methods live,
76
- * and to enable the put()-time embedding-vector compute for collections that
77
- * declare an `embeddings` config. The search/retrieval engine is dynamically
78
- * imported here, so it stays out of the floor bundle until opted in.
79
- */
80
-
81
- declare function withSearch(): SearchStrategy;
82
-
83
- /**
84
- * Enable the atomic-sequence capability.
85
- * Pass to `createNoydb({ sequenceStrategy: withSequence() })` to make
86
- * `vault.sequence('name').next()` / `.peek()` / `.seedTo()` live. The
87
- * {@link SequenceStore} CAS engine is statically imported here, so it is pulled
88
- * into the bundle only when `withSequence()` is referenced (the floor never
89
- * imports it).
90
- */
91
-
92
- declare function withSequence(): SequenceStrategy;
93
-
94
- /**
95
- * computed() — the declaration factory for a field whose value is DERIVED
96
- * from other fields on the same record (#638 Task 7, spec §6). Composes
97
- * with `via()` (the locked grammar since phase A: `via(computed(fn, { deps,
98
- * mode }), money('EUR'))`), grouped by `_viaBrand` like every other via
99
- * feature (`kernel/via-compose.ts#mergeViaFields`).
100
- *
101
- * `mode` picks where the function runs:
102
- * - `'materialized'` (default) — TODAY's stage-5 write-time eager compute
103
- * (`with-formula/computed/index.ts#evalComputedFields`), stored like any
104
- * other field. Byte-for-byte the existing `computed: { field: fn }` sugar.
105
- * - `'virtual'` — rides the `present` read phase (the money-`Formatted`/
106
- * i18n-`Label` precedent, seam map Part 4): computed fresh on every
107
- * read, NEVER stored, `queryable: 'none'`, excluded from export unless
108
- * its declared `deps` permit (identical taint rule to materialized —
109
- * see `shape/via-computed/binding.ts`).
110
- *
111
- * `deps` names the OTHER fields `fn` reads — feeds `ViaGraph` (Task 1/2) so
112
- * a source's taint (e.g. a classified field) propagates to this derived
113
- * field. A depsless entry is fine UNLESS the collection also declares
114
- * classified fields (`kernel/collection-config.ts#resolveComputedEdges`
115
- * refuses it — closes the #636 opaque-function leak).
116
- */
117
-
118
- interface ComputedDescriptor extends ViaDescriptor {
119
- readonly _viaBrand: 'computed';
120
- readonly fn: (record: Record<string, unknown>) => unknown;
121
- readonly deps?: readonly string[];
122
- readonly mode: 'materialized' | 'virtual';
123
- }
124
- declare function computed(fn: (record: Record<string, unknown>) => unknown, opts?: {
125
- readonly deps?: readonly string[];
126
- readonly mode?: 'materialized' | 'virtual';
127
- }): ComputedDescriptor;
128
- declare function isComputedDescriptor(x: unknown): x is ComputedDescriptor;
129
-
130
- /**
131
- * Enable the sovereign-custody (FR-6) capability.
132
- * Pass to `createNoydb({ custodyStrategy: withCustody() })` to make
133
- * `db.grantCustodian` / `db.revokeCustodian` (and the `vault.custody.*` facade
134
- * that delegates to them) plus `vault.custody.liberate()` live. The heavy
135
- * `liberateVault` ceremony is dynamically imported here, so it is reached only
136
- * via opt-in; grant/revoke run the host's own gate + keyring engine.
137
- */
138
-
139
- declare function withCustody(): CustodyStrategy;
140
-
141
- /**
142
- * Helpers for reading records out of a *plaintext* store (`encrypt: false`)
143
- * with native tooling — the programmatic core of a `noydb cat`-style unwrap.
144
- * See the plaintext/debug-store-mode design.
145
- */
146
-
147
- /**
148
- * Extract the record from a plaintext stored envelope, handling both layouts:
149
- *
150
- * - **classic plaintext** (`encrypt: false`): the record is JSON in `_data`.
151
- * - **debugPlaintext**: the record's fields are inlined beside the
152
- * `_`-prefixed metadata (marked by `_debug`).
153
- *
154
- * Returns `null` for an empty/absent body. Throws if handed an **encrypted**
155
- * envelope (non-empty `_iv`) — there is no key here; decrypt through the vault
156
- * instead. Intended for record envelopes, not blob chunks.
157
- *
158
- * @example
159
- * ```ts
160
- * // node script over a to-file store, no vault needed:
161
- * const env = JSON.parse(readFileSync('data/acme/invoices/inv-1.json', 'utf8'))
162
- * console.log(readPlaintextRecord(env)) // → { id: 'inv-1', total: '120.00', … }
163
- * ```
164
- */
165
- declare function readPlaintextRecord<T = Record<string, unknown>>(envelope: EncryptedEnvelope): T | null;
166
-
167
- /**
168
- * `applyListProjection` — the ONE vetted read-projection for lists/exports.
169
- * Replaces classified field values with their declared projection (omit /
170
- * mask / rider) so no consumer re-implements redaction. Pure, non-mutating.
171
- * Consumed by as-* exporters (#489) and available to any list renderer.
172
- * @module
173
- */
174
-
175
- interface ListProjectionOptions {
176
- /** Also handle fields carrying only a plain sensitivity tag (pii/secret). */
177
- readonly sensitivity?: 'omit' | 'mask';
178
- }
179
- declare function applyListProjection(desc: CollectionDescription, record: Record<string, unknown>, opts?: ListProjectionOptions): Record<string, unknown>;
180
-
181
- /** Allow any schema change. Explicit blind / back-compat. */
182
- declare function blindUpdate(): SchemaUpdateStrategy;
183
- /** Allow additive changes; reject non-additive ones. The safety backstop. */
184
- declare function additiveOnly(): SchemaUpdateStrategy;
185
- /**
186
- * Reject schema changes. With `fields`, reject only when one of those
187
- * fields is added/removed/changed; otherwise reject any non-`none` delta.
188
- */
189
- declare function lockSchema(opts?: {
190
- readonly fields?: readonly string[];
191
- }): SchemaUpdateStrategy;
192
-
193
- /** The coordinatedCutover update strategy (single-step — no from/to). */
194
-
195
- declare function coordinatedCutover(opts: {
196
- readonly transform: TransformFn;
197
- }): SchemaUpdateStrategy;
198
-
199
- /**
200
- * Built-in in-memory store — the kernel's zero-config default.
201
- *
202
- * Nested `Map`s: `vault → collection → id → envelope`. Non-persistent
203
- * (data is lost on process exit). A conformant 6-method {@link NoydbStore}
204
- * with CAS atomicity and a monotonic store clock — the kernel version of
205
- * `@noy-db/to-memory`'s core, so `createNoydb()` works with no store package.
206
- *
207
- * Portable: imports only `types` + `errors` (no crypto primitive) — passes
208
- * the `stores-ciphertext-only` architecture guard.
11
+ * ## Architecture in one diagram
209
12
  *
210
- * Implements the 6-method core only (no optional `listVaults`/`ping`/`tx`),
211
- * so `Noydb.listAccessibleVaults()` throws its documented capability error
212
- * rather than enumerating vaults under the default store.
213
- */
214
- declare function memoryStore(): NoydbStore;
215
-
216
- /**
217
- * Store router / multiplexer.
218
- *
219
- * Dispatches `NoydbStore` operations to different backends based on
220
- * collection type, record size, record age, collection name, or vault name.
221
- *
222
- * ```ts
223
- * const db = await createNoydb({
224
- * store: routeStore({
225
- * default: dynamo({ table: 'myapp' }),
226
- * blobs: s3Store({ bucket: 'myapp-blobs' }),
227
- * }),
228
- * })
229
13
  * ```
230
- *
231
- * @module
232
- */
233
-
234
- /**
235
- * Size-tiered blob routing configuration.
236
- *
237
- * Routes blob chunks to different stores based on byte size. Small blobs
238
- * (under `threshold`) stay in the primary or `small` store; large blobs
239
- * go to `large`. This lets you keep DynamoDB as the default while sending
240
- * large binary objects to S3.
241
- */
242
- interface BlobStoreRoute {
243
- /** Store for small blobs (under threshold). Falls back to `default`. */
244
- readonly small?: NoydbStore;
245
- /** Store for large blobs (over threshold). */
246
- readonly large: NoydbStore;
247
- /** Size threshold in bytes. Default: `400 * 1024` (DynamoDB item limit). */
248
- readonly threshold?: number;
249
- }
250
- /**
251
- * Blob lifecycle management policies evaluated during `compact()`.
252
- *
253
- * Controls orphan cleanup, cold-tier archival, and hard deletion of
254
- * blobs that are no longer referenced by any record.
255
- */
256
- interface BlobLifecyclePolicy {
257
- /** Delete orphan blobs (refCount: 0) after this many days. Default: 7. */
258
- readonly orphanRetentionDays?: number;
259
- /** Move blobs not accessed in this many days to the cold blob store. */
260
- readonly archiveAfterDays?: number;
261
- /** Store for archived blobs. Required if archiveAfterDays is set. */
262
- readonly archiveStore?: NoydbStore;
263
- /** Hard-delete archived blobs after this many days. */
264
- readonly expireAfterDays?: number;
265
- }
266
- /**
267
- * Age-based hot/cold tiering configuration.
268
- *
269
- * Records whose `_ts` timestamp is older than `coldAfterDays` are migrated
270
- * to the `cold` store during `compact()`. Reads transparently fall through
271
- * to the cold store when the hot store returns null, so callers don't need
272
- * to know which tier a record lives in.
273
- */
274
- interface AgeRoute {
275
- /** Store for records older than the cutoff. */
276
- readonly cold: NoydbStore;
277
- /**
278
- * Days after last modification before a record is cold-eligible for the
279
- * ROLLING `compact(vault)` migrator. Omit for period-driven archival only
280
- * (`compact(vault, { before })`), where the cutoff is supplied per call.
281
- */
282
- readonly coldAfterDays?: number;
283
- /**
284
- * Collections that participate in age tiering.
285
- * Empty array or omitted = all user collections (excluding `_` prefixed).
286
- */
287
- readonly collections?: string[];
288
- }
289
- /**
290
- * Options for `routeStore()` — the store multiplexer.
291
- *
292
- * At minimum, provide a `default` store. All other fields are optional
293
- * extensions for specific routing scenarios (blobs → S3, geographic sharding,
294
- * age-based tiering, etc.).
295
- */
296
- interface RouteStoreOptions {
297
- /** Default store for all unmatched operations. */
298
- readonly default: NoydbStore;
299
- /**
300
- * Route blob chunk data to a separate store.
301
- * - Pass a `NoydbStore` for simple prefix routing (all chunks → that store).
302
- * - Pass `{ small?, large, threshold? }` for size-tiered routing.
303
- */
304
- readonly blobs?: NoydbStore | BlobStoreRoute;
305
- /** Route all blob metadata (index, slots, versions) to the blobs store too. Default: false. */
306
- readonly routeBlobMeta?: boolean;
307
- /** Route specific user collections to dedicated stores. */
308
- readonly routes?: Record<string, NoydbStore>;
309
- /** Route by vault name (prefix patterns, e.g. `'EU-'`). */
310
- readonly vaultRoutes?: Record<string, NoydbStore>;
311
- /**
312
- * Age-based tiering: records older than `coldAfterDays` are read from
313
- * the cold store. A background `compact()` method migrates them.
314
- */
315
- readonly age?: AgeRoute;
316
- /**
317
- * Content-aware blob routing.
318
- * Route blob chunks by MIME type glob pattern. The MIME type is stored
319
- * in `BlobObject` and matched at read time via `storeHint`.
320
- */
321
- readonly blobRoutes?: Record<string, NoydbStore>;
322
- /**
323
- * Blob lifecycle policies.
324
- * Evaluated during `compact()`.
325
- */
326
- readonly blobLifecycle?: BlobLifecyclePolicy;
327
- /**
328
- * Quota-aware overflow.
329
- * When the default store's usage exceeds the threshold, new writes
330
- * overflow to the specified store.
331
- */
332
- readonly overflow?: NoydbStore;
333
- /**
334
- * Quota threshold (0-1). Default: 0.8 (overflow at 80% usage).
335
- * Only effective when `overflow` is set.
336
- */
337
- readonly quotaThreshold?: number;
338
- }
339
- /**
340
- * Named route that can be overridden or suspended at runtime.
341
- *
342
- * Built-in names: `'default'`, `'blobs'`, `'cold'`.
343
- * Custom names: any collection name from `routes`, any vault prefix from
344
- * `vaultRoutes`, or any sync target label.
345
- */
346
- type OverrideTarget = 'default' | 'blobs' | 'cold' | (string & {});
347
- /**
348
- * Options for `RoutedNoydbStore.override()`.
349
- *
350
- * Controls whether the new store is pre-populated with data from the
351
- * original store before the switch takes effect.
352
- */
353
- interface OverrideOptions {
354
- /**
355
- * Hydrate the override store from the original before activating.
356
- * - `true` — copy all data for all vaults.
357
- * - `string[]` — copy only named collections.
358
- * Makes `override()` async — returns a Promise.
359
- */
360
- hydrate?: boolean | string[];
361
- }
362
- /**
363
- * Options for `RoutedNoydbStore.suspend()`.
364
- *
365
- * A suspended route becomes a null store: reads return null/[], writes
366
- * are dropped (or buffered if `queue: true`). Useful for maintenance
367
- * windows or restricted-network scenarios.
368
- */
369
- interface SuspendOptions {
370
- /**
371
- * Buffer write operations during suspension. On `resume()`, queued
372
- * writes are replayed against the restored store.
373
- */
374
- queue?: boolean;
375
- /**
376
- * Maximum queued operations. When exceeded, oldest entries are dropped.
377
- * Default: 10_000.
378
- */
379
- maxQueueSize?: number;
380
- }
381
- /**
382
- * Snapshot of the current override and suspend state of a `RoutedNoydbStore`.
383
- * Returned by `routeStatus()` for diagnostics and health dashboards.
384
- */
385
- interface RouteStatus {
386
- /** Active overrides: route name → override store name. */
387
- readonly overrides: Record<string, string>;
388
- /** Currently suspended routes. */
389
- readonly suspended: string[];
390
- /** Queued writes per suspended route (only for routes suspended with `queue: true`). */
391
- readonly queued: Record<string, number>;
392
- }
393
- /**
394
- * Extended `NoydbStore` returned by `routeStore()`.
395
- *
396
- * Satisfies the full `NoydbStore` contract plus adds runtime control
397
- * methods for overriding, suspending, and inspecting routes.
398
- */
399
- interface RoutedNoydbStore extends NoydbStore {
400
- /**
401
- * Migrate records to the cold store. Only applies when `age.cold` is
402
- * configured. With `{ before }`, migrates records whose `_ts < before`
403
- * (period-driven archival); without, uses the rolling `coldAfterDays`.
404
- * Returns the number of records migrated.
405
- */
406
- compact(vault: string, opts?: {
407
- before?: string;
408
- }): Promise<number>;
409
- /**
410
- * Override a named route at runtime.
411
- *
412
- * The override persists until `clearOverride()` is called or the
413
- * instance is closed. In-flight operations complete on the original
414
- * store; new operations use the override.
415
- *
416
- * Options:
417
- * - `hydrate: true` — async: copies all data from the original store
418
- * into the override before activating the switch.
419
- * - `hydrate: ['invoices', 'clients']` — copies only named collections.
420
- *
421
- * Use cases:
422
- * - Shared device: `await store.override('default', memory(), { hydrate: true })`
423
- * - Restricted network: `store.override('blobs', localFile(...))`
424
- */
425
- override(route: OverrideTarget, store: NoydbStore, opts?: OverrideOptions): void | Promise<void>;
426
- /** Clear a runtime override, reverting to the original store. */
427
- clearOverride(route: OverrideTarget): void;
428
- /**
429
- * Suspend a route entirely. Operations to suspended stores become
430
- * no-ops (puts silently dropped, gets return null, lists return []).
431
- *
432
- * Options:
433
- * - `queue: true` — buffer write operations (put/delete) during
434
- * suspension. When `resume()` is called, queued writes are replayed
435
- * against the restored store.
436
- *
437
- * Returns a `SuspendHandle` when `queue: true`, for inspecting queue state.
438
- */
439
- suspend(route: OverrideTarget, opts?: SuspendOptions): void;
440
- /**
441
- * Resume a previously suspended route.
442
- * If the route was suspended with `queue: true`, replays queued writes.
443
- * Returns the number of replayed operations.
444
- */
445
- resume(route: OverrideTarget): Promise<number>;
446
- /** Snapshot the current override/suspend state for diagnostics. */
447
- routeStatus(): RouteStatus;
448
- /**
449
- * Resolve the physical backend a vault id maps to via the geographic
450
- * `vaultRoutes` prefix routing (collection-independent), falling back to
451
- * the `default` store. Used by the federation data-residency guard
452
- * to read the placement backend's `capabilities.region`.
453
- */
454
- resolveBackend(vaultId: string): NoydbStore;
455
- }
456
- /**
457
- * Create a store multiplexer that dispatches operations to different backends
458
- * based on collection type, record size, record age, vault prefix, or
459
- * runtime overrides.
460
- *
461
- * ```ts
462
- * const store = routeStore({
463
- * default: dynamo({ table: 'myapp' }),
464
- * blobs: s3({ bucket: 'myapp-blobs' }),
465
- * routes: { auditLog: s3({ bucket: 'myapp-audit' }) },
466
- * })
14
+ * Passphrase
15
+ * └─► PBKDF2-SHA256 (600K iterations) → KEK [memory only]
16
+ * └─► AES-KW unwrap → DEK per collection [memory only]
17
+ * └─► AES-256-GCM encrypt/decrypt
18
+ * └─► NoydbStore [sees only ciphertext envelopes]
467
19
  * ```
468
20
  *
469
- * The returned store satisfies `NoydbStore` and can be passed directly to
470
- * `createNoydb({ store })`. It also exposes additional methods
471
- * (`override`, `suspend`, `resume`, `routeStatus`, `compact`) for runtime
472
- * control and maintenance.
473
- */
474
- declare function routeStore(opts: RouteStoreOptions): RoutedNoydbStore;
475
-
476
- /**
477
- * Store middleware — composable interceptors for NoydbStore.
21
+ * ## Getting started
478
22
  *
479
23
  * ```ts
480
- * const resilient = wrapStore(
481
- * dynamo({ table: 'myapp' }),
482
- * withRetry({ maxRetries: 3 }),
483
- * withLogging({ level: 'debug' }),
484
- * withCache({ ttlMs: 60_000 }),
485
- * )
486
- * ```
487
- *
488
- * Each middleware is `(next: NoydbStore) => NoydbStore`. They compose
489
- * left-to-right: first middleware is outermost (processes requests first,
490
- * responses last).
491
- *
492
- * @module
493
- */
494
-
495
- /**
496
- * A store middleware function.
24
+ * import { createNoydb } from '@noy-db/hub'
25
+ * import { jsonFile } from '@noy-db/to-file'
497
26
  *
498
- * Takes the next store in the chain and returns a wrapped store. Middlewares
499
- * compose left-to-right via `wrapStore()`: the first argument is outermost
500
- * (first to intercept requests, last to process responses).
27
+ * const db = await createNoydb({ store: jsonFile({ dir: './data' }) })
28
+ * const acme = await db.openVault('acme', { passphrase: 'hunter2' })
29
+ * const invoices = acme.collection<Invoice>('invoices')
501
30
  *
502
- * ```ts
503
- * const mw: StoreMiddleware = (next) => ({
504
- * ...next,
505
- * async get(vault, collection, id) {
506
- * console.log('get', id)
507
- * return next.get(vault, collection, id)
508
- * },
509
- * })
510
- * ```
511
- */
512
- type StoreMiddleware = (next: NoydbStore) => NoydbStore;
513
- /**
514
- * Wrap a store with one or more middlewares. Middlewares compose left-to-right.
515
- */
516
- declare function wrapStore(store: NoydbStore, ...middlewares: StoreMiddleware[]): NoydbStore;
517
- /** Options for `withRetry()`. */
518
- interface RetryOptions {
519
- /** Maximum retry attempts. Default: 3. */
520
- maxRetries?: number;
521
- /** Base backoff delay in ms. Default: 500. */
522
- backoffMs?: number;
523
- /** Jitter factor (0-1). Adds random delay up to `backoffMs * jitter`. Default: 0.3. */
524
- jitter?: number;
525
- /** Only retry on these error codes. Default: retry all errors. */
526
- retryOn?: string[];
527
- }
528
- /**
529
- * Middleware that retries failed store operations with exponential backoff
530
- * and optional jitter. Useful for transient network errors on DynamoDB/S3.
531
- *
532
- * ```ts
533
- * wrapStore(dynamo({ table: 'myapp' }), withRetry({ maxRetries: 5, retryOn: ['NETWORK_ERROR'] }))
31
+ * await invoices.put('inv-001', { amount: 1200, client: 'Acme Corp' })
32
+ * const all = await invoices.query().toArray()
534
33
  * ```
535
- */
536
- declare function withRetry(opts?: RetryOptions): StoreMiddleware;
537
- /** Log level for `withLogging()`. Maps to standard console method names. */
538
- type LogLevel = 'debug' | 'info' | 'warn' | 'error';
539
- /** Options for `withLogging()`. */
540
- interface LoggingOptions {
541
- /** Minimum log level. Default: 'info'. */
542
- level?: LogLevel;
543
- /** Custom logger. Default: console. */
544
- logger?: {
545
- debug(msg: string, ...args: unknown[]): void;
546
- info(msg: string, ...args: unknown[]): void;
547
- warn(msg: string, ...args: unknown[]): void;
548
- error(msg: string, ...args: unknown[]): void;
549
- };
550
- /** Log the data payload (envelope contents). Default: false (privacy). */
551
- logData?: boolean;
552
- }
553
- /**
554
- * Middleware that logs every store operation with its method name, arguments,
555
- * and elapsed duration. Privacy-safe by default: envelope payloads are not
556
- * logged unless `logData: true` is set.
557
- */
558
- declare function withLogging(opts?: LoggingOptions): StoreMiddleware;
559
- /**
560
- * Data emitted to `MetricsOptions.onOperation` after every store call.
561
- *
562
- * Carries method name, vault/collection/id context, elapsed duration,
563
- * and success/failure status. Wire this into your metrics pipeline
564
- * (DataDog, Prometheus, CloudWatch) to get per-operation latency histograms.
565
- */
566
- interface StoreOperation {
567
- method: 'get' | 'put' | 'delete' | 'list' | 'loadAll' | 'saveAll';
568
- vault: string;
569
- collection?: string;
570
- id?: string;
571
- durationMs: number;
572
- success: boolean;
573
- error?: Error;
574
- }
575
- /** Options for `withMetrics()`. */
576
- interface MetricsOptions {
577
- /** Called after every store operation. */
578
- onOperation: (op: StoreOperation) => void;
579
- }
580
- /**
581
- * Middleware that calls `onOperation` after every store method with timing
582
- * and success/failure data. Designed for low-overhead integration with
583
- * metrics systems — the callback is synchronous and fire-and-forget.
584
- */
585
- declare function withMetrics(opts: MetricsOptions): StoreMiddleware;
586
- /**
587
- * Options for `withCircuitBreaker()`.
588
- *
589
- * The circuit breaker moves through three states:
590
- * - `closed`: normal operation.
591
- * - `open`: store is failing; all calls return fallback values immediately.
592
- * - `half-open`: one probe call after `resetTimeoutMs` — success closes, failure re-opens.
593
- */
594
- interface CircuitBreakerOptions {
595
- /** Number of consecutive failures before opening the circuit. Default: 5. */
596
- failureThreshold?: number;
597
- /** Time in ms before attempting to half-open the circuit. Default: 30_000. */
598
- resetTimeoutMs?: number;
599
- /** Called when the circuit opens (store becomes unavailable). */
600
- onOpen?: () => void;
601
- /** Called when the circuit closes (store recovers). */
602
- onClose?: () => void;
603
- }
604
- /**
605
- * Middleware that implements the circuit-breaker pattern.
606
- *
607
- * When the wrapped store fails `failureThreshold` consecutive times, the
608
- * circuit opens: subsequent calls return safe fallback values (`null`, `[]`,
609
- * `{}`) without hitting the store. After `resetTimeoutMs` the circuit
610
- * half-opens and allows one probe — success closes the circuit, failure
611
- * keeps it open. Pair with `withRetry` to handle transient errors before
612
- * they trip the circuit.
613
- */
614
- declare function withCircuitBreaker(opts?: CircuitBreakerOptions): StoreMiddleware;
615
- /**
616
- * Options for `withCache()`.
617
- *
618
- * The cache is a read-through LRU that caches individual record fetches
619
- * (`get`). Writes (`put`, `delete`) invalidate the relevant cache entry
620
- * immediately. `list`, `loadAll`, and `saveAll` bypass the cache.
621
- *
622
- * Named `StoreCacheOptions` to distinguish from `CacheOptions` in
623
- * `@noy-db/hub/collection`, which controls the in-memory decrypted-record LRU.
624
- */
625
- interface StoreCacheOptions {
626
- /** Maximum cached entries. Default: 500. */
627
- maxEntries?: number;
628
- /** Cache TTL in ms. Default: 60_000 (1 minute). 0 = no expiry. */
629
- ttlMs?: number;
630
- }
631
- /**
632
- * Middleware that adds a read-through LRU cache for `get()` calls.
633
- *
634
- * Reduces latency for frequently-read records (e.g. lookup tables, user
635
- * profiles) by serving repeat reads from memory. Because NOYDB records are
636
- * encrypted at rest, caching envelopes is safe — the cache holds ciphertext,
637
- * not plaintext. For write-heavy workloads, the cache provides little benefit
638
- * and should be omitted to avoid the invalidation overhead.
639
- */
640
- declare function withCache(opts?: StoreCacheOptions): StoreMiddleware;
641
- interface HealthCheckOptions {
642
- /** Ping interval in ms. Default: 30_000. */
643
- checkIntervalMs?: number;
644
- /** Suspend after N consecutive ping failures. Default: 3. */
645
- suspendAfterFailures?: number;
646
- /** Resume after N consecutive ping successes. Default: 1. */
647
- resumeAfterSuccess?: number;
648
- /** Called when the store is auto-suspended. */
649
- onSuspend?: () => void;
650
- /** Called when the store is auto-resumed. */
651
- onResume?: () => void;
652
- /**
653
- * Custom health check. Default: calls `store.ping()` if available,
654
- * otherwise attempts a `list()` on a sentinel collection.
655
- */
656
- check?: () => Promise<boolean>;
657
- }
658
- /**
659
- * Auto-suspends a store when health checks fail, auto-resumes when they recover.
660
- *
661
- * When suspended, `get` returns null, `put`/`delete` are no-ops, `list` returns [].
662
- * This is identical to the `NullStore` behavior from `routeStore.suspend()`.
663
- */
664
- declare function withHealthCheck(opts?: HealthCheckOptions): StoreMiddleware;
665
-
666
- /**
667
- * Derive a {@link PersistedSchemaEnvelope} from a Standard Schema v1
668
- * validator. Supports zod 3 (via the optional `zod-to-json-schema` peer-dep)
669
- * and zod 4 (via its native `z.toJSONSchema()`); both are loaded lazily so
670
- * hub never statically imports zod. Other validator families write a stub
671
- * envelope flagging the kind.
672
- *
673
- * @see docs/superpowers/specs/2026-05-22-schema-dump-design.md
674
- *
675
- * @module
676
- */
677
-
678
- /**
679
- * Heuristic Zod detection — uses the Standard Schema v1 `~standard.vendor`
680
- * property (present in Zod v3.23+ and Zod v4+). Falls back to the
681
- * `_def.typeName` heuristic for older Zod v3 builds that predate Standard
682
- * Schema support.
683
- */
684
- declare function isZodSchema(value: unknown): boolean;
685
- declare function derivePersistedSchema(validator: unknown): Promise<PersistedSchemaEnvelope>;
686
-
687
- /**
688
- * Read / write the per-collection persisted-schema envelope. Mirrors the
689
- * standard noy-db record envelope shape and is **AES-GCM encrypted with
690
- * the collection's DEK** — the schema body (field names, enum values,
691
- * constraints) is sensitive metadata, so it gets the same encryption
692
- * envelope as the records it describes.
693
- *
694
- * Storage layout:
695
- *
696
- * <vault>/_schemas/<collection> → EncryptedEnvelope
697
- *
698
- * The DEK passed to {@link savePersistedSchema} / {@link loadPersistedSchema}
699
- * is the same key the collection uses for its records.
700
34
  *
701
- * @module
702
- */
703
-
704
- /** Reserved collection name where persisted schemas live. */
705
- declare const SCHEMAS_COLLECTION: "_schemas";
706
- /**
707
- * Read and decrypt the persisted-schema envelope for one collection.
708
- * Returns `undefined` when no envelope has been written or when decryption
709
- * fails (e.g. wrong DEK passed). Tolerates corrupted records JSON parse
710
- * failures surface as `undefined`, mirroring `_meta/handle`'s contract.
711
- */
712
- declare function loadPersistedSchema(store: NoydbStore, vault: string, collection: string, dek: EnclaveKey): Promise<PersistedSchemaEnvelope | undefined>;
713
- /**
714
- * Encrypt and persist a schema envelope for one collection. Always
715
- * overwrites any prior write (callers gate on hash equality before calling
716
- * to avoid no-op writes).
717
- *
718
- * Pass `expectedVersion` the `version` from {@link loadPersistedSchemaEntry}
719
- * captured at load time — to make the write an optimistic CAS: on a store with
720
- * `casAtomic`, `store.put` throws {@link ConflictError} when the record was
721
- * bumped concurrently, so a lost update on the shared `_schemas` record is
722
- * rejected instead of silently clobbering the other writer's field (#583).
723
- * When omitted, keeps the legacy unconditional last-writer-wins behaviour.
724
- */
725
- declare function savePersistedSchema(store: NoydbStore, vault: string, collection: string, dek: EnclaveKey, payload: PersistedSchemaEnvelope, expectedVersion?: number): Promise<void>;
726
-
727
- /**
728
- * Orchestrate the derive hash skip-or-write cycle for a collection's
729
- * persisted JSON Schema. Called by the Vault at collection-registration
730
- * time when the developer opts in via `collection({ persistJsonSchema:
731
- * true })`.
732
- *
733
- * Skip semantics:
734
- *
735
- * - Zod validators: skip when the new hash equals the stored hash.
736
- * - Non-Zod (stub envelopes have hash=null): skip when the stored
737
- * envelope's `kind` matches the freshly-detected kind (since there's
738
- * no body to compare yet — a kind change is the only signal).
739
- *
740
- * @module
741
- */
742
-
743
- interface PersistSchemaResult {
744
- /** True when a fresh envelope was written to storage. */
745
- readonly written: boolean;
746
- /** True when an existing envelope matched and the write was skipped. */
747
- readonly skipped: boolean;
748
- /** The envelope that was either written or matched. */
749
- readonly envelope: PersistedSchemaEnvelope;
750
- /** The update-strategy decision, present when strategies ran. */
751
- readonly decision?: UpdateDecision;
752
- }
753
- declare function persistSchemaIfNeeded(opts: {
754
- readonly store: NoydbStore;
755
- readonly vault: string;
756
- readonly collectionName: string;
757
- readonly validator: unknown;
758
- readonly dek: EnclaveKey;
759
- readonly strategies?: readonly SchemaUpdateStrategy[];
760
- }): Promise<PersistSchemaResult>;
761
-
762
- /**
763
- * `_links_*` reserved collections managed bidirectional many-to-many
764
- * junctions (design B).
765
- *
766
- * Where `refArray` (design A) stores an id-array on one owning record,
767
- * `vault.link()` creates a first-class junction: a dedicated encrypted
768
- * `_links_<name>` collection whose rows are `{ a, b, meta? }` link tuples.
769
- * It is queryable from BOTH sides (`of(id)`), carries optional per-link
770
- * metadata, and cascades on endpoint delete.
771
- *
772
- * Each link is slot-typed: `a` is an id in the `a` endpoint collection,
773
- * `b` an id in the `b` endpoint collection (they may be the same
774
- * collection for self-links). A link's identity is the ordered pair
775
- * `(a, b)`; `of(id)` matches either slot.
776
- *
777
- * Rows are encrypted under a dedicated `_links_<name>` DEK same
778
- * zero-knowledge stack as every other collection (the store sees only
779
- * ciphertext). Backup/restore rides the normal `loadAll` path.
780
- */
781
-
782
- /** Thrown by `connect()` when an endpoint record does not exist. */
783
- declare class LinkEndpointError extends NoydbError {
784
- readonly link: string;
785
- readonly endpoint: string;
786
- readonly missingId: string;
787
- constructor(link: string, endpoint: string, missingId: string);
788
- }
789
-
790
- /**
791
- * Persistence helpers for `_meta/public-envelope`. Mirrors the
792
- * bypass-AES pattern used by `_meta/handle` and `_meta/policy` —
793
- * the document is plaintext JSON, the envelope's `_iv` field is
794
- * left empty.
795
- *
796
- * @module
797
- */
798
-
799
- /** Reserved id for the vault-level public envelope record. */
800
- declare const PUBLIC_ENVELOPE_RECORD_ID = "public-envelope";
801
- /**
802
- * Read the public envelope from `_meta/public-envelope`. Returns
803
- * `undefined` when no envelope has been persisted (fresh vault, or
804
- * a vault written before the feature was enabled). Tolerates
805
- * corrupted documents a JSON parse failure surfaces as `undefined`,
806
- * not a thrown error, mirroring `_meta/handle`'s contract.
807
- */
808
- declare function loadPublicEnvelope(store: NoydbStore, vault: string): Promise<PublicEnvelope | undefined>;
809
- /** Persist the public envelope. Idempotent — overwrites any prior write. */
810
- declare function savePublicEnvelope(store: NoydbStore, vault: string, envelope: PublicEnvelope): Promise<void>;
811
- /**
812
- * Public, no-key reader. Plain function, not a method on `Noydb`
813
- * the whole point is it works without an authenticated session, so
814
- * a UI can show "Acme 2026 Tax Records" before unlocking.
815
- *
816
- * Resolves any `name` / `description` locale map through the supplied
817
- * `locale` (when provided). Omitting `locale` returns the raw
818
- * envelope, which a multilingual picker can render as it pleases.
819
- */
820
- declare function readPublicEnvelope(store: NoydbStore, vault: string, opts?: {
821
- readonly locale?: string;
822
- }): Promise<PublicEnvelope | undefined>;
823
-
824
- /**
825
- * Persistence helpers for per-principal user envelopes stored at
826
- * `_users/<keyringId>` (logically: `_meta/user/<keyringId>`).
827
- *
828
- * Unlike `_meta/policy` and `_meta/handle` which are plaintext, user
829
- * envelopes carry user data and are encrypted with a dedicated
830
- * {@link USER_ENVELOPE_COLLECTION} DEK (provisioned at vault open and
831
- * propagated to every keyring via the system-collection DEK path in
832
- * `team/keyring.ts`).
833
- *
834
- * This module is the **storage primitive** layer. The public API
835
- * (`vault.user.*`) sits on top of this; permission gates, own-only
836
- * write enforcement, and presence-channel propagation live there.
837
- *
838
- * @see docs/superpowers/specs/2026-05-05-user-envelope-design.md
839
- *
840
- * @module
841
- */
842
-
843
- /**
844
- * Read and decrypt the user envelope for `keyringId`. Returns `null`
845
- * when no envelope has been persisted (either the principal has never
846
- * called `updateMe`, or the keyring predates this feature).
847
- *
848
- * Decryption errors propagate a tampered or wrong-keyed envelope
849
- * surfaces as the underlying crypto error rather than masquerading as
850
- * "not found".
851
- */
852
- declare function loadUserEnvelope<T = unknown>(store: NoydbStore, vault: string, keyringId: string, dek: EnclaveKey): Promise<UserEnvelope<T> | null>;
853
- /**
854
- * Encrypt and persist the user envelope for `keyringId`. The new
855
- * version is `(prior._v ?? 0) + 1`. Pass `expectedVersion` to enable
856
- * optimistic-concurrency checks: a mismatch with the stored version
857
- * throws {@link ConflictError} with the actual stored version.
858
- *
859
- * `expectedVersion: 0` means "expect no prior envelope"; the write
860
- * succeeds only if no envelope exists yet.
861
- *
862
- * Soft-caps the JSON-serialized payload at {@link USER_ENVELOPE_MAX_BYTES};
863
- * larger payloads throw {@link UserEnvelopeOversizedError}.
864
- */
865
- declare function saveUserEnvelope<T>(store: NoydbStore, vault: string, keyringId: string, payload: T, dek: EnclaveKey, expectedVersion?: number): Promise<UserEnvelope<T>>;
866
- /**
867
- * Delete the user envelope for `keyringId`. Idempotent — no error if
868
- * the envelope is already absent. Called from the keyring revoke path
869
- * (cascade-delete) and is a no-op for keyrings that never wrote.
870
- */
871
- declare function deleteUserEnvelope(store: NoydbStore, vault: string, keyringId: string): Promise<void>;
872
- /**
873
- * List the keyring ids that have a user envelope persisted in `vault`.
874
- * Order is store-defined callers that need a stable order should sort.
875
- */
876
- declare function listUserEnvelopeIds(store: NoydbStore, vault: string): Promise<string[]>;
877
-
878
- /**
879
- * Type surface for the user-list visibility service.
880
- *
881
- * Two complementary flags:
882
- * - {@link DirectoryConfig} vault-level "is the directory listing
883
- * enabled at all?" toggle. Owner-only mutation.
884
- * - {@link UserVisibility} — per-user "hide me from teammate listings"
885
- * opt-out. Self-mutation via `vault.user.setMyVisibility`.
886
- *
887
- * Both flags live in the existing `_meta` collection as plaintext-bypass
888
- * sidecars (`_iv: ''`). Neither is a security boundary — the keyring
889
- * file is still observable at `_keyring/*` and the envelope ciphertext
890
- * is still at `_users/*` to anyone with direct store read access. The
891
- * flags exist to keep admin-UI listings tidy, not to hide principals
892
- * from a determined attacker.
893
- *
894
- * @see https://github.com/vLannaAi/noy-db-docs/blob/main/content/docs/services/user-envelope.md → Directory visibility
895
- *
896
- * @module
897
- */
898
- /**
899
- * Vault-level directory toggle. Persisted at `_meta/directory`.
900
- *
901
- * - `enabled: true` (default when no document exists) — every authenticated
902
- * caller can enumerate users via `listUsersWithEnvelopes`.
903
- * - `enabled: false` only `owner` and `admin` callers can enumerate;
904
- * anyone else gets {@link import('../../kernel/errors.js').DirectoryDisabledError}.
905
- */
906
- interface DirectoryConfig {
907
- readonly enabled: boolean;
908
- }
909
- /**
910
- * Per-user visibility flag. Persisted at `_meta/visibility/<keyringId>`.
911
- *
912
- * - `hidden: false` (default when no document exists) — the user shows up
913
- * in `listUsersWithEnvelopes` like any other principal.
914
- * - `hidden: true` the user is filtered out of the default listing.
915
- * `owner`/`admin` callers can still see them by passing
916
- * `{ includeHidden: true }`.
917
- */
918
- interface UserVisibility {
919
- readonly hidden: boolean;
920
- }
921
-
922
- /**
923
- * Implementation behind `vault.user`. Constructed once per Vault via
924
- * {@link createUserApi}, holds the writer's keyringId in closure so
925
- * `updateMe`/`setMe` cannot target any other principal — the own-only
926
- * rule is enforced at the type level (no `set(otherKeyringId, …)`
927
- * method) AND at runtime (the keyringId argument simply doesn't exist
928
- * on the write path).
929
- */
930
- declare class UserApi implements VaultUserApi {
931
- /** keyringId set of listeners. Wildcard '*' fires on every change. */
932
- private readonly listeners;
933
- private readonly adapter;
934
- private readonly vaultName;
935
- /** The writer's own keyringId. Frozen at construction time. */
936
- private readonly writerKeyringId;
937
- private readonly getDek;
938
- /**
939
- * Policy-gate validator. When omitted, gates are skipped — useful
940
- * for low-level tests that exercise the storage layer directly.
941
- * Production paths always wire the Noydb-backed implementation.
942
- */
943
- private readonly checkGate?;
944
- /**
945
- * Noydb-backed `exportMyAccessibleData`, injected by the Vault
946
- * (which holds the keyring + bundle machinery). Omitted in low-level tests.
947
- */
948
- private readonly exportAccessible?;
949
- /**
950
- * Noydb-backed `unilateralWithdrawal`, injected by the Vault.
951
- * Destructive extract + dispose (delete | freeze). Omitted in low-level tests.
952
- */
953
- private readonly unilateralWithdraw?;
954
- /**
955
- * Noydb-backed two-party withdrawal ceremony, injected by the
956
- * Vault. requestWithdraw = requester side; the rest = owner side.
957
- */
958
- private readonly requestWithdraw?;
959
- private readonly listWithdrawals?;
960
- private readonly approveWithdraw?;
961
- private readonly rejectWithdraw?;
962
- constructor(deps: UserApiDeps);
963
- /**
964
- * File a two-party withdrawal request for the caller's accessible
965
- * scope. Non-destructive (writes a pending request); an owner later approves
966
- * or rejects. This is the path for read-only roles (`client`/`viewer`) that
967
- * cannot self-serve a destructive `unilateralWithdrawal`. Gated by
968
- * `user-request-withdrawal` (enabled by default).
969
- */
970
- requestWithdrawal(opts?: RequestWithdrawalOptions): Promise<RequestWithdrawalResult>;
971
- /** Owner side: list filed withdrawal requests (optionally by status). */
972
- listWithdrawalRequests(opts?: {
973
- status?: WithdrawalRequestStatus;
974
- }): Promise<WithdrawalRequest[]>;
975
- /**
976
- * Owner side: approve a pending request. Extracts the requester's
977
- * recorded scope under firm authority, disposes of the source per the
978
- * request's disposition, and returns the re-keyed bundle to hand back. Gated
979
- * by `approve-user-withdrawal` (tier-2 default) + owner/admin role.
980
- */
981
- approveWithdrawal(requestId: string, opts?: ApproveWithdrawalOptions): Promise<WithdrawResult>;
982
- /** Owner side: reject a pending request (no data is touched). */
983
- rejectWithdrawal(requestId: string, opts?: RejectWithdrawalOptions): Promise<WithdrawalRequest>;
984
- /**
985
- * Single-party withdrawal: export the caller's accessible scope
986
- * (re-keyed) and dispose of the source (`delete` or `freeze`). Gated by the
987
- * fail-closed built-in `client-unilateral-withdraw` policy — undefined or
988
- * disabled → throws (use `requestWithdrawal`). The firm enables it at vault
989
- * creation.
990
- */
991
- unilateralWithdrawal(opts: WithdrawAccessibleOptions): Promise<WithdrawResult>;
992
- /**
993
- * Export the calling user's accessible scope as a portable, re-keyed
994
- * `.noydb` bundle. Non-destructive and **always allowed** (data sovereignty
995
- * by construction) but audited. Scope = the caller's DEK access set.
996
- */
997
- exportMyAccessibleData(opts?: ExportAccessibleOptions): Promise<Uint8Array>;
998
- /** Read the writer's own envelope. Returns null if never written. */
999
- me<T = unknown>(): Promise<UserEnvelope<T> | null>;
1000
- /**
1001
- * Deep-merge a partial patch into the writer's own envelope. Creates
1002
- * the envelope on first call. Optimistic-concurrency safe — a stale
1003
- * `_v` (parallel writer on another device) throws `ConflictError`.
1004
- *
1005
- * Patch semantics:
1006
- * - `undefined` (or omitted key) — skip; existing value preserved
1007
- * - `null` — delete the field from the merged result
1008
- * - any other value — overwrite (deep-merge for plain objects,
1009
- * replace for primitives / arrays)
1010
- *
1011
- * To clear a field, pass `null` rather than `undefined`. Callers
1012
- * with shape `T = string | null` where `null` is a meaningful value
1013
- * should use `setMe` for that specific field instead — `null` here
1014
- * always means delete.
1015
- *
1016
- * Gated by the `edit-own-profile` policy gate (default `minTier: 3`).
1017
- * Pass `presented` to satisfy tightened policies that require a
1018
- * factor proof (e.g. STRICT_POLICY's TOTP requirement).
1019
- */
1020
- updateMe<T extends object = Record<string, unknown>>(patch: DeepPartialOrNull<T>, presented?: UserEnvelopePresented): Promise<UserEnvelope<T>>;
1021
- /**
1022
- * Replace the writer's own envelope with `payload`. Use sparingly —
1023
- * `updateMe` is the canonical mutation. No `expectedVersion` check;
1024
- * callers explicitly take last-write-wins semantics.
1025
- *
1026
- * Gated by `edit-own-profile`. See `updateMe` for `presented` usage.
1027
- */
1028
- setMe<T = unknown>(payload: T, presented?: UserEnvelopePresented): Promise<UserEnvelope<T>>;
1029
- /**
1030
- * Read the current user's visibility flag from
1031
- * `_meta/visibility/<keyringId>`. Returns `{ hidden: false }` when no
1032
- * document has been persisted (the default-visible case).
1033
- */
1034
- getMyVisibility(): Promise<UserVisibility>;
1035
- /**
1036
- * Update the current user's visibility in the team directory.
1037
- *
1038
- * - `hidden: true` — opt out of the default `listUsersWithEnvelopes`
1039
- * listing. `owner`/`admin` callers can still see the user by passing
1040
- * `{ includeHidden: true }`.
1041
- * - `hidden: false` — opt back in.
1042
- *
1043
- * Own-only by construction: the keyringId argument doesn't exist on
1044
- * this method, so no caller can hide or unhide another principal.
1045
- *
1046
- * Honest caveat: this is a UX flag, not a privacy guarantee. The
1047
- * envelope ciphertext at `_users/<keyringId>` and the keyring file at
1048
- * `_keyring/<userId>` are both still observable to anyone with direct
1049
- * store read access. See `https://github.com/vLannaAi/noy-db-docs/blob/main/content/docs/services/user-envelope.md` →
1050
- * "Directory visibility".
1051
- */
1052
- setMyVisibility(visibility: UserVisibility): Promise<void>;
1053
- /**
1054
- * Read another principal's envelope by their keyringId. Returns null
1055
- * if the principal exists but has no envelope yet, or if the
1056
- * keyringId does not exist at all.
1057
- *
1058
- * Gated by `view-team-profiles` (default `minTier: 2`) — but ONLY for
1059
- * cross-principal reads. Reading your own envelope (`keyringId ===
1060
- * self`) is never gated; that's just `me()` written long-form.
1061
- */
1062
- get<T = unknown>(keyringId: string, presented?: UserEnvelopePresented): Promise<UserEnvelope<T> | null>;
1063
- /**
1064
- * Read every persisted envelope in the vault. Order is store-defined.
1065
- *
1066
- * Gated by `view-team-profiles`. Default policy (`minTier: 2`) lets
1067
- * any authenticated session read all envelopes. Two privacy-strict
1068
- * opt-outs:
1069
- *
1070
- * - `view-team-profiles.enabled: false` → list() returns only the
1071
- * caller's own envelope (silent self-fallback, no thrown error).
1072
- * - `view-team-profiles.minTier: 1` + insufficient tier → throws
1073
- * `PolicyDeniedError` with `reason: 'insufficient-tier'`. The
1074
- * caller is expected to elevate, not silently degrade.
1075
- *
1076
- * The asymmetry is deliberate: `enabled: false` is a deliberate
1077
- * design choice ("nobody sees teammate profiles in this app");
1078
- * `insufficient-tier` is "you need to authenticate further". Different
1079
- * UX prompts for different intents.
1080
- */
1081
- list<T = unknown>(presented?: UserEnvelopePresented): Promise<UserEnvelope<T>[]>;
1082
- /**
1083
- * Listen for changes to a specific keyringId's envelope. The callback
1084
- * fires synchronously after every successful local `updateMe` /
1085
- * `setMe` for that principal.
1086
- *
1087
- * Cross-instance changes (a teammate edits their profile on their
1088
- * device, the sync engine pulls the diff onto this device) will fire
1089
- * subscribers when the sync layer replays the write through this API.
1090
- * In v1, subscribers do NOT fire on raw store changes — wire your sync
1091
- * layer to call back through `vault.user.setMe` / `updateMe` if you
1092
- * need that.
1093
- *
1094
- * Pass keyringId `'*'` to fire on every change in the vault.
1095
- */
1096
- subscribe<T = unknown>(keyringId: string, cb: (env: UserEnvelope<T> | null) => void): Unsubscribe;
1097
- /**
1098
- * Reactive handle that caches the current value and re-reads on every
1099
- * change for the given keyringId. Convenient for framework bindings:
1100
- *
1101
- * const live = vault.user.live<UserShape>(vault.userId)
1102
- * live.subscribe(env => render(env?.data))
1103
- *
1104
- * Initial value is `null` until the first `current()` call materializes
1105
- * it via `vault.user.get()`. Call `stop()` when done to release the
1106
- * subscription.
1107
- */
1108
- live<T = unknown>(keyringId: string): LiveUserEnvelope<T>;
1109
- private fireChange;
1110
- }
1111
-
1112
- /**
1113
- * Authentication introspection.
1114
- *
1115
- * Three surfaces over the configured tier model and the actual
1116
- * per-user enrollment state:
1117
- *
1118
- * 1. **Vault-wide English summary** — {@link describeAuthConfig}.
1119
- * 2. **Vault-wide Mermaid diagram** — {@link diagramAuthConfig}.
1120
- * 3. **Per-user introspection** — {@link describeUserAuth}, gated by
1121
- * the `view-user-auth` policy gate (off by default).
1122
- *
1123
- * The per-user surface is held to a strict allowlist — fields not on
1124
- * the allowlist are dropped, never rendered. The negative test in
1125
- * `auth-introspection.test.ts` exercises the allowlist by feeding a
1126
- * contrived keyring with fake "secret" fields and asserting that none
1127
- * of them appear in the output.
1128
- *
1129
- * @module
1130
- */
1131
-
1132
- /** Vault-wide English summary of the configured authentication graph. */
1133
- declare function describeAuthConfig(store: NoydbStore, vault: string): Promise<string>;
1134
- /**
1135
- * Render the vault's auth graph as Mermaid `flowchart TB` source. The
1136
- * caller pipes this through Mermaid (CLI or browser) to get an SVG.
1137
- */
1138
- declare function diagramAuthConfig(store: NoydbStore, vault: string): Promise<string>;
1139
- /**
1140
- * Render the per-user enrollment summary. Returns an empty
1141
- * (non-throwing) string when the user has no keyring file — never
1142
- * confirms or denies the existence of the user from the document
1143
- * alone.
1144
- *
1145
- * Sanitization is strict: only the slot list, enrollment dates, and
1146
- * recovery-profile counts are rendered. WebAuthn cred ids, OIDC
1147
- * subject ids, password hashes, recovery codes, TOTP secrets — all
1148
- * dropped at the allowlist boundary, not redacted.
1149
- */
1150
- declare function describeUserAuth(store: NoydbStore, vault: string, userId: string): Promise<string>;
1151
- /** Bulk variant for owner dashboards. */
1152
- declare function describeAllUsersAuth(store: NoydbStore, vault: string): Promise<Array<{
1153
- userId: string;
1154
- description: string;
1155
- }>>;
1156
-
1157
- /**
1158
- * Persistence helpers for the vault-level user-directory toggle
1159
- * (`_meta/directory`). Mirrors the bypass-AES pattern used by
1160
- * `_meta/policy` — the directory document is plain JSON, the
1161
- * envelope's `_iv` field is left empty.
1162
- *
1163
- * @see https://github.com/vLannaAi/noy-db-docs/blob/main/content/docs/services/user-envelope.md → Directory visibility
1164
- * @see https://github.com/vLannaAi/noy-db-docs/blob/main/content/docs/services/plaintext-bypass.md — every `_iv: ''` write site
1165
- *
1166
- * @module
1167
- */
1168
-
1169
- /** Reserved id for the vault-level directory document. */
1170
- declare const DIRECTORY_RECORD_ID = "directory";
1171
- /**
1172
- * Read the directory toggle from `_meta/directory`. Returns `undefined`
1173
- * when no document has been persisted — callers treat that as the
1174
- * default-on case (`{ enabled: true }`).
1175
- *
1176
- * Tolerates corrupted documents the same way `_meta/policy` does: a
1177
- * JSON parse failure surfaces as `undefined`, not a thrown error, so a
1178
- * bad write never permanently breaks team enumeration.
1179
- */
1180
- declare function readDirectoryConfig(store: NoydbStore, vault: string): Promise<DirectoryConfig | undefined>;
1181
- /**
1182
- * Persist the directory toggle at `_meta/directory`. Idempotent — call
1183
- * on every `db.setDirectoryEnabled()` invocation. Owner-only at the
1184
- * caller site; this primitive does not check roles.
1185
- */
1186
- declare function persistDirectoryConfig(store: NoydbStore, vault: string, config: DirectoryConfig): Promise<void>;
1187
-
1188
- /**
1189
- * Persistence helpers for the per-user visibility flag
1190
- * (`_meta/visibility/<keyringId>`). Mirrors the bypass-AES pattern used
1191
- * by `_meta/policy` — the visibility document is plain JSON, the
1192
- * envelope's `_iv` field is left empty.
1193
- *
1194
- * Stored alongside the keyring file rather than inside the encrypted
1195
- * user envelope (`_users/<keyringId>`) because:
1196
- *
1197
- * - `UserEnvelope<T>.data` is opaque-to-hub by contract — hub does not
1198
- * introspect or reserve any keys inside it. Adding `hidden` there
1199
- * would violate that contract.
1200
- * - `listUsersWithEnvelopes` filters by the flag, and the filter must
1201
- * work even when decryption fails (legacy keyrings predating the
1202
- * envelope feature, or a corrupted envelope).
1203
- *
1204
- * @see https://github.com/vLannaAi/noy-db-docs/blob/main/content/docs/services/user-envelope.md → Directory visibility
1205
- * @see https://github.com/vLannaAi/noy-db-docs/blob/main/content/docs/services/plaintext-bypass.md — every `_iv: ''` write site
1206
- *
1207
- * @module
1208
- */
1209
-
1210
- /** Prefix for per-user visibility records inside `_meta`. */
1211
- declare const VISIBILITY_RECORD_PREFIX = "visibility/";
1212
- /** Compose the `_meta` record id for a keyring's visibility doc. */
1213
- declare function visibilityRecordId(keyringId: string): string;
1214
- /**
1215
- * Read the visibility flag for `keyringId`. Returns `undefined` when no
1216
- * document has been persisted — callers treat that as the default-visible
1217
- * case (`{ hidden: false }`).
1218
- */
1219
- declare function readUserVisibility(store: NoydbStore, vault: string, keyringId: string): Promise<UserVisibility | undefined>;
1220
- /**
1221
- * Persist the visibility flag for `keyringId` at
1222
- * `_meta/visibility/<keyringId>`. Idempotent — call on every
1223
- * `vault.user.setMyVisibility()` invocation. Own-only at the caller
1224
- * site; this primitive does not enforce keyring ownership.
1225
- */
1226
- declare function persistUserVisibility(store: NoydbStore, vault: string, keyringId: string, visibility: UserVisibility): Promise<void>;
1227
- /**
1228
- * Delete the visibility flag for `keyringId`. Called from `revoke()`
1229
- * alongside `deleteUserEnvelope` so the sidecar does not leak to a
1230
- * re-granted principal with the same `userId`. Idempotent — the store's
1231
- * `delete()` is already a no-op when the record is absent.
1232
- */
1233
- declare function deleteUserVisibility(store: NoydbStore, vault: string, keyringId: string): Promise<void>;
1234
-
1235
- /**
1236
- * Return the ISO-4217 minor-unit scale for a currency code, or `null`
1237
- * when the code is not in the known set (caller must supply an explicit
1238
- * scale).
1239
- */
1240
- declare function scaleForCurrency(code: string): number | null;
1241
-
1242
- /**
1243
- * Money-aware aggregation: exact `sum` / `min` / `max` over money
1244
- * fields.
1245
- *
1246
- * The generic reducers (`aggregate/reducers.ts`) read a field via
1247
- * `readNumber`, which coerces a string (the stored scaled-integer form
1248
- * of money, e.g. `'12345'`) to `0` — so an un-wrapped money `sum` would
1249
- * silently return zero. {@link wrapMoneyReducers} rewrites any `sum` /
1250
- * `min` / `max` over a declared money field into a reducer that
1251
- * accumulates per-currency `BigInt` totals of the stored integers, so
1252
- * the result is exact for any magnitude (past `Number.MAX_SAFE_INTEGER`
1253
- * included).
1254
- *
1255
- * Results are currency-aware and never silently mix currencies:
1256
- * - **fixed** mode → a single exact decimal string.
1257
- * - **multi** mode → an exact `Record<currency, string>` map.
1258
- * - **`sum` with `convertTo` + `fx`** → a single exact string, with
1259
- * each currency converted via BigInt arithmetic (no float).
1260
- *
1261
- * `remove()` is implemented for every money reducer so they participate
1262
- * in incremental live-aggregation and materialized-view maintenance
1263
- * exactly like the generic reducers they replace.
1264
- */
1265
-
1266
- type FxRates = Record<string, number | string>;
1267
-
1268
- /**
1269
- * Exact money arithmetic helpers — `mulRate` and `allocate`.
1270
- *
1271
- * Both operate on the canonical decoded string form that `get()`
1272
- * returns (`'10000.00'`), entirely in scaled-`BigInt` space — no
1273
- * floating-point step anywhere, exact past 2^53. They are pure
1274
- * functions with no vault or descriptor dependency: the working scale
1275
- * is inferred from the amount's fractional digits (a canonical money
1276
- * string always carries exactly the field's scale) or pinned with
1277
- * `opts.scale`.
1278
- *
1279
- * Why these two: app-side invariants of the form
1280
- * `Σ parts === whole` (receipt totals, net-zero WHT pairs, proration)
1281
- * carry ±0.01 tolerances ONLY because the math is major-unit floats +
1282
- * round2. `mulRate` (VAT-style rate application with explicit
1283
- * rounding) and `allocate` (largest-remainder split — parts sum to the
1284
- * input EXACTLY, by construction) make those tolerances zero.
1285
- */
1286
-
1287
- interface MulRateOptions {
1288
- /**
1289
- * Output scale (fraction digits). Defaults to the amount's own
1290
- * fractional digits — for a canonical money string that IS the
1291
- * field's scale.
1292
- */
1293
- readonly scale?: number;
1294
- /** Rounding for the final re-scale. Default `'half-up'`. */
1295
- readonly rounding?: RoundingMode;
1296
- }
1297
- interface AllocateOptions {
1298
- /** Working scale. Defaults to the amount's own fractional digits. */
1299
- readonly scale?: number;
1300
- }
1301
- /**
1302
- * Multiply a money amount by a decimal rate, exactly.
1303
- *
1304
- * The rate is parsed at its OWN full precision (`0.07` → `7` at scale
1305
- * 2), the product computed in `BigInt` at `amountScale + rateScale`,
1306
- * then re-scaled back to the output scale with the requested rounding —
1307
- * one rounding step, at the very end.
1308
- *
1309
- * ```ts
1310
- * mulRate('10000.00', 0.07) // '700.00' (VAT)
1311
- * mulRate('33.33', '0.07') // '2.33' (half-up)
1312
- * mulRate('33.33', 0.07, { rounding: 'floor' }) // '2.33'
1313
- * mulRate(100, 0.07, { scale: 2 }) // '7.00'
1314
- * ```
1315
- */
1316
- declare function mulRate(amount: number | string, rate: number | string, opts?: MulRateOptions): string;
1317
- /**
1318
- * Split a money amount across weighted buckets with ZERO drift: the
1319
- * returned parts sum to the input exactly, by construction
1320
- * (largest-remainder method).
1321
- *
1322
- * Each bucket gets `floor(amount × weightᵢ / Σweights)`; the leftover
1323
- * minor units (always fewer than the bucket count) go one each to the
1324
- * buckets with the largest truncated remainders — ties broken by
1325
- * position, earlier bucket first. Weights are parsed as exact decimals
1326
- * (no float division anywhere); they must be non-negative with a
1327
- * positive sum.
1328
- *
1329
- * ```ts
1330
- * allocate('100.00', [1, 1, 1]) // ['33.34', '33.33', '33.33']
1331
- * allocate('0.05', [3, 7]) // ['0.02', '0.03']
1332
- * allocate('-100.00', [1, 1, 1]) // ['-33.34', '-33.33', '-33.33']
1333
- * ```
1334
- */
1335
- declare function allocate(amount: number | string, weights: ReadonlyArray<number | string>, opts?: AllocateOptions): string[];
1336
-
1337
- /**
1338
- * Hierarchical access — tier-aware keyring helpers.
1339
- *
1340
- * The keyring's existing `deks: Map<string, CryptoKey>` is keyed by
1341
- * collection name. extends the key space:
1342
- *
1343
- * `'invoices'` — tier-0 DEK (unchanged from v0.x)
1344
- * `'invoices#1'` — tier-1 DEK
1345
- * `'invoices#2'` — tier-2 DEK
1346
- *
1347
- * Tier 0 keeps the bare collection name so any keyring written
1348
- * before tiers existed loads without migration. Tiers ≥ 1 use `#N`
1349
- * suffixes that
1350
- * would be invalid as user-supplied collection names (see
1351
- * `ReservedCollectionNameError` — `#` is reserved).
1352
- *
1353
- * @module
1354
- */
1355
-
1356
- /** Canonical DEK key for a given collection + tier. Tier 0 → bare name. */
1357
- declare function dekKey(collection: string, tier: number): string;
1358
- /**
1359
- * Returns the user's effective clearance for a given collection: the
1360
- * maximum tier for which their keyring holds a DEK. Falls back to 0
1361
- * when the user has only the tier-0 DEK (or none — the getDEK caller
1362
- * will raise separately).
1363
- */
1364
- declare function effectiveClearance(keyring: UnlockedKeyring, collection: string): number;
1365
- /**
1366
- * Assert the caller is cleared for the requested tier. Owners and
1367
- * admins always pass (they can mint any new tier DEK on demand);
1368
- * other roles must already hold the tier DEK — via a prior grant or
1369
- * an active delegation — otherwise this throws `TierNotGrantedError`.
1370
- *
1371
- * This gate runs BEFORE `getDEK()` on the mutation path so a
1372
- * non-cleared operator never has the opportunity to silently
1373
- * auto-create a tier DEK they shouldn't have.
1374
- */
1375
- declare function assertTierAccess(keyring: UnlockedKeyring, collection: string, tier: number): void;
1376
-
1377
- /**
1378
- * Default policy for personal vaults and SMB deployments — the gates
1379
- * that need an off-device factor get one (TOTP / email-OTP / paper
1380
- * recovery), the rest take a tier-1 unlock alone. Tier-3 (PIN) is the
1381
- * floor only for `rotate-unlock` because that's the
1382
- * "change my PIN" flow.
1383
- *
1384
- * The unspecified gates (e.g. `view-user-auth`) inherit the engine
1385
- * default of `{ enabled: false, minTier: 1 }` — they fail closed.
1386
- *
1387
- * @see https://github.com/vLannaAi/noy-db-docs/blob/main/content/docs/services/session-tiers.md → Built-in gates
1388
- */
1389
- declare const PERSONAL_POLICY: VaultPolicy;
1390
- /**
1391
- * Strict policy for regulated deployments and shared workstations —
1392
- * raises the phrase floor to 8 words, demands two distinct factors for
1393
- * exports, and blocks export-on-shared-device. Use as a base for
1394
- * `policy: { ...STRICT_POLICY, gates: { ...STRICT_POLICY.gates, ... } }`
1395
- * tweaks.
1396
- */
1397
- declare const STRICT_POLICY: VaultPolicy;
1398
- /**
1399
- * Merge a developer override onto a preset. Unspecified gates inherit;
1400
- * specified gates fully replace the preset's entry for that gate.
1401
- *
1402
- * Example:
1403
- *
1404
- * ```ts
1405
- * mergePolicy(PERSONAL_POLICY, {
1406
- * gates: {
1407
- * 'app:approve-large-payment': { minTier: 2, factors: [{ anyOf: ['totp'] }] },
1408
- * },
1409
- * })
1410
- * // → PERSONAL_POLICY plus the new app gate; existing gates intact.
1411
- * ```
1412
- */
1413
- declare function mergePolicy(base: VaultPolicy, override?: Partial<VaultPolicy>): VaultPolicy;
1414
-
1415
- /**
1416
- * Policy gate engine — the {@link checkGate} entry point.
1417
- *
1418
- * Given a configured {@link VaultPolicy}, an active session tier, and
1419
- * the factor proofs an actor is presenting, decide whether the gate
1420
- * permits the action. On denial, throws {@link PolicyDeniedError} with
1421
- * a stable {@link PolicyDenyReason} so consumers can branch in error
1422
- * UIs.
1423
- *
1424
- * @see https://github.com/vLannaAi/noy-db-docs/blob/main/content/docs/services/session-tiers.md → checkGate() API
1425
- *
1426
- * @module
1427
- */
1428
-
1429
- /** Default freshness window — 5 minutes. */
1430
- declare const DEFAULT_FRESHNESS_MS: number;
1431
- /** Caller-supplied context for one `checkGate` invocation. */
1432
- interface CheckGateContext {
1433
- /** Tier the active session currently holds. */
1434
- readonly activeTier: ActiveTier;
1435
- /** Proofs the actor is presenting for this gate. */
1436
- readonly factors?: ReadonlyArray<FactorProof>;
1437
- /**
1438
- * If the host knows the actor is on a shared device, set this to
1439
- * `true` so the engine can apply `warn.sharedDevice` rules. Defaults
1440
- * to `false`.
1441
- */
1442
- readonly sharedDevice?: boolean;
1443
- /**
1444
- * Override `now()` for tests. Defaults to `Date.now()`.
1445
- * @internal
1446
- */
1447
- readonly now?: number;
1448
- }
1449
- /**
1450
- * Decide whether `gate` permits the action under `context`. Throws
1451
- * {@link PolicyDeniedError} on denial; resolves with `void` on success.
1452
- *
1453
- * Lookup rules:
1454
- * - **Built-in gates** without a configured policy fail closed
1455
- * (`enabled: false`).
1456
- * - **App-defined gates** (`app:*`) without a configured policy are
1457
- * treated as no-op (allow). The developer registered the policy if
1458
- * they wanted enforcement; absence means the gate is informational.
1459
- */
1460
- declare function checkGate(policy: VaultPolicy, gate: GateName, context: CheckGateContext): Promise<void>;
1461
- /**
1462
- * Same as {@link checkGate} but returns a structured verdict instead
1463
- * of throwing. Useful when an error UI wants to show the user
1464
- * "you'll need TOTP plus a recovery code to do that" without first
1465
- * triggering the action.
1466
- */
1467
- declare function describeGate(policy: VaultPolicy, gate: GateName, context: CheckGateContext): Promise<{
1468
- ok: true;
1469
- } | {
1470
- ok: false;
1471
- reason: PolicyDenyReason;
1472
- required: GatePolicy;
1473
- }>;
1474
-
1475
- /**
1476
- * Persistence helpers for the vault-level policy document
1477
- * (`_meta/policy`). Mirrors the bypass-AES pattern used by
1478
- * `_meta/handle` — the policy document is plain JSON, the envelope's
1479
- * `_iv` field is left empty.
1480
- *
1481
- * @see https://github.com/vLannaAi/noy-db-docs/blob/main/content/docs/services/session-tiers.md → Storage location
1482
- *
1483
- * @module
1484
- */
1485
-
1486
- /** Reserved collection name for vault-level metadata documents. */
1487
- declare const META_COLLECTION = "_meta";
1488
- /** Reserved id for the vault-level policy document. */
1489
- declare const POLICY_RECORD_ID = "policy";
1490
- /**
1491
- * Read the vault-level policy from `_meta/policy`. Returns `undefined`
1492
- * when no policy has been persisted (fresh vault, or a vault written
1493
- * before the policy module landed). The caller falls back to the
1494
- * default preset.
1495
- *
1496
- * Tolerates corrupted documents the same way `_meta/handle` does: a
1497
- * JSON parse failure surfaces as `undefined`, not a thrown error, so
1498
- * a bad write never permanently locks a vault.
1499
- */
1500
- declare function loadVaultPolicy(store: NoydbStore, vault: string): Promise<VaultPolicy | undefined>;
1501
- /**
1502
- * Persist the vault-level policy at `_meta/policy`. Idempotent — call
1503
- * once at vault creation and again on `db.updatePolicy()` invocations.
1504
- */
1505
- declare function saveVaultPolicy(store: NoydbStore, vault: string, policy: VaultPolicy): Promise<void>;
1506
-
1507
- export { ActiveTier, type AgeRoute, type AllocateOptions, ApproveWithdrawalOptions, type BlobLifecyclePolicy, type BlobStoreRoute, type CheckGateContext, type CircuitBreakerOptions, CollectionDescription, type ComputedDescriptor, CustodyStrategy, DEFAULT_FRESHNESS_MS, DIRECTORY_RECORD_ID, DeepPartialOrNull, type DirectoryConfig, EncryptedEnvelope, ExportAccessibleOptions, FactorProof, type FxRates, GateName, GatePolicy, type HealthCheckOptions, LinkEndpointError, type ListProjectionOptions, LiveUserEnvelope, type LogLevel, type LoggingOptions, META_COLLECTION, type MetricsOptions, type MulRateOptions, NoydbError, NoydbStore, type OverrideOptions, type OverrideTarget, PERSONAL_POLICY, POLICY_RECORD_ID, PUBLIC_ENVELOPE_RECORD_ID, type PersistSchemaResult, PersistedSchemaEnvelope, PolicyDenyReason, PublicEnvelope, RejectWithdrawalOptions, RequestWithdrawalOptions, RequestWithdrawalResult, type RetryOptions, RoundingMode, type RouteStatus, type RouteStoreOptions, type RoutedNoydbStore, SCHEMAS_COLLECTION, STRICT_POLICY, SchemaUpdateStrategy, SearchStrategy, SequenceStrategy, type StoreCacheOptions, type StoreMiddleware, type StoreOperation, type SuspendOptions, type Tokenizer, UnlockedKeyring, Unsubscribe, UpdateDecision, UserApi, UserEnvelope, UserEnvelopePresented, type UserVisibility, VISIBILITY_RECORD_PREFIX, VaultPolicy, ViaDescriptor, WithdrawAccessibleOptions, WithdrawResult, WithdrawalRequest, WithdrawalRequestStatus, additiveOnly, allocate, applyListProjection, assertTierAccess, blindUpdate, checkGate, computed, coordinatedCutover, dekKey, deleteUserEnvelope, deleteUserVisibility, derivePersistedSchema, describeAllUsersAuth, describeAuthConfig, describeGate, describeUserAuth, diagramAuthConfig, effectiveClearance, estimateRecordBytes, isComputedDescriptor, isZodSchema, listUserEnvelopeIds, loadPersistedSchema, loadPublicEnvelope, loadUserEnvelope, loadVaultPolicy, lockSchema, memoryStore, mergePolicy, mulRate, parseBytes, persistDirectoryConfig, persistSchemaIfNeeded, persistUserVisibility, readDirectoryConfig, readPlaintextRecord, readPublicEnvelope, readUserVisibility, routeStore, savePersistedSchema, savePublicEnvelope, saveUserEnvelope, saveVaultPolicy, scaleForCurrency, tokenize, visibilityRecordId, withCache, withCircuitBreaker, withCustody, withHealthCheck, withLogging, withMetrics, withRetry, withSearch, withSequence, wrapStore };
35
+ * ## Key concepts
36
+ *
37
+ * | Concept | Type | Description |
38
+ * |---------|------|-------------|
39
+ * | Instance | {@link Noydb} | Top-level handle from {@link createNoydb} |
40
+ * | Vault | {@link Vault} | Tenant namespace; has its own keyrings |
41
+ * | Collection | {@link Collection} | Typed record set; has its own DEK |
42
+ * | Store | {@link NoydbStore} | 6-method backend interface |
43
+ * | Envelope | {@link EncryptedEnvelope} | What the store actually persists |
44
+ *
45
+ * ## Security invariants
46
+ *
47
+ * - **Zero crypto dependencies.** All cryptography uses `crypto.subtle` (Web
48
+ * Crypto API). No npm crypto packages.
49
+ * - **KEK never persisted.** The key-encryption key lives only in memory for
50
+ * the duration of an open session.
51
+ * - **Fresh IV per write.** Every `put()` generates a new random 12-byte IV.
52
+ * - **Stores see only ciphertext.** Encryption happens in core before any
53
+ * store method is called.
54
+ *
55
+ * ## Related packages
56
+ *
57
+ * | Package | Purpose |
58
+ * |---------|---------|
59
+ * | `@noy-db/to-file` | JSON file store (USB / local disk) |
60
+ * | `@noy-db/to-browser-idb` | IndexedDB store (atomic CAS) |
61
+ * | `@noy-db/to-memory` | In-memory store (testing) |
62
+ * | `@noy-db/to-aws-dynamo` | DynamoDB single-table store *(noy-db-to)* |
63
+ * | `@noy-db/to-aws-s3` | S3 object store *(noy-db-to)* |
64
+ * | `@noy-db/to-postgres` | PostgreSQL store *(noy-db-to)* |
65
+ * | `@noy-db/in-vue` | Vue 3 composables |
66
+ * | `@noy-db/in-pinia` | Pinia store integration |
67
+ * | `@noy-db/in-nuxt` | Nuxt 4 module |
68
+ * | `@noy-db/on-webauthn` | Hardware-key / passkey unlock |
69
+ * | `@noy-db/on-oidc` | OIDC / federated login unlock |
70
+ *
71
+ * @packageDocumentation
72
+ */
73
+ import './kernel/env-check.js';
74
+ export type { Role, Permission, Permissions, EncryptedEnvelope, KeyringAuthenticator, KeyringAuthenticatorWrappingKEK, KeyringAuthenticatorWrappingDEKs, VaultPolicyOnDisk, VaultSnapshot, NoydbStore, ListPageResult, KeyringFile, VaultBackup, DirtyEntry, SyncMetadata, Conflict, ErasureEnforcement, ConflictStrategy, ConflictPolicy, CollectionConflictResolver, PushOptions, PullOptions, PushResult, PullResult, SyncTransactionResult, SyncStatus, ChangeEvent, NoydbEventMap, GrantOptions, RevokeOptions, UpdateUserOptions, UserInfo, NoydbOptions, HistoryConfig, HistoryOptions, HistoryEntry, PruneOptions, PutManyItemOptions, PutManyOptions, PutManyResult, DeleteManyResult, ExportStreamOptions, ExportChunk, AccessibleVault, ListAccessibleVaultsOptions, QueryAcrossOptions, QueryAcrossResult, SessionPolicy, ReAuthOperation, PlaintextTranslatorContext, PlaintextTranslatorFn, TranslatorAuditEntry, ExportCapability, ExportFormat, ImportCapability, } from './kernel/types.js';
75
+ export { NOYDB_FORMAT_VERSION, NOYDB_KEYRING_VERSION, NOYDB_BACKUP_VERSION, NOYDB_SYNC_VERSION, createStore, } from './kernel/types.js';
76
+ export type { StoreAuthKind, StoreAuth, StoreCapabilities, StoreCredentials, StoreCredentialSource, } from './kernel/types.js';
77
+ export type { NoydbPodStore, NoydbBundleStore, BlobObject, SlotRecord, SlotInfo, VersionRecord, BlobPutOptions, BlobResponseOptions, } from './kernel/types.js';
78
+ export { BlobSet } from './with-shape/blobs/blob-set.js';
79
+ export { memoryObjectProjection } from './with-shape/blobs/object-projection.js';
80
+ export type { ObjectProjection, ObjectMeta, ObjectListEntry, PutObjectOptions, ObjectUrlOptions, PutUrlOptions, } from './with-shape/blobs/object-projection.js';
81
+ export { importExternalObjects } from './with-shape/blobs/import-external.js';
82
+ export type { ImportableCollection, ImportExternalOptions, ImportExternalResult, } from './with-shape/blobs/import-external.js';
83
+ export { BLOB_COLLECTION, BLOB_INDEX_COLLECTION, BLOB_CHUNKS_COLLECTION, BLOB_SLOTS_PREFIX, BLOB_VERSIONS_PREFIX, DEFAULT_CHUNK_SIZE, } from './with-shape/blobs/blob-set.js';
84
+ export { detectMimeType, detectMagic, isPreCompressed } from './with-shape/blobs/mime-magic.js';
85
+ export { BLOB_INTENT_COLLECTION, getIntent, createIntent, deleteIntent, sweepBlobIntents, } from './with-shape/blobs/blob-intent.js';
86
+ export type { BlobIntent, BlobIntentHold, BlobIntentResume } from './with-shape/blobs/blob-intent.js';
87
+ export { BlobIntentPendingError } from './kernel/errors.js';
88
+ export { wrapPodStore, createPodStore, wrapBundleStore, createBundleStore } from './with-pod/pod-store.js';
89
+ export type { WrappedPodNoydbStore, WrapPodStoreOptions, WrappedBundleNoydbStore, WrapBundleStoreOptions, } from './with-pod/pod-store.js';
90
+ export { readPlaintextRecord } from './kernel/debug.js';
91
+ export type { WriteQueue } from './kernel/write-queue.js';
92
+ export type { WriteEvent, WriteHook } from './port/with/write-hooks.js';
93
+ export type { SchemaIntrospection } from './with-shape/introspection/types.js';
94
+ export type { FieldMeta, SemanticType } from './with-shape/introspection/field-meta.js';
95
+ export type { CollectionMeta, VaultMeta } from './with-shape/introspection/meta.js';
96
+ export type { CollectionDescription, DescribedField, DescribeOptions } from './with-shape/introspection/describe.js';
97
+ export { applyListProjection, type ListProjectionOptions } from './with-shape/introspection/projection.js';
98
+ export type { DryRunResult, AffectedDocument, GuardViolation } from './with-commit/tx/dry-run.js';
99
+ export type { TabRole, TabPresence, TabCoordinationOptions, TabLockManager, TabChannel } from './with-party/tab-coordination.js';
100
+ export type { WriteConflict } from './kernel/types.js';
101
+ export type { SchemaDelta, FieldChange, UpdateContext, UpdateDecision, SchemaUpdateStrategy, } from './with-shape/schema-update/index.js';
102
+ export { blindUpdate, additiveOnly, lockSchema, coordinatedCutover } from './with-shape/schema-update/index.js';
103
+ export type { FenceState, FenceDoc } from './with-shape/schema-update/fence.js';
104
+ export type { SyncPolicy, PushPolicy, PullPolicy, PushMode, PullMode, SyncSchedulerStatus } from './kernel/sync-policy.js';
105
+ export { SyncScheduler, INDEXED_STORE_POLICY, POD_STORE_POLICY, BUNDLE_STORE_POLICY } from './kernel/sync-policy.js';
106
+ export type { SyncTarget, SyncTargetRole } from './kernel/types.js';
107
+ export { memoryStore } from './kernel/memory-store.js';
108
+ export { routeStore } from './with-store/route-store.js';
109
+ export type { RouteStoreOptions, RoutedNoydbStore, BlobStoreRoute, AgeRoute, BlobLifecyclePolicy, OverrideTarget, OverrideOptions, SuspendOptions, RouteStatus, } from './with-store/route-store.js';
110
+ export { wrapStore, withRetry, withLogging, withMetrics, withCircuitBreaker, withCache, withHealthCheck } from './with-store/store-middleware.js';
111
+ export type { StoreMiddleware, RetryOptions, LoggingOptions, LogLevel, MetricsOptions, StoreOperation, CircuitBreakerOptions, StoreCacheOptions, HealthCheckOptions, } from './with-store/store-middleware.js';
112
+ export { NoydbError, DecryptionError, TamperedError, InvalidKeyError, KeyringCorruptError, NoAccessError, ReadOnlyError, PermissionDeniedError, PrivilegeEscalationError, StoreCapabilityError, ConflictError, NetworkError, NotFoundError, ValidationError, SchemaValidationError, GroupCardinalityError, BackupLedgerError, BackupCorruptedError, JoinTooLargeError, CrossJoinTooLargeError, CrossJoinSourceUnknownError, DanglingReferenceError, FilenameSanitizationError, PathEscapeError, ElevationExpiredError, AlreadyElevatedError, LedgerContentionError, SequenceContentionError, SequenceOfflineError, SequenceNotEnabledError, BundleIntegrityError, BundleSealMismatchError, PodVersionConflictError, BundleVersionConflictError, SessionExpiredError, SessionNotFoundError, SessionPolicyError, ExportCapabilityError, ImportCapabilityError, KeyringExpiredError, ReadOnlyAtInstantError, ReadOnlyFrameError, RecordLockedError, FieldFrozenError, IllegalTransitionError, InvariantError, AmendmentForbiddenError, AttestationError, AttestationNotEnabledError, ClassifiedNotEnabledError, TiersNotEnabledError, PortabilityNotEnabledError, SchemaUpdateError, NonAdditiveSchemaChangeError, SchemaLockedError, SchemaFenceError, MigrationRequiredError, QuiesceTimeoutError, } from './kernel/errors.js';
113
+ export { SnapshotNotFoundError } from './kernel/errors.js';
114
+ export type { SnapshotMeta, RetentionPolicy } from './with-fork/snapshots/strategy.js';
115
+ export { withArchive } from './with-fork/archive/index.js';
116
+ export type { ArchiveStrategy, WithArchiveOptions, ArchivePolicy, ArchiveResult, ArchiveRunOptions, } from './with-fork/archive/index.js';
117
+ export { SequenceStore, resolveSequenceKey, compileSequenceFormat } from './with-commit/sequence/index.js';
118
+ export type { SequenceHandle, FormattedSequenceHandle, NextOptions, SequenceOptions, SequenceStoreOptions } from './with-commit/sequence/index.js';
119
+ export { withSequence, NO_SEQUENCE } from './with-commit/sequence/index.js';
120
+ export type { SequenceStrategy } from './with-commit/sequence/index.js';
121
+ export { withDeferredNumbering } from './with-commit/numbering/descriptor.js';
122
+ export type { DeferredNumberingConfig } from './with-commit/numbering/descriptor.js';
123
+ export type { Assignment as NumberingAssignment } from './with-commit/numbering/index.js';
124
+ export { NumberingUncertaintyError } from './kernel/errors.js';
125
+ export type { StoreTime } from './kernel/types.js';
126
+ export { STATE_VAULT_NAME } from './kernel/constants.js';
127
+ export { UnknownShardError, ShardProvisioningError, VaultTemplateNotFoundError, ReservedVaultNameError, DataResidencyError } from './kernel/errors.js';
128
+ export { ForgetStrategyNotConfiguredError } from './kernel/errors.js';
129
+ export { SealedRecordExpiredError, SealedRecordMismatchError, RecordCekNotFoundError, SealedRecordNotEnabledError } from './kernel/errors.js';
130
+ export { DebugPlaintextError, DebugReservedFieldError } from './kernel/errors.js';
131
+ export { writePod, readPod, readPodHeader, writeNoydbBundle, readNoydbBundle, readNoydbBundleHeader, resetBrotliSupportCache, } from './with-pod/bundle.js';
132
+ export { exportAccessibleData } from './with-audit/portability/export-accessible.js';
133
+ export type { ExportAccessibleOptions } from './with-audit/portability/export-accessible.js';
134
+ export { withdrawAccessibleData } from './with-audit/portability/withdraw-accessible.js';
135
+ export type { WithdrawAccessibleOptions, WithdrawResult, FrozenSnapshotRef } from './with-audit/portability/withdraw-accessible.js';
136
+ export { requestWithdrawal, listWithdrawalRequests, approveWithdrawal, rejectWithdrawal, WithdrawalRequestError, } from './with-audit/portability/request-withdrawal.js';
137
+ export type { RequestWithdrawalOptions, RequestWithdrawalResult, WithdrawalRequest, WithdrawalRequestStatus, ApproveWithdrawalOptions, RejectWithdrawalOptions, } from './with-audit/portability/request-withdrawal.js';
138
+ export type { NoydbPodHeader, NoydbBundleHeader, CompressionAlgo, } from './with-pod/format.js';
139
+ export type { WritePodOptions, WriteNoydbBundleOptions, ReadNoydbBundleOptions, NoydbBundleReadResult, AutoCredentialKind, AutoCredential, } from './with-pod/bundle.js';
140
+ export { NOYDB_BUNDLE_MAGIC, NOYDB_BUNDLE_PREFIX_BYTES, NOYDB_BUNDLE_FORMAT_VERSION, hasNoydbBundleMagic, } from './with-pod/format.js';
141
+ export { generateULID, isULID } from './with-pod/ulid.js';
142
+ export { decryptExtractedPartition } from './with-cargo/decrypt-partition.js';
143
+ export type { DecryptedRecord } from './with-cargo/decrypt-partition.js';
144
+ export type { StandardSchemaV1, StandardSchemaV1SyncResult, StandardSchemaV1Issue, InferOutput, } from './kernel/schema.js';
145
+ export { validateSchemaInput, validateSchemaOutput } from './kernel/schema.js';
146
+ export type { VaultSchemaSnapshot, DumpSchemaOptions, CollectionDescriptor, CollectionConfig, CollectionStats, FieldDescriptor, FieldSource, MaterializedViewDescriptor, OverlayViewDescriptor, DerivationDescriptor, InternalCollectionStats, } from './with-shape/introspection/index.js';
147
+ export type { PersistedSchemaEnvelope, PersistedSchemaKind, PersistSchemaResult, } from './with-shape/persisted-schemas/index.js';
148
+ export { SCHEMAS_COLLECTION, derivePersistedSchema, isZodSchema, loadPersistedSchema, savePersistedSchema, persistSchemaIfNeeded, } from './with-shape/persisted-schemas/index.js';
149
+ export { VaultInstant, CollectionInstant } from './with-commit/history/time-machine.js';
150
+ export type { VaultEngine } from './with-commit/history/time-machine.js';
151
+ export { VaultFrame, CollectionFrame } from './with-fork/shadow/vault-frame.js';
152
+ export { CONSENT_AUDIT_COLLECTION } from './with-audit/consent/consent.js';
153
+ export type { ConsentContext, ConsentOp, ConsentAuditEntry, ConsentAuditFilter, } from './with-audit/consent/consent.js';
154
+ export { LedgerStore, LEDGER_COLLECTION, LEDGER_DELTAS_COLLECTION, envelopePayloadHash, canonicalJson, sha256Hex, hashEntry, paddedIndex, parseIndex, computePatch, applyPatch, } from './with-commit/history/ledger/index.js';
155
+ export type { LedgerEntry, AppendInput, VerifyResult, JsonPatch, JsonPatchOp, } from './with-commit/history/ledger/index.js';
156
+ export { ref, refArray, isRefArray, RefRegistry, RefIntegrityError, RefScopeError, } from './kernel/refs.js';
157
+ export type { RefMode, RefDescriptor, RefViolation, } from './kernel/refs.js';
158
+ export { isLinkCollectionName, LinkEndpointError, LinkIntegrityError, } from './with-shape/links/link-set.js';
159
+ export type { LinkSpec, LinkRow, LinkOnDelete, LinkSetHandle, } from './with-shape/links/link-set.js';
160
+ export type { UnlockedKeyring } from './with-party/team/keyring.js';
161
+ export { enrollAuthenticator, removeAuthenticator, findAuthenticator, } from './with-party/team/authenticators.js';
162
+ export type { EnrollAuthenticatorOptions, EnrollAuthenticatorWrappingKEKOptions, EnrollAuthenticatorWrappingDEKsOptions, UpdateAuthenticatorOptions, } from './with-party/team/authenticators.js';
163
+ export { QuickUnlockStore } from './with-party/session/unlock-state.js';
164
+ export type { QuickUnlockState } from './with-party/session/unlock-state.js';
165
+ export { rotatePassphrase as keyringRotatePassphrase, recoverPassphrase as keyringRecoverPassphrase, } from './with-party/team/rotate-recover.js';
166
+ export type { RotatePassphraseInput, RecoverPassphraseInput, RecoverPassphraseResult, RecoveryProof, SlotRewrapContext, SlotRewrapCeremony, } from './with-party/team/rotate-recover.js';
167
+ export { loadPublicEnvelope, savePublicEnvelope, readPublicEnvelope, resolveSchema as resolvePublicEnvelopeSchema, validatePublicEnvelopeInput, isPublicEnvelope, PUBLIC_ENVELOPE_FIELDS, DEFAULT_PUBLIC_ENVELOPE_SCHEMA, PUBLIC_ENVELOPE_RECORD_ID, } from './with-party/directory/public-envelope/index.js';
168
+ export type { PublicEnvelope, PublicEnvelopeText, PublicEnvelopeSchema, PublicEnvelopeField, ResolvedPublicEnvelopeSchema, SetPublicEnvelopeInput, } from './with-party/directory/public-envelope/index.js';
169
+ export { readNoydbBundlePublicEnvelope } from './with-pod/bundle.js';
170
+ export { USER_ENVELOPE_COLLECTION, USER_ENVELOPE_MAX_BYTES, } from './kernel/constants.js';
171
+ export { UserEnvelopeOversizedError } from './kernel/errors.js';
172
+ export { loadUserEnvelope, saveUserEnvelope, deleteUserEnvelope, listUserEnvelopeIds, } from './with-party/directory/user-envelope/index.js';
173
+ export type { UserEnvelope, DeepPartial, DeepPartialOrNull, Unsubscribe, LiveUserEnvelope, UserEnvelopePresented, UserEnvelopeCheckGate, } from './kernel/types.js';
174
+ export { UserApi } from './with-party/directory/user-envelope/api.js';
175
+ export { CustodyApi } from './with-party/custody/index.js';
176
+ export type { GrantCustodianOptions } from './with-party/custody/index.js';
177
+ export { liberateVault } from './with-party/custody/liberate.js';
178
+ export type { LiberateOptions, LiberateResult } from './with-party/custody/liberate.js';
179
+ export { withCustody, NO_CUSTODY } from './with-party/custody/index.js';
180
+ export type { CustodyStrategy, CustodyHost } from './with-party/custody/index.js';
181
+ export { CustodyNotEnabledError } from './kernel/errors.js';
182
+ export { createDeedOwner, loadDeedMarker, isDeedVault, DEED_RECORD_ID } from './with-party/team/deed.js';
183
+ export type { DeedMarker } from './with-party/team/deed.js';
184
+ export { withTeam } from './with-party/team/active.js';
185
+ export { NO_TEAM } from './with-party/team/strategy.js';
186
+ export type { TeamStrategy } from './with-party/team/strategy.js';
187
+ export { TeamNotEnabledError } from './kernel/errors.js';
188
+ export { withLazy } from './with-store/lazy/active.js';
189
+ export type { LazyStrategy } from './with-store/lazy/strategy.js';
190
+ export { describeAuthConfig, diagramAuthConfig, describeUserAuth, describeAllUsersAuth, } from './with-party/auth-introspection/index.js';
191
+ export { loadPaperRecoveryEntries, savePaperRecoveryEntries, burnPaperRecoveryEntry, hasRecoveryEnrolled, mintPaperRecoveryEntry, unwrapDeksFromPaperEntry, loadShamirRecoveryEntries, saveShamirRecoveryEntries, mintShamirRecoveryEntry, unwrapDeksFromShamirEntry, } from './with-party/team/recovery.js';
192
+ export type { PaperRecoveryEntry, PaperRecoveryDoc, ShamirRecoveryEntry, ShamirRecoveryDoc, } from './with-party/team/recovery.js';
193
+ export type { EnrollRecoveryResult, RotateRecoveryOptions, RotateRecoveryResult, } from './with-party/team/rotate-recover.js';
194
+ export { mintWrappedDeksBlob, unwrapDeksFromBlob } from './with-party/team/wrapped-deks.js';
195
+ export type { WrappedDeksBlob } from './with-party/team/wrapped-deks.js';
196
+ export type { SealingKeyProvider, SealedPassphrase, SealedEnvelope, RecipientHint, RecipientSealer } from './with-party/team/managed-passphrase.js';
197
+ export type { ShamirRecoveryProvider } from './with-party/team/shamir-recovery-provider.js';
198
+ export { MemorySealingKeyProvider, MemoryRecipientSealer, sealRsaOaepTlv, parseRsaOaepTlv, aesGcmOpen, loadSealedPassphrase, saveSealedPassphrase, parseSealedEnvelope, SEALED_PASSPHRASE_RECORD_ID, } from './with-party/team/managed-passphrase.js';
199
+ export { recoverUser } from './with-party/team/peer-recover.js';
200
+ export type { RecoverUserOptions } from './with-party/team/peer-recover.js';
201
+ export { hasExportCapability, evaluateExportCapability } from './with-party/team/keyring.js';
202
+ export { hasImportCapability, evaluateImportCapability } from './with-party/team/keyring.js';
203
+ export type { BundleRecipient } from './with-party/team/keyring.js';
204
+ export { buildRecipientKeyringFile } from './with-party/team/keyring.js';
205
+ export { listUsers, listUsersWithEnvelopes } from './with-party/team/keyring.js';
206
+ export type { ListUsersOptions } from './with-party/team/keyring.js';
207
+ export { readDirectoryConfig, persistDirectoryConfig, readUserVisibility, persistUserVisibility, deleteUserVisibility, visibilityRecordId, DIRECTORY_RECORD_ID, VISIBILITY_RECORD_PREFIX, } from './with-party/directory/index.js';
208
+ export type { DirectoryConfig, UserVisibility } from './with-party/directory/index.js';
209
+ export { DirectoryDisabledError } from './kernel/errors.js';
210
+ export { Noydb, createNoydb } from './kernel/noydb.js';
211
+ export { Vault } from './kernel/vault.js';
212
+ export { ElevatedHandle, ELEVATION_AUDIT_COLLECTION } from './with-commit/tx/elevated-handle.js';
213
+ export { Collection } from './kernel/collection.js';
214
+ export type { CacheOptions, CacheStats, CollectionChangeEvent } from './kernel/collection.js';
215
+ export type { CrdtMode, CrdtState, LwwMapState, RgaState, YjsState } from './with-commit/crdt/crdt.js';
216
+ export { resolveCrdtSnapshot, mergeCrdtStates } from './with-commit/crdt/crdt.js';
217
+ export { PresenceHandle } from './with-party/team/presence.js';
218
+ export type { PresencePeer } from './kernel/types.js';
219
+ export { derivePresenceKey } from './kernel/enclave/index.js';
220
+ export { SyncEngine } from './with-party/team/sync.js';
221
+ export { SyncTransaction } from './with-party/team/sync-transaction.js';
222
+ export { TxContext, TxVault, TxCollection, runTransaction } from './with-commit/tx/transaction.js';
223
+ export type { TxOp } from './kernel/types.js';
224
+ export type { TransactionInvariant } from './with-commit/tx/invariants.js';
225
+ export type { TransactionStrategyOptions } from './with-commit/tx/active.js';
226
+ export { withGuard } from './with-audit/guards/index.js';
227
+ export { immutableGuard } from './with-audit/guards/index.js';
228
+ export type { ImmutableGuardConfig } from './with-audit/guards/index.js';
229
+ export { transitionGuard } from './with-audit/guards/index.js';
230
+ export type { TransitionGuardConfig } from './with-audit/guards/index.js';
231
+ export type { GuardStrategy, GuardStrategyHandle, GuardContext, GuardChange, } from './with-audit/guards/index.js';
232
+ export { withDerivation } from './with-formula/derivations/index.js';
233
+ export { withRollup } from './with-formula/derivations/index.js';
234
+ export type { DerivationStrategy, DerivationStrategyHandle, DerivedFromMeta, OutputSpec, RecordOutputSpec, ArrayOutputSpec, } from './with-formula/derivations/index.js';
235
+ export { DerivationCycleError, DerivationDepthError, DerivationOutputUnknownError, DerivationOutputShapeError, DerivationCapExceededError, } from './kernel/errors.js';
236
+ export { withMaterializedView } from './with-formula/materialized-views/index.js';
237
+ export type { MaterializedViewStrategy, MaterializedViewStrategyHandle, MaterializedViewOutput, MaterializedFromMeta, UnionSource, UnionArmJoin, } from './with-formula/materialized-views/index.js';
238
+ export { MaterializedViewCycleError, MaterializedViewConfigError, MaterializedViewSourceUnknownError, MaterializedViewTooLargeError, } from './kernel/errors.js';
239
+ export { withOverlayedView } from './with-formula/overlay-views/index.js';
240
+ export type { OverlayedViewStrategy, OverlayedViewStrategyHandle, OverlayFieldMergeRule, OverlayFieldMergeMode, } from './with-formula/overlay-views/index.js';
241
+ export { OverlayBaseIsVirtualError, OverlayCollectionUnavailableError, OverlayNameCollisionError, OverlayIdMismatchError, } from './kernel/errors.js';
242
+ export { PERIODS_COLLECTION } from './with-audit/periods/index.js';
243
+ export type { PeriodRecord, ClosePeriodOptions, OpenPeriodOptions, } from './with-audit/periods/index.js';
244
+ export { PeriodClosedError } from './kernel/errors.js';
245
+ export { Lru, parseBytes, estimateRecordBytes } from './kernel/cache/index.js';
246
+ export type { LruOptions, LruStats } from './kernel/cache/index.js';
247
+ export { dictKey, isDictKeyDescriptor, staticDict, isStaticDictDescriptor, isDictCollectionName, dictCollectionName, DictionaryHandle, DICT_COLLECTION_PREFIX, } from './via/i18n/dictionary.js';
248
+ export type { DictKeyDescriptor, StaticDictDescriptor, DictEntry, DictionaryOptions, } from './via/i18n/dictionary.js';
249
+ export { i18nText, isI18nTextDescriptor, validateI18nTextValue, resolveI18nText, applyI18nLocale, } from './via/i18n/core.js';
250
+ export type { I18nTextOptions, I18nTextDescriptor, ResolveI18nOptions, I18nMap } from './via/i18n/core.js';
251
+ export { money, isMoneyDescriptor, MoneyPrecisionError, MoneyCurrencyError, MoneyUnsupportedError, scaleForCurrency, mulRate, allocate, asMoney, isMoneyString, moneyNumber, } from './via/money/index.js';
252
+ export type { MoneyDescriptor, MoneyOptions, MoneyOptionsFixed, MoneyOptionsMulti, RoundingMode, FxRates, MulRateOptions, AllocateOptions, MoneyString, } from './via/money/index.js';
253
+ export { via, isViaFieldSpec } from './kernel/via/compose.js';
254
+ export type { ViaFieldSpec } from './kernel/via/compose.js';
255
+ export type { ViaPosture, ViaDescriptor } from './kernel/via/index.js';
256
+ export type { DerivationSkippedFrozen } from './kernel/via/dispatch.js';
257
+ export { classified, luhnCheck, isClassifiedFieldSpec, isClassifiedGroup, resolveClassifiedFields, ClassifiedConfigError, ClassifiedNeverStoredError, ClassifiedValidationError, ClassifiedRevealError, ClassifiedVerifyError, ClassifiedRotationError } from './via/classified/index.js';
258
+ export type { ClassifiedFieldSpec, ClassifiedGroup, ClassifiedEntry, ClassifiedList, ClassifiedStorage, ClassifiedVerdict } from './via/classified/index.js';
259
+ export { evalComputedFields, ComputedFieldError } from './with-formula/computed/index.js';
260
+ export type { ComputedFields, ComputedFn, ComputedFieldEntry } from './with-formula/computed/index.js';
261
+ export { computed, isComputedDescriptor } from './via/computed/descriptor.js';
262
+ export type { ComputedDescriptor } from './via/computed/descriptor.js';
263
+ export { resolvePolicy } from './via/i18n/policy.js';
264
+ export type { OnMissing, Layer, OnMissingPolicy } from './via/i18n/policy.js';
265
+ export { inferScripts, enforceScript } from './via/i18n/script.js';
266
+ export type { ScriptWarning } from './via/i18n/script.js';
267
+ export { ReservedCollectionNameError, DictKeyMissingError, DictKeyInUseError, MissingTranslationError, LocaleNotSpecifiedError, TranslatorNotConfiguredError, ScriptViolationError, StaticDictReadonlyError, UnknownDictCodeError, } from './kernel/errors.js';
268
+ export { lookup, dict, enumOf, enum } from './via/lookup/index.js';
269
+ export { UnknownLookupKeyError, RestrictRefUnresolvableError } from './kernel/errors.js';
270
+ export type { LookupDescriptor, Vocabulary, OnDelete } from './via/lookup/index.js';
271
+ export type { LocaleReadOptions } from './kernel/types.js';
272
+ export { putCredential, getCredential, deleteCredential, listCredentials, credentialStatus, SYNC_CREDENTIALS_COLLECTION, } from './with-party/team/sync-credentials.js';
273
+ export type { SyncCredential } from './with-party/team/sync-credentials.js';
274
+ export { PolicyEnforcer, createEnforcer, validateSessionPolicy } from './with-party/session/session-policy.js';
275
+ export { createSession, resolveSession, revokeSession, revokeAllSessions, isSessionAlive, activeSessionCount, } from './with-party/session/session.js';
276
+ export type { SessionToken, CreateSessionResult, CreateSessionOptions, } from './with-party/session/session.js';
277
+ export { enableDevUnlock, loadDevUnlock, clearDevUnlock, isDevUnlockActive, } from './with-party/session/dev-unlock.js';
278
+ export type { DevUnlockOptions } from './with-party/session/dev-unlock.js';
279
+ export { isDiscriminant } from './kernel/util/discriminant.js';
280
+ export { bufferToBase64, base64ToBuffer, encryptBytes, decryptBytes } from './kernel/enclave/index.js';
281
+ export { encryptDeterministic, decryptDeterministic } from './kernel/enclave/index.js';
282
+ export { EnclaveNotSupportedError } from './kernel/errors.js';
283
+ export type { GhostRecord, TierMode, CrossTierAccessEvent } from './kernel/types.js';
284
+ export { TierNotGrantedError, TierDemoteDeniedError, DelegationTargetMissingError, TierWriteRefusedError, UnsupportedTierCompositionError } from './kernel/errors.js';
285
+ export { IndexRequiredError, IndexWriteFailureError } from './kernel/errors.js';
286
+ export { FieldNotQueryableError } from './kernel/errors.js';
287
+ export { fuseRetrieval, type FuseOptions } from './with-lookup/search/fuse.js';
288
+ export { UniqueConstraintError, UnsupportedIndexOptionError } from './kernel/errors.js';
289
+ export { EmbeddingDimMismatchError, EmbeddingModelMismatchError } from './kernel/errors.js';
290
+ export type { EmbeddingDescriptor } from './with-lookup/embeddings/index.js';
291
+ export { dekKey, effectiveClearance, assertTierAccess } from './with-party/team/tiers.js';
292
+ export type { DelegationToken, IssueDelegationOptions } from './with-party/team/delegation.js';
293
+ export { DELEGATIONS_COLLECTION, issueDelegation, loadActiveDelegations, revokeDelegation } from './with-party/team/delegation.js';
294
+ export type { MagicLinkGrantPayload, MagicLinkGrantRecord, IssueMagicLinkGrantOptions, } from './with-party/team/magic-link-grant.js';
295
+ export { MAGIC_LINK_GRANTS_COLLECTION, MAGIC_LINK_CONTENT_INFO_PREFIX, MAGIC_LINK_KEK_INFO_PREFIX, deriveMagicLinkContentKey, writeMagicLinkGrant, readMagicLinkGrantRecord, listMagicLinkGrants, unwrapMagicLinkGrant, revokeMagicLinkGrant, magicLinkGrantRecordId, isMagicLinkGrantExpired, } from './with-party/team/magic-link-grant.js';
296
+ export { diff, formatDiff } from './with-commit/history/diff.js';
297
+ export type { DiffEntry, ChangeType } from './with-commit/history/diff.js';
298
+ export { diffVault } from './with-cargo/vault-diff.js';
299
+ export type { VaultDiff, VaultDiffEntry, VaultDiffModifiedEntry, DiffOptions, DiffCandidate, } from './with-cargo/vault-diff.js';
300
+ export { withCargo, NO_CARGO } from './with-cargo/index.js';
301
+ export type { CargoStrategy } from './with-cargo/index.js';
302
+ export { CargoNotEnabledError } from './kernel/errors.js';
303
+ export { PERSONAL_POLICY, STRICT_POLICY, mergePolicy, checkGate, describeGate, DEFAULT_FRESHNESS_MS, loadVaultPolicy, saveVaultPolicy, META_COLLECTION, POLICY_RECORD_ID, } from './with-party/policy/index.js';
304
+ export { PolicyDeniedError, RecoveryNotEnrolledError, RecoveryProfileNotImplementedError, ManagedRecoveryNotEnrolledError, } from './kernel/errors.js';
305
+ export type { VaultPolicy, GatePolicy, GateName, BuiltInGateName, FactorKind, FactorRequirement, FactorProof, FactorProofBundle, WarningRules, ActiveTier, } from './kernel/types.js';
306
+ export type { PolicyDenyReason } from './kernel/errors.js';
307
+ export type { CheckGateContext } from './with-party/policy/index.js';
308
+ export { validatePassphrase, assertStrongPassphrase, estimateEntropy, WeakPassphraseError, } from './kernel/validation.js';
309
+ export type { PassphrasePolicy, PassphraseValidationResult, WeakPassphraseReason, } from './kernel/validation.js';
310
+ export { Query, executePlan, evaluateClause, evaluateFieldClause, readPath, CollectionIndexes, applyJoins, DEFAULT_JOIN_MAX_ROWS, DEFAULT_CROSS_JOIN_MAX_ROWS, resetJoinWarnings, buildLiveQuery, count, sum, avg, min, max, moneySum, moneyMin, moneyMax, reducerBuilder, Aggregation, reduceRecords, GroupedQuery, GroupedQueryN, GroupedAggregation, groupAndReduce, GROUPBY_WARN_CARDINALITY, GROUPBY_MAX_CARDINALITY, ScanBuilder, } from './kernel/query/index.js';
311
+ export type { QueryPlan, QuerySource, OrderBy, Operator, Clause, FieldClause, FilterClause, GroupClause, IndexDef, HashIndex, JoinLeg, JoinContext, JoinableSource, JoinStrategy, LiveQuery, LiveUpstream, Reducer, ReducerOptions, ReducerBuilder, AggregateSpec, AggregateResult, AggregationUpstream, LiveAggregation, GroupedRow, GroupedRowN, ScanPageProvider, } from './kernel/query/index.js';
312
+ export type { QueryField, IndexFieldName } from './kernel/types.js';
313
+ export type { Sealed, SealedView } from './kernel/types.js';
314
+ export { SealedHandle } from './kernel/types.js';
315
+ export { tokenize } from './with-lookup/search/index.js';
316
+ export type { Tokenizer, SearchOptions, SearchResult, SearchEntry } from './with-lookup/search/index.js';
317
+ export type { RetrieveOptions, RetrieveHit } from './with-lookup/search/index.js';
318
+ export { withSearch, NO_SEARCH } from './with-lookup/search/index.js';
319
+ export type { SearchStrategy } from './with-lookup/search/index.js';
320
+ export { SearchNotEnabledError } from './kernel/errors.js';
321
+ export { PersistedIndexCompensationError } from './kernel/errors.js';