@noy-db/hub 0.2.0-pre.1 → 0.2.0-pre.3

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 (253) hide show
  1. package/dist/aggregate/index.cjs.map +1 -1
  2. package/dist/aggregate/index.js +2 -2
  3. package/dist/attestation/index.cjs +305 -0
  4. package/dist/attestation/index.cjs.map +1 -0
  5. package/dist/attestation/index.d.cts +52 -0
  6. package/dist/attestation/index.d.ts +52 -0
  7. package/dist/attestation/index.js +36 -0
  8. package/dist/attestation/index.js.map +1 -0
  9. package/dist/blobs/index.cjs.map +1 -1
  10. package/dist/blobs/index.d.cts +4 -3
  11. package/dist/blobs/index.d.ts +4 -3
  12. package/dist/blobs/index.js +10 -8
  13. package/dist/blobs/index.js.map +1 -1
  14. package/dist/bundle/index.cjs +17940 -129
  15. package/dist/bundle/index.cjs.map +1 -1
  16. package/dist/bundle/index.d.cts +172 -3
  17. package/dist/bundle/index.d.ts +172 -3
  18. package/dist/bundle/index.js +533 -5
  19. package/dist/bundle/index.js.map +1 -1
  20. package/dist/{chunk-CBAHB2BF.js → chunk-2EYC3WDT.js} +7 -70
  21. package/dist/chunk-2EYC3WDT.js.map +1 -0
  22. package/dist/{chunk-P7EQ2S5O.js → chunk-2XLVPKXG.js} +2 -2
  23. package/dist/chunk-4OQWR46B.js +79 -0
  24. package/dist/chunk-4OQWR46B.js.map +1 -0
  25. package/dist/{chunk-23TTQXVO.js → chunk-4UBOTYP5.js} +2 -2
  26. package/dist/chunk-4X2S7PBF.js +251 -0
  27. package/dist/chunk-4X2S7PBF.js.map +1 -0
  28. package/dist/{chunk-MKSA2V7A.js → chunk-5YHWBPOT.js} +2 -2
  29. package/dist/{chunk-DYBQG5PQ.js → chunk-6S3LLAQ5.js} +2 -2
  30. package/dist/{chunk-UA4RI7OT.js → chunk-74JEQFMT.js} +5 -5
  31. package/dist/chunk-75QDHSE4.js +59 -0
  32. package/dist/chunk-75QDHSE4.js.map +1 -0
  33. package/dist/chunk-A6SWRXUQ.js +118 -0
  34. package/dist/chunk-A6SWRXUQ.js.map +1 -0
  35. package/dist/{chunk-UZXLQCHP.js → chunk-BFI3RS42.js} +2 -2
  36. package/dist/{chunk-EGQYGYIU.js → chunk-EMEX37ZN.js} +2 -2
  37. package/dist/{chunk-PEULZC6M.js → chunk-EPK6A3WJ.js} +8 -1
  38. package/dist/chunk-EPK6A3WJ.js.map +1 -0
  39. package/dist/{chunk-VMIO4IXG.js → chunk-FBMXWVGP.js} +6 -229
  40. package/dist/chunk-FBMXWVGP.js.map +1 -0
  41. package/dist/{chunk-ZNOEIM6Y.js → chunk-FCDO7UAO.js} +2 -2
  42. package/dist/{chunk-5SCJ5UEF.js → chunk-FS7A4XNF.js} +3 -3
  43. package/dist/{chunk-YS3POABP.js → chunk-FXQYZNOW.js} +1 -1
  44. package/dist/chunk-FXQYZNOW.js.map +1 -0
  45. package/dist/{chunk-SIZWEV2Y.js → chunk-G7PAZ3TD.js} +4 -4
  46. package/dist/{chunk-SIZWEV2Y.js.map → chunk-G7PAZ3TD.js.map} +1 -1
  47. package/dist/{chunk-537VFZTR.js → chunk-GAUBWHAF.js} +4 -4
  48. package/dist/{chunk-FCXOFQAJ.js → chunk-GD3BGKAR.js} +2 -2
  49. package/dist/{chunk-DPMFBCV6.js → chunk-GDTCGIPX.js} +2 -2
  50. package/dist/{chunk-DPMFBCV6.js.map → chunk-GDTCGIPX.js.map} +1 -1
  51. package/dist/{chunk-6HPZY4ON.js → chunk-GVXBHCZ2.js} +8 -3
  52. package/dist/chunk-GVXBHCZ2.js.map +1 -0
  53. package/dist/{chunk-HB3Z2GCR.js → chunk-HGZ7DC5H.js} +2 -2
  54. package/dist/{chunk-MIQHZESA.js → chunk-IS5HWQO7.js} +5 -5
  55. package/dist/{chunk-MIQHZESA.js.map → chunk-IS5HWQO7.js.map} +1 -1
  56. package/dist/{chunk-5DWL3JBF.js → chunk-K5PVGKE4.js} +2 -2
  57. package/dist/{chunk-NIOHFJPJ.js → chunk-KMI2NBBF.js} +7 -119
  58. package/dist/chunk-KMI2NBBF.js.map +1 -0
  59. package/dist/{chunk-XGSOTWYX.js → chunk-KYKMKLJ6.js} +2 -2
  60. package/dist/chunk-LOL725S4.js +233 -0
  61. package/dist/chunk-LOL725S4.js.map +1 -0
  62. package/dist/{chunk-4TFSM22V.js → chunk-LS3JLEIB.js} +4 -4
  63. package/dist/{chunk-2AXFIYHT.js → chunk-NCO2JGKK.js} +1 -1
  64. package/dist/chunk-NCO2JGKK.js.map +1 -0
  65. package/dist/{chunk-Z72JH4KG.js → chunk-NGSPBLLE.js} +4 -34
  66. package/dist/chunk-NGSPBLLE.js.map +1 -0
  67. package/dist/{chunk-OMLIZL2P.js → chunk-NSLTPGEN.js} +2 -2
  68. package/dist/{chunk-7H6DOO3E.js → chunk-P6256WTJ.js} +211 -36
  69. package/dist/chunk-P6256WTJ.js.map +1 -0
  70. package/dist/{chunk-KESP7GOK.js → chunk-QAU5HM6Q.js} +3 -3
  71. package/dist/{chunk-34YSDCDP.js → chunk-SAVQ6E2O.js} +2 -2
  72. package/dist/chunk-T6HQMVML.js +9960 -0
  73. package/dist/chunk-T6HQMVML.js.map +1 -0
  74. package/dist/{chunk-PA6R5ZCI.js → chunk-TLFUDXVV.js} +4 -4
  75. package/dist/{chunk-WCA2NROQ.js → chunk-UOF74WQY.js} +2 -2
  76. package/dist/chunk-UVPGJXVO.js +83 -0
  77. package/dist/chunk-UVPGJXVO.js.map +1 -0
  78. package/dist/{chunk-DYECX3IX.js → chunk-WRLHNG6H.js} +2 -2
  79. package/dist/{chunk-ADQ5MQ54.js → chunk-YDLAFP36.js} +71 -1
  80. package/dist/chunk-YDLAFP36.js.map +1 -0
  81. package/dist/{chunk-I6MX32UC.js → chunk-YK72A4IT.js} +4 -4
  82. package/dist/chunk-YL2DR3HY.js +36 -0
  83. package/dist/chunk-YL2DR3HY.js.map +1 -0
  84. package/dist/{chunk-RD5LYKD6.js → chunk-ZC2AAE6J.js} +2 -2
  85. package/dist/chunk-ZUMGGHRB.js +57 -0
  86. package/dist/chunk-ZUMGGHRB.js.map +1 -0
  87. package/dist/consent/index.cjs.map +1 -1
  88. package/dist/consent/index.d.cts +4 -3
  89. package/dist/consent/index.d.ts +4 -3
  90. package/dist/consent/index.js +3 -3
  91. package/dist/{crypto-A7FRXYHC.js → crypto-H2Y3DDFW.js} +3 -3
  92. package/dist/{delegation-YBA4X4JN.js → delegation-QSC7G5QC.js} +5 -5
  93. package/dist/derivations/index.cjs.map +1 -1
  94. package/dist/derivations/index.d.cts +5 -4
  95. package/dist/derivations/index.d.ts +5 -4
  96. package/dist/derivations/index.js +4 -4
  97. package/dist/{dev-unlock-D9s-loPr.d.ts → dev-unlock-Cf2B7Kih.d.ts} +1 -1
  98. package/dist/{dev-unlock-DRwVSy2S.d.cts → dev-unlock-De3mjQWv.d.cts} +1 -1
  99. package/dist/executor-BZKFZVRC.js +8 -0
  100. package/dist/executor-GFZFDQXV.js +8 -0
  101. package/dist/executor-KT2IOZVP.js +11 -0
  102. package/dist/{fanout-sidecar-VJ52RIEY.js → fanout-sidecar-NRBWSLRK.js} +2 -2
  103. package/dist/guards/index.cjs +7 -0
  104. package/dist/guards/index.cjs.map +1 -1
  105. package/dist/guards/index.d.cts +5 -4
  106. package/dist/guards/index.d.ts +5 -4
  107. package/dist/guards/index.js +4 -4
  108. package/dist/{hash-DXXXusyk.d.ts → hash-gVn_uKhp.d.ts} +1 -1
  109. package/dist/{hash-DtRih9MQ.d.cts → hash-vBCB0-Ps.d.cts} +1 -1
  110. package/dist/history/index.cjs +2 -2
  111. package/dist/history/index.cjs.map +1 -1
  112. package/dist/history/index.d.cts +5 -4
  113. package/dist/history/index.d.ts +5 -4
  114. package/dist/history/index.js +6 -6
  115. package/dist/i18n/index.cjs.map +1 -1
  116. package/dist/i18n/index.d.cts +4 -3
  117. package/dist/i18n/index.d.ts +4 -3
  118. package/dist/i18n/index.js +14 -12
  119. package/dist/i18n/index.js.map +1 -1
  120. package/dist/{index-CNwA-B6-.d.ts → index-BF1B2HB9.d.ts} +53 -1
  121. package/dist/{index-CmVgTkqk.d.cts → index-DVkvrgpm.d.cts} +53 -1
  122. package/dist/index.cjs +1780 -64
  123. package/dist/index.cjs.map +1 -1
  124. package/dist/index.d.cts +34 -12
  125. package/dist/index.d.ts +34 -12
  126. package/dist/index.js +160 -8804
  127. package/dist/index.js.map +1 -1
  128. package/dist/indexing/index.cjs.map +1 -1
  129. package/dist/indexing/index.js +2 -2
  130. package/dist/issue-BAJ7ZB4S.js +12 -0
  131. package/dist/{ledger-3TXNP47J.js → ledger-WOEJUYTP.js} +6 -6
  132. package/dist/materialized-views/index.cjs.map +1 -1
  133. package/dist/materialized-views/index.d.cts +6 -5
  134. package/dist/materialized-views/index.d.ts +6 -5
  135. package/dist/materialized-views/index.js +6 -6
  136. package/dist/noydb-XNQSKXGO.js +34 -0
  137. package/dist/overlay-views/index.cjs.map +1 -1
  138. package/dist/overlay-views/index.d.cts +5 -4
  139. package/dist/overlay-views/index.d.ts +5 -4
  140. package/dist/overlay-views/index.js +6 -4
  141. package/dist/periods/index.cjs.map +1 -1
  142. package/dist/periods/index.d.cts +4 -3
  143. package/dist/periods/index.d.ts +4 -3
  144. package/dist/periods/index.js +6 -6
  145. package/dist/{public-envelope-PY6NKFLI.js → public-envelope-OHQ5UZFM.js} +4 -4
  146. package/dist/query/index.cjs.map +1 -1
  147. package/dist/query/index.d.cts +1 -1
  148. package/dist/query/index.d.ts +1 -1
  149. package/dist/query/index.js +3 -3
  150. package/dist/registry-2IEARCGT.js +7 -0
  151. package/dist/{registry-3L3N3PTG.js → registry-CDHASH73.js} +3 -3
  152. package/dist/registry-EMGLZGR6.js +8 -0
  153. package/dist/registry-NQALYR77.js +8 -0
  154. package/dist/registry-NQALYR77.js.map +1 -0
  155. package/dist/revoke-7JOVLZFD.js +17 -0
  156. package/dist/revoke-7JOVLZFD.js.map +1 -0
  157. package/dist/session/index.cjs.map +1 -1
  158. package/dist/session/index.d.cts +5 -4
  159. package/dist/session/index.d.ts +5 -4
  160. package/dist/session/index.js +3 -3
  161. package/dist/shadow/index.cjs.map +1 -1
  162. package/dist/shadow/index.d.cts +4 -3
  163. package/dist/shadow/index.d.ts +4 -3
  164. package/dist/shadow/index.js +2 -2
  165. package/dist/signer-M4K5HBLD.js +18 -0
  166. package/dist/signer-M4K5HBLD.js.map +1 -0
  167. package/dist/{stale-HSC5YO2O.js → stale-PAGCS4K5.js} +2 -2
  168. package/dist/stale-PAGCS4K5.js.map +1 -0
  169. package/dist/store/index.cjs.map +1 -1
  170. package/dist/store/index.d.cts +4 -3
  171. package/dist/store/index.d.ts +4 -3
  172. package/dist/store/index.js +2 -2
  173. package/dist/sync/index.cjs.map +1 -1
  174. package/dist/sync/index.d.cts +3 -2
  175. package/dist/sync/index.d.ts +3 -2
  176. package/dist/sync/index.js +4 -4
  177. package/dist/team/index.cjs.map +1 -1
  178. package/dist/team/index.d.cts +4 -3
  179. package/dist/team/index.d.ts +4 -3
  180. package/dist/team/index.js +13 -11
  181. package/dist/tx/index.cjs +81 -1
  182. package/dist/tx/index.cjs.map +1 -1
  183. package/dist/tx/index.d.cts +5 -4
  184. package/dist/tx/index.d.ts +5 -4
  185. package/dist/tx/index.js +56 -3
  186. package/dist/tx/index.js.map +1 -1
  187. package/dist/{types-C4lwMKKF.d.cts → types-CSLcfytP.d.cts} +644 -5
  188. package/dist/{types-DW9RGSSs.d.ts → types-D9eB0Rvh.d.ts} +644 -5
  189. package/dist/{index-4agOpzqd.d.ts → ulid-CG2YvAbg.d.cts} +51 -33
  190. package/dist/{index-hdFvZkBP.d.cts → ulid-CiM2OAeM.d.ts} +51 -33
  191. package/dist/util/index.cjs.map +1 -1
  192. package/dist/util/index.js +1 -1
  193. package/dist/{with-derivation-g-pGoMzL.d.ts → with-derivation-Bzpj6UTv.d.ts} +1 -1
  194. package/dist/{with-derivation-C8LDlV7t.d.cts → with-derivation-DWajFh4K.d.cts} +1 -1
  195. package/dist/{with-guard-jI1x9Z3k.d.cts → with-guard-DF_Ul3DT.d.cts} +1 -1
  196. package/dist/{with-guard-DWOCK4Ca.d.ts → with-guard-DR7U-l4v.d.ts} +1 -1
  197. package/dist/{with-materialized-view-DcTx4H3j.d.cts → with-materialized-view-_piodoIz.d.cts} +1 -1
  198. package/dist/{with-materialized-view-DaKR-N6J.d.ts → with-materialized-view-qtoJ3xKJ.d.ts} +1 -1
  199. package/dist/{with-overlayed-view-N7jYuNOS.d.ts → with-overlayed-view-DFaRfgMr.d.ts} +1 -1
  200. package/dist/{with-overlayed-view-D-6oWAgM.d.cts → with-overlayed-view-DwzCKxn2.d.cts} +1 -1
  201. package/package.json +15 -3
  202. package/dist/chunk-2AXFIYHT.js.map +0 -1
  203. package/dist/chunk-6HPZY4ON.js.map +0 -1
  204. package/dist/chunk-7H6DOO3E.js.map +0 -1
  205. package/dist/chunk-ADQ5MQ54.js.map +0 -1
  206. package/dist/chunk-CBAHB2BF.js.map +0 -1
  207. package/dist/chunk-NIOHFJPJ.js.map +0 -1
  208. package/dist/chunk-PEULZC6M.js.map +0 -1
  209. package/dist/chunk-VMIO4IXG.js.map +0 -1
  210. package/dist/chunk-YS3POABP.js.map +0 -1
  211. package/dist/chunk-Z72JH4KG.js.map +0 -1
  212. package/dist/executor-7E3VFGW7.js +0 -11
  213. package/dist/executor-CEWX2FQI.js +0 -8
  214. package/dist/executor-X4SQ3ZLC.js +0 -8
  215. package/dist/registry-O47PUPSY.js +0 -8
  216. package/dist/registry-RFGGMVNJ.js +0 -7
  217. package/dist/registry-WLLMODKN.js +0 -8
  218. /package/dist/{chunk-P7EQ2S5O.js.map → chunk-2XLVPKXG.js.map} +0 -0
  219. /package/dist/{chunk-23TTQXVO.js.map → chunk-4UBOTYP5.js.map} +0 -0
  220. /package/dist/{chunk-MKSA2V7A.js.map → chunk-5YHWBPOT.js.map} +0 -0
  221. /package/dist/{chunk-DYBQG5PQ.js.map → chunk-6S3LLAQ5.js.map} +0 -0
  222. /package/dist/{chunk-UA4RI7OT.js.map → chunk-74JEQFMT.js.map} +0 -0
  223. /package/dist/{chunk-UZXLQCHP.js.map → chunk-BFI3RS42.js.map} +0 -0
  224. /package/dist/{chunk-EGQYGYIU.js.map → chunk-EMEX37ZN.js.map} +0 -0
  225. /package/dist/{chunk-ZNOEIM6Y.js.map → chunk-FCDO7UAO.js.map} +0 -0
  226. /package/dist/{chunk-5SCJ5UEF.js.map → chunk-FS7A4XNF.js.map} +0 -0
  227. /package/dist/{chunk-537VFZTR.js.map → chunk-GAUBWHAF.js.map} +0 -0
  228. /package/dist/{chunk-FCXOFQAJ.js.map → chunk-GD3BGKAR.js.map} +0 -0
  229. /package/dist/{chunk-HB3Z2GCR.js.map → chunk-HGZ7DC5H.js.map} +0 -0
  230. /package/dist/{chunk-5DWL3JBF.js.map → chunk-K5PVGKE4.js.map} +0 -0
  231. /package/dist/{chunk-XGSOTWYX.js.map → chunk-KYKMKLJ6.js.map} +0 -0
  232. /package/dist/{chunk-4TFSM22V.js.map → chunk-LS3JLEIB.js.map} +0 -0
  233. /package/dist/{chunk-OMLIZL2P.js.map → chunk-NSLTPGEN.js.map} +0 -0
  234. /package/dist/{chunk-KESP7GOK.js.map → chunk-QAU5HM6Q.js.map} +0 -0
  235. /package/dist/{chunk-34YSDCDP.js.map → chunk-SAVQ6E2O.js.map} +0 -0
  236. /package/dist/{chunk-PA6R5ZCI.js.map → chunk-TLFUDXVV.js.map} +0 -0
  237. /package/dist/{chunk-WCA2NROQ.js.map → chunk-UOF74WQY.js.map} +0 -0
  238. /package/dist/{chunk-DYECX3IX.js.map → chunk-WRLHNG6H.js.map} +0 -0
  239. /package/dist/{chunk-I6MX32UC.js.map → chunk-YK72A4IT.js.map} +0 -0
  240. /package/dist/{chunk-RD5LYKD6.js.map → chunk-ZC2AAE6J.js.map} +0 -0
  241. /package/dist/{crypto-A7FRXYHC.js.map → crypto-H2Y3DDFW.js.map} +0 -0
  242. /package/dist/{delegation-YBA4X4JN.js.map → delegation-QSC7G5QC.js.map} +0 -0
  243. /package/dist/{executor-7E3VFGW7.js.map → executor-BZKFZVRC.js.map} +0 -0
  244. /package/dist/{executor-CEWX2FQI.js.map → executor-GFZFDQXV.js.map} +0 -0
  245. /package/dist/{executor-X4SQ3ZLC.js.map → executor-KT2IOZVP.js.map} +0 -0
  246. /package/dist/{fanout-sidecar-VJ52RIEY.js.map → fanout-sidecar-NRBWSLRK.js.map} +0 -0
  247. /package/dist/{ledger-3TXNP47J.js.map → issue-BAJ7ZB4S.js.map} +0 -0
  248. /package/dist/{public-envelope-PY6NKFLI.js.map → ledger-WOEJUYTP.js.map} +0 -0
  249. /package/dist/{registry-3L3N3PTG.js.map → noydb-XNQSKXGO.js.map} +0 -0
  250. /package/dist/{registry-O47PUPSY.js.map → public-envelope-OHQ5UZFM.js.map} +0 -0
  251. /package/dist/{registry-RFGGMVNJ.js.map → registry-2IEARCGT.js.map} +0 -0
  252. /package/dist/{registry-WLLMODKN.js.map → registry-CDHASH73.js.map} +0 -0
  253. /package/dist/{stale-HSC5YO2O.js.map → registry-EMGLZGR6.js.map} +0 -0
