@noy-db/hub 0.4.0 → 0.6.0-pre.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (438) hide show
  1. package/dist/api-67SBPMMH.js +20 -0
  2. package/dist/attestation/index.js +18 -18
  3. package/dist/{backup-X7F3TCFV.js → backup-GAYWQAFN.js} +16 -11
  4. package/dist/backup-GAYWQAFN.js.map +1 -0
  5. package/dist/blobs/index.js +20 -20
  6. package/dist/broker/index.js +12 -12
  7. package/dist/bundle-handle-5OUAI7CV.js +36 -0
  8. package/dist/bundle-handle-5OUAI7CV.js.map +1 -0
  9. package/dist/cargo/index.js +36 -36
  10. package/dist/{chunk-DQZXPGGZ.js → chunk-24UICKTB.js} +3 -3
  11. package/dist/{chunk-77AEMXFA.js → chunk-24ZLWWEO.js} +1 -1
  12. package/dist/chunk-24ZLWWEO.js.map +1 -0
  13. package/dist/{chunk-2BET5QTS.js → chunk-27TCYH6G.js} +5 -5
  14. package/dist/{chunk-MSMJJB4J.js → chunk-2KIV7BEK.js} +2 -2
  15. package/dist/{chunk-6ZNSB3H6.js → chunk-2LGDCNFJ.js} +2 -2
  16. package/dist/{chunk-GTYFIVIZ.js → chunk-35EBKWQU.js} +5 -5
  17. package/dist/chunk-35EBKWQU.js.map +1 -0
  18. package/dist/{chunk-WBKZUO5V.js → chunk-3737A6EA.js} +3 -3
  19. package/dist/{chunk-ZBYFMI6D.js → chunk-3CLZY46Y.js} +638 -300
  20. package/dist/chunk-3CLZY46Y.js.map +1 -0
  21. package/dist/{chunk-HLKXPJ4V.js → chunk-3EO7RZLJ.js} +6 -6
  22. package/dist/{chunk-JYJFGD2H.js → chunk-3FSX6LDG.js} +2 -2
  23. package/dist/{chunk-MXUT7FTE.js → chunk-3HYWYLXL.js} +2 -2
  24. package/dist/{chunk-IVYQAVWO.js → chunk-3IIPWA75.js} +11 -11
  25. package/dist/{chunk-7H3WWH6J.js → chunk-3UK6STWO.js} +3 -3
  26. package/dist/chunk-46V67XP5.js +117 -0
  27. package/dist/chunk-46V67XP5.js.map +1 -0
  28. package/dist/{chunk-NJ4DYYO5.js → chunk-4HDYQL3J.js} +2 -2
  29. package/dist/{chunk-P4JO3H6R.js → chunk-4MQDV3HZ.js} +2 -2
  30. package/dist/{chunk-X4MVWPHV.js → chunk-4UVDI4XE.js} +3 -3
  31. package/dist/{chunk-LXRTP3AQ.js → chunk-4VCWI42L.js} +2 -2
  32. package/dist/{chunk-QJNCB5SK.js → chunk-747LRSOO.js} +2 -2
  33. package/dist/{chunk-3HUYRN24.js → chunk-7F4DBNSP.js} +3 -3
  34. package/dist/{chunk-UADPR6F4.js → chunk-7G6VDWXB.js} +3 -3
  35. package/dist/{chunk-PTHKZWEH.js → chunk-AHLJSVRL.js} +2 -2
  36. package/dist/{chunk-NFZGZ4AK.js → chunk-AR2JDFAE.js} +2 -2
  37. package/dist/{chunk-3ECU57YH.js → chunk-BPTZ4K5L.js} +11 -11
  38. package/dist/{chunk-KRCBZYTZ.js → chunk-CCZJJ4I2.js} +4 -4
  39. package/dist/{chunk-NYEFP7DY.js → chunk-CJ73OLMW.js} +2 -2
  40. package/dist/{chunk-Q36YXK77.js → chunk-CYQOUTMY.js} +3 -3
  41. package/dist/{chunk-RBTVFPHF.js → chunk-DCMQR46R.js} +5 -5
  42. package/dist/{chunk-TG634KCO.js → chunk-DG27IUVI.js} +2 -2
  43. package/dist/{chunk-E23UGFVC.js → chunk-DMQCLZ4Z.js} +8 -6
  44. package/dist/chunk-DMQCLZ4Z.js.map +1 -0
  45. package/dist/{chunk-ZNWSG7XC.js → chunk-DPJTDNUF.js} +68 -34
  46. package/dist/chunk-DPJTDNUF.js.map +1 -0
  47. package/dist/{chunk-V6UQZA2H.js → chunk-E6427JU2.js} +2 -2
  48. package/dist/{chunk-JEI6JJNI.js → chunk-EK7DT5BT.js} +220 -13
  49. package/dist/chunk-EK7DT5BT.js.map +1 -0
  50. package/dist/chunk-EPFF7LOX.js +14 -0
  51. package/dist/chunk-EPFF7LOX.js.map +1 -0
  52. package/dist/{chunk-TWPK7KUJ.js → chunk-F3GVO44K.js} +6 -6
  53. package/dist/{chunk-QD46HPZG.js → chunk-FAXZQ5UF.js} +2 -2
  54. package/dist/{chunk-IG6KUWBX.js → chunk-FNSMZQS4.js} +2 -2
  55. package/dist/{chunk-BLBAQRBM.js → chunk-FUHKW252.js} +2 -2
  56. package/dist/{chunk-SU6SGWXM.js → chunk-FY343IZR.js} +8 -8
  57. package/dist/{chunk-KPZS5QAQ.js → chunk-GQ3BX5EA.js} +9 -1
  58. package/dist/chunk-GQ3BX5EA.js.map +1 -0
  59. package/dist/{chunk-DAFBJS4Y.js → chunk-GS5RT2KK.js} +4 -4
  60. package/dist/{chunk-5UQ7Y6SQ.js → chunk-HFKGIBMD.js} +3 -3
  61. package/dist/{chunk-QZWTRENR.js → chunk-HNGSV2YC.js} +133 -1
  62. package/dist/chunk-HNGSV2YC.js.map +1 -0
  63. package/dist/chunk-HNHCQ556.js +63 -0
  64. package/dist/chunk-HNHCQ556.js.map +1 -0
  65. package/dist/chunk-HS7HNYBD.js +91 -0
  66. package/dist/chunk-HS7HNYBD.js.map +1 -0
  67. package/dist/{chunk-SHEEBRZ4.js → chunk-HVQGCKY4.js} +2 -2
  68. package/dist/{chunk-35NMVJ7I.js → chunk-HXGUIPQB.js} +3 -3
  69. package/dist/{chunk-ERGECZEI.js → chunk-JEM2IGS3.js} +9 -9
  70. package/dist/chunk-JH3OHQM4.js +260 -0
  71. package/dist/chunk-JH3OHQM4.js.map +1 -0
  72. package/dist/{chunk-L3YYLT4E.js → chunk-JIUVJ4M7.js} +2 -2
  73. package/dist/{chunk-55LX6FSX.js → chunk-JRCYZEHU.js} +2 -2
  74. package/dist/{chunk-SFBYQMZM.js → chunk-JSRU5W2M.js} +5 -5
  75. package/dist/{chunk-NM5UYF6Q.js → chunk-JXIDGFKS.js} +2 -2
  76. package/dist/{chunk-VYYM3MEN.js → chunk-KHKKD62N.js} +16 -2
  77. package/dist/chunk-KHKKD62N.js.map +1 -0
  78. package/dist/{chunk-FQ5CHJR7.js → chunk-KUDZVJKQ.js} +21 -2
  79. package/dist/chunk-KUDZVJKQ.js.map +1 -0
  80. package/dist/{chunk-RO5NM6UI.js → chunk-KZ3KMDN3.js} +2 -2
  81. package/dist/{chunk-HZZP2ZIG.js → chunk-LBGPO5RL.js} +6 -6
  82. package/dist/{chunk-ZFG5EBI3.js → chunk-LTU4FLHG.js} +57 -27
  83. package/dist/chunk-LTU4FLHG.js.map +1 -0
  84. package/dist/{chunk-CLE3TMIS.js → chunk-MC2LFTQM.js} +5 -2
  85. package/dist/{chunk-467SWYT5.js → chunk-MJWCLSQL.js} +17 -8
  86. package/dist/chunk-MJWCLSQL.js.map +1 -0
  87. package/dist/{chunk-W3G5REIU.js → chunk-MSWYQLMQ.js} +2 -2
  88. package/dist/{chunk-WK7ULBTP.js → chunk-MVOWXQHN.js} +5 -3
  89. package/dist/chunk-MVOWXQHN.js.map +1 -0
  90. package/dist/{chunk-2J6UEN2V.js → chunk-MXZ5TSTR.js} +118 -4
  91. package/dist/chunk-MXZ5TSTR.js.map +1 -0
  92. package/dist/{chunk-SGDPRCC4.js → chunk-MZ5ZFO2D.js} +3 -3
  93. package/dist/{chunk-NBXFCQX4.js → chunk-NQCNSVGI.js} +9 -9
  94. package/dist/chunk-NQCNSVGI.js.map +1 -0
  95. package/dist/{chunk-EFJAAFBW.js → chunk-NQRJ5AJO.js} +2 -2
  96. package/dist/{chunk-Q2SEJMP2.js → chunk-NVU7ZMPN.js} +2 -2
  97. package/dist/{chunk-ZTLOXFPB.js → chunk-OF3L2SD6.js} +2 -2
  98. package/dist/{chunk-LLYIMSQQ.js → chunk-OMSAULZM.js} +11 -11
  99. package/dist/{chunk-SF2ZIRD6.js → chunk-OSFPNKY4.js} +3 -3
  100. package/dist/{chunk-WUHEP3HH.js → chunk-P7NGLLUF.js} +5 -5
  101. package/dist/{chunk-RQ4ZI4ZI.js → chunk-PGAPBZEK.js} +7 -7
  102. package/dist/{chunk-T2MOJF76.js → chunk-PP5CO2PR.js} +6 -6
  103. package/dist/{chunk-Q5YJCVJY.js → chunk-RLWY6Z44.js} +227 -41
  104. package/dist/chunk-RLWY6Z44.js.map +1 -0
  105. package/dist/{chunk-QGIBI6GL.js → chunk-ROWL352P.js} +5 -5
  106. package/dist/{chunk-ZHDSUZQU.js → chunk-RPXL6KSX.js} +4 -4
  107. package/dist/{chunk-DTFA5DO4.js → chunk-SKONR2OL.js} +3 -3
  108. package/dist/{chunk-AT2JJEKJ.js → chunk-SRGJET2F.js} +16 -5
  109. package/dist/chunk-SRGJET2F.js.map +1 -0
  110. package/dist/{chunk-4ZKNC6A6.js → chunk-T4GPR2IR.js} +2 -2
  111. package/dist/{chunk-NLYALJMY.js → chunk-TFZ7LLOQ.js} +113 -36
  112. package/dist/chunk-TFZ7LLOQ.js.map +1 -0
  113. package/dist/{chunk-TS5XLBZR.js → chunk-TLNNHG3A.js} +4 -4
  114. package/dist/{chunk-6UBZ6I5Z.js → chunk-UHXCLPGC.js} +2 -2
  115. package/dist/{chunk-KD4HGBJV.js → chunk-V5C5NNBR.js} +4 -4
  116. package/dist/{chunk-WYUAEZSC.js → chunk-VBY6ZLJT.js} +15 -14
  117. package/dist/chunk-VBY6ZLJT.js.map +1 -0
  118. package/dist/{chunk-AKKRXT23.js → chunk-VCETL77O.js} +34 -16
  119. package/dist/chunk-VCETL77O.js.map +1 -0
  120. package/dist/{chunk-5GQEU4DN.js → chunk-VJFMXYKP.js} +2 -2
  121. package/dist/{chunk-5DRROK5W.js → chunk-VMCCGUQB.js} +2 -2
  122. package/dist/{chunk-IXNCZTWA.js → chunk-W3TVWF6N.js} +2 -2
  123. package/dist/{chunk-W66AM5IB.js → chunk-WLYIROCJ.js} +2 -2
  124. package/dist/{chunk-OWHP3H5C.js → chunk-XB7LUDKM.js} +4 -4
  125. package/dist/{chunk-KYRDJI5O.js → chunk-XBLKM73C.js} +10 -10
  126. package/dist/{chunk-MHMLXJ3I.js → chunk-YAWK6AWF.js} +2 -2
  127. package/dist/{chunk-PWPYO73B.js → chunk-ZGGVOADG.js} +5 -5
  128. package/dist/{chunk-YGK2HMLR.js → chunk-ZK4CO2KZ.js} +9 -9
  129. package/dist/chunk-ZK4CO2KZ.js.map +1 -0
  130. package/dist/{chunk-DSDXAKIP.js → chunk-ZVF37PKE.js} +34 -5
  131. package/dist/chunk-ZVF37PKE.js.map +1 -0
  132. package/dist/{chunk-IFOH7RBI.js → chunk-ZWMO5GL5.js} +5 -5
  133. package/dist/{chunk-LRRX57UA.js → chunk-ZXJXDHNK.js} +4 -4
  134. package/dist/classified/index.js +5 -5
  135. package/dist/{classified-marker-LE54HWSX.js → classified-marker-MH3ON5OL.js} +3 -3
  136. package/dist/collection-facade-AHT7FATG.js +45 -0
  137. package/dist/{computed-AB45PS4V.js → computed-6G5M3UPH.js} +3 -3
  138. package/dist/consent/index.js +9 -9
  139. package/dist/cover/index.js +3 -3
  140. package/dist/custody/index.js +11 -11
  141. package/dist/{dead-filter-V3LVWYEJ.js → dead-filter-U575NGSH.js} +2 -2
  142. package/dist/debug/index.js +1 -1
  143. package/dist/{delegation-JDUMAF6L.js → delegation-PDYL6RWT.js} +10 -10
  144. package/dist/derivations/index.js +12 -12
  145. package/dist/derive-AKT4KU36.js +22 -0
  146. package/dist/directory/index.js +10 -10
  147. package/dist/{dispatch-6TV3DGO6.js → dispatch-4XIJSFTT.js} +5 -5
  148. package/dist/{dispatch-W7NWQ637.js → dispatch-N5HGVUGU.js} +18 -18
  149. package/dist/{enclave-YFCLPIDR.js → enclave-OPK24QDR.js} +13 -9
  150. package/dist/executor-3JZ4POTW.js +28 -0
  151. package/dist/executor-CYJQLKKI.js +9 -0
  152. package/dist/executor-S4QIKEHW.js +9 -0
  153. package/dist/export-accessible-CPTP5STN.js +23 -0
  154. package/dist/extract-partition-TWXPHVU7.js +38 -0
  155. package/dist/{fanout-sidecar-273RDMYS.js → fanout-sidecar-T2ZGLQFE.js} +9 -9
  156. package/dist/find-RBBYKXI7.js +11 -0
  157. package/dist/forget/index.js +9 -9
  158. package/dist/guards/index.js +6 -6
  159. package/dist/history/index.js +15 -15
  160. package/dist/i18n/index.js +14 -14
  161. package/dist/index.d.ts +35 -7
  162. package/dist/index.js +279 -202
  163. package/dist/index.js.map +1 -1
  164. package/dist/indexing/index.js +3 -3
  165. package/dist/introspection/index.js +12 -12
  166. package/dist/issue-N74C55X6.js +19 -0
  167. package/dist/kernel/collection-config.d.ts +4 -0
  168. package/dist/kernel/collection.d.ts +34 -8
  169. package/dist/kernel/cutover-transform.d.ts +64 -0
  170. package/dist/kernel/enclave/crypto.d.ts +24 -0
  171. package/dist/kernel/enclave/index.d.ts +2 -1
  172. package/dist/kernel/errors.d.ts +138 -0
  173. package/dist/kernel/noydb.d.ts +10 -1
  174. package/dist/kernel/put-many-atomic.d.ts +45 -0
  175. package/dist/kernel/secret-mode.d.ts +59 -0
  176. package/dist/kernel/types.d.ts +98 -7
  177. package/dist/kernel/validation.d.ts +33 -0
  178. package/dist/kernel/vault.d.ts +32 -6
  179. package/dist/{ledger-XE7JF2I2.js → ledger-DONWFC5M.js} +11 -11
  180. package/dist/liberate-KICI7AJN.js +24 -0
  181. package/dist/{link-set-CGYC3OH5.js → link-set-2TTP4VLO.js} +11 -11
  182. package/dist/managed-secret-EAOYWRYF.js +27 -0
  183. package/dist/materialized-views/index.js +19 -19
  184. package/dist/money/index.js +3 -3
  185. package/dist/noydb-6W2XGQCS.js +83 -0
  186. package/dist/overlay-views/index.js +6 -6
  187. package/dist/periods/index.js +16 -16
  188. package/dist/pod/index.js +121 -12
  189. package/dist/policy/index.js +4 -4
  190. package/dist/port/to/index.d.ts +3 -1
  191. package/dist/port/to/locator.d.ts +84 -0
  192. package/dist/port/with/device-seal-strategy.d.ts +16 -0
  193. package/dist/port/with/strategies.d.ts +2 -0
  194. package/dist/port/with/write-hooks.d.ts +6 -0
  195. package/dist/portability/index.js +8 -8
  196. package/dist/{post-register-LY35EDTJ.js → post-register-ORQOQJCS.js} +6 -6
  197. package/dist/query/index.js +4 -4
  198. package/dist/reduce/index.js +4 -4
  199. package/dist/register-LHETZRJM.js +32 -0
  200. package/dist/registry-AMAZ6QRZ.js +19 -0
  201. package/dist/registry-CZVINVQH.js +9 -0
  202. package/dist/registry-IKUR2MXD.js +9 -0
  203. package/dist/registry-JRIN447B.js +18 -0
  204. package/dist/request-withdrawal-2DN2RGCO.js +31 -0
  205. package/dist/{reveal-T34ADTPY.js → reveal-AG4SCHUQ.js} +6 -6
  206. package/dist/revoke-ZX4NM2CJ.js +24 -0
  207. package/dist/satellites/index.js +1 -1
  208. package/dist/schema-update/index.js +6 -6
  209. package/dist/sealed-record/index.js +12 -12
  210. package/dist/search/index.js +4 -4
  211. package/dist/{seed-JOV54PB3.js → seed-IRCDGIRK.js} +15 -15
  212. package/dist/seed-IRCDGIRK.js.map +1 -0
  213. package/dist/sequence/index.js +9 -9
  214. package/dist/session/index.js +9 -9
  215. package/dist/shadow/index.js +2 -2
  216. package/dist/signer-7KHD4OL2.js +25 -0
  217. package/dist/snapshots/index.js +10 -10
  218. package/dist/{stale-T3V7XEOB.js → stale-K734VACF.js} +10 -10
  219. package/dist/storage-4H2GF6RQ.js +23 -0
  220. package/dist/{store-coordination-provider-AHGFEMFA.js → store-coordination-provider-4SKLSFUG.js} +3 -3
  221. package/dist/sync/index.js +10 -10
  222. package/dist/team/index.js +27 -15
  223. package/dist/tiers/index.js +10 -10
  224. package/dist/to/index.js +28 -3
  225. package/dist/to/index.js.map +1 -1
  226. package/dist/transactions/index.js +3 -3
  227. package/dist/util/index.js +1 -1
  228. package/dist/{verify-7XWHJWUN.js → verify-RO5RTZOJ.js} +5 -5
  229. package/dist/walk-MQHYNDLZ.js +21 -0
  230. package/dist/with-audit/guards/registry.d.ts +8 -1
  231. package/dist/with-audit/guards/types.d.ts +5 -0
  232. package/dist/with-audit/periods/index.d.ts +1 -1
  233. package/dist/with-audit/periods/periods.d.ts +7 -0
  234. package/dist/with-commit/tx/atomic-eligibility.d.ts +13 -11
  235. package/dist/with-formula/derivations/registry.d.ts +6 -0
  236. package/dist/with-formula/derivations/types.d.ts +5 -0
  237. package/dist/with-lookup/indexing/eager-indexes.d.ts +10 -0
  238. package/dist/with-party/team/device-seal.d.ts +25 -0
  239. package/dist/with-party/team/echo-ceremony.d.ts +74 -0
  240. package/dist/with-party/team/echo-secret.d.ts +56 -0
  241. package/dist/with-party/team/index.d.ts +8 -0
  242. package/dist/with-party/team/keyring.d.ts +71 -9
  243. package/dist/with-party/team/rotate-recover.d.ts +99 -5
  244. package/dist/with-pod/bundle-handle.d.ts +9 -0
  245. package/dist/with-pod/bundle.d.ts +100 -2
  246. package/dist/with-pod/format.d.ts +92 -1
  247. package/dist/with-pod/index.d.ts +22 -1
  248. package/dist/with-pod/open.d.ts +117 -0
  249. package/dist/with-pod/redirect.d.ts +78 -0
  250. package/dist/with-pod/signature.d.ts +13 -0
  251. package/dist/with-shape/introspection/behaviors.d.ts +100 -0
  252. package/dist/with-shape/introspection/derivation-key.d.ts +17 -0
  253. package/dist/with-shape/introspection/describe.d.ts +36 -0
  254. package/dist/with-shape/introspection/index.d.ts +1 -0
  255. package/dist/with-shape/introspection/subsystem-matrix.d.ts +22 -0
  256. package/dist/with-shape/introspection/types.d.ts +2 -1
  257. package/dist/with-shape/links/names.d.ts +14 -0
  258. package/dist/with-shape/manifest/derive.d.ts +86 -0
  259. package/dist/with-shape/manifest/reserved-collections.d.ts +27 -0
  260. package/dist/with-shape/manifest/storage.d.ts +62 -0
  261. package/dist/with-shape/manifest/sync.d.ts +135 -0
  262. package/dist/with-shape/manifest/types.d.ts +49 -0
  263. package/dist/with-shape/manifest/writer.d.ts +32 -0
  264. package/dist/with-shape/persisted-schemas/field-ids.d.ts +29 -0
  265. package/dist/with-shape/persisted-schemas/register.d.ts +3 -0
  266. package/dist/with-shape/persisted-schemas/types.d.ts +17 -0
  267. package/dist/with-shape/schema-update/fence-controller.d.ts +34 -0
  268. package/dist/with-shape/schema-update/fence.d.ts +9 -0
  269. package/dist/with-shape/schema-update/strategies.d.ts +18 -2
  270. package/dist/with-shape/schema-update/types.d.ts +11 -0
  271. package/dist/with-sync/engine.d.ts +17 -0
  272. package/dist/with-sync/presence.d.ts +31 -1
  273. package/dist/withdraw-accessible-JSDQHXHE.js +28 -0
  274. package/dist/withdraw-accessible-JSDQHXHE.js.map +1 -0
  275. package/package.json +3 -3
  276. package/dist/api-SI2IVBQO.js +0 -20
  277. package/dist/backup-X7F3TCFV.js.map +0 -1
  278. package/dist/chunk-2J6UEN2V.js.map +0 -1
  279. package/dist/chunk-467SWYT5.js.map +0 -1
  280. package/dist/chunk-4JQK3L4V.js +0 -41
  281. package/dist/chunk-4JQK3L4V.js.map +0 -1
  282. package/dist/chunk-77AEMXFA.js.map +0 -1
  283. package/dist/chunk-AKKRXT23.js.map +0 -1
  284. package/dist/chunk-AT2JJEKJ.js.map +0 -1
  285. package/dist/chunk-DSDXAKIP.js.map +0 -1
  286. package/dist/chunk-E23UGFVC.js.map +0 -1
  287. package/dist/chunk-FQ5CHJR7.js.map +0 -1
  288. package/dist/chunk-GTYFIVIZ.js.map +0 -1
  289. package/dist/chunk-JEI6JJNI.js.map +0 -1
  290. package/dist/chunk-JQ2AX4T5.js +0 -23
  291. package/dist/chunk-JQ2AX4T5.js.map +0 -1
  292. package/dist/chunk-KPZS5QAQ.js.map +0 -1
  293. package/dist/chunk-NBXFCQX4.js.map +0 -1
  294. package/dist/chunk-NLYALJMY.js.map +0 -1
  295. package/dist/chunk-Q5YJCVJY.js.map +0 -1
  296. package/dist/chunk-QZWTRENR.js.map +0 -1
  297. package/dist/chunk-S7GIXBXV.js +0 -129
  298. package/dist/chunk-S7GIXBXV.js.map +0 -1
  299. package/dist/chunk-SBHN6QUT.js +0 -25
  300. package/dist/chunk-SBHN6QUT.js.map +0 -1
  301. package/dist/chunk-VYYM3MEN.js.map +0 -1
  302. package/dist/chunk-WK7ULBTP.js.map +0 -1
  303. package/dist/chunk-WYUAEZSC.js.map +0 -1
  304. package/dist/chunk-YGK2HMLR.js.map +0 -1
  305. package/dist/chunk-ZBYFMI6D.js.map +0 -1
  306. package/dist/chunk-ZFG5EBI3.js.map +0 -1
  307. package/dist/chunk-ZNWSG7XC.js.map +0 -1
  308. package/dist/collection-facade-DO2AABZT.js +0 -45
  309. package/dist/derive-ZPGVLE2Q.js +0 -22
  310. package/dist/executor-FPHKWDWT.js +0 -28
  311. package/dist/executor-IEBLTBCW.js +0 -9
  312. package/dist/executor-RM7XWQDU.js +0 -9
  313. package/dist/export-accessible-EKM3HGB2.js +0 -23
  314. package/dist/extract-partition-LS4ET5A6.js +0 -38
  315. package/dist/find-OZMTRIK3.js +0 -11
  316. package/dist/issue-LIA7FXBJ.js +0 -19
  317. package/dist/liberate-WZ3RHVKW.js +0 -24
  318. package/dist/noydb-ZLPVCDES.js +0 -81
  319. package/dist/register-6RIBIT3I.js +0 -25
  320. package/dist/registry-7Y5WF7GS.js +0 -9
  321. package/dist/registry-BWD2ED52.js +0 -8
  322. package/dist/registry-MUSL4AW6.js +0 -19
  323. package/dist/registry-RON4WHAP.js +0 -18
  324. package/dist/request-withdrawal-FT3ORAWN.js +0 -31
  325. package/dist/revoke-HC7WG3HE.js +0 -24
  326. package/dist/seed-JOV54PB3.js.map +0 -1
  327. package/dist/signer-CTWOH6KT.js +0 -25
  328. package/dist/storage-LLNLPWWB.js +0 -23
  329. package/dist/walk-G3NFEP5L.js +0 -21
  330. package/dist/withdraw-accessible-ANSVG6XG.js +0 -28
  331. /package/dist/{api-SI2IVBQO.js.map → api-67SBPMMH.js.map} +0 -0
  332. /package/dist/{chunk-DQZXPGGZ.js.map → chunk-24UICKTB.js.map} +0 -0
  333. /package/dist/{chunk-2BET5QTS.js.map → chunk-27TCYH6G.js.map} +0 -0
  334. /package/dist/{chunk-MSMJJB4J.js.map → chunk-2KIV7BEK.js.map} +0 -0
  335. /package/dist/{chunk-6ZNSB3H6.js.map → chunk-2LGDCNFJ.js.map} +0 -0
  336. /package/dist/{chunk-WBKZUO5V.js.map → chunk-3737A6EA.js.map} +0 -0
  337. /package/dist/{chunk-HLKXPJ4V.js.map → chunk-3EO7RZLJ.js.map} +0 -0
  338. /package/dist/{chunk-JYJFGD2H.js.map → chunk-3FSX6LDG.js.map} +0 -0
  339. /package/dist/{chunk-MXUT7FTE.js.map → chunk-3HYWYLXL.js.map} +0 -0
  340. /package/dist/{chunk-IVYQAVWO.js.map → chunk-3IIPWA75.js.map} +0 -0
  341. /package/dist/{chunk-7H3WWH6J.js.map → chunk-3UK6STWO.js.map} +0 -0
  342. /package/dist/{chunk-NJ4DYYO5.js.map → chunk-4HDYQL3J.js.map} +0 -0
  343. /package/dist/{chunk-P4JO3H6R.js.map → chunk-4MQDV3HZ.js.map} +0 -0
  344. /package/dist/{chunk-X4MVWPHV.js.map → chunk-4UVDI4XE.js.map} +0 -0
  345. /package/dist/{chunk-LXRTP3AQ.js.map → chunk-4VCWI42L.js.map} +0 -0
  346. /package/dist/{chunk-QJNCB5SK.js.map → chunk-747LRSOO.js.map} +0 -0
  347. /package/dist/{chunk-3HUYRN24.js.map → chunk-7F4DBNSP.js.map} +0 -0
  348. /package/dist/{chunk-UADPR6F4.js.map → chunk-7G6VDWXB.js.map} +0 -0
  349. /package/dist/{chunk-PTHKZWEH.js.map → chunk-AHLJSVRL.js.map} +0 -0
  350. /package/dist/{chunk-NFZGZ4AK.js.map → chunk-AR2JDFAE.js.map} +0 -0
  351. /package/dist/{chunk-3ECU57YH.js.map → chunk-BPTZ4K5L.js.map} +0 -0
  352. /package/dist/{chunk-KRCBZYTZ.js.map → chunk-CCZJJ4I2.js.map} +0 -0
  353. /package/dist/{chunk-NYEFP7DY.js.map → chunk-CJ73OLMW.js.map} +0 -0
  354. /package/dist/{chunk-Q36YXK77.js.map → chunk-CYQOUTMY.js.map} +0 -0
  355. /package/dist/{chunk-RBTVFPHF.js.map → chunk-DCMQR46R.js.map} +0 -0
  356. /package/dist/{chunk-TG634KCO.js.map → chunk-DG27IUVI.js.map} +0 -0
  357. /package/dist/{chunk-V6UQZA2H.js.map → chunk-E6427JU2.js.map} +0 -0
  358. /package/dist/{chunk-TWPK7KUJ.js.map → chunk-F3GVO44K.js.map} +0 -0
  359. /package/dist/{chunk-QD46HPZG.js.map → chunk-FAXZQ5UF.js.map} +0 -0
  360. /package/dist/{chunk-IG6KUWBX.js.map → chunk-FNSMZQS4.js.map} +0 -0
  361. /package/dist/{chunk-BLBAQRBM.js.map → chunk-FUHKW252.js.map} +0 -0
  362. /package/dist/{chunk-SU6SGWXM.js.map → chunk-FY343IZR.js.map} +0 -0
  363. /package/dist/{chunk-DAFBJS4Y.js.map → chunk-GS5RT2KK.js.map} +0 -0
  364. /package/dist/{chunk-5UQ7Y6SQ.js.map → chunk-HFKGIBMD.js.map} +0 -0
  365. /package/dist/{chunk-SHEEBRZ4.js.map → chunk-HVQGCKY4.js.map} +0 -0
  366. /package/dist/{chunk-35NMVJ7I.js.map → chunk-HXGUIPQB.js.map} +0 -0
  367. /package/dist/{chunk-ERGECZEI.js.map → chunk-JEM2IGS3.js.map} +0 -0
  368. /package/dist/{chunk-L3YYLT4E.js.map → chunk-JIUVJ4M7.js.map} +0 -0
  369. /package/dist/{chunk-55LX6FSX.js.map → chunk-JRCYZEHU.js.map} +0 -0
  370. /package/dist/{chunk-SFBYQMZM.js.map → chunk-JSRU5W2M.js.map} +0 -0
  371. /package/dist/{chunk-NM5UYF6Q.js.map → chunk-JXIDGFKS.js.map} +0 -0
  372. /package/dist/{chunk-RO5NM6UI.js.map → chunk-KZ3KMDN3.js.map} +0 -0
  373. /package/dist/{chunk-HZZP2ZIG.js.map → chunk-LBGPO5RL.js.map} +0 -0
  374. /package/dist/{chunk-CLE3TMIS.js.map → chunk-MC2LFTQM.js.map} +0 -0
  375. /package/dist/{chunk-W3G5REIU.js.map → chunk-MSWYQLMQ.js.map} +0 -0
  376. /package/dist/{chunk-SGDPRCC4.js.map → chunk-MZ5ZFO2D.js.map} +0 -0
  377. /package/dist/{chunk-EFJAAFBW.js.map → chunk-NQRJ5AJO.js.map} +0 -0
  378. /package/dist/{chunk-Q2SEJMP2.js.map → chunk-NVU7ZMPN.js.map} +0 -0
  379. /package/dist/{chunk-ZTLOXFPB.js.map → chunk-OF3L2SD6.js.map} +0 -0
  380. /package/dist/{chunk-LLYIMSQQ.js.map → chunk-OMSAULZM.js.map} +0 -0
  381. /package/dist/{chunk-SF2ZIRD6.js.map → chunk-OSFPNKY4.js.map} +0 -0
  382. /package/dist/{chunk-WUHEP3HH.js.map → chunk-P7NGLLUF.js.map} +0 -0
  383. /package/dist/{chunk-RQ4ZI4ZI.js.map → chunk-PGAPBZEK.js.map} +0 -0
  384. /package/dist/{chunk-T2MOJF76.js.map → chunk-PP5CO2PR.js.map} +0 -0
  385. /package/dist/{chunk-QGIBI6GL.js.map → chunk-ROWL352P.js.map} +0 -0
  386. /package/dist/{chunk-ZHDSUZQU.js.map → chunk-RPXL6KSX.js.map} +0 -0
  387. /package/dist/{chunk-DTFA5DO4.js.map → chunk-SKONR2OL.js.map} +0 -0
  388. /package/dist/{chunk-4ZKNC6A6.js.map → chunk-T4GPR2IR.js.map} +0 -0
  389. /package/dist/{chunk-TS5XLBZR.js.map → chunk-TLNNHG3A.js.map} +0 -0
  390. /package/dist/{chunk-6UBZ6I5Z.js.map → chunk-UHXCLPGC.js.map} +0 -0
  391. /package/dist/{chunk-KD4HGBJV.js.map → chunk-V5C5NNBR.js.map} +0 -0
  392. /package/dist/{chunk-5GQEU4DN.js.map → chunk-VJFMXYKP.js.map} +0 -0
  393. /package/dist/{chunk-5DRROK5W.js.map → chunk-VMCCGUQB.js.map} +0 -0
  394. /package/dist/{chunk-IXNCZTWA.js.map → chunk-W3TVWF6N.js.map} +0 -0
  395. /package/dist/{chunk-W66AM5IB.js.map → chunk-WLYIROCJ.js.map} +0 -0
  396. /package/dist/{chunk-OWHP3H5C.js.map → chunk-XB7LUDKM.js.map} +0 -0
  397. /package/dist/{chunk-KYRDJI5O.js.map → chunk-XBLKM73C.js.map} +0 -0
  398. /package/dist/{chunk-MHMLXJ3I.js.map → chunk-YAWK6AWF.js.map} +0 -0
  399. /package/dist/{chunk-PWPYO73B.js.map → chunk-ZGGVOADG.js.map} +0 -0
  400. /package/dist/{chunk-IFOH7RBI.js.map → chunk-ZWMO5GL5.js.map} +0 -0
  401. /package/dist/{chunk-LRRX57UA.js.map → chunk-ZXJXDHNK.js.map} +0 -0
  402. /package/dist/{classified-marker-LE54HWSX.js.map → classified-marker-MH3ON5OL.js.map} +0 -0
  403. /package/dist/{collection-facade-DO2AABZT.js.map → collection-facade-AHT7FATG.js.map} +0 -0
  404. /package/dist/{computed-AB45PS4V.js.map → computed-6G5M3UPH.js.map} +0 -0
  405. /package/dist/{dead-filter-V3LVWYEJ.js.map → dead-filter-U575NGSH.js.map} +0 -0
  406. /package/dist/{delegation-JDUMAF6L.js.map → delegation-PDYL6RWT.js.map} +0 -0
  407. /package/dist/{derive-ZPGVLE2Q.js.map → derive-AKT4KU36.js.map} +0 -0
  408. /package/dist/{dispatch-6TV3DGO6.js.map → dispatch-4XIJSFTT.js.map} +0 -0
  409. /package/dist/{dispatch-W7NWQ637.js.map → dispatch-N5HGVUGU.js.map} +0 -0
  410. /package/dist/{enclave-YFCLPIDR.js.map → enclave-OPK24QDR.js.map} +0 -0
  411. /package/dist/{executor-FPHKWDWT.js.map → executor-3JZ4POTW.js.map} +0 -0
  412. /package/dist/{executor-IEBLTBCW.js.map → executor-CYJQLKKI.js.map} +0 -0
  413. /package/dist/{executor-RM7XWQDU.js.map → executor-S4QIKEHW.js.map} +0 -0
  414. /package/dist/{export-accessible-EKM3HGB2.js.map → export-accessible-CPTP5STN.js.map} +0 -0
  415. /package/dist/{extract-partition-LS4ET5A6.js.map → extract-partition-TWXPHVU7.js.map} +0 -0
  416. /package/dist/{fanout-sidecar-273RDMYS.js.map → fanout-sidecar-T2ZGLQFE.js.map} +0 -0
  417. /package/dist/{find-OZMTRIK3.js.map → find-RBBYKXI7.js.map} +0 -0
  418. /package/dist/{issue-LIA7FXBJ.js.map → issue-N74C55X6.js.map} +0 -0
  419. /package/dist/{ledger-XE7JF2I2.js.map → ledger-DONWFC5M.js.map} +0 -0
  420. /package/dist/{liberate-WZ3RHVKW.js.map → liberate-KICI7AJN.js.map} +0 -0
  421. /package/dist/{link-set-CGYC3OH5.js.map → link-set-2TTP4VLO.js.map} +0 -0
  422. /package/dist/{noydb-ZLPVCDES.js.map → managed-secret-EAOYWRYF.js.map} +0 -0
  423. /package/dist/{register-6RIBIT3I.js.map → noydb-6W2XGQCS.js.map} +0 -0
  424. /package/dist/{post-register-LY35EDTJ.js.map → post-register-ORQOQJCS.js.map} +0 -0
  425. /package/dist/{registry-7Y5WF7GS.js.map → register-LHETZRJM.js.map} +0 -0
  426. /package/dist/{registry-BWD2ED52.js.map → registry-AMAZ6QRZ.js.map} +0 -0
  427. /package/dist/{registry-MUSL4AW6.js.map → registry-CZVINVQH.js.map} +0 -0
  428. /package/dist/{registry-RON4WHAP.js.map → registry-IKUR2MXD.js.map} +0 -0
  429. /package/dist/{request-withdrawal-FT3ORAWN.js.map → registry-JRIN447B.js.map} +0 -0
  430. /package/dist/{revoke-HC7WG3HE.js.map → request-withdrawal-2DN2RGCO.js.map} +0 -0
  431. /package/dist/{reveal-T34ADTPY.js.map → reveal-AG4SCHUQ.js.map} +0 -0
  432. /package/dist/{signer-CTWOH6KT.js.map → revoke-ZX4NM2CJ.js.map} +0 -0
  433. /package/dist/{stale-T3V7XEOB.js.map → signer-7KHD4OL2.js.map} +0 -0
  434. /package/dist/{storage-LLNLPWWB.js.map → stale-K734VACF.js.map} +0 -0
  435. /package/dist/{walk-G3NFEP5L.js.map → storage-4H2GF6RQ.js.map} +0 -0
  436. /package/dist/{store-coordination-provider-AHGFEMFA.js.map → store-coordination-provider-4SKLSFUG.js.map} +0 -0
  437. /package/dist/{verify-7XWHJWUN.js.map → verify-RO5RTZOJ.js.map} +0 -0
  438. /package/dist/{withdraw-accessible-ANSVG6XG.js.map → walk-MQHYNDLZ.js.map} +0 -0
