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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (938) hide show
  1. package/dist/aggregate/index.js +9 -8
  2. package/dist/aggregate/index.js.map +1 -1
  3. package/dist/api-YGMINAET.js +20 -0
  4. package/dist/as/index.js +12 -6
  5. package/dist/attestation/index.js +19 -13
  6. package/dist/attestation/index.js.map +1 -1
  7. package/dist/backup-XA5STIYQ.js +225 -0
  8. package/dist/backup-XA5STIYQ.js.map +1 -0
  9. package/dist/blobs/index.js +12 -6
  10. package/dist/blobs/index.js.map +1 -1
  11. package/dist/broker/index.js +92 -0
  12. package/dist/broker/index.js.map +1 -0
  13. package/dist/bundle/index.js +21 -15
  14. package/dist/bundle/index.js.map +1 -1
  15. package/dist/by/index.js +2 -2
  16. package/dist/cargo/index.js +32 -26
  17. package/dist/chunk-25NDNMQ7.js +70 -0
  18. package/dist/chunk-25NDNMQ7.js.map +1 -0
  19. package/dist/chunk-2JMMY7HZ.js +188 -0
  20. package/dist/chunk-2JMMY7HZ.js.map +1 -0
  21. package/dist/chunk-3CNQ7FQ3.js +430 -0
  22. package/dist/chunk-3G4KMVUN.js +291 -0
  23. package/dist/chunk-3G4KMVUN.js.map +1 -0
  24. package/dist/chunk-3MSQLQNZ.js +74 -0
  25. package/dist/chunk-45ZZLTFH.js +38 -0
  26. package/dist/chunk-45ZZLTFH.js.map +1 -0
  27. package/dist/chunk-4GPE63GU.js +111 -0
  28. package/dist/chunk-4GPE63GU.js.map +1 -0
  29. package/dist/chunk-4N5QFSNQ.js +150 -0
  30. package/dist/chunk-4N5QFSNQ.js.map +1 -0
  31. package/dist/chunk-4R4Q64W5.js +34 -0
  32. package/dist/chunk-57V5S7PW.js +130 -0
  33. package/dist/chunk-57V5S7PW.js.map +1 -0
  34. package/dist/chunk-5JB73NMC.js +202 -0
  35. package/dist/chunk-5JB73NMC.js.map +1 -0
  36. package/dist/chunk-5XIPOCQC.js +155 -0
  37. package/dist/chunk-5ZOSG3RJ.js +778 -0
  38. package/dist/chunk-5ZOSG3RJ.js.map +1 -0
  39. package/dist/chunk-67TNU77I.js +36 -0
  40. package/dist/chunk-67TNU77I.js.map +1 -0
  41. package/dist/chunk-6QILBDZU.js +205 -0
  42. package/dist/chunk-7E67FJ33.js +155 -0
  43. package/dist/chunk-7ITPJFGC.js +50 -0
  44. package/dist/chunk-7ITPJFGC.js.map +1 -0
  45. package/dist/chunk-7NS43EXZ.js +117 -0
  46. package/dist/chunk-7QIXUSDQ.js +341 -0
  47. package/dist/chunk-7QIXUSDQ.js.map +1 -0
  48. package/dist/chunk-7VSGW5KJ.js +74 -0
  49. package/dist/chunk-7VSGW5KJ.js.map +1 -0
  50. package/dist/chunk-A2QF4JUE.js +14073 -0
  51. package/dist/chunk-A2QF4JUE.js.map +1 -0
  52. package/dist/chunk-A2Y6YFVN.js +209 -0
  53. package/dist/chunk-AOVDSIL3.js +1221 -0
  54. package/dist/chunk-AOVDSIL3.js.map +1 -0
  55. package/dist/chunk-ARSAMO24.js +29 -0
  56. package/dist/chunk-ARSAMO24.js.map +1 -0
  57. package/dist/chunk-AWB5JZW6.js +41 -0
  58. package/dist/chunk-AWB5JZW6.js.map +1 -0
  59. package/dist/chunk-BCYQA5BK.js +45 -0
  60. package/dist/chunk-BE7N3AXA.js +621 -0
  61. package/dist/chunk-BE7N3AXA.js.map +1 -0
  62. package/dist/chunk-BEIRE5K4.js +164 -0
  63. package/dist/chunk-BEIRE5K4.js.map +1 -0
  64. package/dist/chunk-BZO4WCJI.js +86 -0
  65. package/dist/chunk-BZO4WCJI.js.map +1 -0
  66. package/dist/chunk-C3YH34IL.js +75 -0
  67. package/dist/chunk-C3YH34IL.js.map +1 -0
  68. package/dist/chunk-C7NTK5I3.js +49 -0
  69. package/dist/chunk-C7NTK5I3.js.map +1 -0
  70. package/dist/chunk-CB25ONKC.js +129 -0
  71. package/dist/chunk-CIKY6I4W.js +21 -0
  72. package/dist/chunk-CKZW6P5V.js +32 -0
  73. package/dist/chunk-CKZW6P5V.js.map +1 -0
  74. package/dist/chunk-D26JB3LZ.js +54 -0
  75. package/dist/chunk-D3EFFFOL.js +59 -0
  76. package/dist/chunk-D3EFFFOL.js.map +1 -0
  77. package/dist/chunk-DGH65E7Q.js +466 -0
  78. package/dist/chunk-DGH65E7Q.js.map +1 -0
  79. package/dist/chunk-DIRRS7WP.js +42 -0
  80. package/dist/chunk-DJ3VKYFA.js +150 -0
  81. package/dist/chunk-DJ3VKYFA.js.map +1 -0
  82. package/dist/chunk-DMFNPHCX.js +247 -0
  83. package/dist/chunk-DMFNPHCX.js.map +1 -0
  84. package/dist/chunk-ELNBMFOS.js +392 -0
  85. package/dist/chunk-ELNBMFOS.js.map +1 -0
  86. package/dist/chunk-FH542DDY.js +1505 -0
  87. package/dist/chunk-FH542DDY.js.map +1 -0
  88. package/dist/chunk-FQQF23MC.js +45 -0
  89. package/dist/chunk-FQQF23MC.js.map +1 -0
  90. package/dist/chunk-FXK4X4BL.js +91 -0
  91. package/dist/chunk-FXK4X4BL.js.map +1 -0
  92. package/dist/chunk-GA2QHD6P.js +235 -0
  93. package/dist/chunk-GA2QHD6P.js.map +1 -0
  94. package/dist/chunk-GYGLAVCX.js +19 -0
  95. package/dist/chunk-GYGLAVCX.js.map +1 -0
  96. package/dist/chunk-H44ZE4IE.js +355 -0
  97. package/dist/chunk-H6CZSDWK.js +1697 -0
  98. package/dist/chunk-H6CZSDWK.js.map +1 -0
  99. package/dist/chunk-H6HM6CVR.js +279 -0
  100. package/dist/chunk-H6HM6CVR.js.map +1 -0
  101. package/dist/chunk-HFJIGWJC.js +382 -0
  102. package/dist/chunk-HUS3J5WM.js +404 -0
  103. package/dist/chunk-HUS3J5WM.js.map +1 -0
  104. package/dist/chunk-IDIV5NVH.js +99 -0
  105. package/dist/chunk-IDIV5NVH.js.map +1 -0
  106. package/dist/chunk-IGJCYUT5.js +99 -0
  107. package/dist/chunk-IGJCYUT5.js.map +1 -0
  108. package/dist/chunk-IGJHJYM6.js +515 -0
  109. package/dist/chunk-IGJHJYM6.js.map +1 -0
  110. package/dist/chunk-IP2QBAGS.js +589 -0
  111. package/dist/chunk-IP2QBAGS.js.map +1 -0
  112. package/dist/chunk-JK733I5V.js +23 -0
  113. package/dist/chunk-JK733I5V.js.map +1 -0
  114. package/dist/chunk-JOQ53DMI.js +255 -0
  115. package/dist/chunk-JOQ53DMI.js.map +1 -0
  116. package/dist/chunk-K62IUKOD.js +823 -0
  117. package/dist/chunk-K62IUKOD.js.map +1 -0
  118. package/dist/chunk-KPGX66PM.js +230 -0
  119. package/dist/chunk-KPZS5QAQ.js +151 -0
  120. package/dist/chunk-KPZS5QAQ.js.map +1 -0
  121. package/dist/chunk-L2SNBIV7.js +453 -0
  122. package/dist/chunk-L2SNBIV7.js.map +1 -0
  123. package/dist/chunk-LP7BEXCT.js +32 -0
  124. package/dist/chunk-LP7BEXCT.js.map +1 -0
  125. package/dist/chunk-MCEKIAO4.js +367 -0
  126. package/dist/chunk-MELR46EF.js +280 -0
  127. package/dist/chunk-MELR46EF.js.map +1 -0
  128. package/dist/chunk-MSPNM2OM.js +95 -0
  129. package/dist/chunk-MSPNM2OM.js.map +1 -0
  130. package/dist/chunk-NO272T7Q.js +194 -0
  131. package/dist/chunk-NO272T7Q.js.map +1 -0
  132. package/dist/chunk-O2DYPAZY.js +23 -0
  133. package/dist/chunk-ODJWBC5I.js +30 -0
  134. package/dist/chunk-OEAATWH5.js +686 -0
  135. package/dist/chunk-OEAATWH5.js.map +1 -0
  136. package/dist/chunk-OFJ5GPNA.js +71 -0
  137. package/dist/chunk-OOLO4LQG.js +99 -0
  138. package/dist/chunk-OOLO4LQG.js.map +1 -0
  139. package/dist/chunk-P5RY4ZWD.js +662 -0
  140. package/dist/chunk-P5RY4ZWD.js.map +1 -0
  141. package/dist/chunk-PR5LC5YX.js +265 -0
  142. package/dist/chunk-PR5LC5YX.js.map +1 -0
  143. package/dist/chunk-PXWVF7MC.js +135 -0
  144. package/dist/chunk-Q3XSMOZM.js +40 -0
  145. package/dist/chunk-QLLKLFE2.js +94 -0
  146. package/dist/chunk-QLLKLFE2.js.map +1 -0
  147. package/dist/chunk-QQJXBZCO.js +1056 -0
  148. package/dist/chunk-QQJXBZCO.js.map +1 -0
  149. package/dist/chunk-QYPKGVT4.js +261 -0
  150. package/dist/chunk-QYPKGVT4.js.map +1 -0
  151. package/dist/chunk-RKRGDAS7.js +59 -0
  152. package/dist/chunk-SRVQHVNX.js +164 -0
  153. package/dist/chunk-SYMS4546.js +29 -0
  154. package/dist/chunk-SYMS4546.js.map +1 -0
  155. package/dist/chunk-THNJ3IKU.js +17 -0
  156. package/dist/chunk-THNJ3IKU.js.map +1 -0
  157. package/dist/chunk-TPH5EO6L.js +54 -0
  158. package/dist/chunk-TPH5EO6L.js.map +1 -0
  159. package/dist/chunk-UFILRICG.js +14 -0
  160. package/dist/chunk-UTLEAJXC.js +97 -0
  161. package/dist/chunk-VA4ZWLFY.js +123 -0
  162. package/dist/chunk-VR24ILCR.js +367 -0
  163. package/dist/chunk-VYYM3MEN.js +98 -0
  164. package/dist/chunk-VYYM3MEN.js.map +1 -0
  165. package/dist/chunk-W5D62AQD.js +944 -0
  166. package/dist/chunk-W5D62AQD.js.map +1 -0
  167. package/dist/chunk-WGV4CUZT.js +167 -0
  168. package/dist/chunk-WGV4CUZT.js.map +1 -0
  169. package/dist/chunk-WTUNZACT.js +30 -0
  170. package/dist/chunk-WTUNZACT.js.map +1 -0
  171. package/dist/chunk-X6CMGUAG.js +69 -0
  172. package/dist/chunk-X6CMGUAG.js.map +1 -0
  173. package/dist/chunk-XFXUTFWQ.js +85 -0
  174. package/dist/chunk-XFXUTFWQ.js.map +1 -0
  175. package/dist/chunk-XHV25KBM.js +30 -0
  176. package/dist/chunk-YSXEFGND.js +124 -0
  177. package/dist/chunk-YXOUQ2H7.js +36 -0
  178. package/dist/chunk-ZP5PL65C.js +80 -0
  179. package/dist/classified/index.js +40 -0
  180. package/dist/classified-marker-LQWWQNIJ.js +24 -0
  181. package/dist/classified-marker-LQWWQNIJ.js.map +1 -0
  182. package/dist/collection-facade-YE2O4J4O.js +39 -0
  183. package/dist/computed-W6MVAMWZ.js +11 -0
  184. package/dist/consent/index.js +10 -4
  185. package/dist/consent/index.js.map +1 -1
  186. package/dist/crdt/index.js +1 -1
  187. package/dist/dead-filter-4KXZEB3X.js +28 -0
  188. package/dist/dead-filter-4KXZEB3X.js.map +1 -0
  189. package/dist/delegation-OPUU3R2E.js +25 -0
  190. package/dist/derivations/index.js +13 -6
  191. package/dist/derive-BGUHU663.js +21 -0
  192. package/dist/enclave-VXAQD4XJ.js +135 -0
  193. package/dist/executor-GTVSUUBX.js +25 -0
  194. package/dist/executor-GZWMTOXB.js +9 -0
  195. package/dist/executor-XXGS4S3K.js +9 -0
  196. package/dist/export-accessible-BMULIOYB.js +23 -0
  197. package/dist/extract-partition-JUQTWDXR.js +36 -0
  198. package/dist/fanout-sidecar-CKYFH33E.js +74 -0
  199. package/dist/fanout-sidecar-CKYFH33E.js.map +1 -0
  200. package/dist/fence-watcher-DHQ775JB.js +69 -0
  201. package/dist/fence-watcher-DHQ775JB.js.map +1 -0
  202. package/dist/find-XRGCNGNN.js +11 -0
  203. package/dist/forget/index.js +11 -5
  204. package/dist/forget/index.js.map +1 -1
  205. package/dist/guards/index.js +4 -4
  206. package/dist/history/index.js +12 -6
  207. package/dist/history/index.js.map +1 -1
  208. package/dist/i18n/index.js +50 -31
  209. package/dist/i18n/index.js.map +1 -1
  210. package/dist/index.d.ts +303 -1400
  211. package/dist/index.js +1525 -184
  212. package/dist/index.js.map +1 -1
  213. package/dist/indexing/index.js +4 -4
  214. package/dist/issue-UB6AA5M6.js +19 -0
  215. package/dist/json-schema-I22JCYCG.js +44 -0
  216. package/dist/json-schema-I22JCYCG.js.map +1 -0
  217. package/dist/kernel/cache/index.d.ts +10 -0
  218. package/dist/kernel/cache/lru.d.ts +97 -0
  219. package/dist/kernel/cache/policy.d.ts +32 -0
  220. package/dist/kernel/collection-config.d.ts +781 -0
  221. package/dist/kernel/collection.d.ts +1505 -0
  222. package/dist/kernel/constants.d.ts +18 -0
  223. package/dist/kernel/debug.d.ts +25 -0
  224. package/dist/kernel/enclave/broker/proof.d.ts +154 -0
  225. package/dist/kernel/enclave/classify/bidx.d.ts +77 -0
  226. package/dist/kernel/enclave/classify/compare.d.ts +10 -0
  227. package/dist/kernel/enclave/classify/digest.d.ts +8 -0
  228. package/dist/kernel/enclave/classify/find.d.ts +36 -0
  229. package/dist/kernel/enclave/classify/kofn.d.ts +7 -0
  230. package/dist/kernel/enclave/classify/normalize.d.ts +7 -0
  231. package/dist/kernel/enclave/classify/reveal.d.ts +10 -0
  232. package/dist/kernel/enclave/classify/vdig.d.ts +39 -0
  233. package/dist/kernel/enclave/classify/verify.d.ts +33 -0
  234. package/dist/kernel/enclave/classify/write.d.ts +8 -0
  235. package/dist/kernel/enclave/crypto.d.ts +263 -0
  236. package/dist/kernel/enclave/index.d.ts +78 -0
  237. package/dist/kernel/enclave/record-keys/deterministic.d.ts +54 -0
  238. package/dist/kernel/enclave/record-keys/envelope-body.d.ts +79 -0
  239. package/dist/kernel/enclave/record-keys/lifecycle.d.ts +57 -0
  240. package/dist/kernel/enclave/record-keys/record-codec.d.ts +301 -0
  241. package/dist/kernel/enclave/record-keys/sealed-slot.d.ts +14 -0
  242. package/dist/kernel/enclave/record-keys/sealed-slots.d.ts +123 -0
  243. package/dist/kernel/enclave/record-keys/sealing.d.ts +70 -0
  244. package/dist/kernel/enclave/record-keys/tombstone.d.ts +57 -0
  245. package/dist/kernel/env-check.d.ts +1 -0
  246. package/dist/kernel/errors.d.ts +1848 -0
  247. package/dist/kernel/events.d.ts +11 -0
  248. package/dist/kernel/memory-store.d.ts +17 -0
  249. package/dist/kernel/mutation.d.ts +14 -0
  250. package/dist/kernel/noydb.d.ts +818 -0
  251. package/dist/kernel/paths.d.ts +25 -0
  252. package/dist/kernel/query/builder.d.ts +520 -0
  253. package/dist/kernel/query/index.d.ts +31 -0
  254. package/dist/kernel/query/join.d.ts +205 -0
  255. package/dist/kernel/query/live.d.ts +111 -0
  256. package/dist/kernel/query/predicate.d.ts +139 -0
  257. package/dist/kernel/query/scan-builder.d.ts +334 -0
  258. package/dist/kernel/refs.d.ts +205 -0
  259. package/dist/kernel/schema.d.ts +134 -0
  260. package/dist/kernel/sync-policy.d.ts +188 -0
  261. package/dist/kernel/types.d.ts +3147 -0
  262. package/dist/kernel/util/discriminant.d.ts +58 -0
  263. package/dist/kernel/util/index.d.ts +14 -0
  264. package/dist/kernel/util/sanitize-filename.d.ts +75 -0
  265. package/dist/kernel/validation.d.ts +130 -0
  266. package/dist/kernel/vault.d.ts +1723 -0
  267. package/dist/kernel/via/compose.d.ts +144 -0
  268. package/dist/kernel/via/dispatch.d.ts +185 -0
  269. package/dist/kernel/via/graph-wiring.d.ts +145 -0
  270. package/dist/kernel/via/graph.d.ts +165 -0
  271. package/dist/kernel/via/index.d.ts +200 -0
  272. package/dist/kernel/via/pipeline.d.ts +266 -0
  273. package/dist/kernel/via/reconcile.d.ts +153 -0
  274. package/dist/kernel/via/taint-binding.d.ts +66 -0
  275. package/dist/kernel/write-queue.d.ts +46 -0
  276. package/dist/lazy/index.js +12 -0
  277. package/dist/ledger-FU6GH5EH.js +42 -0
  278. package/dist/legacy/bundle.d.ts +30 -0
  279. package/dist/legacy/kernel.d.ts +33 -0
  280. package/dist/liberate-YUN7W5QG.js +24 -0
  281. package/dist/link-set-MNADSH5M.js +31 -0
  282. package/dist/materialized-views/index.js +20 -10
  283. package/dist/noydb-6JLBZU4U.js +67 -0
  284. package/dist/on/index.js +10 -4
  285. package/dist/overlay-views/index.js +4 -4
  286. package/dist/periods/index.js +21 -7
  287. package/dist/pod/index.js +12 -6
  288. package/dist/policy-JTFOPPUU.js +41 -0
  289. package/dist/port/as/index.d.ts +26 -0
  290. package/dist/port/at/index.d.ts +18 -0
  291. package/dist/port/by/default-provider.d.ts +9 -0
  292. package/dist/port/by/index.d.ts +17 -0
  293. package/dist/port/by/types.d.ts +86 -0
  294. package/dist/port/in/index.d.ts +21 -0
  295. package/dist/port/on/index.d.ts +27 -0
  296. package/dist/port/to/index.d.ts +19 -0
  297. package/dist/port/ui/index.d.ts +21 -0
  298. package/dist/port/with/blob-strategy.d.ts +81 -0
  299. package/dist/port/with/broker-strategy.d.ts +84 -0
  300. package/dist/port/with/capabilities.d.ts +31 -0
  301. package/dist/port/with/classified-marker.d.ts +9 -0
  302. package/dist/port/with/classified-strategy.d.ts +62 -0
  303. package/dist/port/with/computed-strategy.d.ts +19 -0
  304. package/dist/port/with/i18n-strategy.d.ts +175 -0
  305. package/dist/port/with/index.d.ts +18 -0
  306. package/dist/port/with/lazy-strategy.d.ts +48 -0
  307. package/dist/port/with/lookup-strategy.d.ts +128 -0
  308. package/dist/port/with/service-bus.d.ts +156 -0
  309. package/dist/port/with/team-strategy.d.ts +36 -0
  310. package/dist/port/with/write-hooks.d.ts +34 -0
  311. package/dist/portability/index.js +8 -8
  312. package/dist/post-register-HAWO3O7O.js +55 -0
  313. package/dist/post-register-HAWO3O7O.js.map +1 -0
  314. package/dist/public-envelope-NJVB7LPA.js +32 -0
  315. package/dist/purge-scope-FGNNLWHD.js +24 -0
  316. package/dist/purge-scope-FGNNLWHD.js.map +1 -0
  317. package/dist/query/index.js +9 -6
  318. package/dist/read-only-facade-CHCKSEPD.js +8 -0
  319. package/dist/register-VCKOBWKT.js +23 -0
  320. package/dist/registry-72UKJ2L4.js +9 -0
  321. package/dist/registry-BZFLJNEH.js +18 -0
  322. package/dist/registry-YJEYSYI5.js +19 -0
  323. package/dist/request-withdrawal-6MJRMFHF.js +31 -0
  324. package/dist/reveal-BOY7XYFH.js +38 -0
  325. package/dist/reveal-BOY7XYFH.js.map +1 -0
  326. package/dist/revoke-4KUNSVJC.js +24 -0
  327. package/dist/satellites/index.js +8 -0
  328. package/dist/sealed-record/index.js +13 -7
  329. package/dist/sealed-record/index.js.map +1 -1
  330. package/dist/seed-4RRXT42N.js +231 -0
  331. package/dist/seed-4RRXT42N.js.map +1 -0
  332. package/dist/session/index.js +10 -4
  333. package/dist/session/index.js.map +1 -1
  334. package/dist/shadow/index.js +2 -2
  335. package/dist/signer-DDDXP5JD.js +25 -0
  336. package/dist/signer-DDDXP5JD.js.map +1 -0
  337. package/dist/snapshots/index.js +11 -5
  338. package/dist/snapshots/index.js.map +1 -1
  339. package/dist/stale-NXPT56JA.js +14 -0
  340. package/dist/stale-NXPT56JA.js.map +1 -0
  341. package/dist/storage-IR6EEAV2.js +23 -0
  342. package/dist/storage-IR6EEAV2.js.map +1 -0
  343. package/dist/store-coordination-provider-HPYVFJCV.js +142 -0
  344. package/dist/sync/index.js +10 -4
  345. package/dist/sync/index.js.map +1 -1
  346. package/dist/team/index.js +25 -12
  347. package/dist/tiers/index.js +11 -5
  348. package/dist/to/index.js +1 -2
  349. package/dist/tx/index.js +3 -3
  350. package/dist/util/index.js +1 -1
  351. package/dist/verify-66RHOW7N.js +139 -0
  352. package/dist/verify-66RHOW7N.js.map +1 -0
  353. package/dist/via/blob/active.d.ts +34 -0
  354. package/dist/via/blob/binding.d.ts +86 -0
  355. package/dist/via/blob/index.d.ts +34 -0
  356. package/dist/via/classified/active.d.ts +3 -0
  357. package/dist/via/classified/binding.d.ts +83 -0
  358. package/dist/via/classified/config-drift.d.ts +34 -0
  359. package/dist/via/classified/descriptor.d.ts +66 -0
  360. package/dist/via/classified/errors.d.ts +19 -0
  361. package/dist/via/classified/guards.d.ts +23 -0
  362. package/dist/via/classified/index.d.ts +11 -0
  363. package/dist/via/classified/presets.d.ts +65 -0
  364. package/dist/via/classified/resolve.d.ts +9 -0
  365. package/dist/via/classified/strategy.d.ts +11 -0
  366. package/dist/via/classified/validators.d.ts +3 -0
  367. package/dist/via/classified/write.d.ts +4 -0
  368. package/dist/via/computed/binding.d.ts +34 -0
  369. package/dist/via/computed/descriptor.d.ts +35 -0
  370. package/dist/via/i18n/active.d.ts +28 -0
  371. package/dist/via/i18n/binding.d.ts +36 -0
  372. package/dist/via/i18n/core.d.ts +267 -0
  373. package/dist/via/i18n/densify.d.ts +24 -0
  374. package/dist/via/i18n/dictionary.d.ts +200 -0
  375. package/dist/via/i18n/index.d.ts +21 -0
  376. package/dist/via/i18n/policy.d.ts +44 -0
  377. package/dist/via/i18n/script.d.ts +26 -0
  378. package/dist/via/i18n/strategy.d.ts +13 -0
  379. package/dist/via/lookup/active.d.ts +19 -0
  380. package/dist/via/lookup/binding.d.ts +99 -0
  381. package/dist/via/lookup/descriptor.d.ts +123 -0
  382. package/dist/via/lookup/handle.d.ts +220 -0
  383. package/dist/via/lookup/index.d.ts +17 -0
  384. package/dist/via/lookup/registry.d.ts +219 -0
  385. package/dist/via/lookup/snapshot.d.ts +67 -0
  386. package/dist/via/money/arith.d.ts +68 -0
  387. package/dist/via/money/binding.d.ts +21 -0
  388. package/dist/via/money/branded.d.ts +61 -0
  389. package/dist/via/money/descriptor.d.ts +73 -0
  390. package/dist/via/money/fixed-point.d.ts +51 -0
  391. package/dist/via/money/index.d.ts +15 -0
  392. package/dist/via/money/iso4217.d.ts +6 -0
  393. package/dist/via/money/money-reducer.d.ts +33 -0
  394. package/dist/via/money/normalize.d.ts +105 -0
  395. package/dist/via/money/paths.d.ts +61 -0
  396. package/dist/via/money/where.d.ts +106 -0
  397. package/dist/walk-2RWEOCAS.js +241 -0
  398. package/dist/walk-2RWEOCAS.js.map +1 -0
  399. package/dist/with/index.js +12 -6
  400. package/dist/with-audit/attestation/active.d.ts +10 -0
  401. package/dist/with-audit/attestation/index.d.ts +16 -0
  402. package/dist/with-audit/attestation/issue.d.ts +29 -0
  403. package/dist/with-audit/attestation/revoke.d.ts +15 -0
  404. package/dist/with-audit/attestation/signer.d.ts +33 -0
  405. package/dist/with-audit/attestation/strategy.d.ts +44 -0
  406. package/dist/with-audit/attestation/vault-facade.d.ts +62 -0
  407. package/dist/with-audit/consent/active.d.ts +14 -0
  408. package/dist/with-audit/consent/consent.d.ts +114 -0
  409. package/dist/with-audit/consent/index.d.ts +14 -0
  410. package/dist/with-audit/consent/strategy.d.ts +36 -0
  411. package/dist/with-audit/forget/active.d.ts +31 -0
  412. package/dist/with-audit/forget/index.d.ts +28 -0
  413. package/dist/with-audit/forget/purge-scope.d.ts +54 -0
  414. package/dist/with-audit/forget/strategy.d.ts +177 -0
  415. package/dist/with-audit/forget/subject-index.d.ts +83 -0
  416. package/dist/with-audit/guards/executor.d.ts +26 -0
  417. package/dist/with-audit/guards/immutable-guard.d.ts +63 -0
  418. package/dist/with-audit/guards/index.d.ts +10 -0
  419. package/dist/with-audit/guards/read-only-facade.d.ts +31 -0
  420. package/dist/with-audit/guards/registry.d.ts +83 -0
  421. package/dist/with-audit/guards/transition-guard.d.ts +82 -0
  422. package/dist/with-audit/guards/types.d.ts +134 -0
  423. package/dist/with-audit/guards/with-guard.d.ts +15 -0
  424. package/dist/with-audit/periods/active.d.ts +11 -0
  425. package/dist/with-audit/periods/index.d.ts +18 -0
  426. package/dist/with-audit/periods/periods.d.ts +417 -0
  427. package/dist/with-audit/periods/strategy.d.ts +32 -0
  428. package/dist/with-audit/periods/vault-facade.d.ts +95 -0
  429. package/dist/with-audit/portability/active.d.ts +11 -0
  430. package/dist/with-audit/portability/export-accessible.d.ts +46 -0
  431. package/dist/with-audit/portability/index.d.ts +18 -0
  432. package/dist/with-audit/portability/request-withdrawal.d.ts +85 -0
  433. package/dist/with-audit/portability/strategy.d.ts +31 -0
  434. package/dist/with-audit/portability/withdraw-accessible.d.ts +82 -0
  435. package/dist/with-audit/sealed-record/active.d.ts +9 -0
  436. package/dist/with-audit/sealed-record/index.d.ts +55 -0
  437. package/dist/with-audit/sealed-record/strategy.d.ts +34 -0
  438. package/dist/with-audit/sealed-record/types.d.ts +27 -0
  439. package/dist/with-audit/tiers/active.d.ts +9 -0
  440. package/dist/with-audit/tiers/index.d.ts +122 -0
  441. package/dist/with-audit/tiers/strategy.d.ts +35 -0
  442. package/dist/with-cargo/active.d.ts +11 -0
  443. package/dist/with-cargo/adopt-partition.d.ts +81 -0
  444. package/dist/with-cargo/decrypt-partition.d.ts +19 -0
  445. package/dist/with-cargo/describe-extraction.d.ts +33 -0
  446. package/dist/with-cargo/extract-partition.d.ts +147 -0
  447. package/dist/with-cargo/index.d.ts +33 -0
  448. package/dist/with-cargo/strategy.d.ts +30 -0
  449. package/dist/with-cargo/vault-diff.d.ts +144 -0
  450. package/dist/with-cargo/walk-closure.d.ts +38 -0
  451. package/dist/with-commit/crdt/active.d.ts +25 -0
  452. package/dist/with-commit/crdt/crdt.d.ts +42 -0
  453. package/dist/with-commit/crdt/index.d.ts +16 -0
  454. package/dist/with-commit/crdt/strategy.d.ts +25 -0
  455. package/dist/with-commit/history/active.d.ts +40 -0
  456. package/dist/with-commit/history/diff.d.ts +23 -0
  457. package/dist/with-commit/history/history.d.ts +27 -0
  458. package/dist/with-commit/history/index.d.ts +30 -0
  459. package/dist/with-commit/history/ledger/constants.d.ts +37 -0
  460. package/dist/with-commit/history/ledger/entry.d.ts +195 -0
  461. package/dist/with-commit/history/ledger/hash.d.ts +30 -0
  462. package/dist/with-commit/history/ledger/index.d.ts +19 -0
  463. package/dist/with-commit/history/ledger/patch.d.ts +99 -0
  464. package/dist/with-commit/history/ledger/store.d.ts +335 -0
  465. package/dist/with-commit/history/strategy.d.ts +126 -0
  466. package/dist/with-commit/history/time-machine.d.ts +179 -0
  467. package/dist/with-commit/numbering/descriptor.d.ts +27 -0
  468. package/dist/with-commit/numbering/index.d.ts +69 -0
  469. package/dist/with-commit/sequence/active.d.ts +10 -0
  470. package/dist/with-commit/sequence/index.d.ts +150 -0
  471. package/dist/with-commit/sequence/strategy.d.ts +26 -0
  472. package/dist/with-commit/tx/active.d.ts +27 -0
  473. package/dist/with-commit/tx/dry-run.d.ts +29 -0
  474. package/dist/with-commit/tx/elevated-handle.d.ts +58 -0
  475. package/dist/with-commit/tx/index.d.ts +13 -0
  476. package/dist/with-commit/tx/invariants.d.ts +68 -0
  477. package/dist/with-commit/tx/strategy.d.ts +23 -0
  478. package/dist/with-commit/tx/transaction.d.ts +207 -0
  479. package/dist/with-fork/archive/engine.d.ts +71 -0
  480. package/dist/with-fork/archive/index.d.ts +23 -0
  481. package/dist/with-fork/shadow/active.d.ts +6 -0
  482. package/dist/with-fork/shadow/index.d.ts +14 -0
  483. package/dist/with-fork/shadow/strategy.d.ts +28 -0
  484. package/dist/with-fork/shadow/vault-frame.d.ts +93 -0
  485. package/dist/with-fork/snapshots/active.d.ts +20 -0
  486. package/dist/with-fork/snapshots/engine.d.ts +36 -0
  487. package/dist/with-fork/snapshots/index.d.ts +5 -0
  488. package/dist/with-fork/snapshots/noydb-facade.d.ts +64 -0
  489. package/dist/with-fork/snapshots/policy.d.ts +23 -0
  490. package/dist/with-fork/snapshots/scheduler.d.ts +34 -0
  491. package/dist/with-fork/snapshots/strategy.d.ts +48 -0
  492. package/dist/with-formula/computed/index.d.ts +48 -0
  493. package/dist/with-formula/computed/lazy.d.ts +13 -0
  494. package/dist/with-formula/derivations/executor.d.ts +61 -0
  495. package/dist/with-formula/derivations/fanout-sidecar.d.ts +75 -0
  496. package/dist/with-formula/derivations/index.d.ts +6 -0
  497. package/dist/with-formula/derivations/registry.d.ts +67 -0
  498. package/dist/with-formula/derivations/stale.d.ts +39 -0
  499. package/dist/with-formula/derivations/strategy-hash.d.ts +1 -0
  500. package/dist/with-formula/derivations/types.d.ts +248 -0
  501. package/dist/with-formula/derivations/with-derivation.d.ts +10 -0
  502. package/dist/with-formula/derivations/with-rollup.d.ts +34 -0
  503. package/dist/with-formula/materialized-views/dependency-analyzer.d.ts +58 -0
  504. package/dist/with-formula/materialized-views/executor.d.ts +71 -0
  505. package/dist/with-formula/materialized-views/index.d.ts +11 -0
  506. package/dist/with-formula/materialized-views/query-hash.d.ts +23 -0
  507. package/dist/with-formula/materialized-views/registry.d.ts +99 -0
  508. package/dist/with-formula/materialized-views/stale.d.ts +62 -0
  509. package/dist/with-formula/materialized-views/types.d.ts +318 -0
  510. package/dist/with-formula/materialized-views/with-materialized-view.d.ts +24 -0
  511. package/dist/with-formula/overlay-views/index.d.ts +5 -0
  512. package/dist/with-formula/overlay-views/registry.d.ts +42 -0
  513. package/dist/with-formula/overlay-views/types.d.ts +97 -0
  514. package/dist/with-formula/overlay-views/virtual-collection.d.ts +90 -0
  515. package/dist/with-formula/overlay-views/with-overlayed-view.d.ts +9 -0
  516. package/dist/with-lookup/aggregate/active.d.ts +33 -0
  517. package/dist/with-lookup/aggregate/aggregation.d.ts +166 -0
  518. package/dist/with-lookup/aggregate/canonical-key.d.ts +16 -0
  519. package/dist/with-lookup/aggregate/groupby.d.ts +280 -0
  520. package/dist/with-lookup/aggregate/index.d.ts +23 -0
  521. package/dist/with-lookup/aggregate/reducers.d.ts +257 -0
  522. package/dist/with-lookup/aggregate/strategy.d.ts +59 -0
  523. package/dist/with-lookup/embeddings/cosine.d.ts +2 -0
  524. package/dist/with-lookup/embeddings/descriptor.d.ts +8 -0
  525. package/dist/with-lookup/embeddings/index.d.ts +3 -0
  526. package/dist/with-lookup/embeddings/vector-set.d.ts +19 -0
  527. package/dist/with-lookup/indexing/active.d.ts +30 -0
  528. package/dist/with-lookup/indexing/collection-facade.d.ts +120 -0
  529. package/dist/with-lookup/indexing/eager-indexes.d.ts +122 -0
  530. package/dist/with-lookup/indexing/index.d.ts +27 -0
  531. package/dist/with-lookup/indexing/lazy-builder.d.ts +69 -0
  532. package/dist/with-lookup/indexing/persisted-indexes.d.ts +186 -0
  533. package/dist/with-lookup/indexing/strategy.d.ts +56 -0
  534. package/dist/with-lookup/indexing/unique-constraints.d.ts +74 -0
  535. package/dist/with-lookup/search/active.d.ts +10 -0
  536. package/dist/with-lookup/search/build-docs.d.ts +15 -0
  537. package/dist/with-lookup/search/collection-facade.d.ts +123 -0
  538. package/dist/with-lookup/search/fuse.d.ts +22 -0
  539. package/dist/with-lookup/search/index-store.d.ts +19 -0
  540. package/dist/with-lookup/search/index.d.ts +19 -0
  541. package/dist/with-lookup/search/inverted-index.d.ts +47 -0
  542. package/dist/with-lookup/search/persisted-index-store.d.ts +41 -0
  543. package/dist/with-lookup/search/retrieve-types.d.ts +29 -0
  544. package/dist/with-lookup/search/scan.d.ts +28 -0
  545. package/dist/with-lookup/search/segment.d.ts +15 -0
  546. package/dist/with-lookup/search/serialize.d.ts +4 -0
  547. package/dist/with-lookup/search/snippet.d.ts +5 -0
  548. package/dist/with-lookup/search/strategy.d.ts +37 -0
  549. package/dist/with-lookup/search/tokenize.d.ts +12 -0
  550. package/dist/with-party/auth-introspection/index.d.ts +44 -0
  551. package/dist/with-party/broker/active.d.ts +23 -0
  552. package/dist/with-party/broker/index.d.ts +28 -0
  553. package/dist/with-party/broker/seed.d.ts +77 -0
  554. package/dist/with-party/custody/active.d.ts +10 -0
  555. package/dist/with-party/custody/index.d.ts +69 -0
  556. package/dist/with-party/custody/liberate.d.ts +64 -0
  557. package/dist/with-party/custody/strategy.d.ts +48 -0
  558. package/dist/with-party/directory/index.d.ts +11 -0
  559. package/dist/with-party/directory/public-envelope/index.d.ts +12 -0
  560. package/dist/with-party/directory/public-envelope/schema.d.ts +24 -0
  561. package/dist/with-party/directory/public-envelope/storage.d.ts +59 -0
  562. package/dist/with-party/directory/public-envelope/types.d.ts +80 -0
  563. package/dist/with-party/directory/storage.d.ts +33 -0
  564. package/dist/with-party/directory/types.d.ts +43 -0
  565. package/dist/with-party/directory/user-envelope/api.d.ts +201 -0
  566. package/dist/with-party/directory/user-envelope/index.d.ts +12 -0
  567. package/dist/with-party/directory/user-envelope/storage.d.ts +54 -0
  568. package/dist/with-party/directory/visibility.d.ts +47 -0
  569. package/dist/with-party/policy/engine.d.ts +60 -0
  570. package/dist/with-party/policy/index.d.ts +15 -0
  571. package/dist/with-party/policy/noydb-facade.d.ts +39 -0
  572. package/dist/with-party/policy/presets.d.ts +38 -0
  573. package/dist/with-party/policy/storage.d.ts +31 -0
  574. package/dist/with-party/session/active.d.ts +34 -0
  575. package/dist/with-party/session/dev-unlock.d.ts +128 -0
  576. package/dist/with-party/session/index.d.ts +23 -0
  577. package/dist/with-party/session/session-policy.d.ts +92 -0
  578. package/dist/with-party/session/session.d.ts +131 -0
  579. package/dist/with-party/session/strategy.d.ts +42 -0
  580. package/dist/with-party/session/unlock-state.d.ts +47 -0
  581. package/dist/with-party/sync/index.d.ts +31 -0
  582. package/dist/with-party/tab-coordination.d.ts +73 -0
  583. package/dist/with-party/tab-write-relay.d.ts +39 -0
  584. package/dist/with-party/team/active.d.ts +13 -0
  585. package/dist/with-party/team/authenticators.d.ts +95 -0
  586. package/dist/with-party/team/deed.d.ts +97 -0
  587. package/dist/with-party/team/delegation.d.ts +88 -0
  588. package/dist/with-party/team/index.d.ts +38 -0
  589. package/dist/with-party/team/keyring.d.ts +318 -0
  590. package/dist/with-party/team/magic-link-grant.d.ts +152 -0
  591. package/dist/with-party/team/managed-passphrase.d.ts +280 -0
  592. package/dist/with-party/team/noydb-facade.d.ts +484 -0
  593. package/dist/with-party/team/peer-recover.d.ts +81 -0
  594. package/dist/with-party/team/presence.d.ts +81 -0
  595. package/dist/with-party/team/recovery.d.ts +191 -0
  596. package/dist/with-party/team/reserved-secret-collections.d.ts +41 -0
  597. package/dist/with-party/team/rotate-recover.d.ts +275 -0
  598. package/dist/with-party/team/shamir-recovery-provider.d.ts +15 -0
  599. package/dist/with-party/team/strategy.d.ts +9 -0
  600. package/dist/with-party/team/sync-active.d.ts +33 -0
  601. package/dist/with-party/team/sync-credentials.d.ts +113 -0
  602. package/dist/with-party/team/sync-strategy.d.ts +67 -0
  603. package/dist/with-party/team/sync-transaction.d.ts +39 -0
  604. package/dist/with-party/team/sync.d.ts +165 -0
  605. package/dist/with-party/team/tiers.d.ts +39 -0
  606. package/dist/with-party/team/wrapped-deks.d.ts +86 -0
  607. package/dist/with-pod/backup.d.ts +74 -0
  608. package/dist/with-pod/bundle.d.ts +414 -0
  609. package/dist/with-pod/format.d.ts +203 -0
  610. package/dist/with-pod/index.d.ts +20 -0
  611. package/dist/with-pod/pod-store.d.ts +54 -0
  612. package/dist/with-pod/ulid.d.ts +64 -0
  613. package/dist/with-shape/blobs/blob-compaction.d.ts +170 -0
  614. package/dist/with-shape/blobs/blob-set.d.ts +342 -0
  615. package/dist/with-shape/blobs/export-blobs.d.ts +110 -0
  616. package/dist/with-shape/blobs/import-external.d.ts +50 -0
  617. package/dist/with-shape/blobs/mime-magic.d.ts +48 -0
  618. package/dist/with-shape/blobs/object-projection.d.ts +70 -0
  619. package/dist/with-shape/introspection/describe.d.ts +237 -0
  620. package/dist/with-shape/introspection/field-meta.d.ts +61 -0
  621. package/dist/with-shape/introspection/fields.d.ts +14 -0
  622. package/dist/with-shape/introspection/index.d.ts +12 -0
  623. package/dist/with-shape/introspection/json-schema.d.ts +13 -0
  624. package/dist/with-shape/introspection/meta.d.ts +22 -0
  625. package/dist/with-shape/introspection/projection.d.ts +13 -0
  626. package/dist/with-shape/introspection/types.d.ts +154 -0
  627. package/dist/with-shape/introspection/walk.d.ts +50 -0
  628. package/dist/with-shape/links/lazy-handle.d.ts +36 -0
  629. package/dist/with-shape/links/link-set.d.ts +67 -0
  630. package/dist/with-shape/links/names.d.ts +65 -0
  631. package/dist/with-shape/links/vault-facade.d.ts +211 -0
  632. package/dist/with-shape/persisted-schemas/canonicalize.d.ts +11 -0
  633. package/dist/with-shape/persisted-schemas/derive.d.ts +29 -0
  634. package/dist/with-shape/persisted-schemas/index.d.ts +21 -0
  635. package/dist/with-shape/persisted-schemas/register.d.ts +66 -0
  636. package/dist/with-shape/persisted-schemas/storage.d.ts +61 -0
  637. package/dist/with-shape/persisted-schemas/types.d.ts +54 -0
  638. package/dist/with-shape/satellites/dead-filter.d.ts +21 -0
  639. package/dist/with-shape/satellites/declare.d.ts +60 -0
  640. package/dist/with-shape/satellites/existence.d.ts +5 -0
  641. package/dist/with-shape/satellites/fanout.d.ts +37 -0
  642. package/dist/with-shape/satellites/forget.d.ts +47 -0
  643. package/dist/with-shape/satellites/index.d.ts +3 -0
  644. package/dist/with-shape/satellites/joined.d.ts +19 -0
  645. package/dist/with-shape/satellites/marker.d.ts +10 -0
  646. package/dist/with-shape/satellites/post-register.d.ts +6 -0
  647. package/dist/with-shape/satellites/proxy.d.ts +37 -0
  648. package/dist/with-shape/satellites/raw-target.d.ts +14 -0
  649. package/dist/with-shape/satellites/registry.d.ts +19 -0
  650. package/dist/with-shape/satellites/types.d.ts +26 -0
  651. package/dist/with-shape/satellites/validate.d.ts +17 -0
  652. package/dist/with-shape/schema-update/client-registry.d.ts +35 -0
  653. package/dist/with-shape/schema-update/cutover.d.ts +5 -0
  654. package/dist/with-shape/schema-update/delta.d.ts +2 -0
  655. package/dist/with-shape/schema-update/dispatch.d.ts +3 -0
  656. package/dist/with-shape/schema-update/fence-controller.d.ts +62 -0
  657. package/dist/with-shape/schema-update/fence-watcher.d.ts +37 -0
  658. package/dist/with-shape/schema-update/fence.d.ts +15 -0
  659. package/dist/with-shape/schema-update/gate.d.ts +16 -0
  660. package/dist/with-shape/schema-update/index.d.ts +6 -0
  661. package/dist/with-shape/schema-update/store-coordination-provider.d.ts +29 -0
  662. package/dist/with-shape/schema-update/strategies.d.ts +12 -0
  663. package/dist/with-shape/schema-update/types.d.ts +53 -0
  664. package/dist/with-store/index.d.ts +15 -0
  665. package/dist/with-store/lazy/active.d.ts +12 -0
  666. package/dist/with-store/lazy/index.d.ts +14 -0
  667. package/dist/with-store/lazy/strategy.d.ts +9 -0
  668. package/dist/with-store/route-store.d.ts +259 -0
  669. package/dist/with-store/store-middleware.d.ts +189 -0
  670. package/dist/withdraw-accessible-CLMZEHQT.js +28 -0
  671. package/dist/withdraw-accessible-CLMZEHQT.js.map +1 -0
  672. package/package.json +56 -52
  673. package/dist/adapter/index.d.ts +0 -5
  674. package/dist/adapter/index.js +0 -15
  675. package/dist/aggregate/index.d.ts +0 -42
  676. package/dist/api-RW3KP7WU.js +0 -14
  677. package/dist/as/index.d.ts +0 -7
  678. package/dist/at/index.d.ts +0 -5
  679. package/dist/attestation/index.d.ts +0 -20
  680. package/dist/backup-XV3IOEGB.js +0 -217
  681. package/dist/backup-XV3IOEGB.js.map +0 -1
  682. package/dist/blobs/index.d.ts +0 -44
  683. package/dist/bundle/index.d.ts +0 -122
  684. package/dist/bundle-CH-H06dp.d.ts +0 -548
  685. package/dist/by/index.d.ts +0 -1
  686. package/dist/cargo/index.d.ts +0 -9
  687. package/dist/chunk-26LGBE4T.js +0 -42
  688. package/dist/chunk-26LGBE4T.js.map +0 -1
  689. package/dist/chunk-2P2HZEXU.js +0 -233
  690. package/dist/chunk-2P2HZEXU.js.map +0 -1
  691. package/dist/chunk-3YFXJ3ZP.js +0 -97
  692. package/dist/chunk-5LUY7UTV.js +0 -380
  693. package/dist/chunk-5LUY7UTV.js.map +0 -1
  694. package/dist/chunk-5N6CZTCY.js +0 -367
  695. package/dist/chunk-5O3AOPDT.js +0 -992
  696. package/dist/chunk-5O3AOPDT.js.map +0 -1
  697. package/dist/chunk-5R3ERCDH.js +0 -239
  698. package/dist/chunk-5R3ERCDH.js.map +0 -1
  699. package/dist/chunk-5R5JW2JT.js +0 -12502
  700. package/dist/chunk-5R5JW2JT.js.map +0 -1
  701. package/dist/chunk-5TDJ56JE.js +0 -32
  702. package/dist/chunk-5TDJ56JE.js.map +0 -1
  703. package/dist/chunk-62QYRORB.js +0 -320
  704. package/dist/chunk-62QYRORB.js.map +0 -1
  705. package/dist/chunk-6S7T6WC4.js +0 -111
  706. package/dist/chunk-6S7T6WC4.js.map +0 -1
  707. package/dist/chunk-76722EBH.js +0 -451
  708. package/dist/chunk-76722EBH.js.map +0 -1
  709. package/dist/chunk-AIWULCUO.js +0 -68
  710. package/dist/chunk-AIWULCUO.js.map +0 -1
  711. package/dist/chunk-AQTBSL7R.js +0 -181
  712. package/dist/chunk-AQTBSL7R.js.map +0 -1
  713. package/dist/chunk-AXRXJTE2.js +0 -59
  714. package/dist/chunk-AZAOEIKW.js +0 -155
  715. package/dist/chunk-BG3SPSR4.js +0 -53
  716. package/dist/chunk-BG3SPSR4.js.map +0 -1
  717. package/dist/chunk-BGIZAFY7.js +0 -1
  718. package/dist/chunk-CMGR4ZEW.js +0 -209
  719. package/dist/chunk-CWPPNPOH.js +0 -23
  720. package/dist/chunk-DFEMTNPJ.js +0 -1219
  721. package/dist/chunk-DFEMTNPJ.js.map +0 -1
  722. package/dist/chunk-DGDI2D4M.js +0 -79
  723. package/dist/chunk-DGDI2D4M.js.map +0 -1
  724. package/dist/chunk-EIZUR2XW.js +0 -36
  725. package/dist/chunk-FISN7WE4.js +0 -798
  726. package/dist/chunk-FISN7WE4.js.map +0 -1
  727. package/dist/chunk-GYGWYIOZ.js +0 -200
  728. package/dist/chunk-GYGWYIOZ.js.map +0 -1
  729. package/dist/chunk-HCIPRAGS.js +0 -45
  730. package/dist/chunk-I2NOIW44.js +0 -83
  731. package/dist/chunk-I2NOIW44.js.map +0 -1
  732. package/dist/chunk-I3TIKTJO.js +0 -132
  733. package/dist/chunk-I3TIKTJO.js.map +0 -1
  734. package/dist/chunk-IAGBDSCS.js +0 -40
  735. package/dist/chunk-IELYAOGG.js +0 -78
  736. package/dist/chunk-IELYAOGG.js.map +0 -1
  737. package/dist/chunk-IGUYVGGI.js +0 -205
  738. package/dist/chunk-IO6GRPT6.js +0 -34
  739. package/dist/chunk-IPB7FTQX.js +0 -273
  740. package/dist/chunk-IPB7FTQX.js.map +0 -1
  741. package/dist/chunk-ITNUCOXM.js +0 -148
  742. package/dist/chunk-ITNUCOXM.js.map +0 -1
  743. package/dist/chunk-IUEN57TV.js +0 -722
  744. package/dist/chunk-IUEN57TV.js.map +0 -1
  745. package/dist/chunk-JNUWZ6D3.js +0 -57
  746. package/dist/chunk-JNUWZ6D3.js.map +0 -1
  747. package/dist/chunk-K2WCO3NX.js +0 -1
  748. package/dist/chunk-KVOXU4T5.js +0 -30
  749. package/dist/chunk-KXGNJJXB.js +0 -135
  750. package/dist/chunk-LFLXAY2W.js +0 -414
  751. package/dist/chunk-LFLXAY2W.js.map +0 -1
  752. package/dist/chunk-LMTH2RM6.js +0 -129
  753. package/dist/chunk-LV7M27WM.js +0 -702
  754. package/dist/chunk-LV7M27WM.js.map +0 -1
  755. package/dist/chunk-LXQT4WMP.js +0 -684
  756. package/dist/chunk-LXQT4WMP.js.map +0 -1
  757. package/dist/chunk-M2YKN37S.js +0 -524
  758. package/dist/chunk-M2YKN37S.js.map +0 -1
  759. package/dist/chunk-M6OST55S.js +0 -14
  760. package/dist/chunk-MD3Y6J3L.js +0 -278
  761. package/dist/chunk-MD3Y6J3L.js.map +0 -1
  762. package/dist/chunk-MTMJVJ5W.js +0 -73
  763. package/dist/chunk-MTMJVJ5W.js.map +0 -1
  764. package/dist/chunk-NF5JWERG.js +0 -74
  765. package/dist/chunk-PKHL44ER.js +0 -124
  766. package/dist/chunk-PSMV73A5.js +0 -117
  767. package/dist/chunk-Q7SS3IME.js +0 -120
  768. package/dist/chunk-Q7SS3IME.js.map +0 -1
  769. package/dist/chunk-QHJW5EXU.js +0 -54
  770. package/dist/chunk-RUEKROOS.js +0 -80
  771. package/dist/chunk-RUIMKQTA.js +0 -23
  772. package/dist/chunk-RUIMKQTA.js.map +0 -1
  773. package/dist/chunk-SKF73JOP.js +0 -355
  774. package/dist/chunk-SM3AVUHC.js +0 -42
  775. package/dist/chunk-SMXWYP24.js +0 -155
  776. package/dist/chunk-SRB2XEWB.js +0 -148
  777. package/dist/chunk-SRB2XEWB.js.map +0 -1
  778. package/dist/chunk-TA66UMI4.js +0 -123
  779. package/dist/chunk-TEILUWOI.js +0 -664
  780. package/dist/chunk-TEILUWOI.js.map +0 -1
  781. package/dist/chunk-TJYQIGAP.js +0 -82
  782. package/dist/chunk-TJYQIGAP.js.map +0 -1
  783. package/dist/chunk-UAG5KWVA.js +0 -367
  784. package/dist/chunk-UDRIWL7A.js +0 -382
  785. package/dist/chunk-UIU2THRG.js +0 -1937
  786. package/dist/chunk-UIU2THRG.js.map +0 -1
  787. package/dist/chunk-UPJNJGGA.js +0 -572
  788. package/dist/chunk-UPJNJGGA.js.map +0 -1
  789. package/dist/chunk-UV5MFVO3.js +0 -21
  790. package/dist/chunk-V7RWQRG7.js +0 -430
  791. package/dist/chunk-VCTFO5CO.js +0 -71
  792. package/dist/chunk-VFQGRQIH.js +0 -97
  793. package/dist/chunk-VFQGRQIH.js.map +0 -1
  794. package/dist/chunk-WWGT2MDV.js +0 -762
  795. package/dist/chunk-WWGT2MDV.js.map +0 -1
  796. package/dist/chunk-WYSO2NIH.js +0 -30
  797. package/dist/chunk-XXYIOFUB.js +0 -164
  798. package/dist/chunk-Y22T3KQE.js +0 -261
  799. package/dist/chunk-Y22T3KQE.js.map +0 -1
  800. package/dist/chunk-ZCGAHGUS.js +0 -230
  801. package/dist/chunk-ZYUC53LT.js +0 -1370
  802. package/dist/chunk-ZYUC53LT.js.map +0 -1
  803. package/dist/collection-facade-GQAOGJP2.js +0 -33
  804. package/dist/consent/index.d.ts +0 -23
  805. package/dist/crdt/index.d.ts +0 -34
  806. package/dist/decrypt-partition-IHtxEnTi.d.ts +0 -21
  807. package/dist/delegation-UL5HKLER.js +0 -19
  808. package/dist/derivations/index.d.ts +0 -70
  809. package/dist/describe/index.d.ts +0 -1
  810. package/dist/describe/index.js +0 -1
  811. package/dist/describe-aBkJR2sd.d.ts +0 -131
  812. package/dist/dev-unlock-C9Ro3v_O.d.ts +0 -263
  813. package/dist/discriminant-BN9REW3o.d.ts +0 -60
  814. package/dist/enclave-UL5LW66V.js +0 -88
  815. package/dist/executor-2FWQRLMG.js +0 -15
  816. package/dist/executor-QZ7BXICW.js +0 -9
  817. package/dist/executor-Z5ZLJVTV.js +0 -9
  818. package/dist/export-accessible-KRV5W4GH.js +0 -17
  819. package/dist/extract-partition-GLKBOXFQ.js +0 -30
  820. package/dist/fanout-sidecar-GF3DJ6KR.js +0 -71
  821. package/dist/fanout-sidecar-GF3DJ6KR.js.map +0 -1
  822. package/dist/forget/index.d.ts +0 -36
  823. package/dist/guards/index.d.ts +0 -35
  824. package/dist/hash-Cp5uwiox.d.ts +0 -67
  825. package/dist/history/index.d.ts +0 -61
  826. package/dist/i18n/index.d.ts +0 -37
  827. package/dist/in/index.d.ts +0 -5
  828. package/dist/index-B9QdHytu.d.ts +0 -123
  829. package/dist/index-BF9_96A5.d.ts +0 -123
  830. package/dist/index-BzUo1B6n.d.ts +0 -20730
  831. package/dist/indexing/index.d.ts +0 -39
  832. package/dist/issue-Y6UVIR43.js +0 -13
  833. package/dist/kernel/index.d.ts +0 -32
  834. package/dist/kernel/index.js +0 -53
  835. package/dist/ledger-RYI35CDS.js +0 -36
  836. package/dist/liberate-CRPZEV7O.js +0 -18
  837. package/dist/materialized-views/index.d.ts +0 -173
  838. package/dist/mime-magic-CGhw37_E.d.ts +0 -103
  839. package/dist/noydb-367AM4HT.js +0 -50
  840. package/dist/on/index.d.ts +0 -5
  841. package/dist/overlay-views/index.d.ts +0 -98
  842. package/dist/periods/index.d.ts +0 -20
  843. package/dist/pod/index.d.ts +0 -63
  844. package/dist/policy-IXK4FVXP.js +0 -41
  845. package/dist/portability/index.d.ts +0 -20
  846. package/dist/public-envelope-JHDQCPSX.js +0 -32
  847. package/dist/query/index.d.ts +0 -5
  848. package/dist/read-only-facade-5ADRJVTM.js +0 -8
  849. package/dist/registry-45RJNWGU.js +0 -9
  850. package/dist/registry-5GRV5VXI.js +0 -13
  851. package/dist/registry-WEUCHBO4.js +0 -11
  852. package/dist/request-withdrawal-GBPH2FDY.js +0 -25
  853. package/dist/revoke-TUFRGI6S.js +0 -18
  854. package/dist/sealed-record/index.d.ts +0 -69
  855. package/dist/session/index.d.ts +0 -44
  856. package/dist/shadow/index.d.ts +0 -15
  857. package/dist/signer-PNKTBVF7.js +0 -19
  858. package/dist/snapshots/index.d.ts +0 -26
  859. package/dist/stale-3JWHNDIY.js +0 -14
  860. package/dist/store-coordination-provider-3I7XWZZK.js +0 -142
  861. package/dist/subject-index-O75wKshW.d.ts +0 -362
  862. package/dist/sync/index.d.ts +0 -41
  863. package/dist/team/index.d.ts +0 -116
  864. package/dist/tiers/index.d.ts +0 -5
  865. package/dist/to/index.d.ts +0 -5
  866. package/dist/transition-guard-C7ol6oPw.d.ts +0 -165
  867. package/dist/tx/index.d.ts +0 -35
  868. package/dist/ui/index.d.ts +0 -1
  869. package/dist/ulid-DRH25k3y.d.ts +0 -66
  870. package/dist/util/index.d.ts +0 -79
  871. package/dist/vault-diff-B5fYNBL7.d.ts +0 -147
  872. package/dist/with/index.d.ts +0 -38
  873. package/dist/with-materialized-view-6p0Fk8bL.d.ts +0 -27
  874. package/dist/with-overlayed-view-BJ6mXGMd.d.ts +0 -12
  875. package/dist/with-rollup-BvQo3ROo.d.ts +0 -47
  876. package/dist/withdraw-accessible-FFS46EOD.js +0 -22
  877. /package/dist/{adapter/index.js.map → api-YGMINAET.js.map} +0 -0
  878. /package/dist/{chunk-V7RWQRG7.js.map → chunk-3CNQ7FQ3.js.map} +0 -0
  879. /package/dist/{chunk-NF5JWERG.js.map → chunk-3MSQLQNZ.js.map} +0 -0
  880. /package/dist/{chunk-IO6GRPT6.js.map → chunk-4R4Q64W5.js.map} +0 -0
  881. /package/dist/{chunk-SMXWYP24.js.map → chunk-5XIPOCQC.js.map} +0 -0
  882. /package/dist/{chunk-IGUYVGGI.js.map → chunk-6QILBDZU.js.map} +0 -0
  883. /package/dist/{chunk-AZAOEIKW.js.map → chunk-7E67FJ33.js.map} +0 -0
  884. /package/dist/{chunk-PSMV73A5.js.map → chunk-7NS43EXZ.js.map} +0 -0
  885. /package/dist/{chunk-CMGR4ZEW.js.map → chunk-A2Y6YFVN.js.map} +0 -0
  886. /package/dist/{chunk-HCIPRAGS.js.map → chunk-BCYQA5BK.js.map} +0 -0
  887. /package/dist/{chunk-LMTH2RM6.js.map → chunk-CB25ONKC.js.map} +0 -0
  888. /package/dist/{chunk-UV5MFVO3.js.map → chunk-CIKY6I4W.js.map} +0 -0
  889. /package/dist/{chunk-QHJW5EXU.js.map → chunk-D26JB3LZ.js.map} +0 -0
  890. /package/dist/{chunk-SM3AVUHC.js.map → chunk-DIRRS7WP.js.map} +0 -0
  891. /package/dist/{chunk-SKF73JOP.js.map → chunk-H44ZE4IE.js.map} +0 -0
  892. /package/dist/{chunk-UDRIWL7A.js.map → chunk-HFJIGWJC.js.map} +0 -0
  893. /package/dist/{chunk-ZCGAHGUS.js.map → chunk-KPGX66PM.js.map} +0 -0
  894. /package/dist/{chunk-5N6CZTCY.js.map → chunk-MCEKIAO4.js.map} +0 -0
  895. /package/dist/{chunk-CWPPNPOH.js.map → chunk-O2DYPAZY.js.map} +0 -0
  896. /package/dist/{chunk-KVOXU4T5.js.map → chunk-ODJWBC5I.js.map} +0 -0
  897. /package/dist/{chunk-VCTFO5CO.js.map → chunk-OFJ5GPNA.js.map} +0 -0
  898. /package/dist/{chunk-KXGNJJXB.js.map → chunk-PXWVF7MC.js.map} +0 -0
  899. /package/dist/{chunk-IAGBDSCS.js.map → chunk-Q3XSMOZM.js.map} +0 -0
  900. /package/dist/{chunk-AXRXJTE2.js.map → chunk-RKRGDAS7.js.map} +0 -0
  901. /package/dist/{chunk-XXYIOFUB.js.map → chunk-SRVQHVNX.js.map} +0 -0
  902. /package/dist/{chunk-M6OST55S.js.map → chunk-UFILRICG.js.map} +0 -0
  903. /package/dist/{chunk-3YFXJ3ZP.js.map → chunk-UTLEAJXC.js.map} +0 -0
  904. /package/dist/{chunk-TA66UMI4.js.map → chunk-VA4ZWLFY.js.map} +0 -0
  905. /package/dist/{chunk-UAG5KWVA.js.map → chunk-VR24ILCR.js.map} +0 -0
  906. /package/dist/{chunk-WYSO2NIH.js.map → chunk-XHV25KBM.js.map} +0 -0
  907. /package/dist/{chunk-PKHL44ER.js.map → chunk-YSXEFGND.js.map} +0 -0
  908. /package/dist/{chunk-EIZUR2XW.js.map → chunk-YXOUQ2H7.js.map} +0 -0
  909. /package/dist/{chunk-RUEKROOS.js.map → chunk-ZP5PL65C.js.map} +0 -0
  910. /package/dist/{describe → classified}/index.js.map +0 -0
  911. /package/dist/{api-RW3KP7WU.js.map → collection-facade-YE2O4J4O.js.map} +0 -0
  912. /package/dist/{chunk-BGIZAFY7.js.map → computed-W6MVAMWZ.js.map} +0 -0
  913. /package/dist/{chunk-K2WCO3NX.js.map → delegation-OPUU3R2E.js.map} +0 -0
  914. /package/dist/{collection-facade-GQAOGJP2.js.map → derive-BGUHU663.js.map} +0 -0
  915. /package/dist/{delegation-UL5HKLER.js.map → enclave-VXAQD4XJ.js.map} +0 -0
  916. /package/dist/{enclave-UL5LW66V.js.map → executor-GTVSUUBX.js.map} +0 -0
  917. /package/dist/{executor-2FWQRLMG.js.map → executor-GZWMTOXB.js.map} +0 -0
  918. /package/dist/{executor-QZ7BXICW.js.map → executor-XXGS4S3K.js.map} +0 -0
  919. /package/dist/{executor-Z5ZLJVTV.js.map → export-accessible-BMULIOYB.js.map} +0 -0
  920. /package/dist/{export-accessible-KRV5W4GH.js.map → extract-partition-JUQTWDXR.js.map} +0 -0
  921. /package/dist/{extract-partition-GLKBOXFQ.js.map → find-XRGCNGNN.js.map} +0 -0
  922. /package/dist/{issue-Y6UVIR43.js.map → issue-UB6AA5M6.js.map} +0 -0
  923. /package/dist/{kernel → lazy}/index.js.map +0 -0
  924. /package/dist/{ledger-RYI35CDS.js.map → ledger-FU6GH5EH.js.map} +0 -0
  925. /package/dist/{liberate-CRPZEV7O.js.map → liberate-YUN7W5QG.js.map} +0 -0
  926. /package/dist/{noydb-367AM4HT.js.map → link-set-MNADSH5M.js.map} +0 -0
  927. /package/dist/{policy-IXK4FVXP.js.map → noydb-6JLBZU4U.js.map} +0 -0
  928. /package/dist/{public-envelope-JHDQCPSX.js.map → policy-JTFOPPUU.js.map} +0 -0
  929. /package/dist/{read-only-facade-5ADRJVTM.js.map → public-envelope-NJVB7LPA.js.map} +0 -0
  930. /package/dist/{registry-45RJNWGU.js.map → read-only-facade-CHCKSEPD.js.map} +0 -0
  931. /package/dist/{registry-5GRV5VXI.js.map → register-VCKOBWKT.js.map} +0 -0
  932. /package/dist/{registry-WEUCHBO4.js.map → registry-72UKJ2L4.js.map} +0 -0
  933. /package/dist/{request-withdrawal-GBPH2FDY.js.map → registry-BZFLJNEH.js.map} +0 -0
  934. /package/dist/{revoke-TUFRGI6S.js.map → registry-YJEYSYI5.js.map} +0 -0
  935. /package/dist/{signer-PNKTBVF7.js.map → request-withdrawal-6MJRMFHF.js.map} +0 -0
  936. /package/dist/{stale-3JWHNDIY.js.map → revoke-4KUNSVJC.js.map} +0 -0
  937. /package/dist/{withdraw-accessible-FFS46EOD.js.map → satellites/index.js.map} +0 -0
  938. /package/dist/{store-coordination-provider-3I7XWZZK.js.map → store-coordination-provider-HPYVFJCV.js.map} +0 -0