@@ -1,5 +1,4 @@
1
- import { bh as PublicEnvelope, dj as SealingKeyProvider, bu as BundleRecipient, bq as Vault } from './types-DW9RGSSs.js';
2
- import './index-CNwA-B6-.js';
1
+ import { ba as PublicEnvelope, bb as SealingKeyProvider, bc as BundleRecipient, bd as RecipientSealer, be as RecipientHint, bf as Vault } from './types-CSLcfytP.cjs';
3
2
 
4
3
  /**
5
4
  * `.noydb` container format — byte layout, header schema, validators.
@@ -140,6 +139,22 @@ interface NoydbBundleHeader {
140
139
  * pre-#197 shape; back-compatible).
141
140
  */
142
141
  readonly autoUnlock?: 'unsealed' | 'sealed';
142
+ /**
143
+ * Bundle's role in the source → destination lifecycle (#203).
144
+ * - omitted / 'snapshot' (default): backup/copy of an existing vault.
145
+ * - 'extracted-partition': re-keyed projection awaiting adoption.
146
+ */
147
+ readonly bundleKind?: 'snapshot' | 'extracted-partition';
148
+ /**
149
+ * Transfer-seal INDICATOR (#206) — metadata only, no payload (the
150
+ * sealed DEKs live in the body). Present iff
151
+ * bundleKind === 'extracted-partition'.
152
+ */
153
+ readonly transferSeal?: {
154
+ readonly v: 1;
155
+ readonly alg: 'aes-256-gcm-pre-shared';
156
+ readonly sealId: string;
157
+ };
143
158
  }