@@ -14,9 +14,30 @@
14
14
  export { writePod, readPod, readPodHeader, readPodCover, writeNoydbBundle, readNoydbBundle, readNoydbBundleHeader, resetBrotliSupportCache, } from './bundle.js';
15
15
  export type { Cover } from '../with-party/directory/cover/types.js';
16
16
  export type { WritePodOptions, WriteNoydbBundleOptions, ReadNoydbBundleOptions, NoydbBundleReadResult, } from './bundle.js';
17
+ export { verifyPodHeader } from './bundle.js';
18
+ export type { PodVerifyResult } from './bundle.js';
19
+ export { signRecord, verifyRecord, signedBytes, POD_SIG_ALG } from './signature.js';
17
20
  export { NOYDB_BUNDLE_MAGIC, NOYDB_BUNDLE_PREFIX_BYTES, NOYDB_BUNDLE_FORMAT_VERSION, FLAG_COMPRESSED, FLAG_HAS_INTEGRITY_HASH, COMPRESSION_NONE, COMPRESSION_GZIP, COMPRESSION_BROTLI, validateBundleHeader, encodeBundleHeader, hasNoydbBundleMagic, } from './format.js';
18
- export type { CompressionAlgo, NoydbPodHeader, NoydbBundleHeader, } from './format.js';
21
+ export type { CompressionAlgo, NoydbPodHeader, NoydbBundleHeader, UnlockMethod, } from './format.js';
19
22
  export { generateULID, isULID } from './ulid.js';
