@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
@@ -1,19 +1,20 @@
1
1
  import {
2
2
  pickLocale
3
- } from "./chunk-Q36YXK77.js";
3
+ } from "./chunk-CYQOUTMY.js";
4
4
  import {
5
5
  sha256Hex
6
- } from "./chunk-AKKRXT23.js";
6
+ } from "./chunk-VCETL77O.js";
7
7
  import {
8
8
  BundleIntegrityError,
9
9
  BundleSealMismatchError,
10
10
  ValidationError
11
- } from "./chunk-QZWTRENR.js";
11
+ } from "./chunk-HNGSV2YC.js";
12
12
 
13
13
  // src/with-pod/format.ts
14
14
  var NOYDB_BUNDLE_MAGIC = new Uint8Array([78, 68, 66, 49]);
15
15
  var NOYDB_BUNDLE_PREFIX_BYTES = 10;
16
16
  var NOYDB_BUNDLE_FORMAT_VERSION = 1;
17
+ var NOYDB_BUNDLE_FORMAT_VERSION_SIGNED = 2;
17
18
  var FLAG_COMPRESSED = 1;
18
19
  var FLAG_HAS_INTEGRITY_HASH = 2;
19
20
  var COMPRESSION_NONE = 0;
@@ -27,7 +28,40 @@ var ALLOWED_HEADER_KEYS = /* @__PURE__ */ new Set([
27
28
  "publicEnvelope",
28
29
  "autoUnlock",
29
30
  "bundleKind",
30
- "transferSeal"
31
+ "transferSeal",
32
+ "sig",
33
+ "keyId",
34
+ "sigAlg",
35
+ "engineRange",
36
+ "unlockMethods",
37
+ "hasApp",
38
+ "species",
39
+ "pointerMode",
40
+ "redirect"
41
+ ]);
42
+ var UNLOCK_METHODS = /* @__PURE__ */ new Set([
43
+ "password",
44
+ "webauthn",
45
+ "oidc",
46
+ "totp",
47
+ "email-otp",
48
+ "magic-link",
49
+ "pin",
50
+ "recovery",
51
+ "shamir"
52
+ ]);
53
+ var POD_SPECIES = /* @__PURE__ */ new Set([
54
+ "full",
55
+ "connection",
56
+ "snapshot",
57
+ "redirect",
58
+ "group"
59
+ ]);
60
+ var REDIRECT_REASONS = /* @__PURE__ */ new Set([
61
+ "moved",
62
+ "release",
63
+ "tombstone",
64
+ "repoint"
31
65
  ]);