144
159
  /**
145
160
  * Validate a parsed bundle header. Throws on any deviation from
@@ -328,9 +343,15 @@ interface WriteNoydbBundleOptions {
328
343
  * recipient must hold a provider with a matching `pid` (i.e.,
329
344
  * `provider.id`) to auto-unseal on import.
330
345
  *
331
- * `mode: 'self-target'` is the only supported mode sender and
332
- * recipient share the same provider identity (same iCloud Keychain
333
- * entry, same MDM-provisioned bundle id, same KMS account, etc.).
346
+ * `mode: 'self-target'` sender and recipient share the same
347
+ * provider identity (same iCloud Keychain entry, same
348
+ * MDM-provisioned bundle id, same KMS account, etc.).
349
+ *
350
+ * `mode: 'recipient-target'` — asymmetric sealing via a
351
+ * {@link RecipientSealer}. Each user entry carries a
352
+ * `credential` and a `hint` (the recipient's public material).
353
+ * The bundle can only be unsealed by the holder of the matching
354
+ * private key.
334
355
  *
335
356
  * Mutually exclusive with `autoCredentials`, `autoPassphrases`,
336
357
  * and `sealedPassphrases`.
@@ -339,6 +360,13 @@ interface WriteNoydbBundleOptions {
339
360
  readonly mode: 'self-target';
340
361
  readonly provider: SealingKeyProvider;
341
362
  readonly perUser: Record<string, AutoCredential>;
363
+ } | {
364
+ readonly mode: 'recipient-target';
365
+ readonly provider: RecipientSealer;
366
+ readonly perUser: Record<string, {
367
+ readonly credential: AutoCredential;
368
+ readonly hint: RecipientHint;
369
+ }>;
342
370
  };
343
371
  /**
344
372
  * @deprecated Use `autoCredentials` instead (#215).
@@ -371,11 +399,11 @@ interface WriteNoydbBundleOptions {
371
399
  * recipient must hold a provider with a matching `pid` (i.e.,
372
400
  * `provider.id`) to auto-unseal on import.
373
401
  *
374
- * `mode: 'self-target'` is the only mode in slice 1 — sender and
375
- * recipient share the same provider identity (same iCloud Keychain
402
+ * `mode: 'self-target'` is the only mode for `sealedPassphrases` — sender
403
+ * and recipient share the same provider identity (same iCloud Keychain
376
404
  * entry, same MDM-provisioned bundle id, same KMS account, etc.).
377
- * Recipient-target sealing via the `RecipientSealer` interface
378
- * (foundation §11.4) is deferred to a follow-up slice.
405
+ * For recipient-target sealing via the `RecipientSealer` interface,
406
+ * use `sealedCredentials` with `mode: 'recipient-target'` (§11.4).
379
407
  *
380
408
  * Mutually exclusive with `autoCredentials`, `sealedCredentials`,
381
409
  * and `autoPassphrases`.
@@ -440,31 +468,21 @@ interface ReadNoydbBundleOptions {
440
468
  */
