@noy-db/hub 0.3.0-pre.10 → 0.3.0-pre.12

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 (898) hide show
  1. package/dist/aggregate/index.js +4 -4
  2. package/dist/api-3TH2GOFQ.js +20 -0
  3. package/dist/as/index.js +11 -11
  4. package/dist/attestation/index.js +18 -18
  5. package/dist/backup-2WVBIVXW.js +225 -0
  6. package/dist/blobs/index.js +10 -10
  7. package/dist/broker/index.js +92 -0
  8. package/dist/broker/index.js.map +1 -0
  9. package/dist/bundle/index.js +20 -20
  10. package/dist/by/index.js +2 -2
  11. package/dist/cargo/index.js +30 -30
  12. package/dist/chunk-2MTRJCBI.js +75 -0
  13. package/dist/chunk-37WOJQWY.js +404 -0
  14. package/dist/chunk-3QSOFZQB.js +589 -0
  15. package/dist/chunk-44IL5G3W.js +99 -0
  16. package/dist/chunk-45QPICLE.js +69 -0
  17. package/dist/chunk-4BQXMCE5.js +164 -0
  18. package/dist/chunk-4GPE63GU.js +111 -0
  19. package/dist/chunk-4GPE63GU.js.map +1 -0
  20. package/dist/chunk-5HNX4OD4.js +30 -0
  21. package/dist/chunk-65VLRG3I.js +54 -0
  22. package/dist/chunk-6MA575R5.js +59 -0
  23. package/dist/chunk-6S7ENMRE.js +524 -0
  24. package/dist/chunk-6S7ENMRE.js.map +1 -0
  25. package/dist/chunk-7GAXFU2O.js +123 -0
  26. package/dist/chunk-7QLY64AD.js +202 -0
  27. package/dist/chunk-7ZOSHEVS.js +235 -0
  28. package/dist/chunk-AAIIDAUC.js +371 -0
  29. package/dist/chunk-AAIIDAUC.js.map +1 -0
  30. package/dist/chunk-AKEOHKMT.js +282 -0
  31. package/dist/chunk-AKEOHKMT.js.map +1 -0
  32. package/dist/chunk-APHLCXVC.js +124 -0
  33. package/dist/chunk-BDEMZD4F.js +129 -0
  34. package/dist/chunk-BDPAVYGJ.js +662 -0
  35. package/dist/chunk-BLUT46UP.js +42 -0
  36. package/dist/chunk-CCIR2OJH.js +778 -0
  37. package/dist/chunk-CXC3JLAQ.js +155 -0
  38. package/dist/chunk-CZMCOFEA.js +1221 -0
  39. package/dist/chunk-DIB2BOIH.js +164 -0
  40. package/dist/chunk-DJ7MRXNA.js +344 -0
  41. package/dist/chunk-DJ7MRXNA.js.map +1 -0
  42. package/dist/chunk-EHW5KTTA.js +150 -0
  43. package/dist/chunk-EHW5KTTA.js.map +1 -0
  44. package/dist/chunk-EIZ4YOG2.js +70 -0
  45. package/dist/chunk-EVHBK7BN.js +515 -0
  46. package/dist/chunk-EXGDL2UQ.js +74 -0
  47. package/dist/chunk-F3LGBRSV.js +453 -0
  48. package/dist/chunk-F44XWXOA.js +392 -0
  49. package/dist/chunk-FF7S3XDW.js +230 -0
  50. package/dist/chunk-FJTWLQV3.js +155 -0
  51. package/dist/chunk-FYNE4WLC.js +36 -0
  52. package/dist/chunk-FZCGIJEJ.js +1505 -0
  53. package/dist/chunk-FZCGIJEJ.js.map +1 -0
  54. package/dist/chunk-GL3JV5EV.js +130 -0
  55. package/dist/chunk-GXLZXD2W.js +29 -0
  56. package/dist/chunk-HA6ZQWA2.js +1056 -0
  57. package/dist/chunk-HA6ZQWA2.js.map +1 -0
  58. package/dist/chunk-HBBZWEC5.js +686 -0
  59. package/dist/chunk-HG76BZ6G.js +188 -0
  60. package/dist/chunk-HGAB325C.js +38 -0
  61. package/dist/chunk-HIOLCOK3.js +30 -0
  62. package/dist/chunk-HIOLCOK3.js.map +1 -0
  63. package/dist/chunk-HK4XTXO4.js +49 -0
  64. package/dist/chunk-HYG32HCM.js +14 -0
  65. package/dist/chunk-ILF5GARW.js +135 -0
  66. package/dist/chunk-INBQ43DI.js +382 -0
  67. package/dist/chunk-IQIVD7TP.js +247 -0
  68. package/dist/chunk-J3JIYFYL.js +45 -0
  69. package/dist/chunk-JC75UBMT.js +32 -0
  70. package/dist/chunk-JC75UBMT.js.map +1 -0
  71. package/dist/chunk-JGUZMC3I.js +150 -0
  72. package/dist/chunk-JRKE5MAZ.js +80 -0
  73. package/dist/chunk-K2DLLK34.js +255 -0
  74. package/dist/chunk-KKYEZCQG.js +34 -0
  75. package/dist/chunk-NAR6IDKH.js +54 -0
  76. package/dist/chunk-NEYKOESM.js +117 -0
  77. package/dist/chunk-NM3IFKBL.js +29 -0
  78. package/dist/chunk-NRYNRSGV.js +99 -0
  79. package/dist/chunk-NT2ZO4KI.js +59 -0
  80. package/dist/chunk-P2LJI6JE.js +94 -0
  81. package/dist/chunk-PH7G7ZI7.js +823 -0
  82. package/dist/chunk-PN5332SU.js +209 -0
  83. package/dist/chunk-QF5LGMSV.js +45 -0
  84. package/dist/chunk-QG5RQQBO.js +367 -0
  85. package/dist/chunk-QYPDYN23.js +23 -0
  86. package/dist/chunk-R3NHNVS5.js +478 -0
  87. package/dist/chunk-R3NHNVS5.js.map +1 -0
  88. package/dist/chunk-RNXJ2VO6.js +280 -0
  89. package/dist/chunk-RXTMLYJS.js +97 -0
  90. package/dist/chunk-S2OWPVSO.js +30 -0
  91. package/dist/chunk-S7TAPIRS.js +205 -0
  92. package/dist/chunk-SAL5X5OK.js +40 -0
  93. package/dist/chunk-SGJGWBSC.js +85 -0
  94. package/dist/chunk-SIAIYP6G.js +50 -0
  95. package/dist/chunk-SXPCZ6LL.js +1697 -0
  96. package/dist/chunk-SXPCZ6LL.js.map +1 -0
  97. package/dist/chunk-TBNF5DV5.js +261 -0
  98. package/dist/chunk-TVOHSPVK.js +21 -0
  99. package/dist/chunk-TVS6BUUR.js +41 -0
  100. package/dist/chunk-UMC5QZTX.js +86 -0
  101. package/dist/chunk-US34HTOI.js +367 -0
  102. package/dist/chunk-VCUQR6ZL.js +621 -0
  103. package/dist/chunk-VXZNSPJM.js +957 -0
  104. package/dist/chunk-VXZNSPJM.js.map +1 -0
  105. package/dist/chunk-WEHIQYQH.js +71 -0
  106. package/dist/chunk-WHQHTNT7.js +265 -0
  107. package/dist/chunk-X6Y5MXTH.js +74 -0
  108. package/dist/chunk-XJ47GS53.js +291 -0
  109. package/dist/chunk-XS6DLN67.js +95 -0
  110. package/dist/chunk-Y5TWPBNW.js +91 -0
  111. package/dist/chunk-YCXKFB7J.js +14181 -0
  112. package/dist/chunk-YCXKFB7J.js.map +1 -0
  113. package/dist/chunk-ZHOJOT6S.js +36 -0
  114. package/dist/chunk-ZL6PRULX.js +167 -0
  115. package/dist/chunk-ZL6PRULX.js.map +1 -0
  116. package/dist/classified/index.js +5 -5
  117. package/dist/classified-marker-M7K3OJPM.js +28 -0
  118. package/dist/classified-marker-M7K3OJPM.js.map +1 -0
  119. package/dist/collection-facade-DWA735G2.js +39 -0
  120. package/dist/computed-ORCGM5JE.js +11 -0
  121. package/dist/consent/index.js +9 -9
  122. package/dist/crdt/index.js +1 -1
  123. package/dist/dead-filter-OV5FGKOG.js +28 -0
  124. package/dist/delegation-YVSHMIZZ.js +25 -0
  125. package/dist/derivations/index.js +12 -12
  126. package/dist/derive-BUO555L5.js +21 -0
  127. package/dist/enclave-XXFUKJC6.js +135 -0
  128. package/dist/executor-6OCCE5VM.js +25 -0
  129. package/dist/executor-JFVAJY42.js +9 -0
  130. package/dist/executor-UPSH5O3F.js +9 -0
  131. package/dist/export-accessible-L4A2QZA5.js +23 -0
  132. package/dist/extract-partition-ZHQ4RGGM.js +36 -0
  133. package/dist/fanout-sidecar-IO2KDUWV.js +74 -0
  134. package/dist/find-ZFZDZQ2U.js +11 -0
  135. package/dist/forget/index.js +10 -10
  136. package/dist/forget/index.js.map +1 -1
  137. package/dist/guards/index.js +3 -3
  138. package/dist/history/index.js +11 -11
  139. package/dist/i18n/index.js +15 -15
  140. package/dist/index.d.ts +303 -1492
  141. package/dist/index.js +172 -171
  142. package/dist/index.js.map +1 -1
  143. package/dist/indexing/index.js +5 -5
  144. package/dist/indexing/index.js.map +1 -1
  145. package/dist/issue-OG4V23SQ.js +19 -0
  146. package/dist/kernel/best-effort-revert.d.ts +52 -0
  147. package/dist/kernel/cache/index.d.ts +10 -0
  148. package/dist/kernel/cache/lru.d.ts +97 -0
  149. package/dist/kernel/cache/policy.d.ts +32 -0
  150. package/dist/kernel/collection-config.d.ts +789 -0
  151. package/dist/kernel/collection.d.ts +1519 -0
  152. package/dist/kernel/constants.d.ts +18 -0
  153. package/dist/kernel/debug.d.ts +25 -0
  154. package/dist/kernel/enclave/broker/proof.d.ts +154 -0
  155. package/dist/kernel/enclave/classify/bidx.d.ts +77 -0
  156. package/dist/kernel/enclave/classify/compare.d.ts +10 -0
  157. package/dist/kernel/enclave/classify/digest.d.ts +8 -0
  158. package/dist/kernel/enclave/classify/find.d.ts +36 -0
  159. package/dist/kernel/enclave/classify/kofn.d.ts +7 -0
  160. package/dist/kernel/enclave/classify/normalize.d.ts +7 -0
  161. package/dist/kernel/enclave/classify/reveal.d.ts +10 -0
  162. package/dist/kernel/enclave/classify/vdig.d.ts +39 -0
  163. package/dist/kernel/enclave/classify/verify.d.ts +33 -0
  164. package/dist/kernel/enclave/classify/write.d.ts +8 -0
  165. package/dist/kernel/enclave/crypto.d.ts +263 -0
  166. package/dist/kernel/enclave/index.d.ts +78 -0
  167. package/dist/kernel/enclave/record-keys/deterministic.d.ts +54 -0
  168. package/dist/kernel/enclave/record-keys/envelope-body.d.ts +79 -0
  169. package/dist/kernel/enclave/record-keys/lifecycle.d.ts +57 -0
  170. package/dist/kernel/enclave/record-keys/record-codec.d.ts +301 -0
  171. package/dist/kernel/enclave/record-keys/sealed-slot.d.ts +14 -0
  172. package/dist/kernel/enclave/record-keys/sealed-slots.d.ts +123 -0
  173. package/dist/kernel/enclave/record-keys/sealing.d.ts +70 -0
  174. package/dist/kernel/enclave/record-keys/tombstone.d.ts +57 -0
  175. package/dist/kernel/env-check.d.ts +1 -0
  176. package/dist/kernel/errors.d.ts +1848 -0
  177. package/dist/kernel/events.d.ts +11 -0
  178. package/dist/kernel/memory-store.d.ts +17 -0
  179. package/dist/kernel/mutation.d.ts +14 -0
  180. package/dist/kernel/noydb.d.ts +826 -0
  181. package/dist/kernel/paths.d.ts +25 -0
  182. package/dist/kernel/query/builder.d.ts +520 -0
  183. package/dist/kernel/query/index.d.ts +31 -0
  184. package/dist/kernel/query/join.d.ts +205 -0
  185. package/dist/kernel/query/live.d.ts +111 -0
  186. package/dist/kernel/query/predicate.d.ts +139 -0
  187. package/dist/kernel/query/scan-builder.d.ts +334 -0
  188. package/dist/kernel/refs.d.ts +205 -0
  189. package/dist/kernel/schema.d.ts +134 -0
  190. package/dist/kernel/sync-policy.d.ts +188 -0
  191. package/dist/kernel/types.d.ts +3166 -0
  192. package/dist/kernel/util/discriminant.d.ts +58 -0
  193. package/dist/kernel/util/index.d.ts +14 -0
  194. package/dist/kernel/util/sanitize-filename.d.ts +75 -0
  195. package/dist/kernel/validation.d.ts +130 -0
  196. package/dist/kernel/vault.d.ts +1737 -0
  197. package/dist/kernel/via/compose.d.ts +144 -0
  198. package/dist/kernel/via/dispatch.d.ts +185 -0
  199. package/dist/kernel/via/graph-wiring.d.ts +145 -0
  200. package/dist/kernel/via/graph.d.ts +166 -0
  201. package/dist/kernel/via/index.d.ts +200 -0
  202. package/dist/kernel/via/pipeline.d.ts +266 -0
  203. package/dist/kernel/via/reconcile.d.ts +153 -0
  204. package/dist/kernel/via/taint-binding.d.ts +66 -0
  205. package/dist/kernel/write-queue.d.ts +46 -0
  206. package/dist/ledger-UAQKPWNM.js +42 -0
  207. package/dist/legacy/bundle.d.ts +30 -0
  208. package/dist/legacy/kernel.d.ts +33 -0
  209. package/dist/liberate-GFUQJRK5.js +24 -0
  210. package/dist/link-set-DGYUOFVD.js +31 -0
  211. package/dist/materialized-views/index.js +19 -19
  212. package/dist/noydb-AKH4AMCR.js +67 -0
  213. package/dist/on/index.js +9 -9
  214. package/dist/overlay-views/index.js +4 -4
  215. package/dist/periods/index.js +12 -12
  216. package/dist/pod/index.js +11 -11
  217. package/dist/policy-5POYLI26.js +41 -0
  218. package/dist/port/as/index.d.ts +26 -0
  219. package/dist/port/at/index.d.ts +18 -0
  220. package/dist/port/by/default-provider.d.ts +9 -0
  221. package/dist/port/by/index.d.ts +17 -0
  222. package/dist/port/by/types.d.ts +86 -0
  223. package/dist/port/in/index.d.ts +21 -0
  224. package/dist/port/on/index.d.ts +27 -0
  225. package/dist/port/to/index.d.ts +19 -0
  226. package/dist/port/ui/index.d.ts +21 -0
  227. package/dist/port/with/blob-strategy.d.ts +81 -0
  228. package/dist/port/with/broker-strategy.d.ts +84 -0
  229. package/dist/port/with/capabilities.d.ts +31 -0
  230. package/dist/port/with/classified-marker.d.ts +9 -0
  231. package/dist/port/with/classified-strategy.d.ts +62 -0
  232. package/dist/port/with/computed-strategy.d.ts +19 -0
  233. package/dist/port/with/i18n-strategy.d.ts +175 -0
  234. package/dist/port/with/index.d.ts +18 -0
  235. package/dist/port/with/lazy-strategy.d.ts +48 -0
  236. package/dist/port/with/lookup-strategy.d.ts +129 -0
  237. package/dist/port/with/service-bus.d.ts +156 -0
  238. package/dist/port/with/team-strategy.d.ts +36 -0
  239. package/dist/port/with/write-hooks.d.ts +34 -0
  240. package/dist/portability/index.js +8 -8
  241. package/dist/post-register-LB3P4XQU.js +60 -0
  242. package/dist/post-register-LB3P4XQU.js.map +1 -0
  243. package/dist/public-envelope-GOG4LUM7.js +32 -0
  244. package/dist/purge-scope-FGNNLWHD.js +24 -0
  245. package/dist/purge-scope-FGNNLWHD.js.map +1 -0
  246. package/dist/query/index.js +5 -5
  247. package/dist/register-ZI7YI7US.js +23 -0
  248. package/dist/registry-DZ2T4LL7.js +9 -0
  249. package/dist/registry-NVWEQ2GU.js +18 -0
  250. package/dist/registry-SEKL74ET.js +19 -0
  251. package/dist/request-withdrawal-ZP3JIRVS.js +31 -0
  252. package/dist/reveal-NPVROV4D.js +38 -0
  253. package/dist/revoke-VF6TAJK2.js +24 -0
  254. package/dist/satellites/index.js +1 -1
  255. package/dist/sealed-record/index.js +12 -12
  256. package/dist/seed-VI4FU7UH.js +231 -0
  257. package/dist/seed-VI4FU7UH.js.map +1 -0
  258. package/dist/session/index.js +9 -9
  259. package/dist/shadow/index.js +2 -2
  260. package/dist/signer-DRDDCCHW.js +25 -0
  261. package/dist/snapshots/index.js +10 -10
  262. package/dist/stale-TJXFQKOJ.js +14 -0
  263. package/dist/storage-GR7KZRH4.js +23 -0
  264. package/dist/store-coordination-provider-5KDS2RRP.js +142 -0
  265. package/dist/sync/index.js +9 -9
  266. package/dist/team/index.js +15 -15
  267. package/dist/tiers/index.js +10 -10
  268. package/dist/to/index.js +1 -1
  269. package/dist/tx/index.js +3 -3
  270. package/dist/util/index.js +1 -1
  271. package/dist/verify-QK76NJ4G.js +139 -0
  272. package/dist/via/blob/active.d.ts +34 -0
  273. package/dist/via/blob/binding.d.ts +86 -0
  274. package/dist/via/blob/index.d.ts +34 -0
  275. package/dist/via/classified/active.d.ts +3 -0
  276. package/dist/via/classified/binding.d.ts +83 -0
  277. package/dist/via/classified/config-drift.d.ts +34 -0
  278. package/dist/via/classified/descriptor.d.ts +66 -0
  279. package/dist/via/classified/errors.d.ts +19 -0
  280. package/dist/via/classified/guards.d.ts +23 -0
  281. package/dist/via/classified/index.d.ts +11 -0
  282. package/dist/via/classified/presets.d.ts +65 -0
  283. package/dist/via/classified/resolve.d.ts +9 -0
  284. package/dist/via/classified/strategy.d.ts +11 -0
  285. package/dist/via/classified/validators.d.ts +3 -0
  286. package/dist/via/classified/write.d.ts +4 -0
  287. package/dist/via/computed/binding.d.ts +34 -0
  288. package/dist/via/computed/descriptor.d.ts +35 -0
  289. package/dist/via/i18n/active.d.ts +28 -0
  290. package/dist/via/i18n/binding.d.ts +36 -0
  291. package/dist/via/i18n/core.d.ts +267 -0
  292. package/dist/via/i18n/densify.d.ts +24 -0
  293. package/dist/via/i18n/dictionary.d.ts +200 -0
  294. package/dist/via/i18n/index.d.ts +21 -0
  295. package/dist/via/i18n/policy.d.ts +44 -0
  296. package/dist/via/i18n/script.d.ts +26 -0
  297. package/dist/via/i18n/strategy.d.ts +13 -0
  298. package/dist/via/lookup/active.d.ts +19 -0
  299. package/dist/via/lookup/binding.d.ts +99 -0
  300. package/dist/via/lookup/descriptor.d.ts +123 -0
  301. package/dist/via/lookup/handle.d.ts +220 -0
  302. package/dist/via/lookup/index.d.ts +17 -0
  303. package/dist/via/lookup/registry.d.ts +228 -0
  304. package/dist/via/lookup/snapshot.d.ts +67 -0
  305. package/dist/via/money/arith.d.ts +68 -0
  306. package/dist/via/money/binding.d.ts +21 -0
  307. package/dist/via/money/branded.d.ts +61 -0
  308. package/dist/via/money/descriptor.d.ts +73 -0
  309. package/dist/via/money/fixed-point.d.ts +51 -0
  310. package/dist/via/money/index.d.ts +15 -0
  311. package/dist/via/money/iso4217.d.ts +6 -0
  312. package/dist/via/money/money-reducer.d.ts +33 -0
  313. package/dist/via/money/normalize.d.ts +105 -0
  314. package/dist/via/money/paths.d.ts +61 -0
  315. package/dist/via/money/where.d.ts +127 -0
  316. package/dist/walk-XQCBKSBW.js +241 -0
  317. package/dist/with/index.js +11 -11
  318. package/dist/with-audit/attestation/active.d.ts +10 -0
  319. package/dist/with-audit/attestation/index.d.ts +16 -0
  320. package/dist/with-audit/attestation/issue.d.ts +29 -0
  321. package/dist/with-audit/attestation/revoke.d.ts +15 -0
  322. package/dist/with-audit/attestation/signer.d.ts +33 -0
  323. package/dist/with-audit/attestation/strategy.d.ts +44 -0
  324. package/dist/with-audit/attestation/vault-facade.d.ts +62 -0
  325. package/dist/with-audit/consent/active.d.ts +14 -0
  326. package/dist/with-audit/consent/consent.d.ts +114 -0
  327. package/dist/with-audit/consent/index.d.ts +14 -0
  328. package/dist/with-audit/consent/strategy.d.ts +36 -0
  329. package/dist/with-audit/forget/active.d.ts +31 -0
  330. package/dist/with-audit/forget/index.d.ts +28 -0
  331. package/dist/with-audit/forget/purge-scope.d.ts +54 -0
  332. package/dist/with-audit/forget/strategy.d.ts +177 -0
  333. package/dist/with-audit/forget/subject-index.d.ts +83 -0
  334. package/dist/with-audit/guards/executor.d.ts +26 -0
  335. package/dist/with-audit/guards/immutable-guard.d.ts +63 -0
  336. package/dist/with-audit/guards/index.d.ts +10 -0
  337. package/dist/with-audit/guards/read-only-facade.d.ts +31 -0
  338. package/dist/with-audit/guards/registry.d.ts +83 -0
  339. package/dist/with-audit/guards/transition-guard.d.ts +82 -0
  340. package/dist/with-audit/guards/types.d.ts +134 -0
  341. package/dist/with-audit/guards/with-guard.d.ts +15 -0
  342. package/dist/with-audit/periods/active.d.ts +11 -0
  343. package/dist/with-audit/periods/index.d.ts +18 -0
  344. package/dist/with-audit/periods/periods.d.ts +417 -0
  345. package/dist/with-audit/periods/strategy.d.ts +32 -0
  346. package/dist/with-audit/periods/vault-facade.d.ts +95 -0
  347. package/dist/with-audit/portability/active.d.ts +11 -0
  348. package/dist/with-audit/portability/export-accessible.d.ts +46 -0
  349. package/dist/with-audit/portability/index.d.ts +18 -0
  350. package/dist/with-audit/portability/request-withdrawal.d.ts +85 -0
  351. package/dist/with-audit/portability/strategy.d.ts +31 -0
  352. package/dist/with-audit/portability/withdraw-accessible.d.ts +82 -0
  353. package/dist/with-audit/sealed-record/active.d.ts +9 -0
  354. package/dist/with-audit/sealed-record/index.d.ts +55 -0
  355. package/dist/with-audit/sealed-record/strategy.d.ts +34 -0
  356. package/dist/with-audit/sealed-record/types.d.ts +27 -0
  357. package/dist/with-audit/tiers/active.d.ts +9 -0
  358. package/dist/with-audit/tiers/index.d.ts +122 -0
  359. package/dist/with-audit/tiers/strategy.d.ts +35 -0
  360. package/dist/with-cargo/active.d.ts +11 -0
  361. package/dist/with-cargo/adopt-partition.d.ts +81 -0
  362. package/dist/with-cargo/decrypt-partition.d.ts +19 -0
  363. package/dist/with-cargo/describe-extraction.d.ts +33 -0
  364. package/dist/with-cargo/extract-partition.d.ts +147 -0
  365. package/dist/with-cargo/index.d.ts +33 -0
  366. package/dist/with-cargo/strategy.d.ts +30 -0
  367. package/dist/with-cargo/vault-diff.d.ts +144 -0
  368. package/dist/with-cargo/walk-closure.d.ts +38 -0
  369. package/dist/with-commit/crdt/active.d.ts +25 -0
  370. package/dist/with-commit/crdt/crdt.d.ts +42 -0
  371. package/dist/with-commit/crdt/index.d.ts +16 -0
  372. package/dist/with-commit/crdt/strategy.d.ts +25 -0
  373. package/dist/with-commit/history/active.d.ts +40 -0
  374. package/dist/with-commit/history/diff.d.ts +23 -0
  375. package/dist/with-commit/history/history.d.ts +27 -0
  376. package/dist/with-commit/history/index.d.ts +30 -0
  377. package/dist/with-commit/history/ledger/constants.d.ts +37 -0
  378. package/dist/with-commit/history/ledger/entry.d.ts +195 -0
  379. package/dist/with-commit/history/ledger/hash.d.ts +30 -0
  380. package/dist/with-commit/history/ledger/index.d.ts +19 -0
  381. package/dist/with-commit/history/ledger/patch.d.ts +99 -0
  382. package/dist/with-commit/history/ledger/store.d.ts +335 -0
  383. package/dist/with-commit/history/strategy.d.ts +126 -0
  384. package/dist/with-commit/history/time-machine.d.ts +179 -0
  385. package/dist/with-commit/numbering/descriptor.d.ts +27 -0
  386. package/dist/with-commit/numbering/index.d.ts +69 -0
  387. package/dist/with-commit/sequence/active.d.ts +10 -0
  388. package/dist/with-commit/sequence/index.d.ts +150 -0
  389. package/dist/with-commit/sequence/strategy.d.ts +26 -0
  390. package/dist/with-commit/tx/active.d.ts +27 -0
  391. package/dist/with-commit/tx/dry-run.d.ts +29 -0
  392. package/dist/with-commit/tx/elevated-handle.d.ts +58 -0
  393. package/dist/with-commit/tx/index.d.ts +13 -0
  394. package/dist/with-commit/tx/invariants.d.ts +68 -0
  395. package/dist/with-commit/tx/strategy.d.ts +23 -0
  396. package/dist/with-commit/tx/transaction.d.ts +212 -0
  397. package/dist/with-fork/archive/engine.d.ts +71 -0
  398. package/dist/with-fork/archive/index.d.ts +23 -0
  399. package/dist/with-fork/shadow/active.d.ts +6 -0
  400. package/dist/with-fork/shadow/index.d.ts +14 -0
  401. package/dist/with-fork/shadow/strategy.d.ts +28 -0
  402. package/dist/with-fork/shadow/vault-frame.d.ts +93 -0
  403. package/dist/with-fork/snapshots/active.d.ts +20 -0
  404. package/dist/with-fork/snapshots/engine.d.ts +36 -0
  405. package/dist/with-fork/snapshots/index.d.ts +5 -0
  406. package/dist/with-fork/snapshots/noydb-facade.d.ts +64 -0
  407. package/dist/with-fork/snapshots/policy.d.ts +23 -0
  408. package/dist/with-fork/snapshots/scheduler.d.ts +34 -0
  409. package/dist/with-fork/snapshots/strategy.d.ts +48 -0
  410. package/dist/with-formula/computed/index.d.ts +48 -0
  411. package/dist/with-formula/computed/lazy.d.ts +13 -0
  412. package/dist/with-formula/derivations/executor.d.ts +61 -0
  413. package/dist/with-formula/derivations/fanout-sidecar.d.ts +75 -0
  414. package/dist/with-formula/derivations/index.d.ts +6 -0
  415. package/dist/with-formula/derivations/registry.d.ts +67 -0
  416. package/dist/with-formula/derivations/stale.d.ts +39 -0
  417. package/dist/with-formula/derivations/strategy-hash.d.ts +1 -0
  418. package/dist/with-formula/derivations/types.d.ts +248 -0
  419. package/dist/with-formula/derivations/with-derivation.d.ts +10 -0
  420. package/dist/with-formula/derivations/with-rollup.d.ts +34 -0
  421. package/dist/with-formula/materialized-views/dependency-analyzer.d.ts +58 -0
  422. package/dist/with-formula/materialized-views/executor.d.ts +71 -0
  423. package/dist/with-formula/materialized-views/index.d.ts +11 -0
  424. package/dist/with-formula/materialized-views/query-hash.d.ts +23 -0
  425. package/dist/with-formula/materialized-views/registry.d.ts +99 -0
  426. package/dist/with-formula/materialized-views/stale.d.ts +62 -0
  427. package/dist/with-formula/materialized-views/types.d.ts +318 -0
  428. package/dist/with-formula/materialized-views/with-materialized-view.d.ts +24 -0
  429. package/dist/with-formula/overlay-views/index.d.ts +5 -0
  430. package/dist/with-formula/overlay-views/registry.d.ts +42 -0
  431. package/dist/with-formula/overlay-views/types.d.ts +97 -0
  432. package/dist/with-formula/overlay-views/virtual-collection.d.ts +90 -0
  433. package/dist/with-formula/overlay-views/with-overlayed-view.d.ts +9 -0
  434. package/dist/with-lookup/aggregate/active.d.ts +33 -0
  435. package/dist/with-lookup/aggregate/aggregation.d.ts +166 -0
  436. package/dist/with-lookup/aggregate/canonical-key.d.ts +16 -0
  437. package/dist/with-lookup/aggregate/groupby.d.ts +280 -0
  438. package/dist/with-lookup/aggregate/index.d.ts +23 -0
  439. package/dist/with-lookup/aggregate/reducers.d.ts +257 -0
  440. package/dist/with-lookup/aggregate/strategy.d.ts +59 -0
  441. package/dist/with-lookup/embeddings/cosine.d.ts +2 -0
  442. package/dist/with-lookup/embeddings/descriptor.d.ts +8 -0
  443. package/dist/with-lookup/embeddings/index.d.ts +3 -0
  444. package/dist/with-lookup/embeddings/vector-set.d.ts +19 -0
  445. package/dist/with-lookup/indexing/active.d.ts +30 -0
  446. package/dist/with-lookup/indexing/collection-facade.d.ts +120 -0
  447. package/dist/with-lookup/indexing/eager-indexes.d.ts +122 -0
  448. package/dist/with-lookup/indexing/index.d.ts +27 -0
  449. package/dist/with-lookup/indexing/lazy-builder.d.ts +102 -0
  450. package/dist/with-lookup/indexing/persisted-indexes.d.ts +229 -0
  451. package/dist/with-lookup/indexing/strategy.d.ts +56 -0
  452. package/dist/with-lookup/indexing/unique-constraints.d.ts +74 -0
  453. package/dist/with-lookup/search/active.d.ts +10 -0
  454. package/dist/with-lookup/search/build-docs.d.ts +15 -0
  455. package/dist/with-lookup/search/collection-facade.d.ts +123 -0
  456. package/dist/with-lookup/search/fuse.d.ts +22 -0
  457. package/dist/with-lookup/search/index-store.d.ts +19 -0
  458. package/dist/with-lookup/search/index.d.ts +19 -0
  459. package/dist/with-lookup/search/inverted-index.d.ts +47 -0
  460. package/dist/with-lookup/search/persisted-index-store.d.ts +41 -0
  461. package/dist/with-lookup/search/retrieve-types.d.ts +29 -0
  462. package/dist/with-lookup/search/scan.d.ts +28 -0
  463. package/dist/with-lookup/search/segment.d.ts +15 -0
  464. package/dist/with-lookup/search/serialize.d.ts +4 -0
  465. package/dist/with-lookup/search/snippet.d.ts +5 -0
  466. package/dist/with-lookup/search/strategy.d.ts +37 -0
  467. package/dist/with-lookup/search/tokenize.d.ts +12 -0
  468. package/dist/with-party/auth-introspection/index.d.ts +44 -0
  469. package/dist/with-party/broker/active.d.ts +23 -0
  470. package/dist/with-party/broker/index.d.ts +28 -0
  471. package/dist/with-party/broker/seed.d.ts +77 -0
  472. package/dist/with-party/custody/active.d.ts +10 -0
  473. package/dist/with-party/custody/index.d.ts +69 -0
  474. package/dist/with-party/custody/liberate.d.ts +64 -0
  475. package/dist/with-party/custody/strategy.d.ts +48 -0
  476. package/dist/with-party/directory/index.d.ts +11 -0
  477. package/dist/with-party/directory/public-envelope/index.d.ts +12 -0
  478. package/dist/with-party/directory/public-envelope/schema.d.ts +24 -0
  479. package/dist/with-party/directory/public-envelope/storage.d.ts +59 -0
  480. package/dist/with-party/directory/public-envelope/types.d.ts +80 -0
  481. package/dist/with-party/directory/storage.d.ts +33 -0
  482. package/dist/with-party/directory/types.d.ts +43 -0
  483. package/dist/with-party/directory/user-envelope/api.d.ts +201 -0
  484. package/dist/with-party/directory/user-envelope/index.d.ts +12 -0
  485. package/dist/with-party/directory/user-envelope/storage.d.ts +54 -0
  486. package/dist/with-party/directory/visibility.d.ts +47 -0
  487. package/dist/with-party/policy/engine.d.ts +60 -0
  488. package/dist/with-party/policy/index.d.ts +15 -0
  489. package/dist/with-party/policy/noydb-facade.d.ts +39 -0
  490. package/dist/with-party/policy/presets.d.ts +38 -0
  491. package/dist/with-party/policy/storage.d.ts +31 -0
  492. package/dist/with-party/session/active.d.ts +34 -0
  493. package/dist/with-party/session/dev-unlock.d.ts +128 -0
  494. package/dist/with-party/session/index.d.ts +23 -0
  495. package/dist/with-party/session/session-policy.d.ts +92 -0
  496. package/dist/with-party/session/session.d.ts +131 -0
  497. package/dist/with-party/session/strategy.d.ts +42 -0
  498. package/dist/with-party/session/unlock-state.d.ts +47 -0
  499. package/dist/with-party/sync/index.d.ts +31 -0
  500. package/dist/with-party/tab-coordination.d.ts +73 -0
  501. package/dist/with-party/tab-write-relay.d.ts +39 -0
  502. package/dist/with-party/team/active.d.ts +13 -0
  503. package/dist/with-party/team/authenticators.d.ts +95 -0
  504. package/dist/with-party/team/deed.d.ts +97 -0
  505. package/dist/with-party/team/delegation.d.ts +88 -0
  506. package/dist/with-party/team/index.d.ts +38 -0
  507. package/dist/with-party/team/keyring.d.ts +318 -0
  508. package/dist/with-party/team/magic-link-grant.d.ts +152 -0
  509. package/dist/with-party/team/managed-passphrase.d.ts +280 -0
  510. package/dist/with-party/team/noydb-facade.d.ts +484 -0
  511. package/dist/with-party/team/peer-recover.d.ts +81 -0
  512. package/dist/with-party/team/presence.d.ts +81 -0
  513. package/dist/with-party/team/recovery.d.ts +191 -0
  514. package/dist/with-party/team/reserved-secret-collections.d.ts +41 -0
  515. package/dist/with-party/team/rotate-recover.d.ts +275 -0
  516. package/dist/with-party/team/shamir-recovery-provider.d.ts +15 -0
  517. package/dist/with-party/team/strategy.d.ts +9 -0
  518. package/dist/with-party/team/sync-active.d.ts +33 -0
  519. package/dist/with-party/team/sync-credentials.d.ts +113 -0
  520. package/dist/with-party/team/sync-strategy.d.ts +67 -0
  521. package/dist/with-party/team/sync-transaction.d.ts +39 -0
  522. package/dist/with-party/team/sync.d.ts +174 -0
  523. package/dist/with-party/team/tiers.d.ts +39 -0
  524. package/dist/with-party/team/wrapped-deks.d.ts +86 -0
  525. package/dist/with-pod/backup.d.ts +74 -0
  526. package/dist/with-pod/bundle.d.ts +414 -0
  527. package/dist/with-pod/format.d.ts +203 -0
  528. package/dist/with-pod/index.d.ts +20 -0
  529. package/dist/with-pod/pod-store.d.ts +54 -0
  530. package/dist/with-pod/ulid.d.ts +64 -0
  531. package/dist/with-shape/blobs/blob-compaction.d.ts +170 -0
  532. package/dist/with-shape/blobs/blob-set.d.ts +342 -0
  533. package/dist/with-shape/blobs/export-blobs.d.ts +110 -0
  534. package/dist/with-shape/blobs/import-external.d.ts +50 -0
  535. package/dist/with-shape/blobs/mime-magic.d.ts +48 -0
  536. package/dist/with-shape/blobs/object-projection.d.ts +70 -0
  537. package/dist/with-shape/introspection/describe.d.ts +237 -0
  538. package/dist/with-shape/introspection/field-meta.d.ts +61 -0
  539. package/dist/with-shape/introspection/fields.d.ts +14 -0
  540. package/dist/with-shape/introspection/index.d.ts +12 -0
  541. package/dist/with-shape/introspection/json-schema.d.ts +13 -0
  542. package/dist/with-shape/introspection/meta.d.ts +22 -0
  543. package/dist/with-shape/introspection/projection.d.ts +13 -0
  544. package/dist/with-shape/introspection/types.d.ts +154 -0
  545. package/dist/with-shape/introspection/walk.d.ts +50 -0
  546. package/dist/with-shape/links/lazy-handle.d.ts +36 -0
  547. package/dist/with-shape/links/link-set.d.ts +67 -0
  548. package/dist/with-shape/links/names.d.ts +65 -0
  549. package/dist/with-shape/links/vault-facade.d.ts +211 -0
  550. package/dist/with-shape/persisted-schemas/canonicalize.d.ts +11 -0
  551. package/dist/with-shape/persisted-schemas/derive.d.ts +29 -0
  552. package/dist/with-shape/persisted-schemas/index.d.ts +21 -0
  553. package/dist/with-shape/persisted-schemas/register.d.ts +66 -0
  554. package/dist/with-shape/persisted-schemas/storage.d.ts +61 -0
  555. package/dist/with-shape/persisted-schemas/types.d.ts +54 -0
  556. package/dist/with-shape/satellites/dead-filter.d.ts +21 -0
  557. package/dist/with-shape/satellites/declare.d.ts +60 -0
  558. package/dist/with-shape/satellites/existence.d.ts +5 -0
  559. package/dist/with-shape/satellites/fanout.d.ts +38 -0
  560. package/dist/with-shape/satellites/forget.d.ts +47 -0
  561. package/dist/with-shape/satellites/index.d.ts +3 -0
  562. package/dist/with-shape/satellites/joined.d.ts +19 -0
  563. package/dist/with-shape/satellites/marker.d.ts +10 -0
  564. package/dist/with-shape/satellites/migrate-cek.d.ts +26 -0
  565. package/dist/with-shape/satellites/post-register.d.ts +6 -0
  566. package/dist/with-shape/satellites/proxy.d.ts +37 -0
  567. package/dist/with-shape/satellites/raw-target.d.ts +14 -0
  568. package/dist/with-shape/satellites/registry.d.ts +19 -0
  569. package/dist/with-shape/satellites/types.d.ts +37 -0
  570. package/dist/with-shape/satellites/validate.d.ts +17 -0
  571. package/dist/with-shape/schema-update/client-registry.d.ts +35 -0
  572. package/dist/with-shape/schema-update/cutover.d.ts +5 -0
  573. package/dist/with-shape/schema-update/delta.d.ts +2 -0
  574. package/dist/with-shape/schema-update/dispatch.d.ts +3 -0
  575. package/dist/with-shape/schema-update/fence-controller.d.ts +62 -0
  576. package/dist/with-shape/schema-update/fence-watcher.d.ts +37 -0
  577. package/dist/with-shape/schema-update/fence.d.ts +15 -0
  578. package/dist/with-shape/schema-update/gate.d.ts +16 -0
  579. package/dist/with-shape/schema-update/index.d.ts +6 -0
  580. package/dist/with-shape/schema-update/store-coordination-provider.d.ts +29 -0
  581. package/dist/with-shape/schema-update/strategies.d.ts +12 -0
  582. package/dist/with-shape/schema-update/types.d.ts +53 -0
  583. package/dist/with-store/index.d.ts +15 -0
  584. package/dist/with-store/lazy/active.d.ts +12 -0
  585. package/dist/with-store/lazy/index.d.ts +14 -0
  586. package/dist/with-store/lazy/strategy.d.ts +9 -0
  587. package/dist/with-store/route-store.d.ts +259 -0
  588. package/dist/with-store/store-middleware.d.ts +189 -0
  589. package/dist/withdraw-accessible-FMN4LPJZ.js +28 -0
  590. package/package.json +47 -43
  591. package/dist/aggregate/index.d.ts +0 -41
  592. package/dist/api-TX2EX2FX.js +0 -20
  593. package/dist/as/index.d.ts +0 -6
  594. package/dist/at/index.d.ts +0 -4
  595. package/dist/attestation/index.d.ts +0 -19
  596. package/dist/backup-R7NTDFKY.js +0 -225
  597. package/dist/blobs/index.d.ts +0 -43
  598. package/dist/bundle/index.d.ts +0 -121
  599. package/dist/bundle-D6GxiUfq.d.ts +0 -548
  600. package/dist/by/index.d.ts +0 -1
  601. package/dist/cargo/index.d.ts +0 -7
  602. package/dist/chunk-2OV5NVE7.js +0 -95
  603. package/dist/chunk-2OZXVKVP.js +0 -367
  604. package/dist/chunk-2REPHKET.js +0 -54
  605. package/dist/chunk-3JXPAHOZ.js +0 -686
  606. package/dist/chunk-3MATJ6O4.js +0 -367
  607. package/dist/chunk-3OPY6MK2.js +0 -404
  608. package/dist/chunk-3QSIU3UT.js +0 -291
  609. package/dist/chunk-4OMCIY6F.js +0 -99
  610. package/dist/chunk-5I35DOHK.js +0 -94
  611. package/dist/chunk-5VG4IJR7.js +0 -235
  612. package/dist/chunk-5YESYH2C.js +0 -155
  613. package/dist/chunk-6G5ORS5D.js +0 -202
  614. package/dist/chunk-6P5XCKSD.js +0 -71
  615. package/dist/chunk-6S7T6WC4.js +0 -111
  616. package/dist/chunk-6S7T6WC4.js.map +0 -1
  617. package/dist/chunk-7BWJHO2A.js +0 -34
  618. package/dist/chunk-7P2SDJG3.js +0 -279
  619. package/dist/chunk-7P2SDJG3.js.map +0 -1
  620. package/dist/chunk-ANB77BVV.js +0 -150
  621. package/dist/chunk-ANB77BVV.js.map +0 -1
  622. package/dist/chunk-BKARNZJN.js +0 -382
  623. package/dist/chunk-BQISD5ZV.js +0 -261
  624. package/dist/chunk-BUAQ7YI3.js +0 -1697
  625. package/dist/chunk-BUAQ7YI3.js.map +0 -1
  626. package/dist/chunk-CB7CWSKW.js +0 -430
  627. package/dist/chunk-CB7CWSKW.js.map +0 -1
  628. package/dist/chunk-DFVUTGT2.js +0 -515
  629. package/dist/chunk-DJ7KIPLV.js +0 -23
  630. package/dist/chunk-DSKDQP3G.js +0 -14066
  631. package/dist/chunk-DSKDQP3G.js.map +0 -1
  632. package/dist/chunk-DV4HUP5G.js +0 -99
  633. package/dist/chunk-EOXAAJTY.js +0 -621
  634. package/dist/chunk-ET67AY6B.js +0 -74
  635. package/dist/chunk-F4CEK5YM.js +0 -123
  636. package/dist/chunk-FORYWFN6.js +0 -130
  637. package/dist/chunk-FRP6D2DM.js +0 -91
  638. package/dist/chunk-FUOE7UUV.js +0 -341
  639. package/dist/chunk-FUOE7UUV.js.map +0 -1
  640. package/dist/chunk-G4JYND6L.js +0 -42
  641. package/dist/chunk-G6XV4H65.js +0 -59
  642. package/dist/chunk-GNMXXTMN.js +0 -85
  643. package/dist/chunk-HPWKV3YB.js +0 -21
  644. package/dist/chunk-HY3AUMFI.js +0 -41
  645. package/dist/chunk-HYR4WZZ3.js +0 -69
  646. package/dist/chunk-ICXIFFYZ.js +0 -355
  647. package/dist/chunk-ICXIFFYZ.js.map +0 -1
  648. package/dist/chunk-IVLTXX4W.js +0 -280
  649. package/dist/chunk-J4LPNIGK.js +0 -777
  650. package/dist/chunk-JJZ2LW6T.js +0 -36
  651. package/dist/chunk-KJ2BCBTL.js +0 -589
  652. package/dist/chunk-KNZB6JMR.js +0 -129
  653. package/dist/chunk-LEJIKBBB.js +0 -124
  654. package/dist/chunk-LL2NIVUR.js +0 -188
  655. package/dist/chunk-MCHVVJIA.js +0 -968
  656. package/dist/chunk-MCHVVJIA.js.map +0 -1
  657. package/dist/chunk-NUEQU36L.js +0 -392
  658. package/dist/chunk-O45M6LDB.js +0 -38
  659. package/dist/chunk-OBKWYKYC.js +0 -117
  660. package/dist/chunk-OHHKHSJP.js +0 -209
  661. package/dist/chunk-OT76OZL6.js +0 -45
  662. package/dist/chunk-OVYRLHPE.js +0 -150
  663. package/dist/chunk-OXCSVM3B.js +0 -155
  664. package/dist/chunk-P33LUIML.js +0 -205
  665. package/dist/chunk-PLS64NCS.js +0 -59
  666. package/dist/chunk-PS2NEWEX.js +0 -36
  667. package/dist/chunk-QA2KUPCP.js +0 -45
  668. package/dist/chunk-QOC3VYL2.js +0 -30
  669. package/dist/chunk-QSFOZUYL.js +0 -823
  670. package/dist/chunk-RHK32N73.js +0 -30
  671. package/dist/chunk-RW3Y22MW.js +0 -97
  672. package/dist/chunk-S7VFUQM2.js +0 -1484
  673. package/dist/chunk-S7VFUQM2.js.map +0 -1
  674. package/dist/chunk-T7WSLRAU.js +0 -49
  675. package/dist/chunk-TAKWLZZX.js +0 -944
  676. package/dist/chunk-TAKWLZZX.js.map +0 -1
  677. package/dist/chunk-TMBXVJKT.js +0 -75
  678. package/dist/chunk-TWKKOM55.js +0 -54
  679. package/dist/chunk-U3WZCU7E.js +0 -14
  680. package/dist/chunk-UF362QVH.js +0 -70
  681. package/dist/chunk-UN4FVIBH.js +0 -135
  682. package/dist/chunk-VEAVKDDB.js +0 -29
  683. package/dist/chunk-VEPTFUJY.js +0 -29
  684. package/dist/chunk-VJV7GKQK.js +0 -662
  685. package/dist/chunk-VQRAIPYF.js +0 -50
  686. package/dist/chunk-VRIYFLBA.js +0 -74
  687. package/dist/chunk-VWM3DAVB.js +0 -265
  688. package/dist/chunk-VWRRVE6D.js +0 -80
  689. package/dist/chunk-WBJIQSLL.js +0 -167
  690. package/dist/chunk-WBJIQSLL.js.map +0 -1
  691. package/dist/chunk-WIGQB62E.js +0 -164
  692. package/dist/chunk-WZSCE6RM.js +0 -466
  693. package/dist/chunk-WZSCE6RM.js.map +0 -1
  694. package/dist/chunk-XGDAPN6M.js +0 -255
  695. package/dist/chunk-XH7XP3OL.js +0 -1221
  696. package/dist/chunk-XREOISSI.js +0 -40
  697. package/dist/chunk-XUBPSPKD.js +0 -164
  698. package/dist/chunk-Y3A5CB5G.js +0 -247
  699. package/dist/chunk-YCXCR7VG.js +0 -230
  700. package/dist/chunk-YMVQD5Q5.js +0 -453
  701. package/dist/chunk-YN5IAHN6.js +0 -32
  702. package/dist/chunk-YN5IAHN6.js.map +0 -1
  703. package/dist/chunk-ZYJ55N7N.js +0 -86
  704. package/dist/classified/index.d.ts +0 -16
  705. package/dist/classified-marker-H6YSHYNK.js +0 -24
  706. package/dist/classified-marker-H6YSHYNK.js.map +0 -1
  707. package/dist/collection-facade-LVD22JLM.js +0 -39
  708. package/dist/computed-EXDMQODG.js +0 -11
  709. package/dist/consent/index.d.ts +0 -22
  710. package/dist/crdt/index.d.ts +0 -33
  711. package/dist/dead-filter-HQIE2YG7.js +0 -28
  712. package/dist/decrypt-partition-IHtxEnTi.d.ts +0 -21
  713. package/dist/delegation-BJP73GAP.js +0 -25
  714. package/dist/derivations/index.d.ts +0 -69
  715. package/dist/derive-BME7HDWO.js +0 -21
  716. package/dist/dev-unlock-Bmm2pgJ0.d.ts +0 -263
  717. package/dist/discriminant-BN9REW3o.d.ts +0 -60
  718. package/dist/enclave-NHORSWSF.js +0 -125
  719. package/dist/executor-FE6X4LFX.js +0 -9
  720. package/dist/executor-KSHKRJXP.js +0 -25
  721. package/dist/executor-ZHTJJICG.js +0 -9
  722. package/dist/export-accessible-DACHM5VT.js +0 -23
  723. package/dist/extract-partition-RNENZZ4T.js +0 -36
  724. package/dist/fanout-sidecar-OFWN3NM7.js +0 -74
  725. package/dist/find-BNGBJNKP.js +0 -11
  726. package/dist/forget/index.d.ts +0 -36
  727. package/dist/guards/index.d.ts +0 -34
  728. package/dist/hash-DAJjMsCE.d.ts +0 -72
  729. package/dist/history/index.d.ts +0 -60
  730. package/dist/i18n/index.d.ts +0 -56
  731. package/dist/in/index.d.ts +0 -4
  732. package/dist/index-B9QdHytu.d.ts +0 -123
  733. package/dist/index-DjWbxsjb.d.ts +0 -23579
  734. package/dist/index-qwuNvO2B.d.ts +0 -144
  735. package/dist/indexing/index.d.ts +0 -38
  736. package/dist/issue-NDI4CVZU.js +0 -19
  737. package/dist/lazy/index.d.ts +0 -20
  738. package/dist/ledger-6NDS2EO4.js +0 -42
  739. package/dist/liberate-HN3RIGIP.js +0 -24
  740. package/dist/link-set-SJB2MVJV.js +0 -31
  741. package/dist/materialized-views/index.d.ts +0 -189
  742. package/dist/mime-magic-bBj5OgUC.d.ts +0 -103
  743. package/dist/noydb-BWF6EPIR.js +0 -66
  744. package/dist/on/index.d.ts +0 -4
  745. package/dist/overlay-views/index.d.ts +0 -97
  746. package/dist/periods/index.d.ts +0 -19
  747. package/dist/pod/index.d.ts +0 -62
  748. package/dist/policy-WGNAG5H6.js +0 -41
  749. package/dist/portability/index.d.ts +0 -19
  750. package/dist/post-register-CWKBQRC7.js +0 -55
  751. package/dist/post-register-CWKBQRC7.js.map +0 -1
  752. package/dist/public-envelope-EJLVIFX7.js +0 -32
  753. package/dist/query/index.d.ts +0 -4
  754. package/dist/register-SBIX7TVV.js +0 -23
  755. package/dist/registry-3EQG6OOE.js +0 -18
  756. package/dist/registry-CA327ACV.js +0 -9
  757. package/dist/registry-E7OXOTSV.js +0 -19
  758. package/dist/request-withdrawal-KAH2AAXC.js +0 -31
  759. package/dist/reveal-R3JLHMUF.js +0 -38
  760. package/dist/revoke-IXLOJ3IH.js +0 -24
  761. package/dist/satellites/index.d.ts +0 -4
  762. package/dist/sealed-record/index.d.ts +0 -68
  763. package/dist/session/index.d.ts +0 -43
  764. package/dist/shadow/index.d.ts +0 -14
  765. package/dist/signer-Y46N2GJ3.js +0 -25
  766. package/dist/snapshots/index.d.ts +0 -25
  767. package/dist/stale-Z7IW6RIL.js +0 -14
  768. package/dist/storage-ADNP2UWI.js +0 -23
  769. package/dist/store-coordination-provider-DTDMI6VL.js +0 -142
  770. package/dist/subject-index-CyOgGMJL.d.ts +0 -380
  771. package/dist/sync/index.d.ts +0 -40
  772. package/dist/team/index.d.ts +0 -154
  773. package/dist/tiers/index.d.ts +0 -4
  774. package/dist/to/index.d.ts +0 -4
  775. package/dist/transition-guard-DI-krBsZ.d.ts +0 -165
  776. package/dist/tx/index.d.ts +0 -34
  777. package/dist/ui/index.d.ts +0 -4
  778. package/dist/ulid-DRH25k3y.d.ts +0 -66
  779. package/dist/util/index.d.ts +0 -79
  780. package/dist/validators-BUcli5Nh.d.ts +0 -101
  781. package/dist/vault-diff-Z2DUayMe.d.ts +0 -147
  782. package/dist/verify-JPF2YR5E.js +0 -139
  783. package/dist/walk-XYA2O3LW.js +0 -241
  784. package/dist/with/index.d.ts +0 -37
  785. package/dist/with-materialized-view-BUmzlXue.d.ts +0 -27
  786. package/dist/with-overlayed-view-m4FaXXTO.d.ts +0 -12
  787. package/dist/with-rollup-DEKGI9vb.d.ts +0 -47
  788. package/dist/withdraw-accessible-WLV4MTEN.js +0 -28
  789. /package/dist/{api-TX2EX2FX.js.map → api-3TH2GOFQ.js.map} +0 -0
  790. /package/dist/{backup-R7NTDFKY.js.map → backup-2WVBIVXW.js.map} +0 -0
  791. /package/dist/{chunk-TMBXVJKT.js.map → chunk-2MTRJCBI.js.map} +0 -0
  792. /package/dist/{chunk-3OPY6MK2.js.map → chunk-37WOJQWY.js.map} +0 -0
  793. /package/dist/{chunk-KJ2BCBTL.js.map → chunk-3QSOFZQB.js.map} +0 -0
  794. /package/dist/{chunk-DV4HUP5G.js.map → chunk-44IL5G3W.js.map} +0 -0
  795. /package/dist/{chunk-HYR4WZZ3.js.map → chunk-45QPICLE.js.map} +0 -0
  796. /package/dist/{chunk-XUBPSPKD.js.map → chunk-4BQXMCE5.js.map} +0 -0
  797. /package/dist/{chunk-RHK32N73.js.map → chunk-5HNX4OD4.js.map} +0 -0
  798. /package/dist/{chunk-2REPHKET.js.map → chunk-65VLRG3I.js.map} +0 -0
  799. /package/dist/{chunk-G6XV4H65.js.map → chunk-6MA575R5.js.map} +0 -0
  800. /package/dist/{chunk-F4CEK5YM.js.map → chunk-7GAXFU2O.js.map} +0 -0
  801. /package/dist/{chunk-6G5ORS5D.js.map → chunk-7QLY64AD.js.map} +0 -0
  802. /package/dist/{chunk-5VG4IJR7.js.map → chunk-7ZOSHEVS.js.map} +0 -0
  803. /package/dist/{chunk-LEJIKBBB.js.map → chunk-APHLCXVC.js.map} +0 -0
  804. /package/dist/{chunk-KNZB6JMR.js.map → chunk-BDEMZD4F.js.map} +0 -0
  805. /package/dist/{chunk-VJV7GKQK.js.map → chunk-BDPAVYGJ.js.map} +0 -0
  806. /package/dist/{chunk-G4JYND6L.js.map → chunk-BLUT46UP.js.map} +0 -0
  807. /package/dist/{chunk-J4LPNIGK.js.map → chunk-CCIR2OJH.js.map} +0 -0
  808. /package/dist/{chunk-5YESYH2C.js.map → chunk-CXC3JLAQ.js.map} +0 -0
  809. /package/dist/{chunk-XH7XP3OL.js.map → chunk-CZMCOFEA.js.map} +0 -0
  810. /package/dist/{chunk-WIGQB62E.js.map → chunk-DIB2BOIH.js.map} +0 -0
  811. /package/dist/{chunk-UF362QVH.js.map → chunk-EIZ4YOG2.js.map} +0 -0
  812. /package/dist/{chunk-DFVUTGT2.js.map → chunk-EVHBK7BN.js.map} +0 -0
  813. /package/dist/{chunk-ET67AY6B.js.map → chunk-EXGDL2UQ.js.map} +0 -0
  814. /package/dist/{chunk-YMVQD5Q5.js.map → chunk-F3LGBRSV.js.map} +0 -0
  815. /package/dist/{chunk-NUEQU36L.js.map → chunk-F44XWXOA.js.map} +0 -0
  816. /package/dist/{chunk-YCXCR7VG.js.map → chunk-FF7S3XDW.js.map} +0 -0
  817. /package/dist/{chunk-OXCSVM3B.js.map → chunk-FJTWLQV3.js.map} +0 -0
  818. /package/dist/{chunk-PS2NEWEX.js.map → chunk-FYNE4WLC.js.map} +0 -0
  819. /package/dist/{chunk-FORYWFN6.js.map → chunk-GL3JV5EV.js.map} +0 -0
  820. /package/dist/{chunk-VEAVKDDB.js.map → chunk-GXLZXD2W.js.map} +0 -0
  821. /package/dist/{chunk-3JXPAHOZ.js.map → chunk-HBBZWEC5.js.map} +0 -0
  822. /package/dist/{chunk-LL2NIVUR.js.map → chunk-HG76BZ6G.js.map} +0 -0
  823. /package/dist/{chunk-O45M6LDB.js.map → chunk-HGAB325C.js.map} +0 -0
  824. /package/dist/{chunk-T7WSLRAU.js.map → chunk-HK4XTXO4.js.map} +0 -0
  825. /package/dist/{chunk-U3WZCU7E.js.map → chunk-HYG32HCM.js.map} +0 -0
  826. /package/dist/{chunk-UN4FVIBH.js.map → chunk-ILF5GARW.js.map} +0 -0
  827. /package/dist/{chunk-BKARNZJN.js.map → chunk-INBQ43DI.js.map} +0 -0
  828. /package/dist/{chunk-Y3A5CB5G.js.map → chunk-IQIVD7TP.js.map} +0 -0
  829. /package/dist/{chunk-QA2KUPCP.js.map → chunk-J3JIYFYL.js.map} +0 -0
  830. /package/dist/{chunk-OVYRLHPE.js.map → chunk-JGUZMC3I.js.map} +0 -0
  831. /package/dist/{chunk-VWRRVE6D.js.map → chunk-JRKE5MAZ.js.map} +0 -0
  832. /package/dist/{chunk-XGDAPN6M.js.map → chunk-K2DLLK34.js.map} +0 -0
  833. /package/dist/{chunk-7BWJHO2A.js.map → chunk-KKYEZCQG.js.map} +0 -0
  834. /package/dist/{chunk-TWKKOM55.js.map → chunk-NAR6IDKH.js.map} +0 -0
  835. /package/dist/{chunk-OBKWYKYC.js.map → chunk-NEYKOESM.js.map} +0 -0
  836. /package/dist/{chunk-VEPTFUJY.js.map → chunk-NM3IFKBL.js.map} +0 -0
  837. /package/dist/{chunk-4OMCIY6F.js.map → chunk-NRYNRSGV.js.map} +0 -0
  838. /package/dist/{chunk-PLS64NCS.js.map → chunk-NT2ZO4KI.js.map} +0 -0
  839. /package/dist/{chunk-5I35DOHK.js.map → chunk-P2LJI6JE.js.map} +0 -0
  840. /package/dist/{chunk-QSFOZUYL.js.map → chunk-PH7G7ZI7.js.map} +0 -0
  841. /package/dist/{chunk-OHHKHSJP.js.map → chunk-PN5332SU.js.map} +0 -0
  842. /package/dist/{chunk-OT76OZL6.js.map → chunk-QF5LGMSV.js.map} +0 -0
  843. /package/dist/{chunk-3MATJ6O4.js.map → chunk-QG5RQQBO.js.map} +0 -0
  844. /package/dist/{chunk-DJ7KIPLV.js.map → chunk-QYPDYN23.js.map} +0 -0
  845. /package/dist/{chunk-IVLTXX4W.js.map → chunk-RNXJ2VO6.js.map} +0 -0
  846. /package/dist/{chunk-RW3Y22MW.js.map → chunk-RXTMLYJS.js.map} +0 -0
  847. /package/dist/{chunk-QOC3VYL2.js.map → chunk-S2OWPVSO.js.map} +0 -0
  848. /package/dist/{chunk-P33LUIML.js.map → chunk-S7TAPIRS.js.map} +0 -0
  849. /package/dist/{chunk-XREOISSI.js.map → chunk-SAL5X5OK.js.map} +0 -0
  850. /package/dist/{chunk-GNMXXTMN.js.map → chunk-SGJGWBSC.js.map} +0 -0
  851. /package/dist/{chunk-VQRAIPYF.js.map → chunk-SIAIYP6G.js.map} +0 -0
  852. /package/dist/{chunk-BQISD5ZV.js.map → chunk-TBNF5DV5.js.map} +0 -0
  853. /package/dist/{chunk-HPWKV3YB.js.map → chunk-TVOHSPVK.js.map} +0 -0
  854. /package/dist/{chunk-HY3AUMFI.js.map → chunk-TVS6BUUR.js.map} +0 -0
  855. /package/dist/{chunk-ZYJ55N7N.js.map → chunk-UMC5QZTX.js.map} +0 -0
  856. /package/dist/{chunk-2OZXVKVP.js.map → chunk-US34HTOI.js.map} +0 -0
  857. /package/dist/{chunk-EOXAAJTY.js.map → chunk-VCUQR6ZL.js.map} +0 -0
  858. /package/dist/{chunk-6P5XCKSD.js.map → chunk-WEHIQYQH.js.map} +0 -0
  859. /package/dist/{chunk-VWM3DAVB.js.map → chunk-WHQHTNT7.js.map} +0 -0
  860. /package/dist/{chunk-VRIYFLBA.js.map → chunk-X6Y5MXTH.js.map} +0 -0
  861. /package/dist/{chunk-3QSIU3UT.js.map → chunk-XJ47GS53.js.map} +0 -0
  862. /package/dist/{chunk-2OV5NVE7.js.map → chunk-XS6DLN67.js.map} +0 -0
  863. /package/dist/{chunk-FRP6D2DM.js.map → chunk-Y5TWPBNW.js.map} +0 -0
  864. /package/dist/{chunk-JJZ2LW6T.js.map → chunk-ZHOJOT6S.js.map} +0 -0
  865. /package/dist/{collection-facade-LVD22JLM.js.map → collection-facade-DWA735G2.js.map} +0 -0
  866. /package/dist/{computed-EXDMQODG.js.map → computed-ORCGM5JE.js.map} +0 -0
  867. /package/dist/{dead-filter-HQIE2YG7.js.map → dead-filter-OV5FGKOG.js.map} +0 -0
  868. /package/dist/{delegation-BJP73GAP.js.map → delegation-YVSHMIZZ.js.map} +0 -0
  869. /package/dist/{derive-BME7HDWO.js.map → derive-BUO555L5.js.map} +0 -0
  870. /package/dist/{enclave-NHORSWSF.js.map → enclave-XXFUKJC6.js.map} +0 -0
  871. /package/dist/{executor-FE6X4LFX.js.map → executor-6OCCE5VM.js.map} +0 -0
  872. /package/dist/{executor-KSHKRJXP.js.map → executor-JFVAJY42.js.map} +0 -0
  873. /package/dist/{executor-ZHTJJICG.js.map → executor-UPSH5O3F.js.map} +0 -0
  874. /package/dist/{export-accessible-DACHM5VT.js.map → export-accessible-L4A2QZA5.js.map} +0 -0
  875. /package/dist/{extract-partition-RNENZZ4T.js.map → extract-partition-ZHQ4RGGM.js.map} +0 -0
  876. /package/dist/{fanout-sidecar-OFWN3NM7.js.map → fanout-sidecar-IO2KDUWV.js.map} +0 -0
  877. /package/dist/{find-BNGBJNKP.js.map → find-ZFZDZQ2U.js.map} +0 -0
  878. /package/dist/{issue-NDI4CVZU.js.map → issue-OG4V23SQ.js.map} +0 -0
  879. /package/dist/{ledger-6NDS2EO4.js.map → ledger-UAQKPWNM.js.map} +0 -0
  880. /package/dist/{liberate-HN3RIGIP.js.map → liberate-GFUQJRK5.js.map} +0 -0
  881. /package/dist/{link-set-SJB2MVJV.js.map → link-set-DGYUOFVD.js.map} +0 -0
  882. /package/dist/{noydb-BWF6EPIR.js.map → noydb-AKH4AMCR.js.map} +0 -0
  883. /package/dist/{policy-WGNAG5H6.js.map → policy-5POYLI26.js.map} +0 -0
  884. /package/dist/{public-envelope-EJLVIFX7.js.map → public-envelope-GOG4LUM7.js.map} +0 -0
  885. /package/dist/{register-SBIX7TVV.js.map → register-ZI7YI7US.js.map} +0 -0
  886. /package/dist/{registry-3EQG6OOE.js.map → registry-DZ2T4LL7.js.map} +0 -0
  887. /package/dist/{registry-CA327ACV.js.map → registry-NVWEQ2GU.js.map} +0 -0
  888. /package/dist/{registry-E7OXOTSV.js.map → registry-SEKL74ET.js.map} +0 -0
  889. /package/dist/{request-withdrawal-KAH2AAXC.js.map → request-withdrawal-ZP3JIRVS.js.map} +0 -0
  890. /package/dist/{reveal-R3JLHMUF.js.map → reveal-NPVROV4D.js.map} +0 -0
  891. /package/dist/{revoke-IXLOJ3IH.js.map → revoke-VF6TAJK2.js.map} +0 -0
  892. /package/dist/{signer-Y46N2GJ3.js.map → signer-DRDDCCHW.js.map} +0 -0
  893. /package/dist/{stale-Z7IW6RIL.js.map → stale-TJXFQKOJ.js.map} +0 -0
  894. /package/dist/{storage-ADNP2UWI.js.map → storage-GR7KZRH4.js.map} +0 -0
  895. /package/dist/{store-coordination-provider-DTDMI6VL.js.map → store-coordination-provider-5KDS2RRP.js.map} +0 -0
  896. /package/dist/{verify-JPF2YR5E.js.map → verify-QK76NJ4G.js.map} +0 -0
  897. /package/dist/{walk-XYA2O3LW.js.map → walk-XQCBKSBW.js.map} +0 -0
  898. /package/dist/{withdraw-accessible-WLV4MTEN.js.map → withdraw-accessible-FMN4LPJZ.js.map} +0 -0