20
23
  export { wrapPodStore, createPodStore, wrapBundleStore, createBundleStore } from './pod-store.js';
21
24
  export type { WrappedPodNoydbStore, WrapPodStoreOptions, WrappedBundleNoydbStore, WrapBundleStoreOptions, } from './pod-store.js';
22
25
  export { BundleIntegrityError, BundleSealMismatchError, PodVersionConflictError, BundleVersionConflictError, BackupLedgerError, BackupCorruptedError, } from '../kernel/errors.js';
26
+ export { readPodRedirect } from './bundle.js';
27
+ export { signRedirect, verifyRedirect, followRedirects } from './redirect.js';
28
+ export type { Redirect, RedirectHop, FollowRedirectsResult } from './redirect.js';
29
+ export type { DocSigner } from '../with-audit/attestation/signer.js';
30
+ export { RedirectDepthExceededError, RedirectLoopError, RedirectBadSignatureError, RedirectUnreachableError, } from '../kernel/errors.js';
31
+ export { open } from './open.js';
32
+ export type { OpenPodOptions, OpenPodResult } from './open.js';
33
+ export { deriveSchemaManifest } from '../with-shape/manifest/derive.js';
34
+ export type { DeriveSchemaManifestResult, LookupDEK } from '../with-shape/manifest/derive.js';
35
+ export { loadSchemaManifestEntry } from '../with-shape/manifest/storage.js';
36
+ export type { GetManifestDEK, LoadedSchemaManifest } from '../with-shape/manifest/storage.js';
37
+ export type { SchemaManifest, SchemaManifestEntry } from '../with-shape/manifest/types.js';
38
+ export { MANIFEST_COLLECTION, isManifestReservedCollection } from '../with-shape/manifest/reserved-collections.js';
39
+ export { ManifestConflictError, MigrationRequiredError, PodHeaderVerificationError } from '../kernel/errors.js';
40
+ export type { Noydb } from '../kernel/noydb.js';
41
+ export type { Vault } from '../kernel/vault.js';
42
+ export type { NoydbOptions, NoydbStore } from '../kernel/types.js';
43
+ export type { EchoSecretParts } from '../kernel/enclave/index.js';
@@ -0,0 +1,117 @@
1
+ /**
2
+ * `open(podBytesOrFile)` — the pod READ-path orchestrator (#941 Task 4).
3
+ *
4
+ * A free function (never a `Vault` method — `kernel/vault.ts` is at its
5
+ * line ceiling and open() needs no vault-internal state that isn't already
6
+ * reachable through published seams). Composes, in order:
7
+ *
8
+ * 1. `readPod` — parse + integrity-check the container (throws
9
+ * `BundleIntegrityError` on a corrupted/truncated pod).
10
+ * 2. `verifyPodHeader` — only when `opts.trustedKeys` is supplied.
11
+ * `'unsigned'` is benign (legacy pod, or `writePod({ sign: false })`)
12
+ * and open() proceeds; `'untrusted'` / `'tampered'` are fail-closed —
13
+ * `PodHeaderVerificationError` — mirroring `followRedirects`'s
14
+ * `RedirectBadSignatureError` posture: once a caller opts into
15
+ * verification, an unverifiable header is a hard stop.
16
+ * 3. `createNoydb` + `openVault` + `vault.load(dumpJson)` — the exact
17
+ * unlock+restore sequence `bundle-roundtrip.test.ts` drives by hand.
18
+ * The pod header carries no vault name (minimum-disclosure —
19
+ * `format.ts`'s forbidden-fields list), so the caller names the
20
+ * target vault via `opts.vault`.
21
+ * 4. Re-derive the `SchemaManifest` from the just-restored `_schemas/*`
22
+ * (the source of truth — Task 3's `deriveSchemaManifest`), via a
23
+ * NON-MINTING `LookupDEK` built from `loadKeyring`'s already-unwrapped
24
+ * `UnlockedKeyring.deks` map directly (`with-party/team/keyring.js`).
25
+ * **Not** `ensureCollectionDEK` (#941 review fix — Important 2): that
26
+ * helper mints+persists a fresh DEK into `_keyring/<user>` for any
27
+ * collection absent from the keyring, which is correct for a WRITE
28
+ * path but wrong here — `deriveSchemaManifest` only ever reads
29
+ * collections that already have a `_schemas` envelope, so an absent
30
+ * DEK means "this principal can't decrypt this sibling" (e.g. a
31
+ * collection-scoped grantee), never "new collection." The old
32
+ * minting call polluted a scoped principal's freshly-restored keyring
33
+ * with garbage sibling DEKs on every `open()`. The returned
34
+ * `manifest` is that principal's own visible slice — see
35
+ * `derive.ts`'s `LookupDEK` doc and `sync.ts`'s module doc for the
36
+ * full rationale (the same distinction governs why the sync path
37
+ * must SKIP rather than write a partial manifest).
38
+ * 5. Generation check (AC #4 coexistence): compare the HIGHEST
39
+ * per-collection generation stamp carried by the restored manifest
40
+ * against THIS store's schema-fence generation as it stood
41
+ * immediately before the restore (0 for a brand-new vault; whatever a
42
+ * coexisting local vault already had). If the pod is ahead and
43
+ * `!opts.allowGenerationAhead`, throw `MigrationRequiredError` (the
44
+ * same class `SchemaFenceController`'s write-path gate throws) — the
45
+ * reader hasn't reconciled schema changes that happened elsewhere.
46
+ * `allowGenerationAhead: true` is the documented dev override: open
47
+ * proceeds, with a console warning. Divergence in the OTHER direction
48
+ * (reader ahead of the pod) is non-fatal but also warned (#941
49
+ * review, Important 3 — AC #4 coexistence divergence must be
50
+ * observable in either direction, not just the bypass case).
51
+ *
52
+ * NOTE: this deliberately reads per-collection entries, not
53
+ * `manifest.generation` itself. `_meta/schema-fence` is local
54
+ * session-coordination state and does NOT travel in a pod dump
55
+ * (`with-pod/backup.ts`'s reserved-collection list carries `_schemas`
56
+ * and `_manifest` but not `_meta`) — a fresh re-derive's top-level
57
+ * `generation` is always driven by the (untouched-by-restore) target
58
+ * store's own fence, not the pod's. Each `_schemas/<collection>`
59
+ * envelope's own `generation` field DOES travel (it's stamped at
60
+ * declare-time from the writer's real fence), so per-collection
61
+ * entries are the only signal that survives a restore intact.
62
+ *
63
+ * @module
64
+ */
65
+ import type { NoydbPodHeader } from './format.js';
66
+ import type { PodVerifyResult } from './bundle.js';
67
+ import type { Noydb } from '../kernel/noydb.js';
68
+ import type { Vault } from '../kernel/vault.js';
69
+ import type { NoydbOptions, NoydbStore, EchoSecretParts } from '../kernel/types.js';
70
+ import type { SchemaManifest } from '../with-shape/manifest/types.js';
71
+ export interface OpenPodOptions {
72
+ /** The ciphertext store to restore into (and where the opened `Vault` lives). */
73
+ readonly store: NoydbStore;
74
+ /**
75
+ * The target vault name. The pod header deliberately carries no vault
76
+ * name (minimum-disclosure — `NoydbPodHeader`'s forbidden-fields list),
77
+ * so the caller names the vault to restore into/open.
78
+ */
79
+ readonly vault: string;
80
+ /** User identifier — passed through to `createNoydb`. */
81
+ readonly user: string;
82
+ /** That user's secret — passed through to `createNoydb` / `loadKeyring`. */
83
+ readonly secret: string | EchoSecretParts;
84
+ /**
85
+ * Trusted signing keys (`keyId → publicKeyB64`). When supplied,
86
+ * `verifyPodHeader` runs and its result is returned as `verification`.
87
+ * Omitted → no verification attempted, `verification` is absent.
88
+ */
89
+ readonly trustedKeys?: Readonly<Record<string, string>>;
90
+ /**
91
+ * Passthrough to `createNoydb` for every option beyond `store`/`user`/
92
+ * `secret` (history/indexing/blobs/… strategies, `secretMode`, etc.).
93
+ */
94
+ readonly noydbOptions?: Omit<NoydbOptions, 'store' | 'user' | 'secret'>;
95
+ /**
96
+ * Dev override for the generation-ahead fence (AC #4). Default `false`:
97
+ * a pod whose schema manifest generation is ahead of this store's
98
+ * pre-restore fence generation throws `MigrationRequiredError`. `true`
99
+ * opens anyway, logging a console warning.
100
+ */
101
+ readonly allowGenerationAhead?: boolean;
102
+ }
103
+ export interface OpenPodResult {
104
+ readonly db: Noydb;
105
+ readonly vault: Vault;
106
+ readonly header: NoydbPodHeader;
107
+ /** Present iff `opts.trustedKeys` was supplied. */
108
+ readonly verification?: PodVerifyResult;
109
+ /** The pod's schema manifest, re-derived from the just-restored `_schemas/*`. */
110
+ readonly manifest?: SchemaManifest;
111
+ }
112
+ /**
113
+ * Open a `.noydb` pod: verify its integrity (and, opt-in, its signature),
114
+ * unlock + restore it into `opts.vault`, and re-derive its schema manifest.
115
+ * See the module doc for the full flow and the errors each step can throw.
116
+ */
117
+ export declare function open(podFileOrBytes: Uint8Array, opts: OpenPodOptions): Promise<OpenPodResult>;
@@ -0,0 +1,78 @@
1
+ /**
2
+ * Redirect record (#944) — a signed "this moved, go there" pointer carried
3
+ * in the pod's PLAINTEXT header (`NoydbPodHeader.redirect`, see
4
+ * `format.ts`) so a dispatcher can follow it pre-auth: no secret, no
5
+ * decompression.
6
+ *
7
+ * The record carries its OWN inner `sig` (via `signRecord`/`verifyRecord`
8
+ * from `signature.ts`) — independent from, and in addition to, the #943
9
+ * pod-header signature. A Redirect is REQUIRED to be signed: there is no
10
+ * legacy unsigned install base for this new record type, so an absent or
11
+ * invalid signature is invalid for following, not merely "unverified".
12
+ *
13
+ * Minimum-disclosure: the record is kept to exactly
14
+ * `{ v, target, reason, issuedBy, sig }` — no timestamps, no identities
15
+ * beyond the signer's `keyId` fingerprint.
16
+ */
17
+ import type { DocSigner } from '../with-audit/attestation/signer.js';
18
+ /**
19
+ * A signed pointer to another pod. `target` is a locator string or URL —
20
+ * the forthcoming #945 `Locator` type isn't built yet, so `target` stays a
21
+ * plain string for now (forward-seam noted, not blurred: a Redirect says
22
+ * "go elsewhere once"; a Locator will say "where cargo lives").
23
+ */
24
+ export interface Redirect {
25
+ readonly v: 1;
26
+ readonly target: string;
27
+ readonly reason: 'moved' | 'release' | 'tombstone' | 'repoint';
28
+ readonly issuedBy: string;
29
+ readonly sig: string;
30
+ }
31
+ /**
32
+ * Sign a new Redirect record with `signer`. Builds the record minus `sig`,
33
+ * signs it via the #943 `signRecord` convention, and returns the complete
34
+ * signed record.
35
+ */
36
+ export declare function signRedirect(signer: DocSigner, fields: {
37
+ readonly target: string;
38
+ readonly reason: Redirect['reason'];
39
+ }): Promise<Redirect>;
40
+ /**
41
+ * Verify a Redirect record's signature against `trustedKeys`
42
+ * (`keyId → publicKeyB64`). Fails closed: an `issuedBy` not present in
43
+ * `trustedKeys` is untrusted/unverifiable and returns `false`, same as a
44
+ * tampered or forged signature.
45
+ */
46
+ export declare function verifyRedirect(record: Redirect, trustedKeys: Readonly<Record<string, string>>): Promise<boolean>;
47
+ /** One followed hop's provenance — surfaced so a UI can show "moved from X via Y". */
48
+ export interface RedirectHop {
49
+ readonly target: string;
50
+ readonly reason: Redirect['reason'];
51
+ readonly issuedBy: string;
52
+ }
53
+ /** Result of {@link followRedirects}: the terminal (non-redirect) pod's bytes, plus the ordered hop list that led there. */
54
+ export interface FollowRedirectsResult {
55
+ readonly terminal: Uint8Array;
56
+ readonly hops: readonly RedirectHop[];
57
+ }
58
+ /**
59
+ * Follow a chain of Redirect records starting from `start`'s pod bytes,
60
+ * fetching each hop's target via `fetcher`, until a pod with no `redirect`
61
+ * header field (the terminal) is reached.
62
+ *
63
+ * HTTP-redirect discipline: each hop's Redirect is verified against
64
+ * `opts.trustedKeys` BEFORE it is followed (fail closed — an untrusted or
65
+ * forged hop never advances the walk), loops are detected on the target
66
+ * about to be followed, and the hop count is capped at `opts.maxDepth`
67
+ * (default 8). `fetcher` throwing or returning `null` for a target means
68
+ * that hop is unreachable.
69
+ *
70
+ * @throws {RedirectBadSignatureError} a hop's Redirect fails verification.
71
+ * @throws {RedirectLoopError} a hop's target was already followed in this chain.
72
+ * @throws {RedirectDepthExceededError} more than `maxDepth` hops were followed.
73
+ * @throws {RedirectUnreachableError} `fetcher` threw or returned `null` for a target.
74
+ */
75
+ export declare function followRedirects(start: Uint8Array, fetcher: (target: string) => Promise<Uint8Array | null>, opts: {
76
+ readonly trustedKeys: Readonly<Record<string, string>>;
77
+ readonly maxDepth?: number;
78
+ }): Promise<FollowRedirectsResult>;
@@ -0,0 +1,13 @@
1
+ export declare const POD_SIG_ALG: "ed25519";
2
+ /** The exact bytes a signature covers: utf8(canonicalJson(payload)). Exported for cross-checking. */
3
+ export declare function signedBytes(payload: Record<string, unknown>): Uint8Array;
4
+ /**
5
+ * Sign an arbitrary canonical record. `payload` MUST already exclude any
6
+ * `sig` field.
7
+ */
8
+ export declare function signRecord(privateKeyPkcs8B64: string, payload: Record<string, unknown>): Promise<string>;
9
+ /**
10
+ * Verify. `payload` is the record WITHOUT `sig`. Fails closed (false) on
11
+ * any malformed input.
12
+ */
13
+ export declare function verifyRecord(publicKeyB64: string, sig: string, payload: Record<string, unknown>): Promise<boolean>;
@@ -0,0 +1,100 @@
1
+ /**
2
+ * `Vault.listBehaviors()` builder (#947 Task 3) — a read-only, typed
3
+ * enumeration of the five behavior registries a vault can carry: guards,
4
+ * derivations, materialized views, overlays, satellites. Each entry
5
+ * carries the behavior's stable name (the declared `name`, or a
6
+ * deterministic fallback for an unnamed guard/derivation) plus the
7
+ * SERIALIZABLE half of its spec — every function-valued field (`check`,
8
+ * `derive`, `compute`, a rollup's `compute`, an MV's `query`/`rowKey`/
9
+ * `map`, …) is stripped before it reaches the caller. Registries the
10
+ * vault never initialized (no guard/derivation/MV/overlay/satellite
11
+ * strategy was passed to `createNoydb`) contribute an empty array.
12
+ *
13
+ * @module
14
+ */
15
+ import type { GuardRegistry } from '../../with-audit/guards/registry.js';
16
+ import type { DerivationRegistry } from '../../with-formula/derivations/registry.js';
17
+ import type { MaterializedViewRegistry } from '../../with-formula/materialized-views/registry.js';
18
+ import type { OverlayedViewRegistry } from '../../with-formula/overlay-views/registry.js';
19
+ import type { OverlayFieldMergeMode } from '../../with-formula/overlay-views/types.js';
20
+ import type { SatelliteRegistry } from '../satellites/registry.js';
21
+ /** One guard's public identity + declarative (non-function) config. */
22
+ export interface GuardBehaviorEntry {
23
+ readonly name: string;
24
+ readonly collection: string;
25
+ readonly frozenFields?: {
26
+ readonly fields: readonly string[];
27
+ };
28
+ readonly amendment?: {
29
+ readonly roles: readonly ('admin' | 'owner')[];
30
+ };
31
+ }
32
+ /** One derivation output declaration, functions (`key`) stripped. */
33
+ export interface DerivationOutputEntry {
34
+ readonly shape: 'record' | 'array';
35
+ readonly collection: string;
36
+ readonly optional?: boolean;
37
+ readonly denorm?: readonly string[];
38
+ readonly maxFanout?: number;
39
+ }
40
+ /** One derivation's public identity + declarative (non-function) config. */
41
+ export interface DerivationBehaviorEntry {
42
+ readonly name: string;
43
+ readonly source: string;
44
+ readonly sources?: readonly string[];
45
+ readonly triggerBy?: ReadonlyArray<{
46
+ readonly collection: string;
47
+ readonly on: string;
48
+ readonly maxFanout?: number;
49
+ }>;
50
+ readonly rollup?: {
51
+ readonly from: string;
52
+ readonly key: string;
53
+ readonly field: string;
54
+ };
55
+ readonly deterministic: true;
56
+ readonly outputs: Readonly<Record<string, DerivationOutputEntry>>;
57
+ readonly lifecycle: 'eager' | 'lazy' | {
58
+ readonly mode: 'eager' | 'lazy';
59
+ readonly maxDepth?: number;
60
+ };
61
+ readonly strict?: boolean;
62
+ }
63
+ /** One materialized view's identity + its spec, functions stripped recursively. */
64
+ export interface MaterializedViewBehaviorEntry {
65
+ readonly name: string;
66
+ readonly spec: Readonly<Record<string, unknown>>;
67
+ }
68
+ /** One overlay's identity + config — `OverlayedViewSpec` carries no function fields. */
69
+ export interface OverlayBehaviorEntry {
70
+ readonly name: string;
71
+ readonly base: string;
72
+ readonly overlay: string;
73
+ readonly shadowField: string;
74
+ readonly shadowValue: unknown;
75
+ readonly mergeMode?: OverlayFieldMergeMode;
76
+ }
77
+ /** One satellite pairing — `SatelliteSpec` carries no function fields. */
78
+ export interface SatelliteBehaviorEntry {
79
+ readonly name: string;
80
+ readonly base: string;
81
+ readonly fields: readonly string[];
82
+ readonly joined?: string;
83
+ }
84
+ /** Typed, read-only enumeration of all five behavior registries. */
85
+ export interface BehaviorSummary {
86
+ readonly guards: readonly GuardBehaviorEntry[];
87
+ readonly derivations: readonly DerivationBehaviorEntry[];
88
+ readonly materializedViews: readonly MaterializedViewBehaviorEntry[];
89
+ readonly overlays: readonly OverlayBehaviorEntry[];
90
+ readonly satellites: readonly SatelliteBehaviorEntry[];
91
+ }
92
+ /** The five registries `Vault.listBehaviors()` reads from — `null` when the vault never initialized that strategy. */
93
+ export interface BehaviorRegistries {
94
+ readonly guards: GuardRegistry | null;
95
+ readonly derivations: DerivationRegistry | null;
96
+ readonly materializedViews: MaterializedViewRegistry | null;
97
+ readonly overlays: OverlayedViewRegistry | null;
98
+ readonly satellites: SatelliteRegistry | null;
99
+ }
100
+ export declare function buildBehaviorSummary(registries: BehaviorRegistries): BehaviorSummary;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * The deterministic fallback key for an UNNAMED derivation, shared by
3
+ * `dumpSchema`'s `describeDerivations` (walk.ts) and `listBehaviors`'s
4
+ * `buildDerivationEntries` (behaviors.ts) so the two surfaces always key the
5
+ * same unnamed derivation identically.
6
+ *
7
+ * Base key = the derivation's output-collection names, sorted and joined by
8
+ * `+` (or `source` when it has no outputs). On collision with any key already
9
+ * assigned in this enumeration (named or fallback, passed in `used`), a
10
+ * deterministic `#occurrence` suffix is appended (`base`, `base#1`, `base#2`, …)
11
+ * so two derivations with the same output set both appear.
12
+ *
13
+ * Takes the already-extracted output-collection list + source (rather than a
14
+ * `DerivationSpec`) so both the typed builder and walk.ts's duck-typed registry
15
+ * walk can call it without a shared concrete type.
16
+ */
17
+ export declare function fallbackDerivationName(outputCollections: readonly string[], source: string, used: ReadonlySet<string>): string;
@@ -20,8 +20,20 @@ import type { I18nTextDescriptor } from '../../via/i18n/core.js';
20
20
  import type { ComputedFields } from '../../with-formula/computed/index.js';