441
469
  readonly attemptUnsealAcrossProviders?: boolean;
442
470
  }
443
- /** Test-only: reset the brotli detection cache between tests. */
444
- declare function resetBrotliSupportCache(): void;
445
471
  /**
446
- * Write a `.noydb` bundle for the given vault.
447
- *
448
- * Pipeline:
449
- * 1. Resolve or create the compartment's stable bundle handle
450
- * via `vault.getBundleHandle()` — same handle on
451
- * every export from the same vault instance, so cloud
452
- * adapters can use it as a primary key.
453
- * 2. `vault.dump()` → JSON string with encrypted records
454
- * inside.
455
- * 3. UTF-8 encode the dump string.
456
- * 4. Compress (brotli if available, gzip fallback by default).
457
- * 5. Compute SHA-256 of the compressed body for integrity.
458
- * 6. Build the minimum-disclosure header from format version,
459
- * handle, body length, body sha.
460
- * 7. Serialize: magic (4) + flags (1) + algo (1) + headerLen (4)
461
- * + header JSON (N) + compressed body (M).
462
- *
463
- * The output is a single `Uint8Array`. Consumers writing to disk
464
- * pass it to `fs.writeFile`; consumers uploading to cloud storage
465
- * pass it as the request body. The `@noy-db/file` adapter wraps
466
- * this with a `saveBundle(path, vault)` helper.
472
+ * Transfer-seal payload (#206). The destination DEKs, exported to raw
473
+ * bytes and AES-256-GCM-sealed *as a set* under the one-time transfer
474
+ * key. `adoptPartition` (#207) unseals this; `createOwnerOnAdoptedPartition`
475
+ * (#208) re-wraps the raw DEKs under the recipient's KEK.
467
476
  */
