@noy-db/hub 0.3.0-pre.1 → 0.3.0-pre.11

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