32
66
  function validateBundleHeader(parsed) {
33
67
  if (parsed === null || typeof parsed !== "object") {
@@ -43,9 +77,9 @@ function validateBundleHeader(parsed) {
43
77
  }
44
78
  }
45
79
  const h = parsed;
46
- if (typeof h["formatVersion"] !== "number" || h["formatVersion"] !== NOYDB_BUNDLE_FORMAT_VERSION) {
80
+ if (typeof h["formatVersion"] !== "number" || h["formatVersion"] !== NOYDB_BUNDLE_FORMAT_VERSION && h["formatVersion"] !== NOYDB_BUNDLE_FORMAT_VERSION_SIGNED) {
47
81
  throw new Error(
48
- `.noydb bundle header.formatVersion must be ${NOYDB_BUNDLE_FORMAT_VERSION}, got ${String(h["formatVersion"])}. The reader does not support forward-compat versions; upgrade the reader to handle newer bundles.`
82
+ `.noydb bundle header.formatVersion must be ${NOYDB_BUNDLE_FORMAT_VERSION} or ${NOYDB_BUNDLE_FORMAT_VERSION_SIGNED}, got ${String(h["formatVersion"])}. The reader does not support forward-compat versions; upgrade the reader to handle newer bundles.`
49
83
  );
50
84
  }
51
85
  if (typeof h["handle"] !== "string" || !/^[0-9A-HJKMNP-TV-Z]{26}$/.test(h["handle"])) {
@@ -114,6 +148,99 @@ function validateBundleHeader(parsed) {
114
148
  throw new Error(`.noydb bundle header.transferSeal.sealId must be a non-empty string, got ${String(t["sealId"])}.`);
115
149
  }
116
150
  }
151
+ if (h["keyId"] !== void 0) {
152
+ if (typeof h["keyId"] !== "string" || !/^[0-9a-f]{16}$/.test(h["keyId"])) {
153
+ throw new Error(
154
+ `.noydb bundle header.keyId must be a 16-character lowercase hex fingerprint, got ${typeof h["keyId"] === "string" ? `"${h["keyId"]}"` : typeof h["keyId"]}.`
155
+ );
156
+ }
157
+ }
158
+ if (h["sig"] !== void 0) {
159
+ if (typeof h["sig"] !== "string" || h["sig"].length === 0 || !/^[A-Za-z0-9_-]+$/.test(h["sig"])) {
160
+ throw new Error(
161
+ `.noydb bundle header.sig must be a non-empty base64url string, got ${typeof h["sig"] === "string" ? `"${h["sig"]}"` : typeof h["sig"]}.`
162
+ );
163
+ }
164
+ }
165
+ if (h["sigAlg"] !== void 0) {
166
+ if (h["sigAlg"] !== "ed25519") {
167
+ const got = typeof h["sigAlg"] === "string" ? `"${h["sigAlg"]}"` : typeof h["sigAlg"];
168
+ throw new Error(`.noydb bundle header.sigAlg must be 'ed25519' when present, got ${got}.`);
169
+ }
170
+ }
171
+ if (h["engineRange"] !== void 0) {
172
+ if (typeof h["engineRange"] !== "string" || h["engineRange"].length === 0) {
173
+ throw new Error(
174
+ `.noydb bundle header.engineRange must be a string when present, got ${typeof h["engineRange"]}.`
175
+ );
176
+ }
177
+ }
178
+ if (h["unlockMethods"] !== void 0) {
179
+ const methods = h["unlockMethods"];
180
+ if (!Array.isArray(methods)) {
181
+ throw new Error(
182
+ `.noydb bundle header.unlockMethods must be an array when present, got ${typeof methods}.`
183
+ );
184
+ }
185
+ for (let i = 0; i < methods.length; i++) {
186
+ if (!UNLOCK_METHODS.has(methods[i])) {
187
+ throw new Error(
188
+ `.noydb bundle header.unlockMethods[${i}] must be one of: ${[...UNLOCK_METHODS].join(", ")}, got ${String(methods[i])}.`
189
+ );
190
+ }
191
+ }
192
+ }
193
+ if (h["hasApp"] !== void 0) {
194
+ if (typeof h["hasApp"] !== "boolean") {
195
+ throw new Error(
196
+ `.noydb bundle header.hasApp must be a boolean when present, got ${typeof h["hasApp"]}.`
197
+ );
198
+ }
199
+ }
200
+ if (h["species"] !== void 0) {
201
+ if (!POD_SPECIES.has(h["species"])) {
202
+ const got = typeof h["species"] === "string" ? `"${h["species"]}"` : typeof h["species"];
203
+ throw new Error(
204
+ `.noydb bundle header.species must be one of: ${[...POD_SPECIES].join(", ")}, got ${got}.`
205
+ );
206
+ }
207
+ }
208
+ if (h["pointerMode"] !== void 0) {
209
+ if (h["pointerMode"] !== "public" && h["pointerMode"] !== "private") {
210
+ const got = typeof h["pointerMode"] === "string" ? `"${h["pointerMode"]}"` : typeof h["pointerMode"];
211
+ throw new Error(`.noydb bundle header.pointerMode must be 'public' or 'private' when present, got ${got}.`);
212
+ }
213
+ }
214
+ if (h["redirect"] !== void 0) {
215
+ const r = h["redirect"];
216
+ if (r === null || typeof r !== "object" || Array.isArray(r)) {
217
+ throw new Error(`.noydb bundle header.redirect must be a JSON object when present, got ${typeof r}.`);
218
+ }
219
+ const rec = r;
220
+ if (rec["v"] !== 1) {
221
+ throw new Error(`.noydb bundle header.redirect.v must be 1, got ${String(rec["v"])}.`);
222
+ }
223
+ if (typeof rec["target"] !== "string" || rec["target"].length === 0) {
224
+ throw new Error(
225
+ `.noydb bundle header.redirect.target must be a non-empty string, got ${String(rec["target"])}.`
226
+ );
227
+ }
228
+ if (!REDIRECT_REASONS.has(rec["reason"])) {
229
+ throw new Error(
230
+ `.noydb bundle header.redirect.reason must be one of: ${[...REDIRECT_REASONS].join(", ")}, got ${String(rec["reason"])}.`
231
+ );
232
+ }
233
+ if (typeof rec["issuedBy"] !== "string" || !/^[0-9a-f]{16}$/.test(rec["issuedBy"])) {
234
+ throw new Error(
235
+ `.noydb bundle header.redirect.issuedBy must be a 16-character lowercase hex fingerprint, got ${typeof rec["issuedBy"] === "string" ? `"${rec["issuedBy"]}"` : typeof rec["issuedBy"]}.`
236
+ );
237
+ }
238
+ if (typeof rec["sig"] !== "string" || rec["sig"].length === 0 || !/^[A-Za-z0-9_-]+$/.test(rec["sig"])) {
239
+ throw new Error(
240
+ `.noydb bundle header.redirect.sig must be a non-empty base64url string, got ${typeof rec["sig"] === "string" ? `"${rec["sig"]}"` : typeof rec["sig"]}.`
241
+ );
242
+ }
243
+ }
117
244
  const isExtracted = h["bundleKind"] === "extracted-partition";
118
245
  const hasSeal = h["transferSeal"] !== void 0;
119
246
  if (hasSeal && !isExtracted) {
@@ -131,6 +258,17 @@ function validateBundleHeader(parsed) {
131
258
  `.noydb bundle header cannot carry both autoUnlock and bundleKind === 'extracted-partition' \u2014 an extracted partition is unlocked via its transfer seal, not an auto-credential.`
132
259
  );
133
260
  }
261
+ const sigFieldsPresent = [h["sig"], h["keyId"], h["sigAlg"]].filter((v) => v !== void 0).length;
262
+ if (sigFieldsPresent > 0 && sigFieldsPresent < 3) {
263
+ throw new Error(
264
+ `.noydb bundle header.sig, .keyId, and .sigAlg must be present together or not at all (got ${sigFieldsPresent} of 3).`
265
+ );
266
+ }
267
+ if (sigFieldsPresent === 3 && h["formatVersion"] !== NOYDB_BUNDLE_FORMAT_VERSION_SIGNED) {
268
+ throw new Error(
269
+ `.noydb bundle header with sig/keyId/sigAlg must have formatVersion === ${NOYDB_BUNDLE_FORMAT_VERSION_SIGNED}, got ${String(h["formatVersion"])}.`
270
+ );
271
+ }
134
272
  }
135
273
  function encodeBundleHeader(header) {
136
274
  validateBundleHeader(header);
@@ -142,7 +280,20 @@ function encodeBundleHeader(header) {
142
280
  ...header.publicEnvelope !== void 0 ? { publicEnvelope: header.publicEnvelope } : {},
143
281
  ...header.autoUnlock !== void 0 ? { autoUnlock: header.autoUnlock } : {},
144
282
  ...header.bundleKind !== void 0 ? { bundleKind: header.bundleKind } : {},
145
- ...header.transferSeal !== void 0 ? { transferSeal: header.transferSeal } : {}
283
+ ...header.transferSeal !== void 0 ? { transferSeal: header.transferSeal } : {},
284
+ // Encode order here is the WIRE-byte contract only — it does NOT
285
+ // affect the signature. The signer (Task 4/5) signs the header
286
+ // object via canonicalJson, which re-sorts keys independent of
287
+ // this insertion order.
288
+ ...header.sig !== void 0 ? { sig: header.sig } : {},
289
+ ...header.keyId !== void 0 ? { keyId: header.keyId } : {},
290
+ ...header.sigAlg !== void 0 ? { sigAlg: header.sigAlg } : {},
291
+ ...header.engineRange !== void 0 ? { engineRange: header.engineRange } : {},
292
+ ...header.unlockMethods !== void 0 ? { unlockMethods: header.unlockMethods } : {},
293
+ ...header.hasApp !== void 0 ? { hasApp: header.hasApp } : {},
294
+ ...header.species !== void 0 ? { species: header.species } : {},
295
+ ...header.pointerMode !== void 0 ? { pointerMode: header.pointerMode } : {},
296
+ ...header.redirect !== void 0 ? { redirect: header.redirect } : {}
146
297
  });
147
298
  return new TextEncoder().encode(json);
148
299
  }