477
+ interface TransferSealPayload {
478
+ readonly v: 1;
479
+ readonly alg: 'aes-256-gcm-pre-shared';
480
+ readonly sealId: string;
481
+ /** base64(AES-256-GCM(transferKey, JSON of { collection: base64(rawDEK) })) — iv ‖ ct ‖ tag. */
482
+ readonly payload: string;
483
+ }
484
+ /** Test-only: reset the brotli detection cache between tests. */
485
+ declare function resetBrotliSupportCache(): void;
468
486
  declare function writeNoydbBundle(vault: Vault, opts?: WriteNoydbBundleOptions): Promise<Uint8Array>;
469
487
  /**
470
488
  * Read just the bundle header — no body decompression, no
@@ -582,4 +600,4 @@ declare function generateULID(): string;
582
600
  */
583
601
  declare function isULID(value: string): boolean;
584
602
 
585
- export { type AutoCredential as A, type CompressionAlgo as C, FLAG_COMPRESSED as F, NOYDB_BUNDLE_FORMAT_VERSION as N, type ReadNoydbBundleOptions as R, type WriteNoydbBundleOptions as W, type AutoCredentialKind as a, NOYDB_BUNDLE_MAGIC as b, NOYDB_BUNDLE_PREFIX_BYTES as c, type NoydbBundleHeader as d, type NoydbBundleReadResult as e, readNoydbBundleHeader as f, generateULID as g, hasNoydbBundleMagic as h, isULID as i, readNoydbBundlePublicEnvelope as j, resetBrotliSupportCache as k, COMPRESSION_BROTLI as l, COMPRESSION_GZIP as m, COMPRESSION_NONE as n, FLAG_HAS_INTEGRITY_HASH as o, encodeBundleHeader as p, readNoydbBundle as r, validateBundleHeader as v, writeNoydbBundle as w };
603
+ export { type AutoCredential as A, COMPRESSION_BROTLI as C, FLAG_COMPRESSED as F, NOYDB_BUNDLE_FORMAT_VERSION as N, type ReadNoydbBundleOptions as R, type TransferSealPayload as T, type WriteNoydbBundleOptions as W, COMPRESSION_GZIP as a, COMPRESSION_NONE as b, type CompressionAlgo as c, FLAG_HAS_INTEGRITY_HASH as d, NOYDB_BUNDLE_MAGIC as e, NOYDB_BUNDLE_PREFIX_BYTES as f, type NoydbBundleHeader as g, type NoydbBundleReadResult as h, encodeBundleHeader as i, generateULID as j, isULID as k, readNoydbBundleHeader as l, resetBrotliSupportCache as m, type AutoCredentialKind as n, hasNoydbBundleMagic as o, readNoydbBundlePublicEnvelope as p, readNoydbBundle as r, validateBundleHeader as v, writeNoydbBundle as w };
@@ -1,5 +1,4 @@
1
- import { bh as PublicEnvelope, dj as SealingKeyProvider, bu as BundleRecipient, bq as Vault } from './types-C4lwMKKF.cjs';
2
- import './index-CmVgTkqk.cjs';
1
+ import { ba as PublicEnvelope, bb as SealingKeyProvider, bc as BundleRecipient, bd as RecipientSealer, be as RecipientHint, bf as Vault } from './types-D9eB0Rvh.js';
3
2
 