21
21
  import type { RefDescriptor } from '../../kernel/refs.js';
22
22
  import type { ClassifiedFieldSpec } from '../../via/classified/descriptor.js';
23
+ import type { NoydbStore } from '../../kernel/types.js';
24
+ import type { EnclaveKey } from '../../kernel/enclave/index.js';
23
25
  export interface DescribedField {
24
26
  readonly key: string;
27
+ /**
28
+ * Stable, opaque per-field identity (#946) — survives a rename (the field
29
+ * keeps its id when its name/`key` changes). Sourced from the persisted
30
+ * schema's `PersistedSchemaEnvelope.fieldIds` map, so it is only present on
31
+ * the async `describeAsync()` path for a collection that has persisted a
32
+ * schema (`persistJsonSchema: true`) at least once; absent on the sync
33
+ * `describe()` path (no store I/O) and on any field with no persisted id
34
+ * yet.
35
+ */
36
+ readonly id?: string;
25
37
  /** Sync: inferred from config ('number'|'enum'|'string'|'array'|'unknown'). Async (Task 4): validator-derived. */
26
38
  readonly type: string;
27
39
  readonly optional: boolean;
@@ -175,6 +187,24 @@ export interface ZodFieldSlot {
175
187
  * No static zod import — all zod access is lazy via derivePersistedSchema.
176
188
  */
177
189
  export declare function deriveZodFields(schema: unknown): Promise<Record<string, ZodFieldSlot>>;
190
+ /**
191
+ * Resolve the persisted-schema `fieldIds` map for `describeAsync()`'s
192
+ * `BuildDescriptionInput` (#946). Returns a spreadable partial so the call
193
+ * site can inline it with `...(await resolveDescribeFieldIds(...))` without
194
+ * an intermediate local — `collection.ts`'s `describe()` bodies are under a
195
+ * near-zero line-ceiling headroom.
196
+ *
197
+ * Silent-degrades to `{}` (no ids — every `DescribedField.id` stays
198
+ * `undefined`, never a describe() crash) on any failure: `getDEK` throwing,
199
+ * no persisted envelope yet, or an envelope with no `fieldIds` (legacy /
200
+ * never-persisted). Mirrors the leak/degrade posture of
201
+ * `satellites/dead-filter.ts`'s `liveBaseIdSetsForBundle`, but degrading to
202
+ * "no ids" is lossless here (unlike that filter's data-exposure tradeoff) —
203
+ * describe() simply omits `id` for every field.
204
+ */
205
+ export declare function resolveDescribeFieldIds(store: NoydbStore, vaultName: string, collectionName: string, getDEK: (collectionName: string) => Promise<EnclaveKey>): Promise<{
206
+ fieldIds?: Record<string, string>;
207
+ }>;
178
208
  export interface BuildDescriptionInput {
179
209
  readonly collection: string;
180
210
  readonly fieldMeta: Record<string, FieldMeta> | undefined;
@@ -223,6 +253,12 @@ export interface BuildDescriptionInput {
223
253
  * until they gain a consumer too.
224
254
  */
225
255
  readonly viaFragments?: Record<string, Record<string, unknown>> | undefined;
256
+ /**
257
+ * Persisted-schema `fieldName -> id` map (#946), resolved by the async
258
+ * describe path via {@link resolveDescribeFieldIds}. The sync path passes
259
+ * no `fieldIds` (no store I/O), so every field's `id` is `undefined` there.
260
+ */
261
+ readonly fieldIds?: Record<string, string> | undefined;
226
262
  }
227
263
  export { FieldMetaUnknownFieldError };
228
264
  /**
@@ -16,3 +16,4 @@ export type { FieldMeta, SemanticType } from './field-meta.js';
16
16
  export type { CollectionDescription, DescribedField, DescribeOptions } from './describe.js';
17
17
  export { applyListProjection } from './projection.js';
18
18
  export type { ListProjectionOptions } from './projection.js';
19
+ export type { BehaviorSummary, GuardBehaviorEntry, DerivationBehaviorEntry, DerivationOutputEntry, MaterializedViewBehaviorEntry, OverlayBehaviorEntry, SatelliteBehaviorEntry, } from './behaviors.js';
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Builds the `subsystems` block of the vault schema snapshot (#948 seam 5):
3
+ * the 4 registry-presence booleans (guards / derivations / materializedViews
4
+ * / overlayViews) UNION the 27 strategy-derived booleans — one per
5
+ * {@link StrategyKey}, `true` iff that service's resolved strategy differs
6
+ * from its un-opted-in default.
7
+ *
8
+ * The 4 registry keys are canonical: if a strategy key ever collides with one
9
+ * of them, the registry value wins (registries are spread last).
10
+ *
11
+ * @module
12
+ */
13
+ import { type StrategyBag } from '../../port/with/strategies.js';
14
+ /** The 4 registry-presence keys already reported before #948 seam 5. */
15
+ export interface SubsystemRegistries {
16
+ readonly guards: boolean;
17
+ readonly derivations: boolean;
18
+ readonly materializedViews: boolean;
19
+ readonly overlayViews: boolean;
20
+ }
21
+ /** Registry keys UNION the 27 strategy-derived booleans, keyed by {@link StrategyKey} name. */
22
+ export declare function buildSubsystemMatrix(strategies: StrategyBag, registries: SubsystemRegistries): Record<string, boolean>;
@@ -104,6 +104,7 @@ export interface CollectionDescriptor {
104
104
  readonly refs: Record<string, {
105
105
  readonly target: string;
106
106
  readonly mode: 'strict' | 'warn' | 'cascade';
107
+ readonly isArray?: true;
107
108
  }>;
108
109
  readonly validator?: {
109
110
  readonly kind: PersistedSchemaKind;
@@ -127,6 +128,7 @@ export interface OverlayViewDescriptor {
127
128
  export interface DerivationDescriptor {
128
129
  readonly source: string;
129
130
  readonly outputs: ReadonlyArray<string>;
131
+ readonly name?: string;
130
132
  }
131
133
  export interface InternalCollectionStats {
132
134
  readonly records: number;
@@ -137,7 +139,6 @@ export interface VaultSchemaSnapshot {
137
139
  readonly vault: string;
138
140
  readonly emittedAt: string;
139
141
  readonly subsystems: Record<string, boolean>;
140
- readonly aclRoles?: ReadonlyArray<string>;
141
142
  readonly meta?: VaultMeta;
142
143
  readonly collections: Record<string, CollectionDescriptor>;
143
144
  readonly materializedViews: Record<string, MaterializedViewDescriptor>;
@@ -10,6 +10,7 @@
10
10
  * paths and class identities are unchanged for existing consumers.
11
11
  */
12
12
  import { NoydbError } from '../../kernel/errors.js';
13
+ import type { RefDescriptor } from '../../kernel/refs.js';
13
14
  export declare const LINK_COLLECTION_PREFIX = "_links_";
14
15
  /** Storage collection name for a logical link set. */
15
16
  export declare function linkCollectionName(name: string): string;
@@ -30,6 +31,19 @@ export interface LinkSpec {
30
31
  readonly b: string;
31
32
  readonly onDelete?: LinkOnDelete;
32
33
  }
34
+ /**
35
+ * Validate + register a `vault.link(name, spec)` declaration. `a`/`b`
36
+ * accept either a collection name or a `ref(target)` descriptor (only
37
+ * `target` is used). Idempotent for an identical re-declaration; throws
38
+ * `ValidationError` for an invalid endpoint or a conflicting
39
+ * re-declaration. Body extracted out of `Vault.link()` (shrink-first,
40
+ * #947) — the kernel floor keeps a thin delegator.
41
+ */
42
+ export declare function declareLink(linkRegistry: Map<string, LinkSpec>, name: string, spec: {
43
+ a: string | RefDescriptor;
44
+ b: string | RefDescriptor;
45
+ onDelete?: LinkSpec['onDelete'];
46
+ }): void;
33
47
  /** One link tuple as returned by `of()` / `list()`. */
34
48
  export interface LinkRow {
35
49
  readonly a: string;
@@ -0,0 +1,86 @@
1
+ /**
2
+ * Derive the pod-wide {@link SchemaManifest} from the per-collection
3
+ * `_schemas/<collection>` records — the source of truth (#941 Task 3).
4
+ *
5
+ * The manifest is an INDEX, never a cache with independent state: every
6
+ * field in a {@link SchemaManifestEntry} is a direct projection of the
7
+ * matching `PersistedSchemaEnvelope` (`hash` → `contentHash`, `fieldIds` →
8
+ * `fieldIds`, `generation` → `generation`, falling back to the live fence's
9
+ * `currentSchemaVersion` for a legacy pre-#946 envelope that never got a
10
+ * generation stamp). Re-running this function against the same stored state
11
+ * always produces the same manifest — that's what makes round-trip identity
12
+ * (AC #2: dump → restore → re-derive matches the original) hold for free,
13
+ * with no special-cased restore logic.
14
+ *
15
+ * A collection whose `_schemas/<collection>` envelope decrypts successfully
16
+ * but has no derivable content (`hash === null` — a stub envelope for a
17
+ * non-Zod validator) is legitimately omitted from the index: there is no
18
+ * content hash to bind.
19
+ *
20
+ * ## Scoped principals: "cannot decrypt" is NOT "doesn't exist"
21
+ *
22
+ * A `_schemas/<collection>` envelope is encrypted under **that data
23
+ * collection's own DEK** — the same key its records use — NOT a shared
24
+ * `_schemas`-wide key. In a team vault, a collection-scoped grantee (e.g.
25
+ * `grant(..., { role: 'operator', permissions: { invoices: 'rw' } })`) holds
26
+ * only the DEKs their `permissions` name, plus every system-prefixed (`_*`)
27
+ * collection's DEK — `_manifest` included, by `grant()`'s "propagate system
28
+ * collections to every role" rule (`keyring.ts`). So a member scoped to
29
+ * `invoices` CAN decrypt `_manifest/schema` (the pod-wide index) but CANNOT
30
+ * decrypt a sibling's `_schemas/customers` envelope — even though that
31
+ * envelope is right there in `store.list(vault, SCHEMAS_COLLECTION)`.
32
+ *
33
+ * `lookupDEK` (the {@link LookupDEK} passed in) reflects this: it returns
34
+ * `undefined` for a collection name whose DEK the caller does not hold —
35
+ * deliberately NEVER minting a fresh one (see the module doc on
36
+ * `LookupDEK` for why). This function distinguishes that case
37
+ * (`undecodableCollections`) from "the schema envelope legitimately has no
38
+ * derivable content" (`hash === null`) — the caller (`sync.ts`) MUST treat
39
+ * an incomplete view differently: writing a manifest derived from a
40
+ * partial view would silently drop every collection this principal can't
41
+ * see. See `sync.ts`'s module doc for how the sync path handles this.
42
+ *
43
+ * @module
44
+ */
45
+ import type { EnclaveKey } from '../../kernel/enclave/index.js';
46
+ import type { NoydbStore } from '../../kernel/types.js';
47
+ import type { SchemaManifest } from './types.js';
48
+ /**
49
+ * A NON-MINTING DEK lookup: returns the collection's DEK if the caller
50
+ * already holds it, `undefined` otherwise. Deliberately distinct from
51
+ * `storage.ts`'s `GetManifestDEK` (which mints+persists a fresh DEK for an
52
+ * absent collection — correct for a caller about to WRITE that collection,
53
+ * e.g. `_manifest` itself). `deriveSchemaManifest` only ever READS sibling
54
+ * collections it never created and has no business minting keys for — an
55
+ * absent DEK here means "not my collection to see," never "new collection
56
+ * that needs a key." Minting here would be worse than a no-op: it would
57
+ * silently persist a garbage DEK into the caller's OWN `_keyring/<user>`
58
+ * file (via `ensureCollectionDEK`'s `persistKeyring` side effect) that
59
+ * still can't decrypt anything — see `sync.ts` / `with-pod/open.ts`'s
60
+ * fix notes (#941 review).
61
+ */
62
+ export type LookupDEK = (collectionName: string) => Promise<EnclaveKey | undefined>;
63
+ export interface DeriveSchemaManifestResult {
64
+ /** The derived manifest — an index over every collection this principal could decrypt. */
65
+ readonly manifest: SchemaManifest;
66
+ /**
67
+ * Names present in `_schemas` (per `store.list`) whose envelope this
68
+ * principal could NOT decrypt — either no DEK held for that collection,
69
+ * or the DEK held failed to decrypt/parse it (treated the same: the
70
+ * caller cannot verify what's there, so it cannot safely be omitted or
71
+ * asserted). Empty for a principal with full visibility (typically the
72
+ * owner/admin/custodian). Non-empty means `manifest.collections` is
73
+ * DEFINITELY INCOMPLETE relative to the pod's true collection set —
74
+ * see `sync.ts` for why that must gate whether the manifest gets written.
75
+ */
76
+ readonly undecodableCollections: readonly string[];
77
+ }
78
+ /**
79
+ * Read the fence generation + every `_schemas/<collection>` envelope this
80
+ * principal can decrypt, and project them into a fresh {@link SchemaManifest}.
81
+ * `lookupDEK` is called once per collection found under `_schemas` (never
82
+ * mints — see {@link LookupDEK}). Names whose DEK isn't held, or whose
83
+ * envelope fails to decrypt/parse despite holding a DEK, are reported via
84
+ * `undecodableCollections` rather than silently dropped from the result.
85
+ */
86
+ export declare function deriveSchemaManifest(store: NoydbStore, vault: string, lookupDEK: LookupDEK): Promise<DeriveSchemaManifestResult>;
@@ -0,0 +1,27 @@
1
+ /**
2
+ * The reserved `_manifest` collection — one record per pod, holding the
3
+ * manifest-set (schema / behavior / storage / access / app manifests, per
4
+ * the manifest-engine roadmap #941). A single collection is gated: records
5
+ * inside it are keyed by manifest kind. Only `schema` (record id `schema`)
6
+ * is implemented (#941, P0); `behavior`/`storage`/`access`/`app` are
7
+ * reserved record ids for future kinds (P1-P3) — not built yet.
8
+ *
9
+ * Reserved so `vault.collection('_manifest')` is refused (manifests are
10
+ * privileged, strict-CAS, ledger-audited records — never reachable through
11
+ * the generic public collection handle) and so the collection travels in a
12
+ * pod dump like every other reserved internal collection.
13
+ *
14
+ * Kept dependency-free (mirrors `with-party/team/reserved-secret-collections.ts`)
15
+ * so both the kernel (`vault.ts`) and other shape-layer modules can import it
16
+ * without an import cycle.
17
+ */
18
+ /** Reserved collection holding the pod's manifest-set records. */
19
+ export declare const MANIFEST_COLLECTION: "_manifest";
20
+ /**
21
+ * The set of reserved manifest collection names. Currently just the single
22
+ * `_manifest` collection — record ids inside it (not collection names)
23
+ * distinguish manifest kinds.
24
+ */
25
+ export declare const MANIFEST_RESERVED_COLLECTIONS: ReadonlySet<string>;
26
+ /** True when `name` is a reserved manifest collection. */
27
+ export declare function isManifestReservedCollection(name: string): boolean;