@@ -0,0 +1,1737 @@
1
+ import type { NoydbStore, EncryptedEnvelope, HistoryConfig, ExportStreamOptions, ExportChunk, CollectionConflictResolver, CrossTierAccessEvent, TierMode, Role, VaultUserApi } from './types.js';
2
+ import type { Noydb } from './noydb.js';
3
+ import type { IssueDelegationOptions, DelegationToken } from '../with-party/team/delegation.js';
4
+ import { Collection } from './collection.js';
5
+ import type { CacheOptions } from './collection.js';
6
+ import type { JoinableSource } from './query/index.js';
7
+ import type { OnDirtyCallback } from './collection.js';
8
+ import type { UnlockedKeyring, BundleRecipient } from '../with-party/team/keyring.js';
9
+ import { type PortabilityStrategy } from '../with-audit/portability/strategy.js';
10
+ import type { MaterializedViewRegistry } from '../with-formula/materialized-views/registry.js';
11
+ import type { MaterializedViewStrategyHandle } from '../with-formula/materialized-views/types.js';
12
+ import type { OverlayedViewRegistry } from '../with-formula/overlay-views/registry.js';
13
+ import type { OverlayedViewStrategyHandle } from '../with-formula/overlay-views/types.js';
14
+ import type { PublicEnvelope } from '../with-party/directory/public-envelope/types.js';
15
+ import type { ExportFormat, KeyringFile, SensitiveOpt, IndexFieldName, IndexDefFor, MoneyFieldsOpt } from './types.js';
16
+ import { ElevatedHandle } from '../with-commit/tx/elevated-handle.js';
17
+ import type { NoydbEventEmitter } from './events.js';
18
+ import type { StandardSchemaV1 } from './schema.js';
19
+ import type { BlobStrategy } from '../port/with/blob-strategy.js';
20
+ import type { ObjectProjection } from '../with-shape/blobs/object-projection.js';
21
+ import type { ArchiveStrategy } from '../with-fork/archive/index.js';
22
+ import type { ArchivePolicy, ArchiveResult, ArchiveRunOptions } from '../with-fork/archive/index.js';
23
+ import { type SequenceHandle, type FormattedSequenceHandle, type SequenceOptions } from '../with-commit/sequence/index.js';
24
+ import { type SequenceStrategy } from '../with-commit/sequence/strategy.js';
25
+ import { type Assignment } from '../with-commit/numbering/index.js';
26
+ import type { DeferredNumberingConfig } from '../with-commit/numbering/descriptor.js';
27
+ import type { IndexStrategy } from '../with-lookup/indexing/strategy.js';
28
+ import type { LazyStrategy } from '../port/with/lazy-strategy.js';
29
+ import type { AggregateStrategy } from '../with-lookup/aggregate/strategy.js';
30
+ import type { CrdtStrategy } from './types.js';
31
+ import type { TiersStrategy } from '../with-audit/tiers/strategy.js';
32
+ import type { SearchStrategy } from '../with-lookup/search/strategy.js';
33
+ import { type CargoStrategy } from '../with-cargo/strategy.js';
34
+ import { type BrokerStrategy, type CredentialBrokerHandle } from '../port/with/broker-strategy.js';
35
+ import type { LedgerStore } from '../with-commit/history/ledger/store.js';
36
+ import type { VaultInstant } from '../with-commit/history/time-machine.js';
37
+ import { type HistoryStrategy } from '../with-commit/history/strategy.js';
38
+ import { type ForgetStrategy, type ForgetResult } from '../with-audit/forget/strategy.js';
39
+ import { type SubjectRef } from '../with-audit/forget/subject-index.js';
40
+ import type { VaultFrame } from '../with-fork/shadow/vault-frame.js';
41
+ import { type ShadowStrategy } from '../with-fork/shadow/strategy.js';
42
+ import type { ConsentContext, ConsentAuditEntry, ConsentAuditFilter, ConsentOp } from '../with-audit/consent/consent.js';
43
+ import { type ConsentStrategy } from '../with-audit/consent/strategy.js';
44
+ import { type PeriodsStrategy } from '../with-audit/periods/strategy.js';
45
+ import { type RefDescriptor, type RefViolation } from './refs.js';
46
+ import type { DictionaryHandle, DictionaryOptions, DictKeyDescriptor, StaticDictDescriptor } from '../port/with/i18n-strategy.js';
47
+ import { // #653
48
+ type LookupDescriptor } from '../port/with/lookup-strategy.js';
49
+ import { type LinkSpec, type LinkSetHandle } from '../with-shape/links/names.js';
50
+ import type { EmbeddingDescriptor } from '../with-lookup/embeddings/index.js';
51
+ import type { ComputedFields } from '../with-formula/computed/index.js';
52
+ import { type I18nStrategy, type I18nTextDescriptor } from '../port/with/i18n-strategy.js';
53
+ import { type ViaFieldSpec } from './via/compose.js';
54
+ import { ViaGraph } from './via/graph.js';
55
+ import { type RollupDeleteIntent } from './via/dispatch.js';
56
+ import { type SyncStrategy } from '../with-party/team/sync-strategy.js';
57
+ import type { GuardRegistry } from '../with-audit/guards/registry.js';
58
+ import type { GuardStrategyHandleAny } from '../with-audit/guards/types.js';
59
+ import type { ReadOnlyVaultFacade } from '../with-audit/guards/read-only-facade.js';
60
+ import type { DerivationRegistry } from '../with-formula/derivations/registry.js';
61
+ import type { DerivationStrategyHandle } from '../with-formula/derivations/types.js';
62
+ import type { ConflictPolicy } from './types.js';
63
+ import type { CrdtMode } from '../with-commit/crdt/crdt.js';
64
+ import type { JoinedHandle } from '../with-shape/satellites/types.js';
65
+ import { type PeriodRecord, type ClosePeriodOptions, type OpenPeriodOptions } from '../with-audit/periods/index.js';
66
+ import { type EnclaveKey } from './enclave/index.js';
67
+ import type { RecipientSealer } from '../with-party/team/managed-passphrase.js';
68
+ import { type ExportBlobsOptions, type ExportBlobsHandle } from '../with-shape/blobs/export-blobs.js';
69
+ import { type BlobFieldsConfig, type CompactRunOptions, type CompactionResult } from '../with-shape/blobs/blob-compaction.js';
70
+ import { type IssueMagicLinkGrantOptions, type MagicLinkGrantRecord } from '../with-party/team/magic-link-grant.js';
71
+ import { CustodyApi } from '../with-party/custody/index.js';
72
+ import { SchemaFenceController } from '../with-shape/schema-update/fence-controller.js';
73
+ import { type FenceDoc } from '../with-shape/schema-update/fence.js';
74
+ import type { SchemaUpdateStrategy } from '../with-shape/schema-update/types.js';
75
+ import type { AttestationFieldSchema, RevocationList } from '@noy-db/attestation';
76
+ import { type AttestationStrategy } from '../with-audit/attestation/vault-facade.js';
77
+ import { type SealedRecordStrategy } from '../with-audit/sealed-record/strategy.js';
78
+ import type { DumpSchemaOptions, VaultSchemaSnapshot, SchemaIntrospection } from '../with-shape/introspection/types.js';
79
+ import type { VaultIntrospectState } from '../with-shape/introspection/walk.js';
80
+ import type { FieldMeta } from '../with-shape/introspection/field-meta.js';
81
+ import type { CollectionMeta, VaultMeta } from '../with-shape/introspection/meta.js';
82
+ import { type ClassifiedEntry, type ClassifiedStrategy } from '../port/with/classified-strategy.js';
83
+ /** A vault (tenant namespace) containing collections. */
84
+ export declare class Vault {
85
+ #private;
86
+ private readonly adapter;
87
+ /** The vault's name as passed to `openVault()`. Stable for the instance lifetime. */
88
+ readonly name: string;
89
+ /** Backreference to the parent `Noydb` — lets vault-scoped services reach the strategy seam
90
+ * without threading `db` through every API (type-only import keeps the module graph acyclic). */
91
+ readonly noydb: Noydb;
92
+ /** The active in-memory keyring. NOT readonly — `load()` refreshes it after restoring a
93
+ * different keyring file, or in-memory/on-disk DEKs drift apart and decrypt fails with TamperedError. */
94
+ private keyring;
95
+ private readonly encrypted;
96
+ private readonly emitter;
97
+ private readonly onDirty;
98
+ private readonly onRegisterConflictResolver;
99
+ private readonly syncAdapter;
100
+ private readonly getPurgeableTargets;
101
+ private readonly historyConfig;
102
+ /** tree-shake seam for the optional blob service; `undefined` means "blobs are off for this
103
+ * vault" — every `collection.blob(id)` call throws with a pointer at `@noy-db/hub/blobs`. */
104
+ private readonly blobStrategy;
105
+ private readonly objectStore;
106
+ /** Cold-storage archival strategy (the archive target store). */
107
+ private readonly archiveStrategy;
108
+ /** Per-collection record archival policies. Indexed by collection name. */
109
+ private readonly archiveRegistry;
110
+ private readonly indexStrategy;
111
+ private readonly lazyStrategy;
112
+ private readonly aggregateStrategy;
113
+ private readonly crdtStrategy;
114
+ private readonly tiersStrategy;
115
+ private readonly searchStrategy;
116
+ /** Cargo (partition extraction) strategy — `NO_CARGO` (throwing) unless `withCargo()` was passed.
117
+ * Public so the `extractPartition` free function (which takes a `Vault`) routes through it. */
118
+ readonly cargoStrategy: CargoStrategy;
119
+ private readonly brokerStrategy;
120
+ private readonly sealedRecordStrategy;
121
+ private readonly portabilityStrategy;
122
+ private readonly sequenceStrategy;
123
+ private readonly consentStrategy;
124
+ private readonly periods;
125
+ private readonly linksEnforcer;
126
+ private readonly shadowStrategy;
127
+ private readonly historyStrategy;
128
+ private readonly forgetStrategy;
129
+ private readonly i18nStrategy;
130
+ private readonly syncStrategy;
131
+ private readonly classifiedStrategy;
132
+ /** Per-vault guard registry; `null` until `_initGuards()` runs (or for vaults that never register
133
+ * one) — the runtime class is dynamic-imported on demand to keep it out of the floor bundle. */
134
+ private guardRegistry;
135
+ /** Per-vault derivation/MV/overlay registries — same lazy-load contract as
136
+ * `guardRegistry`: each stays `null` until its `_init*()` runs with at
137
+ * least one strategy/MV/overlay handle. */
138
+ private derivationRegistry;
139
+ private materializedViewRegistry;
140
+ private overlayedViewRegistry;
141
+ /** Per-vault dependency graph (#638) — field postures + derivation/MV/overlay/
142
+ * computed/via-deps edges. Metadata-only (field names, postures, grains —
143
+ * never values or key material); always present, unlike the registries above. */
144
+ readonly graph: ViaGraph;
145
+ /** #638 Task 4 — open sync/cutover/restore touch collector, or `undefined` between batches. */
146
+ private _graphBatch;
147
+ /** Cached read-only facades for guard/derivation callbacks — split by
148
+ * resolution layer (`layer:'guard'` vs `'derivation'`, each field's
149
+ * `onMissing` policy differs). Allocated eagerly inside `_initGuards()`/
150
+ * `_initDerivations()` so read accessors stay synchronous; `null` for
151
+ * vaults without that service. */
152
+ private guardFacade;
153
+ private derivationFacade;
154
+ private getDEK;
155
+ /**
156
+ * Per-principal user envelope API.
157
+ *
158
+ * - Write-self: `me()`, `updateMe(patch)`, `setMe(payload)` — always
159
+ * target this vault session's keyringId. There is no method to write
160
+ * another principal's envelope (own-only write rule, structural).
161
+ * - Read-anyone: `get(keyringId)`, `list()` — read other principals'
162
+ * envelopes, subject to the `view-team-profiles` policy gate.
163
+ * - Reactive: `subscribe(id, cb)`, `live(id)` — fire on local writes.
164
+ *
165
+ * @see docs/superpowers/specs/2026-05-05-user-envelope-design.md
166
+ */
167
+ readonly user: VaultUserApi;
168
+ /**
169
+ * FR-6 custody API — the sovereign-custody surface, mirroring `vault.user.*`.
170
+ *
171
+ * - `grantCustodian(opts)` / `revokeCustodian(opts)` — owner-only: mint /
172
+ * remove a `custodian` who operates the vault fully but can never grant /
173
+ * rotate / sever / extract.
174
+ * - `liberate(opts)` — custodian-only: the audited claim of ownership over a
175
+ * sealed-owner (Deed) vault (mints a DISTINCT new owner; ledger-audited).
176
+ *
177
+ * @see docs/superpowers/specs/2026-06-17-fr6-deed-custodian-liberate-design.md
178
+ */
179
+ readonly custody: CustodyApi;
180
+ /** Re-derives an UnlockedKeyring from the adapter using the active user's passphrase; called by
181
+ * `load()` after the on-disk keyring file has been replaced. Provided by Noydb at openVault()
182
+ * time; `undefined` in tests that construct Vault directly (load() then skips the refresh). */
183
+ private readonly reloadKeyring;
184
+ private readonly collectionCache;
185
+ private satelliteRegistry;
186
+ /** Vault-level schema cutover fence/controller. */
187
+ readonly schemaFence: SchemaFenceController;
188
+ /**
189
+ * per-collection `blobFields` retention/TTL config.
190
+ * Populated on `collection({ blobFields })` and read by
191
+ * `vault.compact()`. Indexed by collection name.
192
+ */
193
+ private readonly blobFieldsRegistry;
194
+ /**
195
+ * Attestation facade (issue/revoke + the per-collection field-schema
196
+ * registry). Built in the constructor.
197
+ */
198
+ private readonly attestation;
199
+ /**
200
+ * Per-vault ledger store. Lazy-initialized on first
201
+ * `collection()` call (which passes it through to the Collection)
202
+ * or on first `ledger()` call from user code.
203
+ *
204
+ * One LedgerStore is shared across all collections in a vault
205
+ * because the hash chain is vault-scoped: the chain head is a
206
+ * single "what did this vault do last" identifier, not a
207
+ * per-collection one. Two collections appending concurrently is the
208
+ * single-writer concurrency concern documented in the LedgerStore
209
+ * docstring.
210
+ */
211
+ private ledgerStore;
212
+ /** Lazily-built atomic-sequence store. See {@link sequence}. */
213
+ private sequenceStore;
214
+ /** Lazily-built deferred-numbering engine. See {@link runNumberingPass}. */
215
+ private deferredNumbering;
216
+ /** Registered deferred-numbering series, keyed by series name. */
217
+ private readonly numberingConfigs;
218
+ /**
219
+ * Background writes for persisted-schema envelopes (#schema-dump v0
220
+ * slice 1). One promise per `collection({ persistJsonSchema: true })`
221
+ * registration that actually fired a derive call. Fire-and-forget
222
+ * from the collection factory; tests await
223
+ * {@link _drainPendingSchemaWrites} before asserting on storage.
224
+ * Production code does not need to drain — the writes are
225
+ * idempotent fingerprints, not correctness invariants.
226
+ */
227
+ private _pendingSchemaWrites;
228
+ /**
229
+ * Per-vault foreign-key reference registry. Collections
230
+ * register their `refs` option here on construction; the
231
+ * vault uses the registry on every put/delete/checkIntegrity
232
+ * call. One instance lives for the compartment's lifetime.
233
+ */
234
+ private readonly refRegistry;
235
+ /**
236
+ * Vault-default locale. Set via
237
+ * `openVault(name, { locale })`. Used as the fallback locale
238
+ * when per-call `{ locale }` options are not specified on individual
239
+ * `get()`/`list()` calls.
240
+ */
241
+ private locale;
242
+ /**
243
+ * Vault-level descriptive metadata. Set once at construction via
244
+ * `openVault(name, { meta })`. First-wins: re-opening a cached vault
245
+ * with different meta leaves the original untouched.
246
+ */
247
+ private readonly vaultMeta;
248
+ /**
249
+ * Current consent scope. Set by `withConsent()` and
250
+ * restored in its finally block. When non-null, every collection
251
+ * access inside the scope writes one entry to `_consent_audit`.
252
+ *
253
+ * Single-slot by design — two concurrent withConsent calls on the
254
+ * same Vault stomp each other. Adopters needing per-flight scoping
255
+ * should use separate Vault instances.
256
+ */
257
+ private consentContext;
258
+ /** dictKeyField registry: collection name → field name → dictionary name — `DictionaryHandle.rename()`'s reference-update source; populated by `collection()` from `dictKeyFields`. */
259
+ private readonly dictKeyFieldRegistry;
260
+ /** Names of `staticDict()`-backed dictionaries (skip rename tracking; `vault.dictionary(name)` refuses mutation on these via `StaticDictReadonlyError`). Populated at `collection()` config time. */
261
+ private readonly staticDictNames;
262
+ /** Static-dict descriptors by dictionary name — backs the read-path label resolver and the `resolveDictSource` snapshot. Last writer wins across collections (tables match by construction). */
263
+ private readonly staticByName;
264
+ /** Per-collection field name → StaticDictDescriptor, validated by `enforceStaticDictOnPut`. */
265
+ private readonly staticDescriptorByField;
266
+ /** i18nText fields: collection name → field name → descriptor. Used by `applyI18nLocale`/`validateI18nTextValue`; populated by `collection()` from `i18nFields`. Private — the #664 `via/reconcile.ts` dispatch reads these through {@link _viaReconcileCtx}'s structural bag, not `this` directly (a plain structural bag, never a `Vault` import — S5 port-layering forbids the kernel spine from reaching a with-* service, and this file's own reconcile-ladder logic moved OUT into that unguarded module). */
267
+ private readonly i18nFieldRegistry;
268
+ /** Cache of DictionaryHandle instances, one per dictionary name. */
269
+ private readonly dictionaryCache;
270
+ /** #650 Task 4 (#647) — declared reserved-lookup collection name → dimension name, for dimensions
271
+ * with `backing:'reserved'` (dict()/dictKey()). The explicit sync-pull registry: NOT a blanket
272
+ * underscore-glob — populated at `collection()`-declare time and at `dictionary()`-call time. */
273
+ private readonly reservedLookupCollections;
274
+ /** Registered link specs, keyed by link name; set by `vault.link()`. */
275
+ private readonly linkRegistry;
276
+ /** Cache of link-set handles, one per link name (lazy -- see links()). */
277
+ private readonly linkSetCache;
278
+ /** — subscribers for cross-tier access events. */
279
+ private readonly crossTierSubs;
280
+ /** — currently-active elevation, or null. One per vault. */
281
+ private activeElevation;
282
+ /**
283
+ * Optional translator callback threaded from `Noydb.invokeTranslator`.
284
+ * Present only when `plaintextTranslator` was configured on `createNoydb()`.
285
+ */
286
+ private readonly translateText;
287
+ constructor(opts: {
288
+ adapter: NoydbStore;
289
+ name: string;
290
+ noydb: Noydb;
291
+ keyring: UnlockedKeyring;
292
+ encrypted: boolean;
293
+ emitter: NoydbEventEmitter;
294
+ onDirty?: OnDirtyCallback | undefined;
295
+ historyConfig?: HistoryConfig | undefined;
296
+ reloadKeyring?: (() => Promise<UnlockedKeyring>) | undefined;
297
+ /** Vault-default locale. */
298
+ locale?: string | undefined;
299
+ /** Translator callback from Noydb. */
300
+ plaintextTranslator?: ((text: string, from: string, to: string, field: string, collection: string) => Promise<string>) | undefined;
301
+ /**
302
+ * callback to register a per-collection envelope-level
303
+ * conflict resolver with the SyncEngine. Present when sync is configured.
304
+ */
305
+ onRegisterConflictResolver?: ((name: string, resolver: CollectionConflictResolver) => void) | undefined;
306
+ /** — optional remote/sync adapter for presence broadcasting. */
307
+ syncAdapter?: NoydbStore | undefined;
308
+ /** #615 — push-only sync targets (backup/archive) this vault may target-purge. Default: none. */
309
+ getPurgeableTargets?: () => readonly {
310
+ store: NoydbStore;
311
+ role: 'backup' | 'archive';
312
+ label?: string;
313
+ }[];
314
+ /**
315
+ * tree-shake seam — strategy for optional blob storage.
316
+ * Passed through to every `Collection` built by `vault.collection()`.
317
+ * `undefined` => every `collection.blob(id)` throws with a pointer
318
+ * at `@noy-db/hub/blobs`.
319
+ */
320
+ blobStrategy?: BlobStrategy | undefined;
321
+ objectStore?: ObjectProjection | undefined;
322
+ archiveStrategy?: ArchiveStrategy | undefined;
323
+ indexStrategy?: IndexStrategy | undefined;
324
+ lazyStrategy?: LazyStrategy | undefined;
325
+ aggregateStrategy?: AggregateStrategy | undefined;
326
+ crdtStrategy?: CrdtStrategy | undefined;
327
+ tiersStrategy?: TiersStrategy | undefined;
328
+ searchStrategy?: SearchStrategy | undefined;
329
+ cargoStrategy?: CargoStrategy | undefined;
330
+ brokerStrategy?: BrokerStrategy | undefined;
331
+ consentStrategy?: ConsentStrategy | undefined;
332
+ periodsStrategy?: PeriodsStrategy | undefined;
333
+ shadowStrategy?: ShadowStrategy | undefined;
334
+ historyStrategy?: HistoryStrategy | undefined;
335
+ i18nStrategy?: I18nStrategy | undefined;
336
+ syncStrategy?: SyncStrategy | undefined;
337
+ guardStrategies?: ReadonlyArray<GuardStrategyHandleAny> | undefined;
338
+ numberingConfigs?: ReadonlyArray<DeferredNumberingConfig> | undefined;
339
+ forgetStrategy?: ForgetStrategy | undefined;
340
+ attestationStrategy?: AttestationStrategy | undefined;
341
+ classifiedStrategy?: ClassifiedStrategy | undefined;
342
+ sealedRecordStrategy?: SealedRecordStrategy | undefined;
343
+ portabilityStrategy?: PortabilityStrategy | undefined;
344
+ sequenceStrategy?: SequenceStrategy | undefined;
345
+ /** Vault-level descriptive metadata — set once at construction (first-wins). */
346
+ meta?: VaultMeta | undefined;
347
+ });
348
+ /**
349
+ * Construct (or reconstruct) the lazy DEK resolver. Captures the
350
+ * CURRENT value of `this.keyring` and `this.adapter` in a closure,
351
+ * memoizing the inner getDEKFn after first use so subsequent
352
+ * lookups are O(1).
353
+ *
354
+ * `load()` calls this after refreshing `this.keyring` to discard
355
+ * the prior session's cached DEKs.
356
+ */
357
+ private makeGetDEK;
358
+ /**
359
+ * Open a typed collection within this vault.
360
+ *
361
+ * - `options.indexes` declares secondary indexes for the query DSL.
362
+ * Indexes are computed in memory after decryption; adapters never
363
+ * see plaintext index data.
364
+ * - `options.prefetch` (default `true`) controls hydration. Eager mode
365
+ * loads everything on first access; lazy mode (`prefetch: false`)
366
+ * loads records on demand and bounds memory via the LRU cache.
367
+ * - `options.cache` configures the LRU bounds. Required in lazy mode.
368
+ * Accepts `{ maxRecords, maxBytes: '50MB' | 1024 }`.
369
+ * - `options.schema` attaches a Standard Schema v1 validator (Zod,
370
+ * Valibot, ArkType, Effect Schema, etc.). Every `put()` is validated
371
+ * before encryption; every read is validated after decryption.
372
+ * Failing records throw `SchemaValidationError`.
373
+ * - `options.i18nFields` declares per-field `i18nText()` descriptors
374
+ *. Validated on `put()` and locale-resolved on reads.
375
+ * - `options.dictKeyFields` declares per-field `dictKey()` descriptors
376
+ *. `put()` validates keys against the declared set; reads
377
+ * with `{ locale }` add `<field>Label` virtual fields.
378
+ *
379
+ * Throws `ReservedCollectionNameError` for names starting with `_dict_` or
380
+ * equal to `_sequences`. Use `vault.dictionary(name)` for dict collections
381
+ * and `vault.sequence(name)` for sequence counters.
382
+ *
383
+ * Lazy mode + indexes is rejected at construction time — see the
384
+ * Collection constructor for the rationale.
385
+ */
386
+ /** Assembles {@link ViaReconcileVaultCtx} — the plain structural bag the #664 `via/reconcile.ts`
387
+ * dispatch reads/writes — from this vault's OWN privates, rather than passing `this` itself. */
388
+ private _viaReconcileCtx;
389
+ collection<T, S extends keyof T & string = never, Q extends keyof T & string = never, M extends keyof T & string = never>(collectionName: string, options?: {
390
+ indexes?: readonly IndexDefFor<IndexFieldName<T, S, Q>>[];
391
+ /** — auto-reconcile policy for persisted-index drift. */
392
+ reconcileOnOpen?: 'off' | 'dry-run' | 'auto';
393
+ prefetch?: boolean;
394
+ cache?: CacheOptions;
395
+ schema?: StandardSchemaV1<unknown, T>;
396
+ refs?: Record<string, RefDescriptor>;
397
+ /** — declare i18nText fields for locale-aware reads. */
398
+ i18nFields?: Record<string, I18nTextDescriptor>;
399
+ /** — embedding config for write-time vector derivation + semantic retrieval. */
400
+ embeddings?: EmbeddingDescriptor;
401
+ /** — string fields exposed to client-side `retrieve()`. */
402
+ textIndexes?: readonly IndexFieldName<T, S>[];
403
+ /** — pre-build the lexical index on open (eager-only). */
404
+ warmIndexOnOpen?: boolean;
405
+ /** — persist the lexical index as an opaque encrypted blob at `_ftindex/<name>`. */
406
+ textIndexPersist?: boolean;
407
+ /** — declare dictKey / staticDict fields for label resolution on reads. */
408
+ dictKeyFields?: Record<string, DictKeyDescriptor | StaticDictDescriptor>;
409
+ /** — declare lookup() / enumOf() / dict() fields (#650 Task 2 — the 'lookup' via binding's three tiers). */
410
+ lookupFields?: Record<string, LookupDescriptor>;
411
+ /** Consumer-neutral per-field descriptors (label/unit/semanticType/sensitivity…). See collection.describe(). */
412
+ fieldMeta?: Record<string, FieldMeta>;
413
+ /** The collection's own descriptive metadata (label/description/icon). See collection.describe(). */
414
+ meta?: CollectionMeta;
415
+ /** — declare money() fields for currency-safe decimal storage/formatting. */
416
+ moneyFields?: MoneyFieldsOpt<T, M>;
417
+ viaFields?: Record<string, ViaFieldSpec>;
418
+ /** — declare computed scalar fields, evaluated on write (schema-owned). Each entry may be
419
+ * a plain `(record) => value` function, OR `{ fn, deps }` to declare source fields for
420
+ * taint propagation (#638 Task 7 — supersedes the retired `computedDeps` option). */
421
+ computed?: ComputedFields<T>;
422
+ /** — declare classified() sensitive-field descriptors. See the classified-fields spec. */
423
+ classifiedFields?: Record<string, ClassifiedEntry>;
424
+ /** — per-collection conflict resolution policy. */
425
+ conflictPolicy?: ConflictPolicy<T>;
426
+ /** — CRDT mode for collaborative editing without conflicts. */
427
+ crdt?: CrdtMode;
428
+ /**
429
+ * declare deterministic-encryption fields for blind
430
+ * equality search. See `Collection` constructor docs for the full
431
+ * trade-off. Requires `acknowledgeDeterministicRisk: true`.
432
+ */
433
+ deterministicFields?: readonly IndexFieldName<T, S>[];
434
+ /** — explicit ack that deterministic encryption leaks equality. */
435
+ acknowledgeDeterministicRisk?: boolean;
436
+ /** — explicit ack for the classified `equatable` knob (R8 door). Required
437
+ * when any classified field declares `equatable: true`. */
438
+ acknowledgeEquatableRisk?: boolean;
439
+ /**
440
+ * — structural group-encryption. Fields sealed into their own
441
+ * `_sealed[field]` envelope slot (per-field key), kept out of the open
442
+ * `_data` blob. Default-off; byte-identical output when absent.
443
+ */
444
+ sensitive?: SensitiveOpt<T, S>;
445
+ /**
446
+ * — per-record content-encryption keys. When `true`, every record
447
+ * body is encrypted under a fresh per-record CEK wrapped under the
448
+ * collection DEK (`_cek`), stable across versions. Foundation for
449
+ * per-record erasure / record-scoped sealing. Off by
450
+ * default; non-adopting collections take the legacy path unchanged.
451
+ */
452
+ perRecordKeys?: boolean;
453
+ satelliteOf?: string;
454
+ fields?: readonly string[];
455
+ joined?: string;
456
+ /**
457
+ * Per-record provenance tracking. When `true`, `put()` calls that
458
+ * supply a `source` option stamp `_source` / `_sourceTs` onto the
459
+ * unencrypted envelope metadata. Off by default.
460
+ */
461
+ provenance?: boolean;
462
+ /**
463
+ * declarative blob retention / TTL policy per slot
464
+ * name. Values are `{ retainDays?, evictWhen? }`. Evaluated only
465
+ * when `vault.compact()` runs.
466
+ */
467
+ blobFields?: BlobFieldsConfig<T>;
468
+ /** — declarative record archival policy: `{ archiveWhen, legalHold? }`. Evaluated when `vault.archive()` runs. */
469
+ archive?: ArchivePolicy<T>;
470
+ /** — declared tiers for this collection. */
471
+ tiers?: readonly number[];
472
+ /** — how lower-tier reads see above-tier records. */
473
+ tierMode?: TierMode;
474
+ /**
475
+ * Opt-in persisted JSON Schema. When `true` AND a Zod `schema` is
476
+ * provided, hub derives a JSON Schema via `zod-to-json-schema`
477
+ * (optional peer-dep) and writes an encrypted snapshot to
478
+ * `_schemas/<collectionName>`. Re-runs on every open; hash-skip
479
+ * avoids write churn when the schema is unchanged.
480
+ *
481
+ * Default: `false`. Non-Zod Standard Schema validators receive a
482
+ * stub envelope flagging the kind without a JSON Schema body.
483
+ *
484
+ * @see docs/superpowers/specs/2026-05-22-schema-dump-design.md
485
+ */
486
+ persistJsonSchema?: boolean;
487
+ /**
488
+ * Ordered schema-update strategies. On a detected schema
489
+ * change, evaluated in order; the first non-`allow` decision wins.
490
+ * A `reject` is enforced at the write path (`put`/`delete` throw).
491
+ * Requires `persistJsonSchema: true` (detection needs the baseline).
492
+ */
493
+ schemaUpdate?: readonly SchemaUpdateStrategy[];
494
+ /** — declare the per-field schema for document attestation (issue side). */
495
+ attestation?: AttestationFieldSchema;
496
+ /**
497
+ * Per-collection history & tamper-ledger scoping. Overrides the
498
+ * vault-wide `history` config for THIS collection only (wholesale, not
499
+ * merged). `enabled: false` suppresses per-record snapshots for this
500
+ * collection; `ledger: false` excludes its writes from the vault-wide
501
+ * hash-chained tamper ledger. Lets you confine version snapshots +
502
+ * tamper-evidence to the few collections where they carry legal weight,
503
+ * without paying snapshot + ledger-entry-per-write across operational /
504
+ * derived collections. Defaults to the vault-wide `history` config.
505
+ */
506
+ historyConfig?: HistoryConfig;
507
+ /**
508
+ * Opt-in: keep the working set encrypted in RAM, decrypting on read (future phase).
509
+ * Default false — the working set is plaintext.
510
+ */
511
+ ramCiphertext?: boolean;
512
+ }): Collection<T, S, Q, M>;
513
+ /** Full-record handle for a satellite pair registered with `joined:` (spec #591). Narrow type — not a Collection. */
514
+ joined<T extends Record<string, unknown>>(name: string): JoinedHandle<T>;
515
+ /**
516
+ * Migrate an existing satellite's records onto per-record CEKs (#599) —
517
+ * unblocks R-S7 when a base gains forget coverage after its satellite was
518
+ * already declared without `perRecordKeys`. Call BEFORE re-declaring with
519
+ * `{ satelliteOf, perRecordKeys: true }` AND before this collection serves
520
+ * writes (unfenced walk — see {@link migrateSatelliteCek}); resumable.
521
+ */
522
+ migrateSatellitePerRecordKeys(satelliteName: string): Promise<{
523
+ migrated: number;
524
+ }>;
525
+ /**
526
+ * Await all background persisted-schema writes triggered by
527
+ * `collection({ persistJsonSchema: true })` calls on this vault.
528
+ * Used in tests; production code does not need to call this.
529
+ */
530
+ _drainPendingSchemaWrites(): Promise<void>;
531
+ /**
532
+ * Run a coordinated schema cutover. Drains pending writes, waits
533
+ * for the active client set to quiesce (the ack-barrier), applies every
534
+ * pending collection transform in bulk, bumps the vault schema generation,
535
+ * and clears the fence. Returns the count of collections migrated.
536
+ * `opts.onPoll` (tests) advances other clients between barrier checks.
537
+ */
538
+ runSchemaCutover(opts?: {
539
+ onPoll?: () => Promise<void>;
540
+ }): Promise<{
541
+ migrated: number;
542
+ }>;
543
+ /**
544
+ * Refresh a loaded collection's view of one document from a peer
545
+ * tab's broadcast. No-op when the collection isn't loaded in this tab
546
+ * (it will read fresh on next open). Mirrors `#runCutoverTransform`'s guard.
547
+ */
548
+ _applyRemoteWrite(collectionName: string, docId: string, action: 'put' | 'delete'): Promise<void>;
549
+ /** @internal #598: refresh cache entries a sync-applied write rewrote underneath us. No-op if not loaded this session.
550
+ * #650 Task 4 (#647): a reserved-lookup collection has no `Collection` instance — instead, refresh
551
+ * its already-warmed `LookupHandle._syncCache` (membership/altIndex/snapshot reads never see a
552
+ * stale verdict for a pulled vocabulary edit) and collect the touch into any open graph batch
553
+ * (the sync-apply wave-reachability seam Task 5's ref edges will use). No-op if never warmed. */
554
+ _invalidateSyncApplied(collection: string, id: string, action: 'put' | 'delete'): Promise<void>;
555
+ /** @internal #650 Task 4 (#647) — declared reserved-lookup collection names, for `SyncEngine.pull()`'s explicit prefix registry. */
556
+ _reservedLookupCollectionNames(): readonly string[];
557
+ /** @internal #653 — one-hop reserved-dict deps of `names`, for `SyncEngine`'s partial-sync
558
+ * filter expansion. Provably complete at one hop: `vault.collection()` refuses `_dict_*`
559
+ * names, so a dict can never itself declare lookup fields (no dict-of-dict chain). */
560
+ _reservedDictDepsOf(names: readonly string[]): readonly string[];
561
+ /** @internal #638 Task 4 — open a graph-dispatch touch batch (sync pull()/push()/cutover). */
562
+ _beginGraphBatch(): void;
563
+ /** @internal #638 Task 4 — `Collection._onRecordMutated`'s sync-apply/cutover/restore hook; a
564
+ * no-op when no batch is open (`_beginGraphBatch()` was never called for this call chain). */
565
+ _collectGraphTouch(collection: string, id: string): void;
566
+ /** @internal #640 — the sync-apply delete socket: `id`'s resolved rollup-parent intents. */
567
+ _collectGraphDelete(collection: string, id: string, intents: readonly RollupDeleteIntent[]): void;
568
+ /** @internal #638 Task 4 — close the open batch and run ONE dispatch wave over it. */
569
+ _flushGraphBatch(): Promise<void>;
570
+ /** @internal #638 Task 4 — cached-collection lookup for `runGraphDispatchWave` (`VaultLike`); never constructs. */
571
+ _getCollection(name: string): Collection<Record<string, unknown>> | undefined;
572
+ /** @internal #640 (#644 item 3) — `VaultLike._emit`: the wave's structured error surfacing. */
573
+ _emit(event: string, payload: unknown): void;
574
+ /**
575
+ * @internal #589 → #604. Physically remove delete markers with `_ts` strictly
576
+ * older than `before` (ISO timestamp), across `collections` (or all data
577
+ * collections). Returns the count removed.
578
+ *
579
+ * SAFETY: purging a marker RE-OPENS the #589 resurrection window for any peer
580
+ * offline since before the cutoff — never-GC is safe precisely because the marker
581
+ * is always present to win convergence. This is an operator-asserted safe-point
582
+ * ONLY; #604's period-close lifecycle is what earns that assertion. Do not call
583
+ * it on live/unsettled data.
584
+ *
585
+ * Emits no ledger/event itself — its callers (#604's `freezePeriod`, #615's
586
+ * `purgePeriodTargets`) own the audit record. The sweep body is shared via
587
+ * {@link _purgeMarkersOn}, which #615 also aims at push-only sync targets.
588
+ *
589
+ * Purges the local adapter only. Markers already pushed to the vault's
590
+ * push-only (`backup`/`archive`) sync targets are reclaimed by #615's
591
+ * `vault.purgePeriodTargets`; `sync-peer` targets are left untouched (purging
592
+ * them would re-open the resurrection window — the deferred half of #611).
593
+ */
594
+ _purgeDeleteMarkers(before: string, collections?: string[]): Promise<number>;
595
+ /**
596
+ * @internal #615. Sweep delete markers with `_ts < before` off ANY store
597
+ * (local adapter or a push-only sync target). Returns the count removed.
598
+ */
599
+ private _purgeMarkersOn;
600
+ /**
601
+ * @internal #613. Relocate this closed period's in-window records (those
602
+ * with `_ts < before`) from the hot store to the configured cold tier,
603
+ * via the routeStore's `compact({ before })`. Returns the count moved.
604
+ * Requires a `routeStore` with a cold route (the `coldArchival`
605
+ * capability); throws a clear error otherwise. Non-destructive — reads
606
+ * fall through to cold, so this does NOT re-open the #589 window.
607
+ */
608
+ _archiveClosedPeriod(before: string): Promise<number>;
609
+ /**
610
+ * @internal #615. Sweep delete markers with `_ts < before` off each of the
611
+ * vault's push-only sync targets, returning a per-target count. Skips
612
+ * `sync-peer` targets by construction (getPurgeableTargets yields only
613
+ * backup/archive). Never touches the local adapter.
614
+ */
615
+ _purgePeriodTargets(before: string): Promise<readonly {
616
+ label?: string;
617
+ role: 'backup' | 'archive';
618
+ purgedCount: number;
619
+ }[]>;
620
+ /**
621
+ * For a detected conflict: capture this tab's clobbered record,
622
+ * read the common ancestor from history, converge the cache to the store's
623
+ * authoritative value (the re-read), and return all three for the
624
+ * WriteConflict payload. Returns null when the collection isn't loaded.
625
+ */
626
+ _captureAndConverge(collectionName: string, docId: string, action: 'put' | 'delete', baseV: number): Promise<{
627
+ local: unknown;
628
+ remote: unknown;
629
+ base: unknown;
630
+ } | null>;
631
+ /** Recover a stuck cutover fence — reset to normal without bumping. */
632
+ abortSchemaCutover(): Promise<void>;
633
+ /** Current schema-cutover fence state for this vault. Thin live read. */
634
+ schemaFenceState(): Promise<FenceDoc>;
635
+ /** @internal Start heartbeat + fence watcher once a cutover is registered. Async since #553: FenceWatcher dynamic-imports on demand. */
636
+ _ensureFenceCoordination(): Promise<void>;
637
+ /** @internal Stop the heartbeat/watcher (vault lock/close). */
638
+ _stopFenceCoordination(): void;
639
+ /** @internal Best-effort flush of all open collections' persisted
640
+ * lexical indexes on close(). Called fire-and-forget from noydb.close().
641
+ * Correctness is backstopped by the fingerprint: a missed flush → rebuild on
642
+ * next load. Only collections with textIndexPersist have a flush(); others no-op. */
643
+ _flushSearchIndexes(): Promise<void>;
644
+ /** @internal Drive one heartbeat + watch cycle deterministically (tests). */
645
+ _fenceTick(): Promise<void>;
646
+ /**
647
+ * Validate i18nText fields on a `put()`. Called by Collection just
648
+ * before the adapter write, after schema validation. Throws
649
+ * `MissingTranslationError` when a required translation is absent.
650
+ *
651
+ * Delegates through the Via registry (#623) — a no-op only when i18n was
652
+ * never declared (mirrors the registry check below).
653
+ */
654
+ enforceI18nOnPut(collectionName: string, record: unknown): void;
655
+ /**
656
+ * Validate staticDict codes on a `put()`. For each `staticDict()`
657
+ * field, every stored code must be a declared key of the descriptor's
658
+ * table, else `UnknownDictCodeError`. Opt out per descriptor with
659
+ * `{ validateCodes: false }`.
660
+ *
661
+ * Delegates through the Via registry — see {@link enforceI18nOnPut}. The
662
+ * per-field validation itself lives in `via/lookup/registry.ts`
663
+ * (#650 Task 1 extraction), reached via `port/with/lookup-strategy.ts`.
664
+ */
665
+ enforceStaticDictOnPut(collectionName: string, record: unknown): void;
666
+ /**
667
+ * Open a dictionary by name. Returns a `DictionaryHandle` for CRUD
668
+ * operations on the `_dict_<name>/` reserved collection.
669
+ *
670
+ * The handle is cached — multiple calls with the same name return the
671
+ * same instance.
672
+ *
673
+ * @param name The dictionary name (e.g. `'status'` → `_dict_status/`).
674
+ * @param options Optional ACL overrides (default `writableBy: 'admin'`).
675
+ *
676
+ * @example
677
+ * ```ts
678
+ * await company.dictionary('status').putAll({
679
+ * draft: { en: 'Draft', th: 'ฉบับร่าง' },
680
+ * paid: { en: 'Paid', th: 'ชำระแล้ว' },
681
+ * })
682
+ * ```
683
+ */
684
+ dictionary<Keys extends string = string>(name: string, options?: DictionaryOptions): DictionaryHandle<Keys>;
685
+ /**
686
+ * Declare a managed many-to-many link set. Registers a
687
+ * `_links_<name>` junction between two endpoint collections; access its
688
+ * rows via `vault.links(name)`. Idempotent for an identical re-declaration;
689
+ * a conflicting one throws. See {@link links}.
690
+ *
691
+ * ```ts
692
+ * vault.link('saleLineLinks', { a: ref('saleLines'), b: ref('purchaseLines'), onDelete: 'cascade' })
693
+ * ```
694
+ *
695
+ * `a` / `b` accept either a collection name or a `ref(target)` descriptor
696
+ * (only its `target` is used — links manage their own integrity). `onDelete`
697
+ * governs what happens to link rows when an endpoint record is deleted
698
+ * (`'cascade'` default, `'strict'`, `'warn'`).
699
+ */
700
+ link(name: string, spec: {
701
+ a: string | RefDescriptor;
702
+ b: string | RefDescriptor;
703
+ onDelete?: LinkSpec['onDelete'];
704
+ }): void;
705
+ /**
706
+ * Access a declared link set. Throws if `name` was not first
707
+ * declared via {@link link}. Returns a cached {@link LinkSetHandle}:
708
+ * `connect(a, b, meta?)`, `disconnect(a, b)`, `has(a, b)`, `of(id)`, `list()`.
709
+ */
710
+ links(name: string): LinkSetHandle;
711
+ /**
712
+ * Build a `JoinableSource` for a dictKey field, for use in dict joins.
713
+ * Returns a source whose snapshot contains `{ key, labels, ...labels }`
714
+ * records — one per dictionary entry — keyed by the stable key. Returns
715
+ * `null` when `field` is not a dictKey in `leftCollection`.
716
+ *
717
+ * Body extracted to `via/lookup/registry.ts` (#650 Task 1) —
718
+ * reached via the `port/with/lookup-strategy.ts` seam. See that
719
+ * function's doc comment for the static-vs-dynamic-dict split and the
720
+ * cache-warming caveat.
721
+ */
722
+ resolveDictSource(leftCollection: string, field: string): JoinableSource | null;
723
+ /**
724
+ * Set or update the vault-default locale at runtime.
725
+ * Useful when the user switches their preferred language after opening
726
+ * the vault.
727
+ */
728
+ setLocale(locale: string | undefined): void;
729
+ /** Return the current vault-default locale. */
730
+ getLocale(): string | undefined;
731
+ /** Return the vault-level descriptive metadata (set-once at construction). */
732
+ getMeta(): VaultMeta | undefined;
733
+ /**
734
+ * The user id of the keyring backing this vault session. Useful for
735
+ * UI affordances ("you are alice"), audit trails, and orchestration
736
+ * composables that need to stamp records with the current actor.
737
+ */
738
+ get userId(): string;
739
+ /**
740
+ * The role of the keyring backing this vault session — one of
741
+ * `owner | admin | operator | viewer | client`. Useful for UI
742
+ * affordance gates and approval workflows that need to confirm
743
+ * the caller can perform a given action before attempting it.
744
+ */
745
+ get role(): Role;
746
+ /**
747
+ * Build keyring files for bundle recipients without persisting them
748
+ * to the source vault. Used by `writePod()` when the bundle
749
+ * is re-keyed for distinct recipients.
750
+ *
751
+ * Each recipient becomes its own `KeyringFile` sealed with that
752
+ * recipient's passphrase. The DEKs wrapped into each slot are
753
+ * exactly those the recipient's role + permissions justify, and
754
+ * never wider than the source keyring's own DEK set
755
+ * (privilege-escalation check).
756
+ *
757
+ * Returns a `Record<userId, KeyringFile>` ready to substitute for
758
+ * the `keyrings` field of a `vault.dump()` JSON. Adapter is never
759
+ * touched; the produced files exist only in the bundle bytes.
760
+ *
761
+ * @public
762
+ */
763
+ buildBundleRecipientKeyrings(recipients: readonly BundleRecipient[]): Promise<Record<string, KeyringFile>>;
764
+ /**
765
+ * Authorize an `@noy-db/as-*` export against the current keyring's
766
+ * `exportCapability`. Throws `ExportCapabilityError` if
767
+ * the invoking keyring is not authorised.
768
+ *
769
+ * `as-*` packages MUST call this before invoking the underlying
770
+ * export primitive (`exportStream()` / `writePod()` / …).
771
+ *
772
+ * - `assertCanExport('plaintext', 'xlsx')` — check plaintext tier
773
+ * for a specific format. Defaults to empty for every role; owner
774
+ * must positively grant.
775
+ * - `assertCanExport('bundle')` — check encrypted-bundle tier.
776
+ * Defaults to on for owner/admin, off for others.
777
+ *
778
+ * See `docs/patterns/as-exports.md` for the full policy.
779
+ */
780
+ assertCanExport(tier: 'plaintext', format: ExportFormat): void;
781
+ assertCanExport(tier: 'bundle'): void;
782
+ /**
783
+ * Authorize an `@noy-db/as-*` import against the current keyring's
784
+ * `importCapability` (issue ). Throws `ImportCapabilityError` if
785
+ * the invoking keyring is not authorised.
786
+ *
787
+ * `as-*` reader entry-points (`fromString` / `fromBytes`) MUST call
788
+ * this before parsing or building an `ImportPlan`.
789
+ *
790
+ * - `assertCanImport('plaintext', 'csv')` — check plaintext-tier
791
+ * import for a specific format. Default-closed for every role.
792
+ * - `assertCanImport('bundle')` — check `.noydb` bundle-import gate.
793
+ * Default-closed for every role, including owner — import is more
794
+ * dangerous than export (corrupts vs leaks).
795
+ *
796
+ * Owner who wants to import re-grants own keyring with
797
+ * `importCapability` set explicitly.
798
+ */
799
+ assertCanImport(tier: 'plaintext', format: ExportFormat): void;
800
+ assertCanImport(tier: 'bundle'): void;
801
+ /**
802
+ * Bulk blob extraction primitive.
803
+ *
804
+ * Returns an async-iterable handle over every blob attached to
805
+ * records in the vault. Single capability check (`plaintext/blob`)
806
+ * at handle creation; single audit entry to `_export_audit` before
807
+ * the first yield. Per-blob decryption happens lazily as the
808
+ * consumer pulls tuples.
809
+ *
810
+ * ```ts
811
+ * const handle = vault.exportBlobs({
812
+ * collections: ['invoiceScans'],
813
+ * where: (rec) => (rec as { clientId?: string }).clientId === 'c-123',
814
+ * })
815
+ * for await (const { bytes, meta, recordRef } of handle) {
816
+ * await uploadToColdStorage(bytes, recordRef)
817
+ * }
818
+ * ```
819
+ *
820
+ * @see `@noy-db/hub/store/export-blobs` for the full option surface.
821
+ */
822
+ /**
823
+ * Evict blob slots per the per-collection `blobFields` retention
824
+ * policy.
825
+ *
826
+ * Iterates every collection declared with `{ blobFields: {...} }`.
827
+ * For each record, checks every configured slot against its
828
+ * policy — `retainDays` (age-based TTL) and/or `evictWhen(record)`
829
+ * (predicate) — and evicts matching slots. Every eviction writes
830
+ * one entry to `_blob_eviction_audit` (actor + eTag + reason +
831
+ * timestamp, no plaintext). Consumer-scheduled; noy-db never runs
832
+ * this on its own.
833
+ *
834
+ * ```ts
835
+ * await vault.compact() // run full pass
836
+ * await vault.compact({ dryRun: true }) // preview counts
837
+ * await vault.compact({ maxEvictions: 1000 }) // cap batch
838
+ * ```
839
+ */
840
+ /**
841
+ * Atomic, gap-free numbering. `vault.sequence('invoice-2026').next()`
842
+ * returns 1, 2, 3, … with no gaps or duplicates under concurrency, via
843
+ * an optimistic-CAS counter at `_sequences/<name>`. Each name is an
844
+ * independent sequence.
845
+ *
846
+ * **Online-only:** `next()` throws `SequenceOfflineError` unless the
847
+ * store advertises `capabilities.casAtomic` — gap-free numbering cannot
848
+ * be serialized by an offline / non-CAS writer.
849
+ *
850
+ * ```ts
851
+ * const n = await vault.sequence('invoice-2026').next() // 1, then 2, …
852
+ * const cur = await vault.sequence('invoice-2026').peek() // current value, no allocation
853
+ * ```
854
+ *
855
+ * Pass a `format` to emit a serial string instead of a bare
856
+ * integer — `next()` then returns `{ serial, formatted }`. Per-partition
857
+ * reset is inherent (a new partition tuple starts at 1):
858
+ *
859
+ * ```ts
860
+ * const seq = vault.sequence('fatture', { partition: [2026], format: '{partition.0}/{seq:04}' })
861
+ * await seq.next() // { serial: 1, formatted: '2026/0001' }
862
+ * ```
863
+ */
864
+ sequence(series: string, opts: SequenceOptions & {
865
+ format: string;
866
+ }): FormattedSequenceHandle;
867
+ sequence(series: string, opts?: SequenceOptions): SequenceHandle;
868
+ /** @internal — lazily build the deferred-numbering engine with a cache-coherent stamp. */
869
+ private deferred;
870
+ /**
871
+ * Run a deferred-numbering pass for `series`: assign gap-free serials to all
872
+ * records whose store-commit-time interval has settled, in store-time order.
873
+ * Returns the assignments made. See {@link sequence} / `withDeferredNumbering`.
874
+ */
875
+ runNumberingPass(series: string): Promise<Assignment[]>;
876
+ compact(options?: CompactRunOptions): Promise<CompactionResult>;
877
+ /**
878
+ * Sweep records eligible by their collection's `archive` policy into the
879
+ * cold archive store. Relocation is envelope-level (no re-encryption) and
880
+ * bypasses guards + materialized-view dispatch, so issued/immutable
881
+ * records over a sealed period can be archived without recomputing
882
+ * finalized aggregates. A `legalHold` predicate blocks archival.
883
+ * Requires `archiveStrategy: withArchive({ store })` in `createNoydb`.
884
+ */
885
+ archive(options?: ArchiveRunOptions): Promise<ArchiveResult>;
886
+ /** Relocate one archived record back to the primary store. Returns false if it was not archived. */
887
+ restore(collection: string, id: string): Promise<boolean>;
888
+ /** List archived record ids for a collection (or all collections with an archive policy). */
889
+ listArchived(collection?: string): Promise<Array<{
890
+ collection: string;
891
+ id: string;
892
+ }>>;
893
+ private _archiveContext;
894
+ exportBlobs(options?: ExportBlobsOptions): ExportBlobsHandle;
895
+ issueAttestation(collectionName: string, id: string): Promise<{
896
+ docId: string;
897
+ qr: string;
898
+ keyId: string;
899
+ publicKeyB64: string;
900
+ }>;
901
+ getDocumentSigningPublicKey(): Promise<{
902
+ keyId: string;
903
+ publicKeyB64: string;
904
+ }>;
905
+ revokeAttestation(docId: string): Promise<void>;
906
+ unrevokeAttestation(docId: string): Promise<void>;
907
+ getRevokedDocIds(): Promise<string[]>;
908
+ publishRevocationList(): Promise<RevocationList>;
909
+ private writeExportAudit;
910
+ /**
911
+ * Read-only accessor for the invoking keyring's export capability,
912
+ * with role-based defaults resolved. Useful for UI affordances
913
+ * (grey out the export button if no capability) without throwing.
914
+ */
915
+ canExport(tier: 'plaintext', format: ExportFormat): boolean;
916
+ canExport(tier: 'bundle'): boolean;
917
+ /**
918
+ * Decrypt a single envelope using the per-collection DEK, returning
919
+ * the parsed plaintext record. Internal helper for bundle-pipeline
920
+ * plaintext filters — keeps DEK access encapsulated
921
+ * inside Vault so callers don't reach into private state.
922
+ *
923
+ * @internal
924
+ */
925
+ _decryptEnvelopeForBundleFilter(env: EncryptedEnvelope, collectionName: string): Promise<unknown>;
926
+ /**
927
+ * Read-only accessor for the invoking keyring's import capability
928
+ * (issue ). UI affordance — returns false in every default-closed
929
+ * case (every role with no explicit `importCapability` grant).
930
+ */
931
+ canImport(tier: 'plaintext', format: ExportFormat): boolean;
932
+ canImport(tier: 'bundle'): boolean;
933
+ /**
934
+ * Enforce strict outbound refs on a `put()`. Called by Collection
935
+ * just before it writes to the adapter. For every strict ref
936
+ * declared on the collection, check that the target id exists in
937
+ * the target collection; throw `RefIntegrityError` if not.
938
+ *
939
+ * `warn` and `cascade` modes don't affect put semantics — they're
940
+ * enforced at delete time or via `checkIntegrity()`.
941
+ */
942
+ enforceRefsOnPut(collectionName: string, record: unknown): Promise<void>;
943
+ /**
944
+ * Enforce inbound ref modes on a `delete()`. Called by Collection
945
+ * just before it deletes from the adapter. Walks every inbound
946
+ * ref that targets this (collection, id) and applies its mode
947
+ * (`strict` throws, `cascade` deletes referencing records, `warn`
948
+ * no-ops). Managed-link `onDelete` policy is applied in the same
949
+ * cascade guard. See `with-shape/links/vault-facade.ts`.
950
+ */
951
+ enforceRefsOnDelete(collectionName: string, id: string): Promise<void>;
952
+ /**
953
+ * Look up the `RefDescriptor` the left collection declared for a
954
+ * given field name. Returns `null` when the field has no ref
955
+ * declaration. Implements the `joinResolver.resolveRef` half of the
956
+ * structural interface that `Collection.query()` consumes.
957
+ */
958
+ resolveRef(leftCollection: string, field: string): RefDescriptor | null;
959
+ /**
960
+ * Resolve a right-side join source by target collection name.
961
+ * Returns `null` for unknown collections. Implements the
962
+ * `joinResolver.resolveSource` half of the structural interface.
963
+ * Only same-vault targets are resolvable — cross-vault joins are
964
+ * explicitly forbidden by the architecture.
965
+ */
966
+ resolveSource(collectionName: string): JoinableSource | null;
967
+ /**
968
+ * Walk every collection that has declared refs, load its records,
969
+ * and report any reference whose target id is missing (modes
970
+ * reported alongside each violation). Returns `{ violations: [...] }`
971
+ * instead of throwing — the point is to surface a list for display
972
+ * or repair, not to fail noisily.
973
+ */
974
+ checkIntegrity(): Promise<{
975
+ violations: RefViolation[];
976
+ }>;
977
+ /**
978
+ * Return this compartment's hash-chained audit log.
979
+ *
980
+ * The ledger is lazy-initialized on first access and cached for the
981
+ * lifetime of the Vault instance. Every LedgerStore instance
982
+ * shares the same adapter and DEK resolver, so `vault.ledger()`
983
+ * can be called repeatedly without performance cost.
984
+ *
985
+ * The LedgerStore itself is the public API: consumers call
986
+ * `.append()` (via Collection internals), `.head()`, `.verify()`,
987
+ * and `.entries({ from, to })`. See the LedgerStore docstring for
988
+ * the full surface and the concurrency caveats.
989
+ */
990
+ ledger(): LedgerStore;
991
+ /**
992
+ * Internal accessor — returns the LedgerStore if the history
993
+ * strategy is opted in, or `null` otherwise. Used by dump/restore/
994
+ * verifyBackupIntegrity and by Collection write paths that already
995
+ * gate on `if (this.ledger)`. The public `ledger()` accessor above
996
+ * throws on null; this one stays silent so the off-path no-ops.
997
+ */
998
+ private getLedgerOrNull;
999
+ /** @internal — add a subject→record ref to the encrypted subject index. */
1000
+ _addSubjectRef(subjectId: string, ref: SubjectRef): Promise<void>;
1001
+ /** @internal — drop a subject→record ref from the encrypted subject index. */
1002
+ _removeSubjectRef(subjectId: string, ref: SubjectRef): Promise<void>;
1003
+ /**
1004
+ * Rebuild the encrypted subject index from canonical records. The recovery
1005
+ * path for the documented read-modify-write race (RISK #3). Returns the
1006
+ * number of distinct subjects re-indexed.
1007
+ */
1008
+ rebuildSubjectIndex(): Promise<number>;
1009
+ /**
1010
+ * GDPR crypto-shred of a data subject. Consults the encrypted subject index and, per matching
1011
+ * record: rewrites the LIVE envelope to a tombstone (drops `_iv`/`_data`/`_cek`/`_det`), tombstones
1012
+ * every `_history` version, and fans out to derived residue via the graph (#622) — record-grain
1013
+ * artifacts (MV rows, derivation copies) ERASED, aggregate-grain rollups RECOMPUTED without the
1014
+ * forgotten contribution (skip+audit in a frozen period). The body/history become permanently
1015
+ * undecryptable while the collection DEK and every OTHER record stay intact. Then appends ONE
1016
+ * `op:'forget'` ledger entry whose `payloadHash` is `sha256Hex(subjectId)` — the chain still
1017
+ * `verify()`s, PROVING the subject existed and was erased without retaining any plaintext.
1018
+ *
1019
+ * Reports — but does not silently swallow — two completeness gaps: `unmigratedRecords` (a record
1020
+ * whose body was NOT yet migrated to a per-record CEK — still tombstoned, but pre-shred backups
1021
+ * stay decryptable; migrate, then re-forget) and `blobResidueCollections` (blob attachments, keyed
1022
+ * off a separate `_blob` DEK, out of scope here).
1023
+ *
1024
+ * @throws ForgetStrategyNotConfiguredError when no `withForgetCascade` was set.
1025
+ */
1026
+ forget(subjectId: string): Promise<ForgetResult>;
1027
+ /**
1028
+ * Seal ONE record's content-encryption key (CEK) to an `at-*` host so that
1029
+ * host — and only that host — can decrypt exactly that record, with no
1030
+ * access to the vault DEK and no ability to read any other record.
1031
+ *
1032
+ * The grantor (this caller, who holds the collection DEK) reads the record's
1033
+ * live `_cek`, unwraps it under the collection DEK, exports the raw CEK
1034
+ * bytes, builds a {@link SealedCekBinding} `{collection, id, cek, expiresAt}`,
1035
+ * seals that binding for the recipient host via the host's published hint,
1036
+ * and persists a thin {@link SealedCekDeliveryEnvelope} at
1037
+ * `_sealed_cek/<collection>/<id>/<pid>`. The binding (not the delivery
1038
+ * envelope) is the security boundary: the host re-verifies `{collection, id}`
1039
+ * and `expiresAt` from inside the sealed payload.
1040
+ *
1041
+ * Only works on a `perRecordKeys` record — a legacy record has no `_cek` to
1042
+ * seal (its body is under the shared collection DEK, which is never exposed
1043
+ * by sealing) → {@link RecordCekNotFoundError}.
1044
+ *
1045
+ * @param collection Collection holding the record.
1046
+ * @param id Record id.
1047
+ * @param hostSealer The recipient host's {@link RecipientSealer}.
1048
+ * @param opts.expiresAt REQUIRED authoritative expiry (ISO 8601), sealed into
1049
+ * the binding the host verifies.
1050
+ * @returns `{ pid, envelopeKey }` — the host provider id and the
1051
+ * `<collection>/<id>/<pid>` key the delivery envelope was written under.
1052
+ */
1053
+ sealRecordToHost(collection: string, id: string, hostSealer: RecipientSealer, opts: {
1054
+ expiresAt: string;
1055
+ }): Promise<{
1056
+ pid: string;
1057
+ envelopeKey: string;
1058
+ }>;
1059
+ /**
1060
+ * Revoke a sealed-CEK grant. **Default is SOFT**: deletes the `pid` delivery
1061
+ * envelope, but a host that already fetched it KEEPS decrypt capability (stops
1062
+ * new fetches, not a cryptographic cutoff). Pass **`{ hard: true }`** to rotate
1063
+ * the record CEK ({@link rotateRecordCek}) so any prior sealed CEK can no
1064
+ * longer open the record. See `revokeSealedRecord` in `record-keys/sealing.ts`.
1065
+ */
1066
+ revokeSealedRecord(collection: string, id: string, pid: string, opts?: {
1067
+ hard?: boolean;
1068
+ }): Promise<void>;
1069
+ /**
1070
+ * HARD-rotate a record's CEK: decrypt the live body under the old CEK,
1071
+ * re-encrypt it under a freshly-minted CEK, write the new live envelope, evict
1072
+ * the in-memory caches, and delete EVERY sealed-CEK delivery envelope for the
1073
+ * record. After this, any host holding a previously-sealed CEK can still
1074
+ * decrypt PRE-rotation history versions (they keep their old `_cek`) but NOT
1075
+ * the rotated live record (its body is under the new CEK → the old CEK fails
1076
+ * the AES-GCM auth tag → `TamperedError`). That asymmetry IS the revocation:
1077
+ * old grants lose the live record.
1078
+ *
1079
+ * Administrative path — bypasses `Collection.put` deliberately (no guards, no
1080
+ * history snapshot, no materialized-view refresh): rotation is a key-rotation
1081
+ * operation, not a business write, and must not version-bump history (which
1082
+ * would re-encrypt the prior version under the NEW CEK and defeat the point).
1083
+ *
1084
+ * @throws {@link RecordCekNotFoundError} if the record is missing or has no `_cek`.
1085
+ */
1086
+ rotateRecordCek(collection: string, id: string): Promise<void>;
1087
+ /**
1088
+ * Build the {@link SealingContext} the record-keys grantor functions need:
1089
+ * the vault-bound adapter, DEK resolver, actor, and the dual-cache eviction
1090
+ * `rotateRecordCek` performs (per-record CEK cache + decrypted-record cache).
1091
+ */
1092
+ private _sealingContext;
1093
+ /**
1094
+ * @internal — called by `Noydb.openVault` after construction.
1095
+ * Dynamic-imports `GuardRegistry` + `ReadOnlyVaultFacade` and seeds
1096
+ * the registry with the supplied strategy handles. No-op when the
1097
+ * handles array is empty — keeps the guard service out of the
1098
+ * floor bundle for consumers that don't use guards.
1099
+ *
1100
+ * The read-only facade is eagerly instantiated here so the sync
1101
+ * accessor `_getReadOnlyFacade()` (called from the tx amendment
1102
+ * runner) stays synchronous.
1103
+ */
1104
+ _initGuards(handles: ReadonlyArray<GuardStrategyHandleAny>): Promise<void>;
1105
+ /**
1106
+ * @internal — The gate handler in Noydb.#registerGuardGate calls into
1107
+ * this. Returns `null` for vaults that never registered any guard
1108
+ * strategy. Callers MUST gate on null.
1109
+ */
1110
+ _getGuardRegistry(): GuardRegistry | null;
1111
+ /**
1112
+ * @internal — called by `Noydb.openVault` after construction.
1113
+ * Dynamic-imports `DerivationRegistry` and registers the supplied
1114
+ * derivation strategies (async because `strategyHash` computation
1115
+ * goes through `crypto.subtle.digest`). No-op when the handles
1116
+ * array is empty — keeps the derivation service out of the floor
1117
+ * bundle for consumers that don't use derivations. Throws
1118
+ * `DerivationCycleError` if a cycle is detected after registration.
1119
+ */
1120
+ _initDerivations(handles: ReadonlyArray<DerivationStrategyHandle>): Promise<void>;
1121
+ /**
1122
+ * @internal — consumed by `Collection.put` at write-time. Returns
1123
+ * `null` for vaults that never registered any derivation strategy.
1124
+ */
1125
+ _getDerivationRegistry(): DerivationRegistry | null;
1126
+ /**
1127
+ * @internal — called by `Noydb.openVault` after collections are
1128
+ * wired. Dynamic-imports `MaterializedViewRegistry`, registers each
1129
+ * MV spec (which invokes its `query()` once for dependency
1130
+ * analysis), then runs the unified cycle detection across the MV +
1131
+ * derivation graphs. No-op when the handles array is empty — keeps
1132
+ * the MV service out of the floor bundle (mirrors the derivation lazy-import pattern).
1133
+ * Throws `MaterializedViewCycleError` if a cycle is detected.
1134
+ */
1135
+ _initMaterializedViews(handles: ReadonlyArray<MaterializedViewStrategyHandle>): Promise<void>;
1136
+ /**
1137
+ * @internal — consumed by `Collection.put` at write-time. Returns
1138
+ * `null` for vaults that never registered any MV strategy.
1139
+ */
1140
+ _getMaterializedViewRegistry(): MaterializedViewRegistry | null;
1141
+ /**
1142
+ * @internal — called by `Noydb.openVault` after MVs are wired.
1143
+ * Dynamic-imports `OverlayedViewRegistry`, registers each spec,
1144
+ * validates against the MV registry for name/base/overlay collisions.
1145
+ * Throws on validation failure.
1146
+ */
1147
+ _initOverlayedViews(handles: ReadonlyArray<OverlayedViewStrategyHandle>): Promise<void>;
1148
+ /**
1149
+ * @internal — consumed by `Vault.collection()`. Returns `null` for
1150
+ * vaults with no overlays registered.
1151
+ */
1152
+ _getOverlayedViewRegistry(): OverlayedViewRegistry | null;
1153
+ /** @internal — ctx for `putDerivedOutput`'s frozen-period skip+audit (#638 Task 5). */
1154
+ private _dispatchCtx;
1155
+ /**
1156
+ * Manual re-materialize for a single registered MV (`refresh: 'manual'` consumers,
1157
+ * stale-bit recovery on vault reopen, bulk-recompute escape hatch after a strategy
1158
+ * change). Returns `{ written, deleted, failed }` (`deleted` always 0 without
1159
+ * tombstoning). Throws if `name` is not a registered MV.
1160
+ */
1161
+ refreshView(name: string): Promise<{
1162
+ written: number;
1163
+ deleted: number;
1164
+ failed: number;
1165
+ }>;
1166
+ /**
1167
+ * Re-derive every record in the named source collection (useful after a strategy
1168
+ * change to bring previously-derived records up-to-date). Sequential in v1.
1169
+ */
1170
+ deriveAll(sourceCollection: string): Promise<{
1171
+ derived: number;
1172
+ failed: number;
1173
+ skippedFrozen: number;
1174
+ }>;
1175
+ /**
1176
+ * @internal — exposed for `runTransaction({ amendment: true })` so
1177
+ * the amendment invariant runner can pass the SAME read-only vault
1178
+ * facade that the gate handler in Noydb.#registerGuardGate uses.
1179
+ * Eagerly instantiated by `_initGuards()` so this accessor stays
1180
+ * synchronous; returns `null` for vaults that never registered any
1181
+ * guard (amendments require at least one guard, so the caller should
1182
+ * never see null).
1183
+ */
1184
+ _getReadOnlyFacade(): ReadOnlyVaultFacade | null;
1185
+ /**
1186
+ * Internal lazy-allocator for the derivation read-only facade
1187
+ * (`layer:'derivation'`). Used as a defensive fallback; in practice
1188
+ * `_initDerivations()` eagerly instantiates this, so the lazy path is
1189
+ * a no-op.
1190
+ */
1191
+ private _ensureReadOnlyFacade;
1192
+ /**
1193
+ * @internal — exposed for `runTransaction({ amendment: true })`
1194
+ * to append the structured `op: 'amendment'` audit entry without
1195
+ * dragging this private accessor onto the public surface or
1196
+ * forcing the tx executor to depend on the history-strategy
1197
+ * shape directly. Returns `null` when no history strategy is
1198
+ * configured, in which case the amendment commits silently
1199
+ * (the records still write through; only the multi-record
1200
+ * audit summary is skipped).
1201
+ */
1202
+ _getLedgerOrNull(): LedgerStore | null;
1203
+ /**
1204
+ * Return a read-only view of this vault as it existed at
1205
+ * `timestamp`. Time-machine queries are reconstructed from the
1206
+ * per-version history snapshots persisted by every `put()`, then
1207
+ * cross-checked against the ledger for deletes that happened
1208
+ * between the snapshot and the target timestamp.
1209
+ *
1210
+ * ```ts
1211
+ * const q1End = vault.at('2026-03-31T23:59:59Z')
1212
+ * const invoice = await q1End.collection<Invoice>('invoices').get('inv-001')
1213
+ * // → the record as it stood at the close of Q1 2026
1214
+ * ```
1215
+ *
1216
+ * `timestamp` accepts an ISO-8601 string or a `Date`. Time-machine
1217
+ * views are read-only — writes throw {@link ReadOnlyAtInstantError}.
1218
+ * Accuracy bounded by history retention: if `historyConfig.maxVersions`
1219
+ * pruned earlier versions, queries before the oldest retained
1220
+ * snapshot return null even for records that existed.
1221
+ *
1222
+ *.
1223
+ */
1224
+ at(timestamp: string | Date): VaultInstant;
1225
+ /**
1226
+ * Return a read-only "shadow" view of this vault. Every read method
1227
+ * on the returned {@link VaultFrame} delegates to the underlying
1228
+ * live collection; every write method throws
1229
+ * {@link ReadOnlyFrameError}.
1230
+ *
1231
+ * ```ts
1232
+ * const presentation = vault.frame()
1233
+ * const invoices = await presentation.collection<Invoice>('invoices').list()
1234
+ * ```
1235
+ *
1236
+ * Use for screen-sharing a live vault, demo mode, or compliance
1237
+ * review where the reviewer should not be able to edit. Writes are
1238
+ * blocked at the JavaScript layer — the keyring DEKs are unchanged,
1239
+ * so this is **not** a cryptographic security boundary against a
1240
+ * hostile caller in the same process. See {@link VaultFrame} for
1241
+ * the full caveat.
1242
+ *
1243
+ *.
1244
+ */
1245
+ frame(): VaultFrame;
1246
+ /** Credential-broker handle (#479); `NO_BROKER` throws unless `brokerStrategy: withBroker(config)` was passed to createNoydb(). */
1247
+ broker(): CredentialBrokerHandle;
1248
+ /**
1249
+ * Run `fn` under a consent scope. Every `get` / `put` / `delete`
1250
+ * that happens inside `fn` writes one entry to `_consent_audit`
1251
+ * with the supplied `purpose` and `consentHash`. Outside a scope,
1252
+ * no entries are written — consent logging is opt-in by design.
1253
+ *
1254
+ * ```ts
1255
+ * await vault.withConsent(
1256
+ * { purpose: 'quarterly-review', consentHash: '7f3a...' },
1257
+ * async () => {
1258
+ * const invoices = await vault.collection<Invoice>('invoices').list()
1259
+ * return invoices
1260
+ * },
1261
+ * )
1262
+ * ```
1263
+ *
1264
+ * The scope is a single slot on this Vault instance — two
1265
+ * concurrent `withConsent` calls stomp each other. Use separate
1266
+ * Vault instances (or an external `AsyncLocalStorage` shim) for
1267
+ * per-flight scoping.
1268
+ *
1269
+ *.
1270
+ */
1271
+ withConsent<T>(ctx: ConsentContext, fn: () => Promise<T>): Promise<T>;
1272
+ /**
1273
+ * Query the consent-audit log. Returns every entry matching the
1274
+ * filter, newest-first isn't enforced — entries carry ULID ids so
1275
+ * sorting by id is insertion-order stable. Caller may sort further.
1276
+ *
1277
+ *.
1278
+ */
1279
+ consentAudit(filter?: ConsentAuditFilter): Promise<ConsentAuditEntry[]>;
1280
+ /**
1281
+ * Called by Collection after every access when a consent scope is
1282
+ * active. Internal — not part of the public API.
1283
+ *
1284
+ * @internal
1285
+ */
1286
+ _logConsent(op: ConsentOp, collection: string, recordId: string): Promise<void>;
1287
+ /**
1288
+ * Subscribe to cross-tier access events. The callback fires every
1289
+ * time a record at a tier above the caller's inherent clearance is
1290
+ * read, written, elevated, or demoted successfully via this vault.
1291
+ * Returns an unsubscribe function.
1292
+ */
1293
+ onCrossTierAccess(listener: (event: CrossTierAccessEvent) => void): () => void;
1294
+ private emitCrossTier;
1295
+ /**
1296
+ * issue a time-boxed cross-tier delegation. Writes an
1297
+ * encrypted envelope to the reserved `_delegations` collection that
1298
+ * the target user's runtime will pick up next time they open the
1299
+ * vault.
1300
+ *
1301
+ * Caller must hold the tier DEK for the requested tier and
1302
+ * collection.
1303
+ */
1304
+ delegate(opts: IssueDelegationOptions): Promise<DelegationToken>;
1305
+ /**
1306
+ * revoke an issued delegation by id. Safe to call even
1307
+ * if the id does not exist.
1308
+ */
1309
+ revokeDelegation(id: string): Promise<void>;
1310
+ /**
1311
+ * Briefly elevate this vault to a higher tier and return a scoped
1312
+ * handle whose writes land at that tier. Reads on the original
1313
+ * vault continue at the caller's inherent tier; only the returned
1314
+ * handle is privileged. Auto-reverts when `release()` is called or
1315
+ * `ttlMs` elapses, whichever comes first.
1316
+ *
1317
+ * Capability semantics:
1318
+ * - The keyring must already carry a wrap for the target tier on
1319
+ * at least one collection (or be `owner` / `admin`, who can
1320
+ * auto-mint). Otherwise throws {@link TierNotGrantedError}.
1321
+ * - Per-collection capability gates (`canExportPlaintext`,
1322
+ * `canExportBundle`) are NOT bypassed — elevation is a tier
1323
+ * projection, not a privilege escalation path.
1324
+ * - Only one elevation can be active per vault at a time.
1325
+ * Calling `elevate(...)` while another is live throws
1326
+ * {@link AlreadyElevatedError}.
1327
+ *
1328
+ * Audit:
1329
+ * - One `_elevation_audit` envelope is written at start with
1330
+ * `{ id, actor, tier, reason, ttlMs, startedAt, expiresAt }`.
1331
+ * - Each write through the elevated handle additionally fires a
1332
+ * {@link CrossTierAccessEvent} with `authorization: 'elevation'`,
1333
+ * stamped with `reason` and `elevatedFrom`.
1334
+ */
1335
+ elevate(tier: number, options: {
1336
+ ttlMs: number;
1337
+ reason: string;
1338
+ }): Promise<ElevatedHandle>;
1339
+ /**
1340
+ * Internal — invoked by an `ElevatedHandle.collection().put()` call.
1341
+ * Routes through the existing `Collection.putAtTier` code path with
1342
+ * the elevation context attached so the cross-tier event reflects
1343
+ * the right authorization class.
1344
+ */
1345
+ _elevatedPut<T>(collectionName: string, id: string, record: T, tier: number, reason: string): Promise<void>;
1346
+ private writeElevationAudit;
1347
+ /**
1348
+ * low-level escape hatch used by `@noy-db/on-magic-link`
1349
+ * to persist a magic-link-bound grant after the auth package has
1350
+ * derived the content key + KEK from `(serverSecret, token, vault)`.
1351
+ *
1352
+ * Callers outside of `@noy-db/on-magic-link` should use
1353
+ * `issueMagicLinkDelegation()` from that package instead — it handles
1354
+ * the HKDF derivation, record-id composition, and batch logic so the
1355
+ * grantor doesn't touch this method directly.
1356
+ */
1357
+ writeMagicLinkGrant(contentKey: EnclaveKey, grantKek: EnclaveKey, recordId: string, opts: IssueMagicLinkGrantOptions): Promise<MagicLinkGrantRecord>;
1358
+ /**
1359
+ * Close an accounting period. After this call every record whose
1360
+ * envelope `_ts` is at or before `endDate` is write-locked: further
1361
+ * `put` or `delete` calls against such records throw
1362
+ * {@link PeriodClosedError}. New records (with fresh timestamps)
1363
+ * remain freely writable, and records last written AFTER `endDate`
1364
+ * are unaffected.
1365
+ *
1366
+ * Each closure writes a `PeriodRecord` to the reserved `_periods`
1367
+ * collection. The record carries the hash of the prior period's
1368
+ * record, so a tamper with any closure breaks the chain visible to
1369
+ * {@link listPeriods} + `vault.ledger().verify()`.
1370
+ *
1371
+ * Correctness is tied to the `_ts` field the hub assigns on every
1372
+ * write. Backdating records by editing the envelope directly is
1373
+ * outside the threat model — see SPEC § zero-knowledge envelopes.
1374
+ *
1375
+ *.
1376
+ */
1377
+ closePeriod(options: ClosePeriodOptions): Promise<PeriodRecord>;
1378
+ /**
1379
+ * Open a new period that carries forward from a prior closed one
1380
+ *. The `carryForward` callback receives a read-only
1381
+ * {@link VaultInstant} view anchored at the prior period's
1382
+ * `endDate` — use it to compute opening balances, closing-trial
1383
+ * snapshots, or any aggregate the new period should inherit. The
1384
+ * returned `{ [collection]: { [id]: record } }` map is written
1385
+ * before the new `PeriodRecord` lands, so the opening entries
1386
+ * materialise with fresh `_ts` values that fall outside every
1387
+ * closed period (the guard lets them through).
1388
+ *
1389
+ * The new period is stored with `kind: 'opened'` and hash-chained
1390
+ * to the same chain the close calls build — `listPeriods()` sees
1391
+ * both closed and opened entries in `closedAt` order.
1392
+ */
1393
+ openPeriod<TCollections extends Record<string, Record<string, unknown>>>(options: OpenPeriodOptions<TCollections>): Promise<PeriodRecord>;
1394
+ /** Return every closed / opened period in `closedAt` order. */
1395
+ listPeriods(): Promise<readonly PeriodRecord[]>;
1396
+ /** Look up a single period by name. Returns `null` if not found. */
1397
+ getPeriod(name: string): Promise<PeriodRecord | null>;
1398
+ /**
1399
+ * Freeze a closed period (#604): purges in-window delete markers and
1400
+ * records a `_period_freezes` companion, never mutating the chained
1401
+ * `_periods` record. Idempotent. Purges the LOCAL adapter only — a
1402
+ * synced target's markers survive there and re-import on pull (benign),
1403
+ * and purging re-opens the #589 resurrection window for a peer offline
1404
+ * since before the cutoff (see periods.ts's "Freeze" section).
1405
+ */
1406
+ freezePeriod(name: string): Promise<PeriodRecord>;
1407
+ /**
1408
+ * Archive a closed period (#613): relocates its in-window records from the
1409
+ * hot store to the configured cold tier (via the routeStore's cold route),
1410
+ * recording a `_period_archives` companion + ledger entry, never mutating
1411
+ * the chained `_periods` record. Non-destructive (reads fall through to
1412
+ * cold) and idempotent. Requires a routeStore with a cold route.
1413
+ */
1414
+ archivePeriod(name: string): Promise<PeriodRecord>;
1415
+ /**
1416
+ * Target-purge a closed+frozen period (#615): sweeps delete markers off the
1417
+ * vault's push-only sync targets (`backup`/`archive`), recording a
1418
+ * `_period_target_purges` companion + ledger entry, never mutating the chained
1419
+ * `_periods` record. `sync-peer` targets are skipped. Requires the period be
1420
+ * frozen first. Idempotent; a vault with no push-only targets writes no
1421
+ * companion and is re-runnable.
1422
+ */
1423
+ purgePeriodTargets(name: string): Promise<PeriodRecord>;
1424
+ /** @internal — called by the gate bus before put/delete. */
1425
+ _assertTsWritable(existing: {
1426
+ ts: string | null;
1427
+ record: Record<string, unknown> | null;
1428
+ } | null, incoming: Record<string, unknown> | null): Promise<void>;
1429
+ /** List all collection names in this vault. */
1430
+ collections(): Promise<string[]>;
1431
+ /**
1432
+ * Emit a structured introspection snapshot of this vault — vault name,
1433
+ * service opt-in matrix, collections + their fields, materialized
1434
+ * views, overlay views, derivations. With `withStats: true`, walks
1435
+ * every collection's envelopes to compute record counts, byte totals,
1436
+ * and oldest/newest timestamps.
1437
+ *
1438
+ * Consumed by the `noydb describe` CLI to produce human-readable
1439
+ * audit YAML/JSON from a `.noydb` bundle.
1440
+ *
1441
+ * Field provenance:
1442
+ * - `persisted`: read from `_schemas/<col>` envelope (Route B opt-in)
1443
+ * - `live-validator`: derived in-process from a Zod schema attached
1444
+ * to the live `Collection`
1445
+ * - `sampled`: inferred from decrypted records (deferred to a follow-up)
1446
+ * - `unknown`: no schema info available
1447
+ *
1448
+ * @see docs/superpowers/specs/2026-05-22-schema-dump-design.md
1449
+ */
1450
+ dumpSchema(opts?: DumpSchemaOptions): Promise<VaultSchemaSnapshot>;
1451
+ /**
1452
+ * Lightweight read of the vault's registered schema: collections
1453
+ * (+ doc counts), guards, materialized views, schema-update strategies,
1454
+ * and the unlocked user's grants. Cheap — one `adapter.list` per
1455
+ * collection, no decryption. For a full snapshot + stats use dumpSchema().
1456
+ * Post-unlock by construction (a Vault only exists with an unlocked keyring).
1457
+ */
1458
+ introspect(): Promise<SchemaIntrospection>;
1459
+ /**
1460
+ * Internal accessor for {@link dumpVaultSchema}. Exposes the structural
1461
+ * state the walker needs (collection cache, registries, ref registry,
1462
+ * adapter) without widening the public Vault surface.
1463
+ *
1464
+ * @internal
1465
+ */
1466
+ _introspectState(): VaultIntrospectState;
1467
+ /**
1468
+ * Return the stable opaque bundle handle for this vault,
1469
+ * generating and persisting a fresh ULID on first call.
1470
+ *
1471
+ * used by `writePod()` to identify the
1472
+ * vault in the unencrypted bundle header without
1473
+ * exposing the vault name. The handle is persisted in
1474
+ * the reserved `_meta` internal collection so subsequent
1475
+ * exports of the same vault produce the same handle —
1476
+ * bundle adapters (Drive, Dropbox, iCloud) will use it
1477
+ * as their primary key.
1478
+ *
1479
+ * **Storage path:** the handle is written via the adapter
1480
+ * directly with collection name `_meta` and id `handle`. The
1481
+ * envelope's `_data` field contains a plain JSON
1482
+ * `{ handle: '...' }` payload — the handle is opaque, doesn't
1483
+ * need encryption, and the bundle header exposes the same
1484
+ * value anyway. This mirrors the storage approach `_keyring`
1485
+ * uses for its plain-JSON wrapped-DEK envelopes (also bypasses
1486
+ * the AES-GCM layer; the `_iv` field is left empty).
1487
+ *
1488
+ * **Cross-process stability:** the handle survives process
1489
+ * restarts because it's persisted on the adapter, not just
1490
+ * cached in memory. A new Vault instance opened on the
1491
+ * same adapter sees the same `_meta/handle` envelope and
1492
+ * returns the same ULID.
1493
+ *
1494
+ * **Round-trip after restore:** the receiving vault of a
1495
+ * `load()` call generates its OWN handle on first export. The
1496
+ * dump body does not include `_meta`, because handle stability
1497
+ * is per-vault-instance, not per-vault-content. Two
1498
+ * separate restorations of the same backup produce two
1499
+ * distinct handles, which is the right behavior — they're
1500
+ * separate vault instances now.
1501
+ */
1502
+ getBundleHandle(): Promise<string>;
1503
+ /**
1504
+ * Read the owner-curated public envelope for this vault (or
1505
+ * `undefined` if none is persisted). The envelope lives in
1506
+ * `_meta/public-envelope` as plaintext — readable without any KEK
1507
+ * — so `getBundleHandle`-style callers can label a vault before
1508
+ * unlock.
1509
+ *
1510
+ * Mirrors `Noydb.getPublicEnvelope(vault, opts)` but scoped to a
1511
+ * single, already-opened `Vault` instance so the
1512
+ * bundle writer can snapshot it without holding a `Noydb` reference.
1513
+ *
1514
+ * @see https://github.com/vLannaAi/noy-db-docs/blob/main/content/docs/services/public-envelope.md
1515
+ */
1516
+ getPublicEnvelope(opts?: {
1517
+ readonly locale?: string;
1518
+ }): Promise<PublicEnvelope | undefined>;
1519
+ /**
1520
+ * Dump vault as a verifiable encrypted JSON backup string.
1521
+ *
1522
+ * backups embed the current ledger head and the full
1523
+ * `_ledger` + `_ledger_deltas` internal collections so the
1524
+ * receiver can run `verifyBackupIntegrity()` after `load()` and
1525
+ * detect any tampering between dump and restore. Backups produced
1526
+ * without a ledger (older formats or hub instances built without
1527
+ * the history strategy) skip the integrity check with a warning —
1528
+ * both modes round-trip cleanly.
1529
+ */
1530
+ dump(): Promise<string>;
1531
+ /**
1532
+ * Build the `BackupContext` the extracted backup module (`with-pod/backup.ts`)
1533
+ * binds to: the read paths + the post-load mutation seams (`reloadKeyring`,
1534
+ * collection-cache clear, ledger-store reset) that `load()` performs on this
1535
+ * Vault's private state.
1536
+ */
1537
+ private backupContext;
1538
+ /**
1539
+ * Restore a vault from a verifiable backup.
1540
+ *
1541
+ * After loading, runs `verifyBackupIntegrity()` to confirm:
1542
+ * 1. The hash chain is intact (no `prevHash` mismatches)
1543
+ * 2. The chain head matches the embedded `ledgerHead.hash`
1544
+ * from the backup
1545
+ * 3. Every data envelope's `payloadHash` matches the
1546
+ * corresponding ledger entry — i.e. nobody swapped
1547
+ * ciphertext between dump and restore
1548
+ *
1549
+ * On any failure, throws `BackupLedgerError` (chain or head
1550
+ * mismatch) or `BackupCorruptedError` (data envelope mismatch).
1551
+ * The vault state on the adapter has already been written
1552
+ * by the time we throw, so the caller is responsible for either
1553
+ * accepting the suspect state or wiping it and trying a different
1554
+ * backup.
1555
+ *
1556
+ * Legacy backups (no `ledgerHead` field, no `_internal`) load
1557
+ * with a console warning and skip the integrity check entirely
1558
+ * — there's no chain to verify against.
1559
+ */
1560
+ load(backupJson: string): Promise<void>;
1561
+ /**
1562
+ * End-to-end backup integrity check. Runs both:
1563
+ *
1564
+ * 1. `ledger.verify()` — walks the hash chain and confirms
1565
+ * every `prevHash` matches the recomputed hash of its
1566
+ * predecessor.
1567
+ *
1568
+ * 2. **Data envelope cross-check** — for every (collection, id)
1569
+ * that has a current value, find the most recent ledger
1570
+ * entry recording a `put` for that pair, recompute the
1571
+ * sha256 of the stored envelope's `_data`, and compare to
1572
+ * the entry's `payloadHash`. Any mismatch means an
1573
+ * out-of-band write modified the data without updating the
1574
+ * ledger.
1575
+ *
1576
+ * Returns a discriminated union so callers can handle the two
1577
+ * failure modes differently:
1578
+ * - `{ ok: true, head, length }` — chain verified and all
1579
+ * data matches; safe to use.
1580
+ * - `{ ok: false, kind: 'chain', divergedAt, message }` — the
1581
+ * chain itself is broken at the given index.
1582
+ * - `{ ok: false, kind: 'data', collection, id, message }` —
1583
+ * a specific data envelope doesn't match its ledger entry.
1584
+ *
1585
+ * This method is exposed so users can call it any time, not just
1586
+ * during `load()`. A scheduled background check is the simplest
1587
+ * way to detect tampering of an in-place vault.
1588
+ */
1589
+ verifyBackupIntegrity(): Promise<import("../with-pod/backup.js").VerifyBackupResult>;
1590
+ /**
1591
+ * Stream every collection in this vault as decrypted, ACL-scoped
1592
+ * chunks.
1593
+ *
1594
+ * ⚠ **This method decrypts your records.** noy-db's threat model assumes
1595
+ * that records on disk are encrypted; the values yielded here are
1596
+ * plaintext. The consumer is responsible for ensuring the yielded data
1597
+ * is handled in a way that matches the data's sensitivity. If your goal
1598
+ * is encrypted backup or transport between noy-db instances, use
1599
+ * `dump()` instead — it produces a tamper-evident encrypted envelope and
1600
+ * never exposes plaintext.
1601
+ *
1602
+ * ## Behavior
1603
+ *
1604
+ * - **ACL-scoped.** Collections the calling principal cannot read are
1605
+ * silently skipped (same rule as `Collection.list()`). An operator
1606
+ * with `{ invoices: 'rw', clients: 'ro' }` permissions on a
1607
+ * five-collection vault exports only `invoices` and `clients`,
1608
+ * with no error on the others.
1609
+ * - **Streaming.** Returns an `AsyncIterableIterator` so consumers can
1610
+ * process chunks as they arrive without holding the full export in
1611
+ * memory. Note: the underlying adapter call (`loadAll`) is still a
1612
+ * single bulk read — the streaming benefit is on the *output* side.
1613
+ * True per-record adapter streaming arrives with the query DSL.
1614
+ * - **Schema + refs surfaced** as metadata on every chunk so downstream
1615
+ * serializers (`@noy-db/as-csv`, `@noy-db/as-xlsx`, custom
1616
+ * exporters) can produce schema-aware output without reaching into
1617
+ * collection internals.
1618
+ * - **Internal collections filtered.** `_ledger`, `_keyring`, etc. are
1619
+ * never yielded — they're noy-db's own bookkeeping and have no value
1620
+ * in a plaintext export. Use `dump()` for full backup including
1621
+ * internal collections.
1622
+ *
1623
+ * ## Composition
1624
+ *
1625
+ * Once cross-vault queries land, fanning this out across
1626
+ * every vault the caller can unlock is `queryAcross(ids, c =>
1627
+ * c.exportStream())` — no new primitive needed. That's part of why this
1628
+ * method belongs in core: it's the single decrypt+ACL+metadata path
1629
+ * that every export-format package will build on, and pushing it into
1630
+ * a `@noy-db/as-*` package would force every format to re-solve
1631
+ * the same problems independently.
1632
+ *
1633
+ * @example
1634
+ * ```ts
1635
+ * for await (const chunk of company.exportStream()) {
1636
+ * // chunk.collection: 'invoices'
1637
+ * // chunk.schema: ZodObject | null
1638
+ * // chunk.refs: { clientId: { target: 'clients', mode: 'strict' } }
1639
+ * // chunk.records: Invoice[]
1640
+ * }
1641
+ * ```
1642
+ *
1643
+ * @example
1644
+ * ```ts
1645
+ * // Per-record streaming for arbitrarily large collections.
1646
+ * for await (const chunk of company.exportStream({ granularity: 'record' })) {
1647
+ * // chunk.records is always length 1
1648
+ * await writer.write(serialize(chunk.records[0]))
1649
+ * }
1650
+ * ```
1651
+ */
1652
+ exportStream(opts?: ExportStreamOptions): AsyncIterableIterator<ExportChunk>;
1653
+ /**
1654
+ * Convenience wrapper that consumes `exportStream()` and serializes the
1655
+ * result to a single JSON string.
1656
+ *
1657
+ * ⚠ **`exportJSON()` decrypts your records and produces plaintext.**
1658
+ *
1659
+ * noy-db's threat model assumes that records on disk are encrypted.
1660
+ * This function deliberately violates that assumption: it produces a
1661
+ * JSON string in plaintext, which the consumer is then responsible for
1662
+ * protecting (filesystem permissions, full-disk encryption, secure
1663
+ * transfer, secure deletion).
1664
+ *
1665
+ * Use this function only when:
1666
+ * - You are the authorized owner of the data, **and**
1667
+ * - You have a legitimate downstream tool that requires plaintext
1668
+ * JSON, **and**
1669
+ * - You have a documented plan for how the resulting plaintext will be
1670
+ * protected and eventually destroyed.
1671
+ *
1672
+ * If your goal is encrypted backup or transport between noy-db
1673
+ * instances, use `dump()` instead — it produces a tamper-evident
1674
+ * encrypted envelope, never plaintext.
1675
+ *
1676
+ * ## Why `Promise<string>` instead of writing to a file path
1677
+ *
1678
+ * Core has zero `node:` imports — it runs unchanged in browsers, Node,
1679
+ * Bun, Deno, and edge runtimes. Accepting a file path would force a
1680
+ * `node:fs` import (breaks browsers) or a runtime dynamic import
1681
+ * (doesn't tree-shake, inflates bundles). Returning a string lets the
1682
+ * consumer choose any sink and forces the destination decision to be
1683
+ * explicit at the call site — which is also better for the security
1684
+ * warning.
1685
+ *
1686
+ * @example
1687
+ * ```ts
1688
+ * // Node: write to a file
1689
+ * import { writeFile } from 'node:fs/promises'
1690
+ * await writeFile('./backup.json', await company.exportJSON())
1691
+ * ```
1692
+ *
1693
+ * @example
1694
+ * ```ts
1695
+ * // Browser: download as a file
1696
+ * const json = await company.exportJSON()
1697
+ * const blob = new Blob([json], { type: 'application/json' })
1698
+ * const url = URL.createObjectURL(blob)
1699
+ * // ... attach to an <a download> and click
1700
+ * ```
1701
+ *
1702
+ * @example
1703
+ * ```ts
1704
+ * // Stream upload to a server
1705
+ * await fetch('/upload', {
1706
+ * method: 'POST',
1707
+ * body: await company.exportJSON(),
1708
+ * })
1709
+ * ```
1710
+ *
1711
+ * ## On-disk shape
1712
+ *
1713
+ * ```json
1714
+ * {
1715
+ * "_noydb_export": 1,
1716
+ * "_compartment": "acme",
1717
+ * "_exported_at": "2026-04-07T12:00:00.000Z",
1718
+ * "_exported_by": "alice@acme.example",
1719
+ * "collections": {
1720
+ * "invoices": {
1721
+ * "schema": null,
1722
+ * "refs": { "clientId": { "target": "clients", "mode": "strict" } },
1723
+ * "records": [ ... ]
1724
+ * }
1725
+ * },
1726
+ * "ledgerHead": { "hash": "...", "index": 42, "ts": "..." }
1727
+ * }
1728
+ * ```
1729
+ *
1730
+ * `schema` is included for forward compatibility but is currently
1731
+ * always `null` because Standard Schema validators are not JSON-
1732
+ * serializable. Format-package serializers that need the schema
1733
+ * should use `exportStream()` directly and read `chunk.schema` (which
1734
+ * is the live validator object, not a serialization of it).
1735
+ */
1736
+ exportJSON(opts?: ExportStreamOptions): Promise<string>;
1737
+ }