4
3
  /**
5
4
  * `.noydb` container format — byte layout, header schema, validators.
@@ -140,6 +139,22 @@ interface NoydbBundleHeader {
140
139
  * pre-#197 shape; back-compatible).
141
140
  */
142
141
  readonly autoUnlock?: 'unsealed' | 'sealed';
142
+ /**
143
+ * Bundle's role in the source → destination lifecycle (#203).
144
+ * - omitted / 'snapshot' (default): backup/copy of an existing vault.
145
+ * - 'extracted-partition': re-keyed projection awaiting adoption.
146
+ */
147
+ readonly bundleKind?: 'snapshot' | 'extracted-partition';
148
+ /**
149
+ * Transfer-seal INDICATOR (#206) — metadata only, no payload (the
150
+ * sealed DEKs live in the body). Present iff
151
+ * bundleKind === 'extracted-partition'.
152
+ */
153
+ readonly transferSeal?: {
154
+ readonly v: 1;
155
+ readonly alg: 'aes-256-gcm-pre-shared';
156
+ readonly sealId: string;
157
+ };
143
158
  }
144
159
  /**
145
160
  * Validate a parsed bundle header. Throws on any deviation from
@@ -328,9 +343,15 @@ interface WriteNoydbBundleOptions {
328
343
  * recipient must hold a provider with a matching `pid` (i.e.,
329
344
  * `provider.id`) to auto-unseal on import.
330
345
  *
331
- * `mode: 'self-target'` is the only supported mode sender and
332
- * recipient share the same provider identity (same iCloud Keychain
333
- * entry, same MDM-provisioned bundle id, same KMS account, etc.).
346
+ * `mode: 'self-target'` sender and recipient share the same
347
+ * provider identity (same iCloud Keychain entry, same
348
+ * MDM-provisioned bundle id, same KMS account, etc.).
349
+ *
350
+ * `mode: 'recipient-target'` — asymmetric sealing via a
351
+ * {@link RecipientSealer}. Each user entry carries a
352
+ * `credential` and a `hint` (the recipient's public material).
353
+ * The bundle can only be unsealed by the holder of the matching
354
+ * private key.
334
355
  *
335
356
  * Mutually exclusive with `autoCredentials`, `autoPassphrases`,
336
357
  * and `sealedPassphrases`.
@@ -339,6 +360,13 @@ interface WriteNoydbBundleOptions {
339
360
  readonly mode: 'self-target';
340
361
  readonly provider: SealingKeyProvider;
341
362
  readonly perUser: Record<string, AutoCredential>;
363
+ } | {
364
+ readonly mode: 'recipient-target';
365
+ readonly provider: RecipientSealer;
366
+ readonly perUser: Record<string, {
367
+ readonly credential: AutoCredential;
368
+ readonly hint: RecipientHint;
369
+ }>;
342
370
  };
343
371
  /**
344
372
  * @deprecated Use `autoCredentials` instead (#215).
@@ -371,11 +399,11 @@ interface WriteNoydbBundleOptions {
371
399
  * recipient must hold a provider with a matching `pid` (i.e.,
372
400
  * `provider.id`) to auto-unseal on import.
373
401
  *
374
- * `mode: 'self-target'` is the only mode in slice 1 — sender and
375
- * recipient share the same provider identity (same iCloud Keychain
402
+ * `mode: 'self-target'` is the only mode for `sealedPassphrases` — sender
403
+ * and recipient share the same provider identity (same iCloud Keychain
376
404
  * entry, same MDM-provisioned bundle id, same KMS account, etc.).
377
- * Recipient-target sealing via the `RecipientSealer` interface
378
- * (foundation §11.4) is deferred to a follow-up slice.
405
+ * For recipient-target sealing via the `RecipientSealer` interface,
406
+ * use `sealedCredentials` with `mode: 'recipient-target'` (§11.4).
379
407
  *
380
408
  * Mutually exclusive with `autoCredentials`, `sealedCredentials`,
381
409
  * and `autoPassphrases`.
@@ -440,31 +468,21 @@ interface ReadNoydbBundleOptions {
440
468
  */