@@ -0,0 +1,1505 @@
1
+ import type { EncryptedEnvelope, HistoryOptions, HistoryEntry, PruneOptions, LocaleReadOptions, PutManyItemOptions, PutManyOptions, PutManyResult, DeleteManyResult, SealedView, ClassifiedVerdict } from './types.js';
2
+ import type { FieldMeta } from '../with-shape/introspection/field-meta.js';
3
+ import type { CollectionMeta } from '../with-shape/introspection/meta.js';
4
+ import { type ClassifiedEntry } from '../port/with/classified-strategy.js';
5
+ import type { CrdtState } from '../with-commit/crdt/crdt.js';
6
+ import type { I18nTextDescriptor, DictKeyDescriptor, StaticDictDescriptor, DictionaryHandle } from '../port/with/i18n-strategy.js';
7
+ import type { LookupDescriptor } from '../port/with/lookup-strategy.js';
8
+ import { ViaPipeline } from './via/pipeline.js';
9
+ import { type ViaDescriptor, type ViaEraseReport } from './via/index.js';
10
+ import type { MutationOrigin } from './mutation.js';
11
+ import { type WaveContext, type RollupOutcome, type RollupDeleteIntent } from './via/dispatch.js';
12
+ import type { ComputedFields } from '../with-formula/computed/index.js';
13
+ import { type SealedShredSlot } from './enclave/index.js';
14
+ import type { GhostRecord } from './types.js';
15
+ import type { StandardSchemaV1 } from './schema.js';
16
+ import type { DiffEntry } from '../with-commit/history/diff.js';
17
+ import { Query, ScanBuilder } from './query/index.js';
18
+ import type { JoinableSource } from './query/index.js';
19
+ import type { CollectionIndexes } from '../with-lookup/indexing/eager-indexes.js';
20
+ import { LazyQuery } from '../with-lookup/indexing/lazy-builder.js';
21
+ import type { SearchOptions, SearchResult } from '../with-lookup/search/index.js';
22
+ import type { RetrieveOptions, RetrieveHit } from '../with-lookup/search/retrieve-types.js';
23
+ import { type CollectionDescription, type DescribeOptions } from '../with-shape/introspection/describe.js';
24
+ import type { CollectionConfig } from '../with-shape/introspection/types.js';
25
+ import { type LruStats } from './cache/index.js';
26
+ import type { PresenceHandle } from '../with-party/team/presence.js';
27
+ import type { BlobSet } from '../with-shape/blobs/blob-set.js';
28
+ import type { TxContext } from '../with-commit/tx/transaction.js';
29
+ import { type CollectionOpts } from './collection-config.js';
30
+ /**
31
+ * Callback for dirty tracking (sync engine integration). `action: 'revert'`
32
+ * (spec #591) means "un-dirty" — the fan-out wiring in `noydb.ts` routes it
33
+ * to `SyncEngine.removeDirty` instead of `trackChange`; `version` is unused
34
+ * for that action.
35
+ */
36
+ export type OnDirtyCallback = (collection: string, id: string, action: 'put' | 'delete' | 'revert', version: number) => Promise<void>;
37
+ /**
38
+ * Event delivered to a `collection.subscribe()` callback. Distinct
39
+ * from the hub-level `ChangeEvent` — this one is bound to a single
40
+ * collection's type `T` and hydrates the record from cache on put.
41
+ *
42
+ * - `type: 'put'` — `record` is the current decrypted value, or
43
+ * `null` in the rare case where another op deleted the record
44
+ * between the emit and the handler firing.
45
+ * - `type: 'delete'` — `record` is always `null`; the deletion is
46
+ * the only information.
47
+ */
48
+ export interface CollectionChangeEvent<T> {
49
+ readonly type: 'put' | 'delete';
50
+ readonly id: string;
51
+ readonly record: T | null;
52
+ }
53
+ /**
54
+ * Per-collection cache configuration. Only meaningful when paired with
55
+ * `prefetch: false` (lazy mode); eager mode keeps the entire decrypted
56
+ * cache in memory and ignores these bounds.
57
+ */
58
+ export interface CacheOptions {
59
+ /** Maximum number of records to keep in memory before LRU eviction. */
60
+ maxRecords?: number;
61
+ /**
62
+ * Maximum total decrypted byte size before LRU eviction. Accepts a raw
63
+ * number or a human-friendly string: `'50KB'`, `'50MB'`, `'1GB'`.
64
+ * Eviction picks the least-recently-used entry until both budgets
65
+ * (maxRecords AND maxBytes, if both are set) are satisfied.
66
+ */
67
+ maxBytes?: number | string;
68
+ }
69
+ /** Statistics exposed via `Collection.cacheStats()`. */
70
+ export interface CacheStats extends LruStats {
71
+ /** True if this collection is in lazy mode. */
72
+ lazy: boolean;
73
+ }
74
+ /** A typed collection of records within a vault. */
75
+ export declare class Collection<T, S extends keyof T = never, Q extends keyof T & string = never, M extends keyof T & string = never> {
76
+ #private;
77
+ private readonly adapter;
78
+ private readonly vault;
79
+ private readonly name;
80
+ private readonly keyring;
81
+ private readonly storeCiphertext;
82
+ private readonly ramCiphertext;
83
+ private readonly emitter;
84
+ private readonly writeQueue;
85
+ private readonly schemaUpdateGate;
86
+ private readonly schemaFence;
87
+ private readonly writeHooks;
88
+ private readonly subsystemBus;
89
+ private readonly activeTxId;
90
+ private readonly getDEK;
91
+ private readonly onDirty;
92
+ private readonly historyConfig;
93
+ /** True when the caller explicitly provided a `historyConfig` option (vs. inheriting the vault default). */
94
+ private readonly historyConfigExplicit;
95
+ /**
96
+ * tree-shake seam — the strategy that backs `collection.blob(id)`.
97
+ * Defaults to `NO_BLOBS`, a ~10-line stub that throws with an actionable
98
+ * message. Consumers opt into real blob storage by importing
99
+ * `{ blobs }` from `@noy-db/hub/blobs` and passing the returned
100
+ * strategy to `createNoydb({ blobStrategy: blobs() })`. With the
101
+ * default stub, none of the BlobSet / chunk / MIME-magic machinery
102
+ * reaches the bundle.
103
+ */
104
+ private readonly blobStrategy;
105
+ private readonly objectStore;
106
+ private readonly blobFields;
107
+ private readonly aggregateStrategy;
108
+ private readonly crdtStrategy;
109
+ private readonly tiersStrategy;
110
+ private readonly searchStrategy;
111
+ private readonly historyStrategy;
112
+ private readonly syncStrategy;
113
+ private readonly cache;
114
+ private hydrated;
115
+ /**
116
+ * Lazy mode flag. `true` when constructed with `prefetch: false`.
117
+ * In lazy mode the cache is bounded by an LRU and `list()`/`query()`
118
+ * throw — callers must use `scan()` or per-id `get()` instead.
119
+ */
120
+ private readonly lazy;
121
+ /**
122
+ * LRU cache for lazy mode. Only allocated when `prefetch: false` is set.
123
+ * Stores `{ record, version }` entries the same shape as `this.cache`.
124
+ * Tree-shaking note: importing Collection without setting `prefetch:false`
125
+ * still pulls in the Lru class today; future bundle-size work could
126
+ * lazy-import the cache module.
127
+ */
128
+ private readonly lru;
129
+ /**
130
+ * tree-shake seam — per-Collection indexing state. Owned by the
131
+ * `IndexStrategy` passed through from `createNoydb({ indexStrategy })`.
132
+ * Defaults to a disabled state (both accessors return null) so the
133
+ * `CollectionIndexes` / `PersistedCollectionIndex` / `LazyQuery`
134
+ * classes never reach the bundle when indexing is unused.
135
+ *
136
+ * Accessor helpers below (`get indexes()`, `get persistedIndexes()`)
137
+ * preserve the field-access ergonomics without changing every
138
+ * caller site.
139
+ */
140
+ private readonly indexState;
141
+ /**
142
+ * In-memory unique-constraint enforcement for eager mode.
143
+ * `null` when no `unique:true` indexes are declared on this collection,
144
+ * or when the collection is in lazy mode (which throws at registration).
145
+ */
146
+ private readonly uniqueConstraints;
147
+ /**
148
+ * True once `_idx/*` side-cars have been bulk-loaded into
149
+ * `persistedIndexes`. Flipped by `ensurePersistedIndexesLoaded()` on
150
+ * first lazy-mode query so subsequent queries skip the adapter round
151
+ * trip. Invalidation (remote sync, rotation) resets it alongside
152
+ * `persistedIndexes.clear()`.
153
+ */
154
+ private persistedIndexesLoaded;
155
+ /**
156
+ * Accessor for the in-memory eager-mode index mirror. Returns `null`
157
+ * when indexing is disabled on this Noydb instance (the
158
+ * `NO_INDEXING` default) or when the collection is in lazy mode
159
+ * (which uses the persisted mirror instead).
160
+ */
161
+ private get indexes();
162
+ /**
163
+ * Accessor for the persisted-mirror (lazy-mode) index. Returns `null`
164
+ * when indexing is disabled or the collection is in eager mode.
165
+ */
166
+ private get persistedIndexes();
167
+ /**
168
+ * per-collection reconcile-on-open policy. Read once
169
+ * from `CollectionOptions.reconcileOnOpen` and applied by
170
+ * `ensurePersistedIndexesLoaded()` on the first lazy-mode query.
171
+ */
172
+ private readonly reconcileOnOpen;
173
+ /**
174
+ * Re-entrancy guard for the auto-reconcile path. `reconcileIndex`
175
+ * reloads the mirror after applying fixes, which re-enters
176
+ * `ensurePersistedIndexesLoaded`; without this flag we'd trigger a
177
+ * second auto-reconcile pass and potentially infinite recursion.
178
+ */
179
+ private autoReconciling;
180
+ /**
181
+ * Optional Standard Schema v1 validator. When set, every `put()` runs
182
+ * the input through `validateSchemaInput` before encryption, and every
183
+ * record coming OUT of `decryptRecord` runs through
184
+ * `validateSchemaOutput`. A rejected input throws
185
+ * `SchemaValidationError` with `direction: 'input'`; drifted stored
186
+ * data throws with `direction: 'output'`. Both carry the rich issue
187
+ * list from the validator so UI code can render field-level messages.
188
+ *
189
+ * The schema is stored as `StandardSchemaV1<unknown, T>` because the
190
+ * collection type parameter `T` is the OUTPUT type — whatever the
191
+ * validator produces after transforms and coercion. Users who pass a
192
+ * schema to `defineNoydbStore` (or `Collection.constructor`) get their
193
+ * `T` inferred automatically via `InferOutput<Schema>`.
194
+ */
195
+ private readonly schema;
196
+ /**
197
+ * Vault-default locale. Used as the fallback when no per-call
198
+ * locale option is passed to `get()`/`list()`. Provided by Vault
199
+ * at collection construction time via the `collection({ locale })` or
200
+ * `openVault(name, { locale })` path.
201
+ *
202
+ * `undefined` means "no default locale set" — i18nText fields will
203
+ * throw `LocaleNotSpecifiedError` unless a per-call locale is passed.
204
+ */
205
+ private readonly defaultLocale;
206
+ /** Field name → `I18nTextDescriptor` for `i18nText()` fields (`i18nFields` option); write/read runs through the compiled `via` i18n binding — this remains for `describe()` and the search-index build path. Mutable — see {@link _reconcileReadState} (#671 item 2). */
207
+ private i18nFields;
208
+ /** The configured string fields exposed to `retrieve()`; `undefined` for ordinary collections (zero-cost). */
209
+ private readonly textIndexes;
210
+ /** Session-scoped lexical index store; `undefined` (zero-cost) unless `textIndexes` is non-empty. */
211
+ private readonly searchIndexStore;
212
+ /** Embedding config for write-time vector derivation; `undefined` (zero-cost) for ordinary
213
+ * collections. When set, `put()` encodes the source field(s) and stores an encrypted `_vec` sidecar. */
214
+ private readonly embeddings;
215
+ /** In-memory vector set, populated lazily from `_vec` sidecars; `undefined` when no embedding config is declared. */
216
+ private vectorSet;
217
+ /** Field name → `DictKeyDescriptor` for `dictKey()` fields; used by `get()`/`list()` to add `<field>Label` virtual fields when a locale is requested. Mutable — see {@link _reconcileReadState} (#671 item 2). */
218
+ private dictKeyFields;
219
+ /** Field name → `LookupDescriptor` for native `lookup()`/`enumOf()`/`dict()` fields (#650 Task 2) — describe()-only in this task. Mutable — see {@link _reconcileReadState} (#671 item 2). */
220
+ private lookupFields;
221
+ /** Sync join-dressing hook (#650 Task 6, #626 retirement) — `querySourceForJoin()`'s `presentForJoin`. Mutable — see {@link _reconcileReadState} (#671 item 3). */
222
+ private presentForJoin;
223
+ /** Consumer-neutral per-field descriptors declared via `fieldMeta`; read by `getFieldMeta()`, merged by `describe()`. */
224
+ private fieldMeta;
225
+ /** Collection-level descriptive metadata declared via `meta`; read by `getMeta()`, surfaced in `describe()`. */
226
+ private meta;
227
+ /** Outbound ref declarations (snapshot from vault refRegistry at construction time); used by `describe()`. */
228
+ private readonly _refs;
229
+ /** Money field descriptors keyed by field path, typed as the opaque {@link ViaDescriptor} marker
230
+ * (the kernel never inspects the concrete shape); `put()` quantizes to a scaled-int string,
231
+ * `get()`/`list()` decode back. Mutable so {@link _applyMoneyFields} can attach. */
232
+ private moneyFields;
233
+ private via;
234
+ /**
235
+ * Computed scalar fields, evaluated first on every `put()`. Mutable for
236
+ * the same MV-pre-creation reconcile as {@link moneyFields}.
237
+ */
238
+ private computed;
239
+ /**
240
+ * Resolved classified() sensitive-field descriptors, declared via the
241
+ * `classifiedFields` collection option. Mutable so {@link _applyClassifiedFields}
242
+ * can attach a declaration to a collection MV-analysis pre-created.
243
+ */
244
+ private classified;
245
+ /**
246
+ * Frozen construction-time facts the refusal matrix (R1-R5) checks against.
247
+ * Stored so {@link _applyClassifiedFields} — door 2, the reconcile seam —
248
+ * can re-run the SAME guard the config resolver ran at door 1 (C5's lesson:
249
+ * crdt/conflictPolicy/perRecordKeys are construction-only but
250
+ * classifiedFields can attach later).
251
+ */
252
+ private readonly classifiedGuardCtx;
253
+ /**
254
+ * Digest-only classified fields (`storage: 'digest-only'`), keyed by field
255
+ * name — the enclave-consumable policy map the codec's write path carries
256
+ * `_vdig` forward under (C6). `null` when the collection declares none.
257
+ */
258
+ private readonly vdigFields;
259
+ /** C-A/R10 memoization: marker declared-set lookup (undefined=unresolved) + classified-handle persist-once flag. */
260
+ private _markerDigestOnlyCache;
261
+ private _markerPersisted;
262
+ /**
263
+ * Tree-shake seam for `reveal()` — defaults to `NO_CLASSIFIED`, which
264
+ * throws `ClassifiedNotEnabledError`. Set via the `classifiedStrategy`
265
+ * `createNoydb()` option (opt in with `withClassified()`).
266
+ */
267
+ private readonly classifiedStrategy;
268
+ /** Async callback provided by the Vault to open a dynamic dictionary handle (for label-map pre-computation in the search index). Only used in `resolveDictLabelMaps()`; static dicts bypass this entirely. Mutable, assign-once — see {@link _reconcileReadState} (#671 item 1). */
269
+ private getDictionary;
270
+ /**
271
+ * declared deterministic fields. `null` when the feature
272
+ * is inactive for this collection; a frozen `Set` otherwise.
273
+ */
274
+ private readonly deterministicFields;
275
+ /**
276
+ * Declared structural-group-encryption fields (`sensitive`). Each is
277
+ * sealed into its own `_sealed[field]` slot under a per-field key and kept
278
+ * out of the open `_data` blob. Empty set ⇒ feature off (byte-identical
279
+ * output). See {@link encryptRecord} / {@link decryptRecord}.
280
+ */
281
+ private readonly sensitiveFields;
282
+ /**
283
+ * Per-record CEK opt-in (`perRecordKeys: true`). When set, writes mint /
284
+ * reuse a per-record content-encryption key and stamp `_cek` on the
285
+ * envelope (see {@link EncryptedEnvelope._cek}). OFF by default — a
286
+ * non-adopting collection takes the byte-identical legacy path. The READ
287
+ * path does not consult this flag: `_cek` presence on the envelope is the
288
+ * format discriminant, so a mixed vault (and a recipient that never set the
289
+ * flag) still decrypts CEK records.
290
+ */
291
+ private readonly perRecordCek;
292
+ /**
293
+ * Per-record provenance opt-in (`provenance: true`). When set, `put()` calls
294
+ * that supply a `source` option stamp `_source`/`_sourceTs` onto the
295
+ * unencrypted envelope metadata. Off by default — zero cost for collections
296
+ * that don't need lineage tracking.
297
+ */
298
+ private readonly provenance;
299
+ /**
300
+ * Session-scoped `(id) → CEK` cache for this collection. Lets updates
301
+ * reuse a record's stable CEK and lets repeated reads skip the AES-KW
302
+ * unwrap. Bounded by LRU; never persisted. Dropped when the owning
303
+ * collection instance is discarded — `vault.load()` clears the
304
+ * collectionCache, so a keyring refresh drops every CEK alongside the
305
+ * DEK cache. `null` unless `perRecordCek` is set.
306
+ */
307
+ private readonly cekCache;
308
+ /**
309
+ * The per-record envelope build + encrypt/decrypt + per-record-CEK +
310
+ * sealed-field crypto, extracted off this god-object. Holds no mutable
311
+ * state of its own — it shares this collection's `cekCache` reference (so
312
+ * tier methods and `vault.invalidateRecordCaches` evictions stay visible to
313
+ * it) and reads the rest of its dependencies as a frozen context snapshot.
314
+ */
315
+ private readonly codec;
316
+ /**
317
+ * declared tiers for this collection. `null` when
318
+ * tier-aware methods are disabled. Tier 0 is implicit and never
319
+ * stored here.
320
+ */
321
+ private readonly tiers;
322
+ private readonly tierMode;
323
+ private readonly onCrossTierAccess;
324
+ /**
325
+ * Optional reference to the vault-level hash-chained audit
326
+ * log. When present, every successful `put()` and `delete()` appends
327
+ * an entry to the ledger AFTER the adapter write succeeds (so a
328
+ * failed adapter write never produces an orphan ledger entry).
329
+ *
330
+ * The ledger is always a vault-wide singleton — all
331
+ * collections in the same vault share the same LedgerStore.
332
+ * Vault.ledger() does the lazy init; this field just holds
333
+ * the reference so Collection doesn't need to reach back up to the
334
+ * vault on every mutation.
335
+ *
336
+ * `undefined` means "no ledger attached" — supported for tests that
337
+ * construct a Collection directly without a vault, and for
338
+ * future backwards-compat scenarios. Production usage always has a
339
+ * ledger because Vault.collection() passes one through.
340
+ */
341
+ private readonly ledger;
342
+ /** — per-collection CRDT mode, or undefined for normal LWW-at-record-level. */
343
+ private readonly crdtMode;
344
+ /** — optional remote/sync adapter for presence broadcasting. */
345
+ private readonly syncAdapter;
346
+ /** — consent-audit hook, no-op when no scope is active. */
347
+ private readonly onAccess;
348
+ /**
349
+ * Vault-internal hook for derivation dispatch. When set,
350
+ * `Collection.put` consults the registry after the source-write
351
+ * commits and writes derived outputs through `getCollection(name).put`.
352
+ */
353
+ private readonly derivationSource;
354
+ /**
355
+ * Vault-internal hook for materialized-view dispatch.
356
+ * Parallel to `derivationSource` — when set, `Collection.put` fires
357
+ * `MaterializedViewRegistry.onSourceWrite` after the source-write
358
+ * commits + after `dispatchDerivations` has run.
359
+ */
360
+ private readonly materializedViewSource;
361
+ /** #638 Task 4 — `Vault._collectGraphTouch`; a no-op absent an open batch. `collectDelete` (#640) is the sync-apply delete socket. */
362
+ private readonly graphDispatch;
363
+ /**
364
+ * Optional back-reference to the owning compartment's ref
365
+ * enforcer. When present, `Collection.put` calls
366
+ * `refEnforcer.enforceRefsOnPut(name, record)` before the adapter
367
+ * write, and `Collection.delete` calls
368
+ * `refEnforcer.enforceRefsOnDelete(name, id)` before its own
369
+ * adapter delete. The Vault handles the actual registry
370
+ * lookup and cross-collection enforcement — Collection just
371
+ * notifies it at the right points in the lifecycle.
372
+ *
373
+ * Typed as a structural interface rather than `Vault`
374
+ * directly to avoid a circular import. Vault implements
375
+ * these two methods; any other object with the same shape would
376
+ * work too (used only in unit tests).
377
+ */
378
+ private readonly refEnforcer;
379
+ /**
380
+ * Optional back-reference to the owning compartment's join resolver
381
+ *`). When present,
382
+ * `Collection.query()` builds a `JoinContext` that lets the Query
383
+ * resolve `.join(field)` calls into target collections via this
384
+ * resolver.
385
+ *
386
+ * Two methods:
387
+ * - `resolveSource(name)` — fetch a `JoinableSource` for the
388
+ * right-side collection by name. Returning `null` means "no
389
+ * such collection in this compartment" — the executor then
390
+ * throws an actionable error naming the missing target.
391
+ * - `resolveRef(leftCollection, field)` — look up the ref
392
+ * descriptor the left collection declared for this field.
393
+ * `null` when the field has no ref, which makes `.join()`
394
+ * throw at plan time before any records are touched.
395
+ *
396
+ * Typed structurally rather than as `Vault` to avoid a
397
+ * circular import. Vault implements these two methods; any
398
+ * other object with the same shape works too (used only in unit
399
+ * tests against a plain object).
400
+ */
401
+ private readonly joinResolver;
402
+ constructor(opts: CollectionOpts<T>);
403
+ /**
404
+ * Return the Standard Schema validator attached to this collection,
405
+ * or `undefined` if none was provided at construction time.
406
+ *
407
+ * Exposed (read-only) for the Vault-level export primitive,
408
+ * which surfaces each collection's schema in the per-chunk metadata
409
+ * so downstream serializers (`@noy-db/as-*` packages, custom
410
+ * exporters) can produce schema-aware output without poking at
411
+ * collection internals. The validator object is returned by
412
+ * reference — callers must treat it as immutable.
413
+ */
414
+ getSchema(): StandardSchemaV1<unknown, T> | undefined;
415
+ /** The declared consumer-neutral field metadata channel (canonical). */
416
+ getFieldMeta(): Record<string, FieldMeta> | undefined;
417
+ /** The collection's declared descriptive metadata. */
418
+ getMeta(): CollectionMeta | undefined;
419
+ /**
420
+ * Aggregate all collection-level configuration options that are actively set
421
+ * into a {@link CollectionConfig} snapshot. Returns `undefined` when no options
422
+ * are configured (omitting the `config` block from `dumpSchema()` output).
423
+ * Consumed by `walk.ts` to populate `CollectionDescriptor.config`.
424
+ */
425
+ getConfig(): CollectionConfig | undefined;
426
+ /**
427
+ * Describe the collection's field schema from in-memory config — zero store I/O.
428
+ * Sync overload (no args): merges moneyFields/dictKeyFields/refs/computed/fieldMeta/
429
+ * taint into a {@link CollectionDescription} (types inferred from config; the async
430
+ * overload also derives validator-exact types and resolves dynamic dict labels).
431
+ */
432
+ describe(): CollectionDescription;
433
+ describe(opts: DescribeOptions): Promise<CollectionDescription>;
434
+ /**
435
+ * Async describe implementation. Derives validator-exact types via deriveZodFields
436
+ * (lazy, no static zod import), optionally resolves dynamic-dict labels from vault.dictionary(name).list(),
437
+ * then delegates to buildDescription (which also runs fieldMeta key-validation).
438
+ */
439
+ private describeAsync;
440
+ /** JSON Schema for this collection with describe() metadata as x- extensions. */
441
+ toJSONSchema(): Promise<object>;
442
+ /** Single-point audited reveal of one classified field. Requires withClassified(). */
443
+ reveal(id: string, field: string): Promise<unknown>;
444
+ /** Verify-without-reveal: verdict-only oracle for one classified field. Requires withClassified(). */
445
+ verify(id: string, field: string, candidate: string): Promise<ClassifiedVerdict>;
446
+ /** k-of-n challenge over the collection's secretAnswer members. Requires withClassified(). */
447
+ verifyGroup(id: string, answers: Record<string, string>, opts: {
448
+ readonly min: number;
449
+ }): Promise<{
450
+ readonly passed: boolean;
451
+ }>;
452
+ private _classifiedVerifyCtx;
453
+ /**
454
+ * Equatable blind-index lookup: the ids whose classified digest-only
455
+ * `equatable` field carries a `_bidx` tag matching `candidate` AND whose
456
+ * `_vdig` payload confirms it. Requires the field to be declared
457
+ * `classified.password({ equatable: true })` (or `secretAnswer`) and the
458
+ * collection to have opened its `acknowledgeEquatableRisk` door.
459
+ *
460
+ * The algorithm order is load-bearing (spec §3):
461
+ * 1. Caller-bug refusals thrown at ~0 elapsed, BEFORE any PBKDF2 (R9 /
462
+ * Oracle #6): the three field mis-declarations share ONE constant,
463
+ * field-name-free message so the refusal text cannot enumerate which
464
+ * fields are classified / digest-only / equatable.
465
+ * 2. Derive the ONE blind-index target UNCONDITIONALLY (I-1 / F1): an empty
466
+ * collection still pays exactly one 600K PBKDF2, so wall-time can never
467
+ * distinguish "no records" from "no match". No early return may precede
468
+ * this line.
469
+ * 3. Scan `list + one get` per id, string-comparing the stored `_bidx` tag —
470
+ * decrypting NOTHING — and retain each hit's already-fetched envelope.
471
+ * 4. Emit the single sweep consent op (`onAccess('find', '*')`) now — after
472
+ * the scan, before confirm (Oracle #5) — fixing its store-write timestamp
473
+ * independent of hit count.
474
+ * 5. Confirm-by-verify against the ALREADY-FETCHED envelope (C-B): run the
475
+ * enclave `verifyDigestField` on an in-memory `getEnvelope` closure so the
476
+ * confirm reads ZERO additional envelopes. A tag-hit whose `_vdig` fails
477
+ * to confirm is dropped silently (a splice is indistinguishable from a
478
+ * stale tag). Store-shape law: the only store calls are `list + N get`.
479
+ */
480
+ findByDigest(field: string, candidate: string): Promise<readonly string[]>;
481
+ /**
482
+ * Retire a field's equatable blind-index (`_bidx`) coverage across every
483
+ * live record — the SOLE lazy-write-independent drop-path for a still-live
484
+ * record's tag (besides clear / `forget()` / DEK-rotation). For each envelope
485
+ * carrying `_bidx[field]`, rewrite it WITHOUT that slot (dropping the whole
486
+ * `_bidx` map when it becomes empty), leaving `_vdig[field]` and everything
487
+ * else INTACT — the field stays `digest-only`, only the index coverage is
488
+ * retired. NO crypto, NO re-mint, NO re-encrypt: a targeted envelope rewrite.
489
+ * Returns the count of records scrubbed.
490
+ *
491
+ * This is a maintenance write, not a read-egress: it emits NO `'find'` op and
492
+ * no consent. The field is validated to a declared equatable digest-only
493
+ * classified field (only such a field ever carries `_bidx`).
494
+ *
495
+ * **Ledger consistency**: dropping `_bidx[field]` changes the envelope's
496
+ * payload hash (`_bidx` is bound into `envelopeBodyForHash`), so a raw
497
+ * `adapter.put` of the scrubbed envelope WITHOUT a matching ledger entry would
498
+ * desync the chain and make a future integrity cross-check flag false
499
+ * tampering. After each rewrite we therefore append an `op:'migration'` entry
500
+ * recording the NEW payloadHash at the SAME version — this is index retirement,
501
+ * not a new record version, so `_v` is NOT bumped; the migration op is
502
+ * reverse-delta-inert (`ledger.reconstruct` skips non-put/delete ops) yet
503
+ * keeps the hash chain and the record's latest recorded payloadHash correct.
504
+ */
505
+ scrubEquatableTags(field: string): Promise<number>;
506
+ /**
507
+ * @internal — attach money descriptors post-construction. MV dependency
508
+ * analysis auto-creates a source collection (without options) during
509
+ * `openVault`, before the user's `collection(name, { moneyFields })`
510
+ * declaration; this reconciles that ordering. First-wins. Not public.
511
+ *
512
+ * PREPENDS money rather than appending: {@link compileViaBindings} always
513
+ * compiles money before i18n (money-first pipeline order — see its
514
+ * docstring), and by the time this reconcile runs an i18n binding may
515
+ * already be sitting in `this.via.bindings` (declared at construction).
516
+ * Appending here would yield `[i18n, money]` on this path vs `[money,
517
+ * i18n]` from compile — prepending keeps both paths money-first.
518
+ */
519
+ _applyMoneyFields(moneyFields: Record<string, ViaDescriptor>): void;
520
+ /** @internal — attach computed fields post-construction. See {@link _applyMoneyFields}. */
521
+ _applyComputed(computed: ComputedFields): void;
522
+ /** @internal — attach fieldMeta post-construction. See {@link _applyMoneyFields}. First-wins. */
523
+ _applyFieldMeta(fieldMeta: Record<string, FieldMeta>): void;
524
+ /** @internal — attach collection-level meta post-construction. See {@link _applyMoneyFields}. First-wins. */
525
+ _applyMeta(meta: CollectionMeta): void;
526
+ /**
527
+ * @internal — attach classified fields post-construction. See {@link _applyMoneyFields}.
528
+ * First-wins. Note: unlike money/computed/meta, this cannot retro-seal a
529
+ * collection that was already auto-created — `sensitiveFields` is frozen at
530
+ * construction time. A reconciled declaration is only accepted when none of
531
+ * its members are `storage: 'recoverable'` (those require sealing at first
532
+ * open); otherwise this throws rather than silently persisting the value as
533
+ * inline plaintext while `describe()` advertises protection.
534
+ */
535
+ _applyClassifiedFields(classifiedFields: Record<string, ClassifiedEntry>): void;
536
+ get _ramCiphertext(): boolean;
537
+ /**
538
+ * Get a single record by ID.
539
+ *
540
+ * @param id Record identifier.
541
+ * @param locale Optional locale options. When provided,
542
+ * `i18nText` fields are resolved to the requested locale
543
+ * string, and `dictKey` fields get a `<field>Label`
544
+ * virtual field added. Pass `{ locale: 'raw' }` to
545
+ * return the full `{ [locale]: string }` map instead.
546
+ *
547
+ * @returns The decrypted (and optionally locale-resolved) record, or
548
+ * `null` if not found.
549
+ */
550
+ get(id: string, locale?: LocaleReadOptions): Promise<SealedView<T, S> | null>;
551
+ /**
552
+ * Return the raw CRDT state for a record.
553
+ * Only available on collections configured with `crdt: 'lww-map' | 'rga' | 'yjs'`.
554
+ * Use this for merge operations or to pass to `@noy-db/yjs`.
555
+ * Throws if the collection is not in CRDT mode.
556
+ */
557
+ getRaw(id: string): Promise<CrdtState | null>;
558
+ /**
559
+ * Read a record's unencrypted envelope metadata (version, timestamps,
560
+ * provenance) without decrypting the body.
561
+ *
562
+ * Returns `null` when no envelope exists for `id` (record absent or never
563
+ * written). Only `_source`/`_sourceTs` fields are populated when the
564
+ * collection was opened with `provenance: true` AND the record was written
565
+ * with a `source` option — but this method works on any collection because
566
+ * it reads the raw envelope directly.
567
+ *
568
+ * @returns `{ version, timestamp, by?, source?, sourceTs? }` or `null`.
569
+ *
570
+ * @example
571
+ * const meta = await clients.getMetadata('c1')
572
+ * if (meta) console.log(meta.source, meta.timestamp)
573
+ */
574
+ getMetadata(id: string): Promise<{
575
+ readonly version: number;
576
+ readonly timestamp: string;
577
+ readonly by?: string;
578
+ readonly source?: string;
579
+ readonly sourceTs?: string;
580
+ } | null>;
581
+ /**
582
+ * Return a presence handle for this collection.
583
+ *
584
+ * The handle manages an encrypted ephemeral presence channel keyed by an
585
+ * HKDF derivation of this collection's DEK. Presence payloads are invisible
586
+ * to the adapter.
587
+ *
588
+ * @param opts.staleMs Milliseconds before a peer is considered inactive.
589
+ * Default: 30 000.
590
+ * @param opts.pollIntervalMs Milliseconds between storage polls (fallback mode).
591
+ * Default: 5 000.
592
+ */
593
+ presence<P = unknown>(opts?: {
594
+ staleMs?: number;
595
+ pollIntervalMs?: number;
596
+ }): PresenceHandle<P>;
597
+ /**
598
+ * Create or update a record. Runs inside the hub's write-queue tracker
599
+ * so `hub.writeQueue.pending` reflects this write.
600
+ *
601
+ * @param id Record identifier.
602
+ * @param record The record body (validated by the collection's schema
603
+ * if one was attached at `vault.collection(...)` time).
604
+ * @param options Optional metadata for audit + import workflows.
605
+ * `reason` is stamped onto the resulting ledger entry
606
+ * so audit consumers can filter via
607
+ * `entries.filter(e => e.reason?.startsWith('import:'))`.
608
+ * `source` is an opaque source id (e.g. `'crm-sync'`, `'firm-A'`)
609
+ * stamped onto the envelope as `_source`/`_sourceTs` when
610
+ * the collection has `provenance: true`. Ignored otherwise
611
+ * (zero cost).
612
+ * `sourceTs` is an optional ISO-8601 origin timestamp override;
613
+ * when supplied together with `source` on a provenance collection,
614
+ * replaces the machine-stamped `now()` so re-merges preserve the
615
+ * ORIGIN refresh time across vaults. (FR-4)
616
+ */
617
+ put(id: string, record: T, options?: {
618
+ readonly reason?: string;
619
+ readonly source?: string;
620
+ readonly sourceTs?: string;
621
+ }): Promise<void>;
622
+ /**
623
+ * Resolve the prior stored record (with its `_i18nFilled` marker) for
624
+ * densify. Eager: in-memory cache; lazy: LRU then adapter. undefined if absent.
625
+ */
626
+ private resolveDensifyPrior;
627
+ /**
628
+ * Densify provenance for a record: which i18n slots were auto-filled,
629
+ * e.g. `{ name: ['en'] }`. undefined when nothing was filled. The marker is
630
+ * stripped from ordinary reads; this is the sanctioned audit accessor.
631
+ */
632
+ i18nProvenance(id: string): Promise<Record<string, readonly string[]> | undefined>;
633
+ /**
634
+ * Validate a record against this collection's schema WITHOUT writing it.
635
+ * Returns the (possibly coerced) record on success; throws
636
+ * {@link SchemaValidationError} (direction: `'input'`) on violation.
637
+ * A no-op pass-through when no schema is declared.
638
+ *
639
+ * Used by FR-8 migrate-then-merge to pre-validate all staged records
640
+ * before `mergeDecryptedRecords` writes anything — so a failed upgrade
641
+ * never half-writes the receiver.
642
+ */
643
+ validateInput(record: T): Promise<T>;
644
+ /**
645
+ * Resolve the prior record as REAL VALUES for the eager write/delete paths
646
+ * (history snapshot, ledger patch, index upkeep). The eager cache holds
647
+ * {@link Sealed} handles for sensitive fields (non-residency), so when the
648
+ * collection seals anything we re-decrypt the stored envelope to materialise
649
+ * real values — re-encrypting a handle would otherwise persist the marker
650
+ * `'[sealed]'` in place of the value. `via?.hasAtRestHooks` (#642) catches
651
+ * hook-only sealing (taint/classified, no local `sensitiveFields`).
652
+ */
653
+ private resolvePriorValues;
654
+ /** Resolves the prior envelope/record for a gate event; elides the read (#267) when no handler at `point` needs it (`elided: true`, `env`/`record` null). */
655
+ private resolveGatePrior;
656
+ /**
657
+ * Wraps {@link RecordCodec.toCacheRecord} with an additional strip for
658
+ * digest-only classified fields: the codec already omits them from `_data`
659
+ * on write, but the write path caches the pre-encrypt `record` object
660
+ * directly (to skip a redundant decrypt) — without this, a vdig field's
661
+ * plaintext would sit in the working-set cache and `get()` would leak it
662
+ * right back out, defeating C6.
663
+ */
664
+ private _toCacheableRecord;
665
+ /** @internal Untracked put body — call {@link put}, not this. */
666
+ private _putInternal;
667
+ /**
668
+ * Fire registered MV strategies whose dependency set includes this
669
+ * collection. Eager-mode MVs re-materialize inline via
670
+ * `MaterializedViewExecutor.refresh`; lazy / manual modes are
671
+ * no-ops in the foundation; wired in the lazy-mode implementation.
672
+ *
673
+ * Skips entirely when the record being written is itself an
674
+ * MV-emitted row (carries `_materializedFrom`) — defensive guard
675
+ * against missed cycle detection.
676
+ *
677
+ * @internal `wave` (#638 Task 4): when present (the sync/cutover/restore dispatch wave),
678
+ * an eager MV already refreshed this wave is skipped (per-target dedup, keyed on spec name).
679
+ */
680
+ dispatchMaterializedViews(id: string, record: T, wave?: WaveContext): Promise<void>;
681
+ /**
682
+ * Fire registered derivation strategies for this source collection.
683
+ * Eager mode runs `derive` inline and writes each output via the
684
+ * sibling `Collection.put`; lazy mode marks dependent outputs stale
685
+ * (D11 stub today). Errors in non-strict mode are logged and
686
+ * skipped; strict mode propagates the first failing output's error.
687
+ *
688
+ * Skips entirely when the record being written is itself a derived
689
+ * output (carries `_derivedFrom`) — defensive guard against missed
690
+ * cycle detection.
691
+ */
692
+ /**
693
+ * @internal The RAW stored record (canonical-money form, i18n maps
694
+ * intact), WITHOUT the locale resolution `get()` applies. Used as the
695
+ * patch base for self-write reverse-denorm so writing back never clobbers
696
+ * an i18n map or re-quantizes money incorrectly. Returns null for
697
+ * missing / tombstoned records.
698
+ */
699
+ _getStoredRecord(id: string): Promise<T | null>;
700
+ /** @internal #638 Task 4 — decrypted STORED-form record + envelope version for the sync/cutover/
701
+ * restore dispatch wave (id threaded into decrypt, matching `_invalidateCacheEntry`'s contract). */
702
+ _getStoredRecordForDispatch(id: string): Promise<{
703
+ record: T;
704
+ version: number;
705
+ } | null>;
706
+ /**
707
+ * @internal Ids of records whose top-level `field` equals `value`.
708
+ * Uses the FK index when the field is indexed (O(matches)); otherwise a
709
+ * linear scan (O(N) — fine for small child sets; index the FK to scale).
710
+ */
711
+ _findMatchingIds(field: string, value: unknown): Promise<string[]>;
712
+ /** @internal Recompute a rollup aggregate onto the parent from `parentId`'s current children (value-equality guarded; no-op absent parent).
713
+ * `wave` (#638 T4, #640): per-target dedup. Returns the `putDerivedOutput` outcome, or `'noop'` (no parent/no-op/deduped) — `dispatchRollupsOnDelete`'s forget-fanout caller + #640's `_recomputeDeletedRollups` need this to fill their reports. */
714
+ private recomputeRollup;
715
+ /** @internal #640 — this deleted child's rollup PARENT intents (see via/dispatch.ts#resolveRollupDeleteIntents). */
716
+ _rollupDeleteIntents(deleted: T): RollupDeleteIntent[];
717
+ /**
718
+ * @internal Fire any rollups for which THIS collection is the child `from`, recomputing the
719
+ * affected parent after a child delete/forget. Called from the delete path (return discarded)
720
+ * and from `forgetDerivedFanout` (#638 Task 6), which needs the per-target outcome to fill
721
+ * `ForgetResult.derivedAggregatesRecomputed`/`derivedResidueFrozen`). `wave` (#640): per-target dedup for the sync-apply path; `undefined` on local-delete (byte-identical).
722
+ */
723
+ dispatchRollupsOnDelete(id: string, deleted: T, wave?: WaveContext): Promise<ReadonlyArray<{
724
+ readonly into: string;
725
+ readonly parentId: string;
726
+ readonly outcome: RollupOutcome;
727
+ }>>;
728
+ /** @internal #640 — the wave's per-id driver: recompute each sync-apply delete's rollup parent. */
729
+ _recomputeDeletedRollups(intents: readonly RollupDeleteIntent[], wave: WaveContext): Promise<void>;
730
+ /** @internal `wave` (#638 Task 4) — threaded to `recomputeRollup` for the sync/cutover/restore
731
+ * dispatch wave's per-target dedup; `undefined` on the local-write path (byte-identical). */
732
+ dispatchDerivations(id: string, record: T, version: number, wave?: WaveContext): Promise<void>;
733
+ /**
734
+ * Delete a record by ID. Runs inside the hub's write-queue tracker
735
+ * so `hub.writeQueue.pending` reflects this write.
736
+ */
737
+ delete(id: string): Promise<void>;
738
+ /**
739
+ * @internal — bulk-rewrite every record through a cutover transform.
740
+ * Raw adapter path (bypasses the write gate + guards — the transform is
741
+ * trusted and runs only during the `migrating` phase). Bumps each
742
+ * record's `_v` and appends a ledger `op:'migration'` entry.
743
+ */
744
+ _applyCutoverTransform(transform: (doc: Record<string, unknown>) => Record<string, unknown>): Promise<number>;
745
+ /** @internal Untracked delete body — call {@link delete}, not this. */
746
+ private _deleteInternal;
747
+ /**
748
+ * @internal — system-internal delete that bypasses user-facing
749
+ * delete hooks (`onDelete`, FK ref enforcer). Used by derivation tombstones and MV refresh
750
+ * (Dim 14 v2) — system housekeeping shouldn't trip user invariants
751
+ * registered against the output collection. The ledger entry and
752
+ * history snapshot still fire so backup integrity and time-travel
753
+ * reconstruction stay consistent.
754
+ *
755
+ * Returns `true` when it erased a live record, `false` for delete-of-absent (idempotent
756
+ * contract — both txCtx-aware and txCtx===null callers honour this, short-circuiting before any side-effect).
757
+ *
758
+ * When a `txCtx` is supplied, the prior envelope is captured and
759
+ * pushed onto `txCtx._executed` BEFORE the delete fires — mirrors
760
+ * the rollback hardening for puts. Callers outside a
761
+ * multi-record transaction pass `null` and skip the tracking.
762
+ *
763
+ * Amendment composition: if `_internalDelete` runs while a vault's
764
+ * `GuardRegistry` has an amendment window open, the `{before, after:
765
+ * null}` change pair is pushed onto the amendment change-set the
766
+ * same way a user-initiated delete would. The `onDelete` user-hook
767
+ * is still skipped (housekeeping must not trip user invariants in
768
+ * normal mode), but the amendment's invariant DOES see the change
769
+ * — so a `RCT-CANCEL-001`-style invariant pairing can reject a
770
+ * derivation-driven tombstone fired during an admin amendment.
771
+ *
772
+ * Constraint to surface to consumers: output collections of
773
+ * derivations with `optional: true` outputs should not be the
774
+ * targets of `strict` or `cascade` inbound foreign-key refs —
775
+ * `_internalDelete` bypasses the ref enforcer by design (the
776
+ * `onDelete` bypass primitive). Treat the housekeeping path as
777
+ * "system can tombstone its own emissions regardless of FK shape."
778
+ *
779
+ * Permission handling is unchanged: the caller must still hold
780
+ * write permission on the collection (derivations run under the
781
+ * user's keyring).
782
+ */
783
+ _internalDelete(id: string, txCtx?: TxContext | null): Promise<boolean>;
784
+ private _doDelete;
785
+ /**
786
+ * @internal — GDPR crypto-shred a LIVE record to a tombstone.
787
+ *
788
+ * Rewrites the on-disk envelope to `{ _noydb, _v, _ts, _by, _iv:'', _data:'' }`,
789
+ * dropping `_iv`/`_data`/`_cek`/`_det`. The wrapped per-record CEK is gone, so
790
+ * the body — and (via {@link tombstoneHistory}) every history version under
791
+ * the same CEK — is permanently undecryptable; the collection DEK and every
792
+ * other record are untouched. `_det` is stripped too, so `findByDet` no
793
+ * longer matches the shredded record (avoiding a post-shred TamperedError).
794
+ *
795
+ * Unlike `delete()`/`_internalDelete`, this:
796
+ * - does NOT fire onDelete guards / MV / derivation dispatch (a shred is an
797
+ * erasure, not a domain delete — re-running those would be wrong),
798
+ * - does NOT append a per-record ledger entry (`vault.forget()` appends a
799
+ * single `op:'forget'` summary for the whole subject),
800
+ * - keeps the record KEY present (it's an overwrite, not an adapter delete)
801
+ * so the version counter + "record existed" survive for audit.
802
+ *
803
+ * Idempotent: returns `null` when the record is absent or already a tombstone.
804
+ * Otherwise returns `{ previousVersion }`. Invalidates the eager cache, the
805
+ * lazy LRU, and the per-record CEK cache for this id.
806
+ */
807
+ /**
808
+ * @internal — decrypt an envelope to a plain record for subject-index
809
+ * rebuild. Returns `null` for a tombstone or unreadable envelope.
810
+ * Skips schema validation — the rebuild only reads the subject field.
811
+ */
812
+ _decodeEnvelope(envelope: EncryptedEnvelope, id: string): Promise<Record<string, unknown> | null>;
813
+ _writeTombstone(id: string, actor: string): Promise<{
814
+ previousVersion: number;
815
+ } | null>;
816
+ /**
817
+ * Cascade deletes of array-shape derived rows when a source row is deleted. Reads each
818
+ * registered strategy's fanout sidecar for this source id, deletes every listed derived
819
+ * row, then deletes the sidecar itself. Returns the REAL erased count (#622 review Finding 1).
820
+ *
821
+ * Record-shape derivations are skipped on the ordinary delete path (see _doDelete's comment).
822
+ * `eraseRecordShapeToo` (#638 T6, default `false`) opts a same-id record-shape copy into
823
+ * erasure too — forget()'s fanout, GDPR residue. A delete-of-absent contributes 0 either way.
824
+ * @internal
825
+ */
826
+ dispatchArrayDerivationsOnDelete(id: string, eraseRecordShapeToo?: boolean): Promise<number>;
827
+ /**
828
+ * Mirror of {@link dispatchMaterializedViews} for the delete/forget path — no `_materializedFrom`
829
+ * skip (record's gone); the `internal` gate at `_doDelete` is the recursion guard. Returns the
830
+ * row count TOMBSTONED across every eager MV sourced here (#638 T6 — `forgetDerivedFanout`'s
831
+ * `derivedRecordsErased`); a lazy MV only flips its stale bit (0 contribution — resolved on read).
832
+ * @internal
833
+ */
834
+ dispatchMaterializedViewsOnDelete(id: string): Promise<number>;
835
+ /**
836
+ * List all records in the collection.
837
+ *
838
+ * Throws in lazy mode — bulk listing defeats the purpose of lazy
839
+ * hydration. Use `scan()` to iterate over the full collection
840
+ * page-by-page without holding more than `pageSize` records in memory.
841
+ *
842
+ * @param locale Optional locale options. When provided,
843
+ * each record is locale-resolved before being returned.
844
+ */
845
+ list(locale?: LocaleReadOptions): Promise<T[]>;
846
+ /**
847
+ * Scan-mode full-text search over a plain-text `field`. Decrypts the
848
+ * collection in memory and ranks records by BM25 against the tokenized query.
849
+ * **Zero added store leakage** — pure client-side scan; nothing searchable is
850
+ * written to the store. (A store-usable blind index for at-scale search is a
851
+ * separate, gated opt-in.) Eager mode only.
852
+ *
853
+ * `opts.match` (`'any'` default | `'all'`), `opts.prefix` (last query term as
854
+ * a prefix → typeahead), `opts.limit` (top-N). Returns `{ id, score, record }`
855
+ * ranked by descending score. The default tokenizer is word-boundary based —
856
+ * see `src/search/tokenize.ts` for the Thai/CJK caveat.
857
+ */
858
+ search(field: string, query: string, opts?: SearchOptions): Promise<SearchResult<T>[]>;
859
+ /** Force-persist the lexical index now — gated behind `searchStrategy: withSearch()`. */
860
+ flushIndex(): Promise<void>;
861
+ /** Pre-build the lexical index — gated behind `searchStrategy: withSearch()`. */
862
+ warmIndex(): Promise<void>;
863
+ /** Retrieval (lexical | semantic | hybrid) — gated behind `searchStrategy: withSearch()`. */
864
+ retrieve(query: string, opts?: RetrieveOptions<T>): Promise<RetrieveHit<T>[]>;
865
+ /** Raw-vector kNN — gated behind `searchStrategy: withSearch()`. */
866
+ similarTo(vector: Float32Array, opts?: {
867
+ k?: number;
868
+ minScore?: number;
869
+ includeRecord?: boolean;
870
+ }): Promise<RetrieveHit<T>[]>;
871
+ /**
872
+ * Bind the {@link SearchContext} the search/retrieval surface needs. The
873
+ * `cache` is the SAME `Map` reference the eager read/write path owns (passed
874
+ * by reference, never copied) so the index always builds over the live set.
875
+ */
876
+ private searchContext;
877
+ /**
878
+ * Put many records in one call. Each item is processed sequentially
879
+ * through the normal `put()` path — meaning per-item validation,
880
+ * history snapshots, ledger appends, and change events all still
881
+ * fire. The round-trip saving comes from the adapter staying hot
882
+ * across the batch (no connection re-open, no keyring re-unlock).
883
+ *
884
+ * ## Semantics
885
+ *
886
+ * **Best-effort with per-item results.** If item 5 of 10 fails, items
887
+ * 1–4 are already persisted and items 6–10 are still attempted.
888
+ * The returned {@link PutManyResult} lists every success and failure
889
+ * individually so the caller can decide whether to roll forward
890
+ * (retry the failures) or roll back (manually delete the successes).
891
+ *
892
+ * **True tx-atomic putMany** — pass `{ atomic: true }` to switch
893
+ * to the transaction executor: pre-flight CAS against every
894
+ * item's `expectedVersion`, then commit all ops with best-effort
895
+ * revert on mid-batch failure. Atomic mode throws on failure rather
896
+ * than returning a mixed-results object.
897
+ *
898
+ * ## Change events
899
+ *
900
+ * One `change` event per successfully-written record, same as N
901
+ * single-record puts. Subscribers don't need to special-case bulk.
902
+ */
903
+ putMany(entries: ReadonlyArray<readonly [id: string, record: T, opts?: PutManyItemOptions]>, options?: PutManyOptions): Promise<PutManyResult>;
904
+ /**
905
+ * Atomic-mode implementation of {@link putMany}. Pre-flights every
906
+ * `expectedVersion`, executes all puts in declaration order, and
907
+ * reverts executed ops via the raw adapter on mid-batch failure.
908
+ * See `runTransaction` for the shared semantics + crash-window caveat.
909
+ *
910
+ * @internal
911
+ */
912
+ private putManyAtomic;
913
+ /**
914
+ * Get many records in one call. Returns a `Map<id, T | null>` —
915
+ * missing records surface as `null` entries so the caller can
916
+ * distinguish "not found" from "lookup failed". Order-stable
917
+ * iteration (Map preserves insertion order = input `ids` order).
918
+ *
919
+ * Reads go through the per-id `get()` path, which means the cache
920
+ * / hydration logic stays consistent with single-record reads.
921
+ */
922
+ getMany(ids: readonly string[]): Promise<Map<string, T | null>>;
923
+ /**
924
+ * Delete many records in one call. Same best-effort contract as
925
+ * {@link putMany}: if item 5 fails, items 1–4 are already deleted
926
+ * and items 6–10 are still attempted.
927
+ *
928
+ * Deleting a non-existent id is not a failure — matches the
929
+ * idempotent semantics of single-record `delete()`.
930
+ */
931
+ deleteMany(ids: readonly string[]): Promise<DeleteManyResult>;
932
+ /**
933
+ * Build a chainable query against the collection. Returns a `Query<T>`
934
+ * builder when called with no arguments.
935
+ *
936
+ * Backward-compatible overload: passing a predicate function returns
937
+ * the filtered records directly (the API). Prefer the chainable
938
+ * form for new code.
939
+ *
940
+ * **Lazy-MV gap:** `query()` is synchronous and does NOT
941
+ * trigger lazy materialized-view resolve-on-read. If this
942
+ * collection is a lazy MV's output and the MV is currently stale,
943
+ * `query().toArray()` returns the pre-stale snapshot. To force a
944
+ * fresh read on a lazy MV, either call `list()` (which DOES
945
+ * trigger resolve) or `vault.refreshView(mvName)` before querying.
946
+ * The proper fix — extending `QuerySource` with an async prepare
947
+ * hook — is a separate PR.
948
+ *
949
+ * @example
950
+ * ```ts
951
+ * // New chainable API:
952
+ * const overdue = invoices.query()
953
+ * .where('status', '==', 'open')
954
+ * .where('dueDate', '<', new Date())
955
+ * .orderBy('dueDate')
956
+ * .toArray();
957
+ *
958
+ * // Legacy predicate form (still supported):
959
+ * const drafts = invoices.query(i => i.status === 'draft');
960
+ * ```
961
+ */
962
+ query(): Query<T, S, Q, M>;
963
+ query(predicate: (record: T) => boolean): T[];
964
+ /**
965
+ * Subscribe to every put/delete on this collection. Returns an
966
+ * unsubscribe function.
967
+ *
968
+ * Fires **after** the store write has committed — subscribers see
969
+ * only materialised state, never in-flight or rolled-back writes.
970
+ *
971
+ * This is an event stream, not a reactive value. For reactive
972
+ * "current array state" semantics use `query().live()`. Typical
973
+ * use cases for `subscribe()`:
974
+ * - audit-trail / activity-feed UI that lists events as they happen
975
+ * - Pinia-per-collection wiring where each store subscribes once
976
+ * - outbox-style workers that process every new record
977
+ *
978
+ * The callback receives a `CollectionChangeEvent<T>`:
979
+ * - `{ type: 'put', id, record }` — record is the current
980
+ * decrypted value. May be `null` if another op deleted the
981
+ * record between the emit and the handler firing (rare race).
982
+ * - `{ type: 'delete', id, record: null }` — deletion event;
983
+ * the record content is gone by the time the handler runs.
984
+ *
985
+ * The callback is invoked synchronously *with respect to the emit
986
+ * moment*, but the record lookup is async (cache hit for eager
987
+ * collections; one `get()` for lazy collections). If your handler
988
+ * does not need the record, cast it away and ignore — the lookup
989
+ * is still performed, but it's cheap on the hydrated path.
990
+ *
991
+ * ergonomic wrapper over `db.on('change', …)` that
992
+ * filters to this collection and hydrates the record.
993
+ */
994
+ subscribe(cb: (event: CollectionChangeEvent<T>) => void): () => void;
995
+ /**
996
+ * Return a minimal JoinableSource view of this collection's
997
+ * in-memory cache. Used by the Vault's `resolveSource`
998
+ * method when another collection's `.join()` needs to probe this
999
+ * one as the right side.
1000
+ *
1001
+ * The returned object captures the cache reference through a
1002
+ * closure, so subsequent mutations to the cache are visible to
1003
+ * the joined query. That's intentional: a join that fires after
1004
+ * the right-side collection has been updated should see the
1005
+ * fresh data.
1006
+ *
1007
+ * Throws in lazy mode because the cache is bounded and could
1008
+ * silently miss records — consistent with the `query()` /
1009
+ * `list()` lazy-mode policy. If this becomes a blocker for a
1010
+ * real consumer, the fix is to add an async `scan()`-backed
1011
+ * variant of this method, which is exactly what streaming joins will need anyway.
1012
+ */
1013
+ querySourceForJoin(): JoinableSource;
1014
+ /**
1015
+ * Cache statistics — useful for devtools, monitoring, and verifying
1016
+ * that LRU eviction is happening as expected in lazy mode.
1017
+ *
1018
+ * In eager mode, returns size only (no hits/misses are tracked because
1019
+ * every read is a cache hit by construction). In lazy mode, returns
1020
+ * the full LRU stats: `{ hits, misses, evictions, size, bytes }`.
1021
+ */
1022
+ cacheStats(): CacheStats;
1023
+ /** Get version history for a record, newest first. */
1024
+ history(id: string, options?: HistoryOptions): Promise<HistoryEntry<T>[]>;
1025
+ /**
1026
+ * Get a specific past version of a record.
1027
+ *
1028
+ * History reads intentionally **skip schema validation** — historical
1029
+ * records predate the current schema by definition, so validating them
1030
+ * against today's shape would be a false positive on any schema
1031
+ * evolution. If a caller needs validated history, they should filter
1032
+ * and re-put the records through the normal `put()` path.
1033
+ */
1034
+ getVersion(id: string, version: number): Promise<T | null>;
1035
+ /** Revert a record to a past version. Creates a new version with the old content. */
1036
+ revert(id: string, version: number): Promise<void>;
1037
+ /**
1038
+ * Compare two versions of a record and return the differences.
1039
+ * Use version 0 to represent "before creation" (empty).
1040
+ * Omit versionB to compare against the current version.
1041
+ */
1042
+ diff(id: string, versionA: number, versionB?: number): Promise<DiffEntry[]>;
1043
+ /** Resolve a version: try history first, then check if it's the current version. */
1044
+ private resolveVersion;
1045
+ private resolveCurrentOrVersion;
1046
+ /** Prune history entries for a record (or all records if id is undefined). */
1047
+ pruneRecordHistory(id: string | undefined, options: PruneOptions): Promise<number>;
1048
+ /** Clear all history for this collection (or a specific record). */
1049
+ clearHistory(id?: string): Promise<number>;
1050
+ /**
1051
+ * Count records in the collection.
1052
+ *
1053
+ * In eager mode this returns the in-memory cache size (instant). In
1054
+ * lazy mode it asks the adapter via `list()` to enumerate ids — slower
1055
+ * but still correct, and avoids loading any record bodies into memory.
1056
+ */
1057
+ count(): Promise<number>;
1058
+ /**
1059
+ * Fetch a single page of records via the adapter's optional `listPage`
1060
+ * extension. Returns the decrypted records for this page plus an opaque
1061
+ * cursor for the next page.
1062
+ *
1063
+ * Pass `cursor: undefined` (or omit it) to start from the beginning.
1064
+ * The final page returns `nextCursor: null`.
1065
+ *
1066
+ * If the adapter does NOT implement `listPage`, this falls back to a
1067
+ * synthetic implementation: it loads all ids via `list()`, sorts them,
1068
+ * and slices a window. The first call emits a one-time console.warn so
1069
+ * developers can spot adapters that should opt into the fast path.
1070
+ */
1071
+ listPage(opts?: {
1072
+ cursor?: string;
1073
+ limit?: number;
1074
+ }): Promise<{
1075
+ items: T[];
1076
+ nextCursor: string | null;
1077
+ }>;
1078
+ /**
1079
+ * Stream every record in the collection page-by-page as an async
1080
+ * iterable, with chainable `.where()` / `.filter()` clauses and a
1081
+ * memory-bounded `.aggregate(spec)` terminal.
1082
+ *
1083
+ * The whole point: process collections larger than RAM without
1084
+ * ever holding more than `pageSize` records decrypted at once.
1085
+ *
1086
+ * @example
1087
+ * ```ts
1088
+ * // Backward-compatible iteration — unchanged from the previous
1089
+ * // async-generator shape. `ScanBuilder` implements AsyncIterable.
1090
+ * for await (const record of invoices.scan({ pageSize: 500 })) {
1091
+ * await processOne(record)
1092
+ * }
1093
+ *
1094
+ * // — streaming aggregation with O(reducers) memory.
1095
+ * const { total, n } = await invoices.scan()
1096
+ * .where('year', '==', 2025)
1097
+ * .aggregate({ total: sum('amount'), n: count() })
1098
+ * ```
1099
+ *
1100
+ * **Lazy-MV gap:** `scan()` is synchronous-build and does
1101
+ * NOT trigger lazy materialized-view resolve-on-read. For lazy
1102
+ * MVs, call `list()` (which DOES resolve) or `vault.refreshView(name)`
1103
+ * before scanning. Same shape as the `query()` limitation.
1104
+ *
1105
+ * Returns a `ScanBuilder<T>` instead of the raw async iterator
1106
+ * that previous versions used. The builder implements
1107
+ * `AsyncIterable<T>`, so every existing `for await … of` call
1108
+ * continues to work unchanged. Direct `.next()` calls on the
1109
+ * iterator — not idiomatic, not used in the codebase — are no
1110
+ * longer supported; upgrade to `for await` or call the new
1111
+ * `.aggregate()` terminal.
1112
+ *
1113
+ * Uses `adapter.listPage` when available; otherwise falls back
1114
+ * to the synthetic pagination path with the same one-time
1115
+ * warning (`listPage()` routes through that fallback internally).
1116
+ */
1117
+ scan(opts?: {
1118
+ pageSize?: number;
1119
+ }): ScanBuilder<T, S, M>;
1120
+ /** Decrypt a page of envelopes returned by `adapter.listPage`. */
1121
+ private decryptPage;
1122
+ /** Load all records from adapter into memory cache. */
1123
+ /**
1124
+ * @internal — refresh the in-memory cache entry for a single id by
1125
+ * re-reading from the adapter. Used by the transaction executor's
1126
+ * Phase-3 revert path: that path writes the prior envelope directly
1127
+ * via the raw store (to avoid re-firing Collection-level side
1128
+ * effects), which would otherwise leave this Collection's eager
1129
+ * cache holding the rolled-back value. After revert, the executor
1130
+ * calls this hook so subsequent `get` / `query` reads see the
1131
+ * actual on-disk state.
1132
+ *
1133
+ * Lazy mode: drops the LRU entry; the next `get` repopulates from
1134
+ * the adapter. Eager mode: re-reads the envelope and either sets
1135
+ * the cache entry (record still present) or deletes it (record was
1136
+ * gone before the tx and the revert deleted it again).
1137
+ */
1138
+ /**
1139
+ * @internal — evict ONLY the per-record CEK cache entry for `id`. Used by
1140
+ * `vault.rotateRecordCek()`: after a hard CEK rotation the cached unwrapped
1141
+ * CEK is stale (it would decrypt the pre-rotation body and fail GCM auth on
1142
+ * the post-rotation body). Eviction must be synchronous with the live-envelope
1143
+ * rewrite so no concurrent read observes the old CEK. Paired with
1144
+ * {@link _invalidateCacheEntry} (which refreshes the decrypted-record cache).
1145
+ * No-op when the collection is not `perRecordKeys`.
1146
+ */
1147
+ _invalidateCekCacheEntry(id: string): void;
1148
+ /** @internal Satellite fan-out revert cleanup (spec #591): drop the sync dirty entry ('revert' is
1149
+ * onDirty-channel-only) and re-announce the RESTORED state as a plain put/delete — `subscribe()`
1150
+ * only understands those two actions, and the restored record may exist again. */
1151
+ _compensateRevertedWrite(id: string): Promise<void>;
1152
+ _invalidateCacheEntry(id: string): Promise<void>;
1153
+ /**
1154
+ * Apply a peer tab's committed write to THIS tab's in-memory view:
1155
+ * re-read the (already-persisted) envelope from the shared store + refresh
1156
+ * cache/indexes, then emit a `change` event so reactive consumers re-render.
1157
+ * Never writes to the store and never fires write hooks, so it cannot loop.
1158
+ */
1159
+ _applyRemoteChange(id: string, action: 'put' | 'delete'): Promise<void>;
1160
+ /**
1161
+ * Origin-tagged mutation choke point (#623 task 10) — the single dispatch
1162
+ * point every put/delete path funnels through, AFTER its own store write,
1163
+ * to fire the side-effects that path performs today. Each case below
1164
+ * performs EXACTLY the side-effect set the seam-map Part-3 table
1165
+ * (`.superpowers/sdd/seam-map-i18n-pipeline.md`) records for `origin` —
1166
+ * this is a pure parity extraction of existing tails, not a behavior
1167
+ * change. Phase C (#621, #622) plugs the dependency-graph dispatch into
1168
+ * this socket, keyed off `origin`, without every call site having to
1169
+ * learn the graph.
1170
+ *
1171
+ * `restore` is never reached: `Vault.load` / `backup.ts#loadVault` drops
1172
+ * the whole `collectionCache` instead of dispatching per record — the
1173
+ * origin is reserved for phase C.
1174
+ *
1175
+ * @internal
1176
+ */
1177
+ _onRecordMutated(id: string, action: 'put' | 'delete', origin: MutationOrigin, ctx?: {
1178
+ readonly record?: T;
1179
+ readonly version?: number;
1180
+ }): Promise<void>;
1181
+ /** @internal — the current in-memory record without a store read (for conflict capture); also the #640 FK-recovery read on a sync-applied delete — misses on a cold or evicted child (lazy LRU eviction OR an un-hydrated eager collection whose first sync op is a delete), not "lazy-mode" only. */
1182
+ _peekCached(id: string): T | null;
1183
+ private ensureHydrated;
1184
+ /** Hydrate from a pre-loaded snapshot (used by Vault). */
1185
+ hydrateFromSnapshot(records: Record<string, EncryptedEnvelope>): Promise<void>;
1186
+ /**
1187
+ * Rebuild secondary indexes from the current in-memory cache.
1188
+ *
1189
+ * Called after any bulk hydration. Incremental put/delete updates
1190
+ * are handled by `indexes.upsert()` / `indexes.remove()` directly,
1191
+ * so this only fires for full reloads.
1192
+ *
1193
+ * Synchronous and O(N × indexes.size); for the target scale of
1194
+ * 1K–50K records this completes in single-digit milliseconds.
1195
+ */
1196
+ private rebuildEagerIndexesFromCache;
1197
+ /**
1198
+ * Rebuild unique-constraint maps from the current in-memory cache.
1199
+ * Called after any bulk hydration alongside `rebuildEagerIndexesFromCache`.
1200
+ */
1201
+ private rebuildUniqueConstraintsFromCache;
1202
+ /**
1203
+ * Rebuild every declared index from scratch.
1204
+ *
1205
+ * Eager mode: refreshes the in-memory `CollectionIndexes` from the
1206
+ * current cache — O(records × declaredFields).
1207
+ *
1208
+ * Lazy mode: tears down every `_idx/<field>/<recordId>`
1209
+ * side-car, walks the canonical record namespace, and materialises
1210
+ * fresh side-cars for every declared field. The in-memory mirror is
1211
+ * cleared and re-ingested. Intended for two scenarios:
1212
+ * 1. Adding a new indexed field to a collection that already holds
1213
+ * records — after the schema change, call `rebuildIndexes()` to
1214
+ * backfill the side-cars.
1215
+ * 2. Recovery from a catastrophic drift (audit noticed many
1216
+ * `index:write-partial` events, operator wants a clean slate).
1217
+ *
1218
+ * The rebuild is NOT incremental — it's a full bulk-replace. For
1219
+ * per-field drift repair, use `reconcileIndex(field)` instead.
1220
+ */
1221
+ rebuildIndexes(): Promise<void>;
1222
+ /**
1223
+ * Compare the persisted `_idx/<field>/*` side-cars against the
1224
+ * canonical records for a single field, reporting the drift (and
1225
+ * optionally repairing it).
1226
+ *
1227
+ * Lazy mode only. Eager mode throws — the in-memory index cannot
1228
+ * drift.
1229
+ *
1230
+ * `missing` — record ids whose value is indexable but no side-car
1231
+ * exists. Happens when a `put()` succeeded but the side-car put
1232
+ * failed (surfaced as `index:write-partial`).
1233
+ * `stale` — side-car ids pointing to a record that no longer exists
1234
+ * or whose current value no longer matches the side-car body.
1235
+ * `applied` — number of writes that were actually applied (always 0
1236
+ * when `dryRun: true`).
1237
+ *
1238
+ * Design reference: acceptance criteria.
1239
+ */
1240
+ reconcileIndex(field: string, opts?: {
1241
+ dryRun?: boolean;
1242
+ }): Promise<{
1243
+ field: string;
1244
+ missing: string[];
1245
+ stale: string[];
1246
+ applied: number;
1247
+ }>;
1248
+ /**
1249
+ * Get the in-memory index store. Used by `Query` to short-circuit
1250
+ * `==` and `in` lookups when an index covers the where clause.
1251
+ *
1252
+ * Returns `null` if no indexes are declared on this collection.
1253
+ */
1254
+ getIndexes(): CollectionIndexes | null;
1255
+ /**
1256
+ * Return a `BlobSet` for the given record id.
1257
+ *
1258
+ * No I/O is performed until you call a method on the handle.
1259
+ *
1260
+ * ```ts
1261
+ * const blobs = invoices.blob('inv-001')
1262
+ *
1263
+ * // Upload a PDF (deduplicates automatically, MIME auto-detected)
1264
+ * await blobs.put('receipt.pdf', pdfBytes)
1265
+ *
1266
+ * // List slots
1267
+ * const files = await blobs.list() // SlotInfo[]
1268
+ *
1269
+ * // Serve as HTTP response (Content-Type, ETag, streaming body)
1270
+ * const res = await blobs.response('receipt.pdf', { inline: true })
1271
+ *
1272
+ * // Publish a named version (amendment versioning)
1273
+ * await blobs.publish('receipt.pdf', 'issued-2025-01')
1274
+ *
1275
+ * // Raw bytes
1276
+ * const bytes = await blobs.get('receipt.pdf')
1277
+ * ```
1278
+ *
1279
+ * Blobs are stored in internal collections (`_blob_slots_*`, `_blob_index`,
1280
+ * `_blob_chunks`, `_blob_versions_*`) that are excluded from queries and
1281
+ * `list()`. Slot metadata uses this collection's DEK; chunk data uses a
1282
+ * vault-shared `_blob` DEK (enabling cross-collection deduplication).
1283
+ */
1284
+ blob(id: string): BlobSet;
1285
+ /** Get all records as encrypted envelopes (for dump). */
1286
+ dumpEnvelopes(): Promise<Record<string, EncryptedEnvelope>>;
1287
+ /**
1288
+ * Apply locale resolution to a record.
1289
+ *
1290
+ * Called from `get()` and `list()` when locale options are present.
1291
+ * Uses the effective locale: per-call `locale` takes precedence over
1292
+ * `this.defaultLocale`.
1293
+ *
1294
+ * - i18nText fields: replaced with the resolved string (or the full
1295
+ * map when `locale === 'raw'`).
1296
+ * - dictKey fields: `<field>Label` virtual fields added.
1297
+ *
1298
+ * Returns the record unchanged when no Via pipeline is compiled (#638 Task 7:
1299
+ * was money/i18n/dictKey-flag-gated — missed any OTHER binding's `present`
1300
+ * hook, e.g. the `computed` via-binding's virtual-mode read-time compute;
1301
+ * `this.via` truthiness is the general condition every binding's presence
1302
+ * already implies).
1303
+ */
1304
+ private applyLocaleToRecord;
1305
+ /**
1306
+ * Low-level: encrypt a pre-serialised JSON string into an EncryptedEnvelope.
1307
+ * Used by both the normal record path and the CRDT path (which serialises
1308
+ * a CrdtState rather than a T).
1309
+ */
1310
+ /**
1311
+ * Write / update / delete the `_idx/<field>/<recordId>` side-cars for
1312
+ * every declared persistence-index field on this collection after a
1313
+ * successful main-record `put()`.
1314
+ *
1315
+ * Timing: called AFTER `adapter.put()` of the main record succeeds, so
1316
+ * a failed main write never leaves a stale index entry. Side-car write
1317
+ * failures do NOT fail the overall `put()` — the main record is already
1318
+ * durably committed. Per-field failures surface as
1319
+ * `IndexWriteFailureError` on the emitter's `index:write-partial`
1320
+ * channel and the operator runs a reconcile pass later.
1321
+ *
1322
+ * Null/undefined field values are not indexed — matches the
1323
+ * `PersistedCollectionIndex.stringifyKey` contract. If the prior value
1324
+ * was non-null and the new value is null, the side-car is deleted.
1325
+ */
1326
+ private maintainPersistedIndexesOnPut;
1327
+ /**
1328
+ * Tear down `_idx/<field>/<recordId>` side-cars for a deleted record.
1329
+ * Mirror state updates regardless of adapter outcome; adapter failures
1330
+ * surface on `index:write-partial` the same way put does.
1331
+ */
1332
+ private maintainPersistedIndexesOnDelete;
1333
+ /**
1334
+ * @internal — hard-delete this record's persisted `_idx/<field>/<recordId>`
1335
+ * side-cars for the erasure path. `forget()` crypto-shreds the body but
1336
+ * keeps the collection DEK, under which these side-cars are encrypted — so
1337
+ * without this they leave the indexed field VALUES readable after a "forget".
1338
+ *
1339
+ * Content-free: the side-car id is `encodeIdxId(def.key, id)`, so it needs no
1340
+ * body decode (the body is being shredded). Eager mode has no durable side-car
1341
+ * → no-op. The in-memory mirror is left as-is: it is ephemeral (rebuilt from
1342
+ * the now-deleted side-cars on reopen) and live reads skip the tombstone, so a
1343
+ * stale mirror hit cannot surface the erased record. Returns the count deleted
1344
+ * + the `def.key`s whose delete FAILED (residue that still leaks the value).
1345
+ */
1346
+ _purgePersistedIndexes(id: string): Promise<{
1347
+ purged: number;
1348
+ residue: string[];
1349
+ }>;
1350
+ /** Drop a record's encrypted _vec sidecar on erasure (a vector is text-invertible).
1351
+ * Called by vault.ts forget() inside a resilient try/catch; residue is reported in ForgetResult. */
1352
+ _purgeVector(id: string): Promise<void>;
1353
+ /** Drop the persisted lexical-index blob (forget/erasure): an opaque
1354
+ * all-records index must not survive crypto-shred. Idempotent; no-op without persist. */
1355
+ _purgeSearchIndex(): Promise<void>;
1356
+ /**
1357
+ * Bulk-load the persisted-index mirror from `_idx/<field>/*` side-cars
1358
+ * on first lazy-mode query. Idempotent — subsequent calls short-circuit
1359
+ * on the `persistedIndexesLoaded` flag.
1360
+ *
1361
+ * Listing the whole id namespace is acceptable here because the caller
1362
+ * has already decided to pay a first-query cost (this is the indexed
1363
+ * equivalent of lazy-mode hydration, not a per-query scan).
1364
+ */
1365
+ private ensurePersistedIndexesLoaded;
1366
+ /**
1367
+ * Walk every declared persisted-index field, run `reconcileIndex`
1368
+ * per the configured policy, and emit `index:reconciled` for each.
1369
+ * Called internally by `ensurePersistedIndexesLoaded()` — exposed as
1370
+ * a private helper for readability, not as a public API (the public
1371
+ * entry points are `reconcileIndex` and `rebuildIndexes`).
1372
+ */
1373
+ private autoReconcile;
1374
+ /**
1375
+ * Construct a `LazyQuery<T>` bound to this collection. Used by the
1376
+ * lazy-mode branch of `query()` and kept private because callers should
1377
+ * always go through `query()` to pick up the eager/lazy dispatch.
1378
+ */
1379
+ /**
1380
+ * Build a chainable indexed-read query against a lazy-mode collection.
1381
+ *
1382
+ * Companion to `query()`, which is eager-mode only and materialises a
1383
+ * snapshot. `lazyQuery()` dispatches every read through the persisted
1384
+ * index side-cars — no bulk decrypt, no snapshot. Every field touched by
1385
+ * `.where(...)` or `.orderBy(...)` MUST be declared in `indexes`;
1386
+ * otherwise `.toArray()` throws `IndexRequiredError`.
1387
+ *
1388
+ * The returned builder is always Promise-returning on its terminals
1389
+ * (`toArray`, `first`, `count`) because candidate records are decrypted
1390
+ * from the adapter on demand.
1391
+ *
1392
+ * @example
1393
+ * ```ts
1394
+ * const disbursements = vault.collection<Disbursement>('disbursements', {
1395
+ * prefetch: false,
1396
+ * cache: { maxRecords: 1000 },
1397
+ * indexes: ['clientId', 'period'],
1398
+ * })
1399
+ * const rows = await disbursements.lazyQuery()
1400
+ * .where('clientId', '==', 'c-42')
1401
+ * .orderBy('period', 'desc')
1402
+ * .limit(50)
1403
+ * .toArray()
1404
+ * ```
1405
+ *
1406
+ * Throws at call time when the collection is in eager mode — use
1407
+ * `query()` there. Throws if no index is declared, because a lazy
1408
+ * query with no index would need to enumerate the whole collection.
1409
+ */
1410
+ lazyQuery(): LazyQuery<T, S, Q>;
1411
+ /**
1412
+ * Resolve the stable CEK for a record on the WRITE path — see
1413
+ * {@link resolveStableCek}. Thin delegate that supplies the collection's
1414
+ * CEK cache, live-envelope reader, and DEK resolver.
1415
+ */
1416
+ private resolveRecordCek;
1417
+ /** C-A/R10: persist the classified marker once per classified handle (store I/O in config-drift.ts). */
1418
+ private _ensureClassifiedMarker;
1419
+ /** C-A/R10 drift signal — the marker's declared digest-only set, memoized to one store read per handle (see config-drift.ts). */
1420
+ private _classifiedMarkerDigestOnly;
1421
+ /**
1422
+ * find the first record whose deterministic field matches
1423
+ * the given plaintext. Returns `null` when no match exists.
1424
+ *
1425
+ * Reads every envelope via the adapter and compares the stored
1426
+ * `_det[field]` to a freshly computed deterministic ciphertext — no
1427
+ * record bodies are decrypted during the search, which is the whole
1428
+ * point of a deterministic index.
1429
+ *
1430
+ * Throws when the field is not declared in `deterministicFields`, so a
1431
+ * typo fails loudly at the call site rather than silently returning
1432
+ * null forever.
1433
+ */
1434
+ findByDet(field: string, value: unknown): Promise<T | null>;
1435
+ /**
1436
+ * return every record whose deterministic field matches.
1437
+ * Same semantics as {@link findByDet} but without the short-circuit.
1438
+ */
1439
+ queryByDet(field: string, value: unknown): Promise<T[]>;
1440
+ /** Bind the {@link DeterministicContext} this collection's det lookups need. */
1441
+ private detContext;
1442
+ /** tier-aware put — gated behind `tiersStrategy: withTiers()`. */
1443
+ putAtTier(id: string, record: T, tier: number, opts?: {
1444
+ elevation?: {
1445
+ reason: string;
1446
+ fromTier: number;
1447
+ };
1448
+ source?: string;
1449
+ sourceTs?: string;
1450
+ }): Promise<void>;
1451
+ /** tier-aware get — gated behind `tiersStrategy: withTiers()`. */
1452
+ getAtTier(id: string): Promise<T | GhostRecord | null>;
1453
+ /** list ids grouped by the caller's readability — gated behind `withTiers()`. */
1454
+ listAtTier(): Promise<Array<{
1455
+ id: string;
1456
+ tier: number;
1457
+ readable: boolean;
1458
+ }>>;
1459
+ /** elevate a record to a higher tier — gated behind `withTiers()`. */
1460
+ elevate(id: string, toTier: number): Promise<void>;
1461
+ /** demote a record to a lower tier — gated behind `withTiers()`. */
1462
+ demote(id: string, toTier: number): Promise<void>;
1463
+ /**
1464
+ * Emit a cross-tier access event. The subscriber sink stays collection-
1465
+ * resident (it captures `onCrossTierAccess`); the tiers module reaches it
1466
+ * via the {@link TiersContext.emitCrossTierEvent} callback.
1467
+ */
1468
+ private emitCrossTierEvent;
1469
+ /**
1470
+ * Classify a live envelope's `_sealed` slots for crypto-shred completeness
1471
+ * (#M-1, 2026-06-30 security review). Kept as a `_`-prefixed method on
1472
+ * Collection because `vault.ts` forget() reaches in via this name.
1473
+ */
1474
+ _classifySealedShred(live: EncryptedEnvelope): Promise<{
1475
+ readonly slots: readonly SealedShredSlot[];
1476
+ }>;
1477
+ _onViaErase(id: string, live: EncryptedEnvelope): Promise<ViaEraseReport | undefined>;
1478
+ get _via(): ViaPipeline | undefined;
1479
+ _setVia(pipeline: ViaPipeline | undefined): void;
1480
+ get _viaFieldsSnapshot(): {
1481
+ i18nFields: Record<string, I18nTextDescriptor> | undefined;
1482
+ lookupFields: Record<string, LookupDescriptor> | undefined;
1483
+ };
1484
+ _reconcileReadState(patch: {
1485
+ dictKeyFields?: Record<string, DictKeyDescriptor | StaticDictDescriptor>;
1486
+ i18nFields?: Record<string, I18nTextDescriptor>;
1487
+ lookupFields?: Record<string, LookupDescriptor>;
1488
+ getDictionary?: (name: string) => Promise<DictionaryHandle>;
1489
+ presentForJoin?: (record: unknown, locale: string) => unknown;
1490
+ }): void;
1491
+ /**
1492
+ * Bind the {@link TiersContext} the tier ops need. The `cekCache` is passed
1493
+ * by reference (the SAME `Lru` the kernel's read/write path owns) so an
1494
+ * elevate/demote CEK re-wrap stays synchronous with cache eviction.
1495
+ */
1496
+ private tiersContext;
1497
+ /**
1498
+ * Bind the {@link IndexingContext} the index-maintenance surface needs. The
1499
+ * eager `cache` Map and the index / unique-constraint / persisted mirrors are
1500
+ * passed by reference (the SAME instances the query path reads, never
1501
+ * copied); the `persistedIndexesLoaded` flag and `ensure*` hydration stay
1502
+ * collection-resident, reached via callbacks.
1503
+ */
1504
+ private indexingContext;
1505
+ }