@@ -176,6 +327,19 @@ function hasNoydbBundleMagic(bytes) {
176
327
  return true;
177
328
  }
178
329
 
330
+ // src/with-pod/signature.ts
331
+ import { canonicalJson, ed25519Sign, ed25519Verify, utf8 } from "@noy-db/attestation";
332
+ var POD_SIG_ALG = "ed25519";
333
+ function signedBytes(payload) {
334
+ return utf8(canonicalJson(payload));
335
+ }
336
+ async function signRecord(privateKeyPkcs8B64, payload) {
337
+ return ed25519Sign(privateKeyPkcs8B64, signedBytes(payload));
338
+ }
339
+ async function verifyRecord(publicKeyB64, sig, payload) {
340
+ return ed25519Verify(publicKeyB64, sig, signedBytes(payload));
341
+ }
342
+
179
343
  // src/with-pod/bundle.ts
180
344
  function toAutoCredentials(m) {
181
345
  return Object.fromEntries(
@@ -613,7 +777,7 @@ async function applySatelliteLivenessFilter(vault, dumpJson) {
613
777
  if (!backup.collections || typeof backup.collections !== "object") return dumpJson;
614
778
  if (typeof vault._introspectState !== "function") return dumpJson;
615
779
  const { adapter, name, getDEK } = vault._introspectState();
616
- const { liveBaseIdSetsForBundle } = await import("./dead-filter-V3LVWYEJ.js");
780
+ const { liveBaseIdSetsForBundle } = await import("./dead-filter-U575NGSH.js");
617
781
  const satLive = await liveBaseIdSetsForBundle(adapter, name, Object.keys(backup.collections), getDEK);
618
782
  if (satLive.size === 0) return dumpJson;
619
783
  const next = {};
@@ -678,9 +842,20 @@ async function assembleBundleContainer(opts) {
678
842
  ...opts.headerExtras?.publicEnvelope !== void 0 ? { publicEnvelope: opts.headerExtras.publicEnvelope } : {},
679
843
  ...opts.headerExtras?.autoUnlock !== void 0 ? { autoUnlock: opts.headerExtras.autoUnlock } : {},
680
844
  ...opts.headerExtras?.bundleKind !== void 0 ? { bundleKind: opts.headerExtras.bundleKind } : {},
681
- ...opts.headerExtras?.transferSeal !== void 0 ? { transferSeal: opts.headerExtras.transferSeal } : {}
845
+ ...opts.headerExtras?.transferSeal !== void 0 ? { transferSeal: opts.headerExtras.transferSeal } : {},
846
+ ...opts.headerExtras?.engineRange !== void 0 ? { engineRange: opts.headerExtras.engineRange } : {},
847
+ ...opts.headerExtras?.unlockMethods !== void 0 ? { unlockMethods: opts.headerExtras.unlockMethods } : {},
848
+ ...opts.headerExtras?.hasApp !== void 0 ? { hasApp: opts.headerExtras.hasApp } : {},
849
+ ...opts.headerExtras?.species !== void 0 ? { species: opts.headerExtras.species } : {},
850
+ ...opts.headerExtras?.pointerMode !== void 0 ? { pointerMode: opts.headerExtras.pointerMode } : {},
851
+ ...opts.headerExtras?.redirect !== void 0 ? { redirect: opts.headerExtras.redirect } : {}
682
852
  };
683
- const headerBytes = encodeBundleHeader(header);
853
+ const signed = opts.signer === void 0 ? header : await (async (s) => {
854
+ const toSign = { ...header, formatVersion: NOYDB_BUNDLE_FORMAT_VERSION_SIGNED, keyId: s.keyId, sigAlg: "ed25519" };
855
+ const sig = await signRecord(s.privateKeyPkcs8B64, toSign);
856
+ return { ...toSign, sig };
857
+ })(opts.signer);
858
+ const headerBytes = encodeBundleHeader(signed);
684
859
  const prefix = new Uint8Array(NOYDB_BUNDLE_PREFIX_BYTES);
685
860
  prefix.set(NOYDB_BUNDLE_MAGIC, 0);
686
861
  prefix[4] = (streamFormat === null ? 0 : FLAG_COMPRESSED) | FLAG_HAS_INTEGRITY_HASH;
@@ -704,6 +879,7 @@ async function writePod(vault, opts = {}) {
704
879
  const filtered = applySliceFilters(plainFiltered, opts);
705
880
  const bodyJsonStr = normalizedAutoUnlock === null ? filtered : JSON.stringify(await buildAutoUnlockWrapper(filtered, normalizedAutoUnlock));
706
881
  const cover = await vault.getCover();
882
+ const signer = opts.sign === false ? void 0 : opts.sign !== void 0 ? opts.sign : await vault._loadPodSigner() ?? void 0;
707
883
  return assembleBundleContainer({
708
884
  handle,
709
885
  bodyJsonStr,
@@ -711,8 +887,16 @@ async function writePod(vault, opts = {}) {
711
887
  headerExtras: {
712
888
  // `publicEnvelope` is the frozen wire key for the cover (#799).
713
889
  ...cover !== void 0 ? { publicEnvelope: cover } : {},
714
- ...autoUnlockMode !== null ? { autoUnlock: autoUnlockMode } : {}
715
- }
890
+ ...autoUnlockMode !== null ? { autoUnlock: autoUnlockMode } : {},
891
+ // Header L2 fields (#942) — passed through verbatim from opts.
892
+ ...opts.engineRange !== void 0 ? { engineRange: opts.engineRange } : {},
893
+ ...opts.unlockMethods !== void 0 ? { unlockMethods: opts.unlockMethods } : {},
894
+ ...opts.hasApp !== void 0 ? { hasApp: opts.hasApp } : {},
895
+ ...opts.species !== void 0 ? { species: opts.species } : {},
896
+ ...opts.pointerMode !== void 0 ? { pointerMode: opts.pointerMode } : {},
897
+ ...opts.redirect !== void 0 ? { redirect: opts.redirect } : {}
898
+ },
899
+ ...signer !== void 0 ? { signer } : {}
716
900
  });
717
901
  }
718
902
  var writeNoydbBundle = writePod;
@@ -749,6 +933,20 @@ function readPodHeader(bytes) {
749
933
  return parsePrefixAndHeader(bytes).header;
750
934
  }
751
935
  var readNoydbBundleHeader = readPodHeader;
936
+ async function verifyPodHeader(bytes, trustedKeys) {
937
+ const { header } = parsePrefixAndHeader(bytes);
938
+ if (header.sig === void 0 || header.keyId === void 0 || header.sigAlg === void 0) {
939
+ return { status: "unsigned" };
940
+ }
941
+ const publicKeyB64 = trustedKeys[header.keyId];
942
+ if (publicKeyB64 === void 0) {
943
+ return { status: "untrusted", keyId: header.keyId };
944
+ }
945
+ const payload = { ...header };
946
+ delete payload["sig"];
947
+ const ok = await verifyRecord(publicKeyB64, header.sig, payload);
948
+ return { status: ok ? "verified" : "tampered", keyId: header.keyId };
949
+ }
752
950
  function readPodCover(bytes, opts = {}) {
753
951
  const header = parsePrefixAndHeader(bytes).header;
754
952
  const env = header.publicEnvelope;
@@ -760,6 +958,9 @@ function readPodCover(bytes, opts = {}) {
760
958
  ...env.description !== void 0 ? { description: pickLocale(env.description, opts.locale, env.defaultLocale) } : {}
761
959
  };
762
960
  }
961
+ function readPodRedirect(bytes) {
962
+ return parsePrefixAndHeader(bytes).header.redirect;
963
+ }
763
964
  async function readPod(bytes, opts = {}) {
764
965
  const { header, bodyOffset, algo } = parsePrefixAndHeader(bytes);
765
966
  const body = bytes.slice(bodyOffset);
@@ -809,6 +1010,10 @@ export {
809
1010
  validateBundleHeader,
810
1011
  encodeBundleHeader,
811
1012
  hasNoydbBundleMagic,
1013
+ POD_SIG_ALG,
1014
+ signedBytes,
1015
+ signRecord,
1016
+ verifyRecord,
812
1017
  buildExtractedPartitionWrapper,
813
1018
  parseExtractedPartitionBody,
814
1019
  resetBrotliSupportCache,
@@ -817,8 +1022,10 @@ export {
817
1022
  writeNoydbBundle,
818
1023
  readPodHeader,
819
1024
  readNoydbBundleHeader,
1025
+ verifyPodHeader,
820
1026
  readPodCover,
1027
+ readPodRedirect,
821
1028
  readPod,
822
1029
  readNoydbBundle
823
1030
  };
824
- //# sourceMappingURL=chunk-JEI6JJNI.js.map
1031
+ //# sourceMappingURL=chunk-EK7DT5BT.js.map