441
469
  readonly attemptUnsealAcrossProviders?: boolean;
442
470
  }
443
- /** Test-only: reset the brotli detection cache between tests. */
444
- declare function resetBrotliSupportCache(): void;
445
471
  /**
446
- * Write a `.noydb` bundle for the given vault.
447
- *
448
- * Pipeline:
449
- * 1. Resolve or create the compartment's stable bundle handle
450
- * via `vault.getBundleHandle()` — same handle on
451
- * every export from the same vault instance, so cloud
452
- * adapters can use it as a primary key.
453
- * 2. `vault.dump()` → JSON string with encrypted records
454
- * inside.
455
- * 3. UTF-8 encode the dump string.
456
- * 4. Compress (brotli if available, gzip fallback by default).
457
- * 5. Compute SHA-256 of the compressed body for integrity.
458
- * 6. Build the minimum-disclosure header from format version,
459
- * handle, body length, body sha.
460
- * 7. Serialize: magic (4) + flags (1) + algo (1) + headerLen (4)
461
- * + header JSON (N) + compressed body (M).
462
- *
463
- * The output is a single `Uint8Array`. Consumers writing to disk
464
- * pass it to `fs.writeFile`; consumers uploading to cloud storage
465
- * pass it as the request body. The `@noy-db/file` adapter wraps
466
- * this with a `saveBundle(path, vault)` helper.
472
+ * Transfer-seal payload (#206). The destination DEKs, exported to raw
473
+ * bytes and AES-256-GCM-sealed *as a set* under the one-time transfer
474
+ * key. `adoptPartition` (#207) unseals this; `createOwnerOnAdoptedPartition`
475
+ * (#208) re-wraps the raw DEKs under the recipient's KEK.
467
476
  */
477
+ interface TransferSealPayload {
478
+ readonly v: 1;
479
+ readonly alg: 'aes-256-gcm-pre-shared';
480
+ readonly sealId: string;
481
+ /** base64(AES-256-GCM(transferKey, JSON of { collection: base64(rawDEK) })) — iv ‖ ct ‖ tag. */
482
+ readonly payload: string;
483
+ }
484
+ /** Test-only: reset the brotli detection cache between tests. */
485
+ declare function resetBrotliSupportCache(): void;
468
486
  declare function writeNoydbBundle(vault: Vault, opts?: WriteNoydbBundleOptions): Promise<Uint8Array>;
469
487
  /**
470
488
  * Read just the bundle header — no body decompression, no
@@ -582,4 +600,4 @@ declare function generateULID(): string;
582
600
  */
583
601
  declare function isULID(value: string): boolean;
584
602
 
585
- export { type AutoCredential as A, type CompressionAlgo as C, FLAG_COMPRESSED as F, NOYDB_BUNDLE_FORMAT_VERSION as N, type ReadNoydbBundleOptions as R, type WriteNoydbBundleOptions as W, type AutoCredentialKind as a, NOYDB_BUNDLE_MAGIC as b, NOYDB_BUNDLE_PREFIX_BYTES as c, type NoydbBundleHeader as d, type NoydbBundleReadResult as e, readNoydbBundleHeader as f, generateULID as g, hasNoydbBundleMagic as h, isULID as i, readNoydbBundlePublicEnvelope as j, resetBrotliSupportCache as k, COMPRESSION_BROTLI as l, COMPRESSION_GZIP as m, COMPRESSION_NONE as n, FLAG_HAS_INTEGRITY_HASH as o, encodeBundleHeader as p, readNoydbBundle as r, validateBundleHeader as v, writeNoydbBundle as w };
603
+ export { type AutoCredential as A, COMPRESSION_BROTLI as C, FLAG_COMPRESSED as F, NOYDB_BUNDLE_FORMAT_VERSION as N, type ReadNoydbBundleOptions as R, type TransferSealPayload as T, type WriteNoydbBundleOptions as W, COMPRESSION_GZIP as a, COMPRESSION_NONE as b, type CompressionAlgo as c, FLAG_HAS_INTEGRITY_HASH as d, NOYDB_BUNDLE_MAGIC as e, NOYDB_BUNDLE_PREFIX_BYTES as f, type NoydbBundleHeader as g, type NoydbBundleReadResult as h, encodeBundleHeader as i, generateULID as j, isULID as k, readNoydbBundleHeader as l, resetBrotliSupportCache as m, type AutoCredentialKind as n, hasNoydbBundleMagic as o, readNoydbBundlePublicEnvelope as p, readNoydbBundle as r, validateBundleHeader as v, writeNoydbBundle as w };