@noy-db/hub 0.4.0 → 0.5.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 (325) hide show
  1. package/dist/api-M7REIE7H.js +20 -0
  2. package/dist/attestation/index.js +16 -16
  3. package/dist/{backup-X7F3TCFV.js → backup-ENTZYW37.js} +9 -9
  4. package/dist/blobs/index.js +11 -11
  5. package/dist/broker/index.js +10 -10
  6. package/dist/cargo/index.js +26 -26
  7. package/dist/{chunk-6ZNSB3H6.js → chunk-3LYMOSY7.js} +2 -2
  8. package/dist/{chunk-LXRTP3AQ.js → chunk-4DGBZEV6.js} +2 -2
  9. package/dist/{chunk-LRRX57UA.js → chunk-4MSNAB64.js} +4 -4
  10. package/dist/{chunk-MXUT7FTE.js → chunk-4SG5TOXK.js} +2 -2
  11. package/dist/{chunk-W66AM5IB.js → chunk-4TXO442D.js} +2 -2
  12. package/dist/{chunk-UADPR6F4.js → chunk-5EKL6BXI.js} +3 -3
  13. package/dist/{chunk-ZBYFMI6D.js → chunk-5UKUOMO6.js} +247 -136
  14. package/dist/chunk-5UKUOMO6.js.map +1 -0
  15. package/dist/{chunk-SU6SGWXM.js → chunk-623QEHDB.js} +6 -6
  16. package/dist/{chunk-IVYQAVWO.js → chunk-653KOQ7A.js} +7 -7
  17. package/dist/{chunk-2BET5QTS.js → chunk-6PFST3FC.js} +4 -4
  18. package/dist/{chunk-PWPYO73B.js → chunk-6RDTG6E5.js} +5 -5
  19. package/dist/{chunk-DAFBJS4Y.js → chunk-7P4LL3JH.js} +3 -3
  20. package/dist/{chunk-S7GIXBXV.js → chunk-AJAOXFCF.js} +8 -8
  21. package/dist/chunk-AJAOXFCF.js.map +1 -0
  22. package/dist/{chunk-L3YYLT4E.js → chunk-ALUVACKT.js} +2 -2
  23. package/dist/{chunk-QZWTRENR.js → chunk-AR5D76T2.js} +5 -1
  24. package/dist/chunk-AR5D76T2.js.map +1 -0
  25. package/dist/{chunk-5DRROK5W.js → chunk-BFG7LD6Z.js} +2 -2
  26. package/dist/{chunk-6UBZ6I5Z.js → chunk-DDB626I7.js} +2 -2
  27. package/dist/{chunk-W3G5REIU.js → chunk-EAN4TAPC.js} +2 -2
  28. package/dist/{chunk-4JQK3L4V.js → chunk-EBETHILL.js} +2 -2
  29. package/dist/{chunk-467SWYT5.js → chunk-ECGDJU5R.js} +3 -3
  30. package/dist/{chunk-WYUAEZSC.js → chunk-ELJOLQIG.js} +14 -13
  31. package/dist/chunk-ELJOLQIG.js.map +1 -0
  32. package/dist/{chunk-ZFG5EBI3.js → chunk-F2WWHKO7.js} +5 -5
  33. package/dist/{chunk-NJ4DYYO5.js → chunk-F5UWVF6Z.js} +2 -2
  34. package/dist/{chunk-Q36YXK77.js → chunk-FHK6WWUE.js} +2 -2
  35. package/dist/{chunk-SHEEBRZ4.js → chunk-FT5Y4VSP.js} +2 -2
  36. package/dist/{chunk-JQ2AX4T5.js → chunk-FUECZSRM.js} +2 -2
  37. package/dist/{chunk-Q5YJCVJY.js → chunk-FZAP4JNC.js} +4 -4
  38. package/dist/{chunk-SFBYQMZM.js → chunk-G3ORJ3IQ.js} +4 -4
  39. package/dist/{chunk-HLKXPJ4V.js → chunk-G7ZIMGPQ.js} +5 -5
  40. package/dist/{chunk-QJNCB5SK.js → chunk-GIGLOQL7.js} +2 -2
  41. package/dist/{chunk-ERGECZEI.js → chunk-GTQF32TP.js} +5 -5
  42. package/dist/{chunk-JYJFGD2H.js → chunk-GYJRDALN.js} +2 -2
  43. package/dist/{chunk-HZZP2ZIG.js → chunk-HGDXJVK2.js} +4 -4
  44. package/dist/{chunk-ZNWSG7XC.js → chunk-IHYSIPEK.js} +6 -6
  45. package/dist/{chunk-5GQEU4DN.js → chunk-IJV56FWY.js} +2 -2
  46. package/dist/{chunk-5UQ7Y6SQ.js → chunk-IM2KST7E.js} +3 -3
  47. package/dist/{chunk-7H3WWH6J.js → chunk-IQ423YMK.js} +3 -3
  48. package/dist/{chunk-P4JO3H6R.js → chunk-J7YVY7TW.js} +2 -2
  49. package/dist/{chunk-YGK2HMLR.js → chunk-JLBCK7XM.js} +8 -8
  50. package/dist/chunk-JLBCK7XM.js.map +1 -0
  51. package/dist/{chunk-2J6UEN2V.js → chunk-K5OFKXUG.js} +2 -2
  52. package/dist/{chunk-JEI6JJNI.js → chunk-KDWBVCIX.js} +5 -5
  53. package/dist/{chunk-T2MOJF76.js → chunk-KJNMTE2W.js} +6 -6
  54. package/dist/{chunk-NFZGZ4AK.js → chunk-L67H6FAQ.js} +2 -2
  55. package/dist/{chunk-RBTVFPHF.js → chunk-LQVRK2XJ.js} +4 -4
  56. package/dist/{chunk-MHMLXJ3I.js → chunk-LXRVTJ5D.js} +2 -2
  57. package/dist/{chunk-LLYIMSQQ.js → chunk-MDRCEA56.js} +10 -10
  58. package/dist/{chunk-KRCBZYTZ.js → chunk-MFW466PX.js} +4 -4
  59. package/dist/{chunk-RO5NM6UI.js → chunk-MGXUAID4.js} +2 -2
  60. package/dist/{chunk-OWHP3H5C.js → chunk-MPW6AHTC.js} +3 -3
  61. package/dist/{chunk-35NMVJ7I.js → chunk-MYSNNMJ3.js} +3 -3
  62. package/dist/{chunk-QGIBI6GL.js → chunk-NG4AQIYJ.js} +4 -4
  63. package/dist/{chunk-BLBAQRBM.js → chunk-NIKQQXI2.js} +2 -2
  64. package/dist/{chunk-55LX6FSX.js → chunk-NJHQE4LT.js} +2 -2
  65. package/dist/{chunk-TS5XLBZR.js → chunk-NMYH55MW.js} +4 -4
  66. package/dist/{chunk-GTYFIVIZ.js → chunk-NWK6SVBM.js} +5 -5
  67. package/dist/chunk-NWK6SVBM.js.map +1 -0
  68. package/dist/{chunk-IFOH7RBI.js → chunk-NZEGQWQ5.js} +4 -4
  69. package/dist/{chunk-DTFA5DO4.js → chunk-ODCEOSJF.js} +2 -2
  70. package/dist/{chunk-NYEFP7DY.js → chunk-OKBNFUUX.js} +2 -2
  71. package/dist/{chunk-SGDPRCC4.js → chunk-OKRXXFZZ.js} +3 -3
  72. package/dist/{chunk-IG6KUWBX.js → chunk-P6UIVLZK.js} +2 -2
  73. package/dist/{chunk-V6UQZA2H.js → chunk-PKBONLCP.js} +2 -2
  74. package/dist/{chunk-MSMJJB4J.js → chunk-PTSVGKSR.js} +2 -2
  75. package/dist/{chunk-IXNCZTWA.js → chunk-PWEMRXPO.js} +2 -2
  76. package/dist/{chunk-PTHKZWEH.js → chunk-PZRYKOKP.js} +2 -2
  77. package/dist/{chunk-KD4HGBJV.js → chunk-Q6MXHDSE.js} +3 -3
  78. package/dist/{chunk-RQ4ZI4ZI.js → chunk-QITP2JGX.js} +5 -5
  79. package/dist/{chunk-WBKZUO5V.js → chunk-QMCWYN6O.js} +3 -3
  80. package/dist/{chunk-4ZKNC6A6.js → chunk-QQL6XPPG.js} +2 -2
  81. package/dist/{chunk-TG634KCO.js → chunk-QTMZDMJ6.js} +2 -2
  82. package/dist/{chunk-AT2JJEKJ.js → chunk-RM4FIXY2.js} +4 -4
  83. package/dist/{chunk-AKKRXT23.js → chunk-RPWMDIGK.js} +2 -2
  84. package/dist/{chunk-NBXFCQX4.js → chunk-RQILGK3N.js} +8 -8
  85. package/dist/chunk-RQILGK3N.js.map +1 -0
  86. package/dist/{chunk-NM5UYF6Q.js → chunk-SBGXQK5I.js} +2 -2
  87. package/dist/{chunk-SF2ZIRD6.js → chunk-SL3PLML2.js} +3 -3
  88. package/dist/{chunk-3ECU57YH.js → chunk-TJOUKMWF.js} +8 -8
  89. package/dist/{chunk-QD46HPZG.js → chunk-U2ID5A2I.js} +2 -2
  90. package/dist/{chunk-X4MVWPHV.js → chunk-UC5Y7OEJ.js} +3 -3
  91. package/dist/{chunk-SBHN6QUT.js → chunk-US2AR4BI.js} +2 -2
  92. package/dist/{chunk-DQZXPGGZ.js → chunk-V3EGXDFN.js} +3 -3
  93. package/dist/{chunk-ZHDSUZQU.js → chunk-V4O6YZSP.js} +3 -3
  94. package/dist/{chunk-3HUYRN24.js → chunk-W7C7MMIS.js} +3 -3
  95. package/dist/{chunk-NLYALJMY.js → chunk-WFYKIDCS.js} +30 -11
  96. package/dist/chunk-WFYKIDCS.js.map +1 -0
  97. package/dist/{chunk-TWPK7KUJ.js → chunk-XID22NOA.js} +5 -5
  98. package/dist/{chunk-E23UGFVC.js → chunk-XVK7TULT.js} +2 -2
  99. package/dist/{chunk-WUHEP3HH.js → chunk-XX7YB5BI.js} +4 -4
  100. package/dist/{chunk-ZTLOXFPB.js → chunk-Y2PTKKIN.js} +2 -2
  101. package/dist/{chunk-KYRDJI5O.js → chunk-YA7Y3EZP.js} +10 -10
  102. package/dist/classified/index.js +4 -4
  103. package/dist/{classified-marker-LE54HWSX.js → classified-marker-ZALWKOBC.js} +3 -3
  104. package/dist/{collection-facade-DO2AABZT.js → collection-facade-KI53O6QB.js} +15 -15
  105. package/dist/{computed-AB45PS4V.js → computed-YOQCGUCS.js} +3 -3
  106. package/dist/consent/index.js +7 -7
  107. package/dist/cover/index.js +2 -2
  108. package/dist/custody/index.js +9 -9
  109. package/dist/{dead-filter-V3LVWYEJ.js → dead-filter-6DVWST6U.js} +2 -2
  110. package/dist/debug/index.js +1 -1
  111. package/dist/{delegation-JDUMAF6L.js → delegation-WMO3Q3O5.js} +8 -8
  112. package/dist/derivations/index.js +10 -10
  113. package/dist/{derive-ZPGVLE2Q.js → derive-P2NXWUNB.js} +8 -8
  114. package/dist/directory/index.js +8 -8
  115. package/dist/{dispatch-W7NWQ637.js → dispatch-TKV4UCKB.js} +16 -16
  116. package/dist/{dispatch-6TV3DGO6.js → dispatch-VNR3TLBX.js} +5 -5
  117. package/dist/{enclave-YFCLPIDR.js → enclave-YWP3QAIQ.js} +7 -7
  118. package/dist/executor-M4ZZNX6S.js +28 -0
  119. package/dist/executor-TI64S4LE.js +9 -0
  120. package/dist/executor-YBK3I2OT.js +9 -0
  121. package/dist/export-accessible-GBLYLGW4.js +23 -0
  122. package/dist/extract-partition-SFV35U2R.js +38 -0
  123. package/dist/{fanout-sidecar-273RDMYS.js → fanout-sidecar-WYXO6QQT.js} +7 -7
  124. package/dist/find-HUSSZRBR.js +11 -0
  125. package/dist/forget/index.js +7 -7
  126. package/dist/guards/index.js +5 -5
  127. package/dist/history/index.js +10 -10
  128. package/dist/i18n/index.js +12 -12
  129. package/dist/index.d.ts +1 -1
  130. package/dist/index.js +86 -84
  131. package/dist/index.js.map +1 -1
  132. package/dist/indexing/index.js +2 -2
  133. package/dist/introspection/index.js +9 -9
  134. package/dist/issue-6TIJYWKS.js +19 -0
  135. package/dist/kernel/collection-config.d.ts +4 -0
  136. package/dist/kernel/collection.d.ts +24 -6
  137. package/dist/kernel/errors.d.ts +15 -0
  138. package/dist/kernel/put-many-atomic.d.ts +45 -0
  139. package/dist/kernel/vault.d.ts +14 -0
  140. package/dist/{ledger-XE7JF2I2.js → ledger-BLYDYRTQ.js} +9 -9
  141. package/dist/liberate-TSOW7IG5.js +24 -0
  142. package/dist/{link-set-CGYC3OH5.js → link-set-7F5ZPDEB.js} +9 -9
  143. package/dist/materialized-views/index.js +22 -22
  144. package/dist/money/index.js +3 -3
  145. package/dist/noydb-KFN6M6UJ.js +81 -0
  146. package/dist/overlay-views/index.js +4 -4
  147. package/dist/periods/index.js +11 -11
  148. package/dist/pod/index.js +9 -9
  149. package/dist/policy/index.js +2 -2
  150. package/dist/port/with/write-hooks.d.ts +6 -0
  151. package/dist/portability/index.js +8 -8
  152. package/dist/{post-register-LY35EDTJ.js → post-register-PQSY544J.js} +6 -6
  153. package/dist/query/index.js +3 -3
  154. package/dist/reduce/index.js +4 -4
  155. package/dist/{register-6RIBIT3I.js → register-S3ECUZPV.js} +10 -10
  156. package/dist/registry-FZOHKUME.js +18 -0
  157. package/dist/registry-RISV7IDZ.js +19 -0
  158. package/dist/registry-ZE35A7WC.js +9 -0
  159. package/dist/{request-withdrawal-FT3ORAWN.js → request-withdrawal-KXVTQKR5.js} +12 -12
  160. package/dist/{reveal-T34ADTPY.js → reveal-HY7DZST4.js} +4 -4
  161. package/dist/{revoke-HC7WG3HE.js → revoke-J473JJ22.js} +9 -9
  162. package/dist/satellites/index.js +1 -1
  163. package/dist/schema-update/index.js +2 -2
  164. package/dist/sealed-record/index.js +10 -10
  165. package/dist/search/index.js +4 -4
  166. package/dist/{seed-JOV54PB3.js → seed-ALU3BHFS.js} +13 -13
  167. package/dist/seed-ALU3BHFS.js.map +1 -0
  168. package/dist/sequence/index.js +7 -7
  169. package/dist/session/index.js +7 -7
  170. package/dist/shadow/index.js +2 -2
  171. package/dist/{signer-CTWOH6KT.js → signer-XLUKCCH3.js} +8 -8
  172. package/dist/snapshots/index.js +8 -8
  173. package/dist/{stale-T3V7XEOB.js → stale-U3WO5MYN.js} +8 -8
  174. package/dist/{storage-LLNLPWWB.js → storage-IQONEOYY.js} +8 -8
  175. package/dist/sync/index.js +8 -8
  176. package/dist/team/index.js +11 -11
  177. package/dist/tiers/index.js +8 -8
  178. package/dist/to/index.js +1 -1
  179. package/dist/transactions/index.js +3 -3
  180. package/dist/util/index.js +1 -1
  181. package/dist/{verify-7XWHJWUN.js → verify-JEIXSK5U.js} +5 -5
  182. package/dist/walk-BF36V4SR.js +21 -0
  183. package/dist/with-commit/tx/atomic-eligibility.d.ts +13 -11
  184. package/dist/with-sync/engine.d.ts +13 -0
  185. package/dist/{withdraw-accessible-ANSVG6XG.js → withdraw-accessible-TYTA23XH.js} +11 -11
  186. package/package.json +3 -3
  187. package/dist/api-SI2IVBQO.js +0 -20
  188. package/dist/chunk-GTYFIVIZ.js.map +0 -1
  189. package/dist/chunk-NBXFCQX4.js.map +0 -1
  190. package/dist/chunk-NLYALJMY.js.map +0 -1
  191. package/dist/chunk-QZWTRENR.js.map +0 -1
  192. package/dist/chunk-S7GIXBXV.js.map +0 -1
  193. package/dist/chunk-WYUAEZSC.js.map +0 -1
  194. package/dist/chunk-YGK2HMLR.js.map +0 -1
  195. package/dist/chunk-ZBYFMI6D.js.map +0 -1
  196. package/dist/executor-FPHKWDWT.js +0 -28
  197. package/dist/executor-IEBLTBCW.js +0 -9
  198. package/dist/executor-RM7XWQDU.js +0 -9
  199. package/dist/export-accessible-EKM3HGB2.js +0 -23
  200. package/dist/extract-partition-LS4ET5A6.js +0 -38
  201. package/dist/find-OZMTRIK3.js +0 -11
  202. package/dist/issue-LIA7FXBJ.js +0 -19
  203. package/dist/liberate-WZ3RHVKW.js +0 -24
  204. package/dist/noydb-ZLPVCDES.js +0 -81
  205. package/dist/registry-7Y5WF7GS.js +0 -9
  206. package/dist/registry-MUSL4AW6.js +0 -19
  207. package/dist/registry-RON4WHAP.js +0 -18
  208. package/dist/seed-JOV54PB3.js.map +0 -1
  209. package/dist/walk-G3NFEP5L.js +0 -21
  210. /package/dist/{api-SI2IVBQO.js.map → api-M7REIE7H.js.map} +0 -0
  211. /package/dist/{backup-X7F3TCFV.js.map → backup-ENTZYW37.js.map} +0 -0
  212. /package/dist/{chunk-6ZNSB3H6.js.map → chunk-3LYMOSY7.js.map} +0 -0
  213. /package/dist/{chunk-LXRTP3AQ.js.map → chunk-4DGBZEV6.js.map} +0 -0
  214. /package/dist/{chunk-LRRX57UA.js.map → chunk-4MSNAB64.js.map} +0 -0
  215. /package/dist/{chunk-MXUT7FTE.js.map → chunk-4SG5TOXK.js.map} +0 -0
  216. /package/dist/{chunk-W66AM5IB.js.map → chunk-4TXO442D.js.map} +0 -0
  217. /package/dist/{chunk-UADPR6F4.js.map → chunk-5EKL6BXI.js.map} +0 -0
  218. /package/dist/{chunk-SU6SGWXM.js.map → chunk-623QEHDB.js.map} +0 -0
  219. /package/dist/{chunk-IVYQAVWO.js.map → chunk-653KOQ7A.js.map} +0 -0
  220. /package/dist/{chunk-2BET5QTS.js.map → chunk-6PFST3FC.js.map} +0 -0
  221. /package/dist/{chunk-PWPYO73B.js.map → chunk-6RDTG6E5.js.map} +0 -0
  222. /package/dist/{chunk-DAFBJS4Y.js.map → chunk-7P4LL3JH.js.map} +0 -0
  223. /package/dist/{chunk-L3YYLT4E.js.map → chunk-ALUVACKT.js.map} +0 -0
  224. /package/dist/{chunk-5DRROK5W.js.map → chunk-BFG7LD6Z.js.map} +0 -0
  225. /package/dist/{chunk-6UBZ6I5Z.js.map → chunk-DDB626I7.js.map} +0 -0
  226. /package/dist/{chunk-W3G5REIU.js.map → chunk-EAN4TAPC.js.map} +0 -0
  227. /package/dist/{chunk-4JQK3L4V.js.map → chunk-EBETHILL.js.map} +0 -0
  228. /package/dist/{chunk-467SWYT5.js.map → chunk-ECGDJU5R.js.map} +0 -0
  229. /package/dist/{chunk-ZFG5EBI3.js.map → chunk-F2WWHKO7.js.map} +0 -0
  230. /package/dist/{chunk-NJ4DYYO5.js.map → chunk-F5UWVF6Z.js.map} +0 -0
  231. /package/dist/{chunk-Q36YXK77.js.map → chunk-FHK6WWUE.js.map} +0 -0
  232. /package/dist/{chunk-SHEEBRZ4.js.map → chunk-FT5Y4VSP.js.map} +0 -0
  233. /package/dist/{chunk-JQ2AX4T5.js.map → chunk-FUECZSRM.js.map} +0 -0
  234. /package/dist/{chunk-Q5YJCVJY.js.map → chunk-FZAP4JNC.js.map} +0 -0
  235. /package/dist/{chunk-SFBYQMZM.js.map → chunk-G3ORJ3IQ.js.map} +0 -0
  236. /package/dist/{chunk-HLKXPJ4V.js.map → chunk-G7ZIMGPQ.js.map} +0 -0
  237. /package/dist/{chunk-QJNCB5SK.js.map → chunk-GIGLOQL7.js.map} +0 -0
  238. /package/dist/{chunk-ERGECZEI.js.map → chunk-GTQF32TP.js.map} +0 -0
  239. /package/dist/{chunk-JYJFGD2H.js.map → chunk-GYJRDALN.js.map} +0 -0
  240. /package/dist/{chunk-HZZP2ZIG.js.map → chunk-HGDXJVK2.js.map} +0 -0
  241. /package/dist/{chunk-ZNWSG7XC.js.map → chunk-IHYSIPEK.js.map} +0 -0
  242. /package/dist/{chunk-5GQEU4DN.js.map → chunk-IJV56FWY.js.map} +0 -0
  243. /package/dist/{chunk-5UQ7Y6SQ.js.map → chunk-IM2KST7E.js.map} +0 -0
  244. /package/dist/{chunk-7H3WWH6J.js.map → chunk-IQ423YMK.js.map} +0 -0
  245. /package/dist/{chunk-P4JO3H6R.js.map → chunk-J7YVY7TW.js.map} +0 -0
  246. /package/dist/{chunk-2J6UEN2V.js.map → chunk-K5OFKXUG.js.map} +0 -0
  247. /package/dist/{chunk-JEI6JJNI.js.map → chunk-KDWBVCIX.js.map} +0 -0
  248. /package/dist/{chunk-T2MOJF76.js.map → chunk-KJNMTE2W.js.map} +0 -0
  249. /package/dist/{chunk-NFZGZ4AK.js.map → chunk-L67H6FAQ.js.map} +0 -0
  250. /package/dist/{chunk-RBTVFPHF.js.map → chunk-LQVRK2XJ.js.map} +0 -0
  251. /package/dist/{chunk-MHMLXJ3I.js.map → chunk-LXRVTJ5D.js.map} +0 -0
  252. /package/dist/{chunk-LLYIMSQQ.js.map → chunk-MDRCEA56.js.map} +0 -0
  253. /package/dist/{chunk-KRCBZYTZ.js.map → chunk-MFW466PX.js.map} +0 -0
  254. /package/dist/{chunk-RO5NM6UI.js.map → chunk-MGXUAID4.js.map} +0 -0
  255. /package/dist/{chunk-OWHP3H5C.js.map → chunk-MPW6AHTC.js.map} +0 -0
  256. /package/dist/{chunk-35NMVJ7I.js.map → chunk-MYSNNMJ3.js.map} +0 -0
  257. /package/dist/{chunk-QGIBI6GL.js.map → chunk-NG4AQIYJ.js.map} +0 -0
  258. /package/dist/{chunk-BLBAQRBM.js.map → chunk-NIKQQXI2.js.map} +0 -0
  259. /package/dist/{chunk-55LX6FSX.js.map → chunk-NJHQE4LT.js.map} +0 -0
  260. /package/dist/{chunk-TS5XLBZR.js.map → chunk-NMYH55MW.js.map} +0 -0
  261. /package/dist/{chunk-IFOH7RBI.js.map → chunk-NZEGQWQ5.js.map} +0 -0
  262. /package/dist/{chunk-DTFA5DO4.js.map → chunk-ODCEOSJF.js.map} +0 -0
  263. /package/dist/{chunk-NYEFP7DY.js.map → chunk-OKBNFUUX.js.map} +0 -0
  264. /package/dist/{chunk-SGDPRCC4.js.map → chunk-OKRXXFZZ.js.map} +0 -0
  265. /package/dist/{chunk-IG6KUWBX.js.map → chunk-P6UIVLZK.js.map} +0 -0
  266. /package/dist/{chunk-V6UQZA2H.js.map → chunk-PKBONLCP.js.map} +0 -0
  267. /package/dist/{chunk-MSMJJB4J.js.map → chunk-PTSVGKSR.js.map} +0 -0
  268. /package/dist/{chunk-IXNCZTWA.js.map → chunk-PWEMRXPO.js.map} +0 -0
  269. /package/dist/{chunk-PTHKZWEH.js.map → chunk-PZRYKOKP.js.map} +0 -0
  270. /package/dist/{chunk-KD4HGBJV.js.map → chunk-Q6MXHDSE.js.map} +0 -0
  271. /package/dist/{chunk-RQ4ZI4ZI.js.map → chunk-QITP2JGX.js.map} +0 -0
  272. /package/dist/{chunk-WBKZUO5V.js.map → chunk-QMCWYN6O.js.map} +0 -0
  273. /package/dist/{chunk-4ZKNC6A6.js.map → chunk-QQL6XPPG.js.map} +0 -0
  274. /package/dist/{chunk-TG634KCO.js.map → chunk-QTMZDMJ6.js.map} +0 -0
  275. /package/dist/{chunk-AT2JJEKJ.js.map → chunk-RM4FIXY2.js.map} +0 -0
  276. /package/dist/{chunk-AKKRXT23.js.map → chunk-RPWMDIGK.js.map} +0 -0
  277. /package/dist/{chunk-NM5UYF6Q.js.map → chunk-SBGXQK5I.js.map} +0 -0
  278. /package/dist/{chunk-SF2ZIRD6.js.map → chunk-SL3PLML2.js.map} +0 -0
  279. /package/dist/{chunk-3ECU57YH.js.map → chunk-TJOUKMWF.js.map} +0 -0
  280. /package/dist/{chunk-QD46HPZG.js.map → chunk-U2ID5A2I.js.map} +0 -0
  281. /package/dist/{chunk-X4MVWPHV.js.map → chunk-UC5Y7OEJ.js.map} +0 -0
  282. /package/dist/{chunk-SBHN6QUT.js.map → chunk-US2AR4BI.js.map} +0 -0
  283. /package/dist/{chunk-DQZXPGGZ.js.map → chunk-V3EGXDFN.js.map} +0 -0
  284. /package/dist/{chunk-ZHDSUZQU.js.map → chunk-V4O6YZSP.js.map} +0 -0
  285. /package/dist/{chunk-3HUYRN24.js.map → chunk-W7C7MMIS.js.map} +0 -0
  286. /package/dist/{chunk-TWPK7KUJ.js.map → chunk-XID22NOA.js.map} +0 -0
  287. /package/dist/{chunk-E23UGFVC.js.map → chunk-XVK7TULT.js.map} +0 -0
  288. /package/dist/{chunk-WUHEP3HH.js.map → chunk-XX7YB5BI.js.map} +0 -0
  289. /package/dist/{chunk-ZTLOXFPB.js.map → chunk-Y2PTKKIN.js.map} +0 -0
  290. /package/dist/{chunk-KYRDJI5O.js.map → chunk-YA7Y3EZP.js.map} +0 -0
  291. /package/dist/{classified-marker-LE54HWSX.js.map → classified-marker-ZALWKOBC.js.map} +0 -0
  292. /package/dist/{collection-facade-DO2AABZT.js.map → collection-facade-KI53O6QB.js.map} +0 -0
  293. /package/dist/{computed-AB45PS4V.js.map → computed-YOQCGUCS.js.map} +0 -0
  294. /package/dist/{dead-filter-V3LVWYEJ.js.map → dead-filter-6DVWST6U.js.map} +0 -0
  295. /package/dist/{delegation-JDUMAF6L.js.map → delegation-WMO3Q3O5.js.map} +0 -0
  296. /package/dist/{derive-ZPGVLE2Q.js.map → derive-P2NXWUNB.js.map} +0 -0
  297. /package/dist/{dispatch-W7NWQ637.js.map → dispatch-TKV4UCKB.js.map} +0 -0
  298. /package/dist/{dispatch-6TV3DGO6.js.map → dispatch-VNR3TLBX.js.map} +0 -0
  299. /package/dist/{enclave-YFCLPIDR.js.map → enclave-YWP3QAIQ.js.map} +0 -0
  300. /package/dist/{executor-FPHKWDWT.js.map → executor-M4ZZNX6S.js.map} +0 -0
  301. /package/dist/{executor-IEBLTBCW.js.map → executor-TI64S4LE.js.map} +0 -0
  302. /package/dist/{executor-RM7XWQDU.js.map → executor-YBK3I2OT.js.map} +0 -0
  303. /package/dist/{export-accessible-EKM3HGB2.js.map → export-accessible-GBLYLGW4.js.map} +0 -0
  304. /package/dist/{extract-partition-LS4ET5A6.js.map → extract-partition-SFV35U2R.js.map} +0 -0
  305. /package/dist/{fanout-sidecar-273RDMYS.js.map → fanout-sidecar-WYXO6QQT.js.map} +0 -0
  306. /package/dist/{find-OZMTRIK3.js.map → find-HUSSZRBR.js.map} +0 -0
  307. /package/dist/{issue-LIA7FXBJ.js.map → issue-6TIJYWKS.js.map} +0 -0
  308. /package/dist/{ledger-XE7JF2I2.js.map → ledger-BLYDYRTQ.js.map} +0 -0
  309. /package/dist/{liberate-WZ3RHVKW.js.map → liberate-TSOW7IG5.js.map} +0 -0
  310. /package/dist/{link-set-CGYC3OH5.js.map → link-set-7F5ZPDEB.js.map} +0 -0
  311. /package/dist/{noydb-ZLPVCDES.js.map → noydb-KFN6M6UJ.js.map} +0 -0
  312. /package/dist/{post-register-LY35EDTJ.js.map → post-register-PQSY544J.js.map} +0 -0
  313. /package/dist/{register-6RIBIT3I.js.map → register-S3ECUZPV.js.map} +0 -0
  314. /package/dist/{registry-7Y5WF7GS.js.map → registry-FZOHKUME.js.map} +0 -0
  315. /package/dist/{registry-MUSL4AW6.js.map → registry-RISV7IDZ.js.map} +0 -0
  316. /package/dist/{registry-RON4WHAP.js.map → registry-ZE35A7WC.js.map} +0 -0
  317. /package/dist/{request-withdrawal-FT3ORAWN.js.map → request-withdrawal-KXVTQKR5.js.map} +0 -0
  318. /package/dist/{reveal-T34ADTPY.js.map → reveal-HY7DZST4.js.map} +0 -0
  319. /package/dist/{revoke-HC7WG3HE.js.map → revoke-J473JJ22.js.map} +0 -0
  320. /package/dist/{signer-CTWOH6KT.js.map → signer-XLUKCCH3.js.map} +0 -0
  321. /package/dist/{stale-T3V7XEOB.js.map → stale-U3WO5MYN.js.map} +0 -0
  322. /package/dist/{storage-LLNLPWWB.js.map → storage-IQONEOYY.js.map} +0 -0
  323. /package/dist/{verify-7XWHJWUN.js.map → verify-JEIXSK5U.js.map} +0 -0
  324. /package/dist/{walk-G3NFEP5L.js.map → walk-BF36V4SR.js.map} +0 -0
  325. /package/dist/{withdraw-accessible-ANSVG6XG.js.map → withdraw-accessible-TYTA23XH.js.map} +0 -0
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  TierNotGrantedError
3
- } from "./chunk-QZWTRENR.js";
3
+ } from "./chunk-AR5D76T2.js";
4
4
 
5
5
  // src/with-party/team/tiers.ts
6
6
  function dekKey(collection, tier) {
@@ -19,4 +19,4 @@ export {
19
19
  dekKey,
20
20
  assertTierAccess
21
21
  };
22
- //# sourceMappingURL=chunk-PTHKZWEH.js.map
22
+ //# sourceMappingURL=chunk-PZRYKOKP.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  openEnvelopeJson
3
- } from "./chunk-SU6SGWXM.js";
3
+ } from "./chunk-623QEHDB.js";
4
4
  import {
5
5
  encrypt
6
- } from "./chunk-AKKRXT23.js";
6
+ } from "./chunk-RPWMDIGK.js";
7
7
  import {
8
8
  NOYDB_FORMAT_VERSION
9
9
  } from "./chunk-77AEMXFA.js";
@@ -46,4 +46,4 @@ export {
46
46
  loadPersistedSchema,
47
47
  savePersistedSchema
48
48
  };
49
- //# sourceMappingURL=chunk-KD4HGBJV.js.map
49
+ //# sourceMappingURL=chunk-Q6MXHDSE.js.map
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  assertTierAccess,
3
3
  dekKey
4
- } from "./chunk-PTHKZWEH.js";
4
+ } from "./chunk-PZRYKOKP.js";
5
5
  import {
6
6
  applyRewrappedBody,
7
7
  rewrapBodyToDek
8
- } from "./chunk-SU6SGWXM.js";
8
+ } from "./chunk-623QEHDB.js";
9
9
  import {
10
10
  isDeleteMarker,
11
11
  isTombstoneShape
@@ -14,7 +14,7 @@ import {
14
14
  decrypt,
15
15
  encrypt,
16
16
  unwrapCek
17
- } from "./chunk-AKKRXT23.js";
17
+ } from "./chunk-RPWMDIGK.js";
18
18
  import {
19
19
  NOYDB_FORMAT_VERSION
20
20
  } from "./chunk-77AEMXFA.js";
@@ -23,7 +23,7 @@ import {
23
23
  TierDemoteDeniedError,
24
24
  TiersNotEnabledError,
25
25
  UnsupportedTierCompositionError
26
- } from "./chunk-QZWTRENR.js";
26
+ } from "./chunk-AR5D76T2.js";
27
27
 
28
28
  // src/with-audit/tiers/active.ts
29
29
  function withTiers() {
@@ -378,4 +378,4 @@ export {
378
378
  demote,
379
379
  classifySealedShred
380
380
  };
381
- //# sourceMappingURL=chunk-RQ4ZI4ZI.js.map
381
+ //# sourceMappingURL=chunk-QITP2JGX.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  applyJoins
3
- } from "./chunk-V6UQZA2H.js";
3
+ } from "./chunk-PKBONLCP.js";
4
4
  import {
5
5
  NO_REDUCE
6
6
  } from "./chunk-YMUFFJCO.js";
@@ -17,7 +17,7 @@ import {
17
17
  CrossJoinTooLargeError,
18
18
  DanglingReferenceError,
19
19
  FieldNotQueryableError
20
- } from "./chunk-QZWTRENR.js";
20
+ } from "./chunk-AR5D76T2.js";
21
21
 
22
22
  // src/kernel/query/live.ts
23
23
  function buildLiveQuery(recompute, upstreams) {
@@ -1517,4 +1517,4 @@ export {
1517
1517
  executePlan,
1518
1518
  ScanBuilder
1519
1519
  };
1520
- //# sourceMappingURL=chunk-WBKZUO5V.js.map
1520
+ //# sourceMappingURL=chunk-QMCWYN6O.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  DerivationCycleError,
3
3
  MaterializedViewCycleError
4
- } from "./chunk-QZWTRENR.js";
4
+ } from "./chunk-AR5D76T2.js";
5
5
 
6
6
  // src/kernel/via/graph.ts
7
7
  var DEFAULT_POSTURE = { encryptedAtRest: "envelope", queryable: "full", exportable: true, forgettable: false };
@@ -341,4 +341,4 @@ export {
341
341
  DEFAULT_POSTURE,
342
342
  ViaGraph
343
343
  };
344
- //# sourceMappingURL=chunk-4ZKNC6A6.js.map
344
+ //# sourceMappingURL=chunk-QQL6XPPG.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  CargoNotEnabledError,
3
3
  QuiesceTimeoutError
4
- } from "./chunk-QZWTRENR.js";
4
+ } from "./chunk-AR5D76T2.js";
5
5
 
6
6
  // src/with-cargo/strategy.ts
7
7
  var NO_CARGO = {
@@ -60,4 +60,4 @@ export {
60
60
  isQuorum,
61
61
  runDrainBarrier
62
62
  };
63
- //# sourceMappingURL=chunk-TG634KCO.js.map
63
+ //# sourceMappingURL=chunk-QTMZDMJ6.js.map
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  ViaGraph
3
- } from "./chunk-4ZKNC6A6.js";
3
+ } from "./chunk-QQL6XPPG.js";
4
4
  import {
5
5
  sha256Hex
6
- } from "./chunk-AKKRXT23.js";
6
+ } from "./chunk-RPWMDIGK.js";
7
7
  import {
8
8
  DerivationCycleError
9
- } from "./chunk-QZWTRENR.js";
9
+ } from "./chunk-AR5D76T2.js";
10
10
 
11
11
  // src/with-formula/derivations/strategy-hash.ts
12
12
  async function computeStrategyHash(source, outputKeys, derive, sources) {
@@ -161,4 +161,4 @@ var DerivationRegistry = class {
161
161
  export {
162
162
  DerivationRegistry
163
163
  };
164
- //# sourceMappingURL=chunk-AT2JJEKJ.js.map
164
+ //# sourceMappingURL=chunk-RM4FIXY2.js.map
@@ -2,7 +2,7 @@ import {
2
2
  DecryptionError,
3
3
  InvalidKeyError,
4
4
  TamperedError
5
- } from "./chunk-QZWTRENR.js";
5
+ } from "./chunk-AR5D76T2.js";
6
6
 
7
7
  // src/kernel/enclave/crypto.ts
8
8
  var PBKDF2_ITERATIONS = 6e5;
@@ -401,4 +401,4 @@ export {
401
401
  bufferToBase64,
402
402
  base64ToBuffer
403
403
  };
404
- //# sourceMappingURL=chunk-AKKRXT23.js.map
404
+ //# sourceMappingURL=chunk-RPWMDIGK.js.map
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  openEnvelopeJson
3
- } from "./chunk-SU6SGWXM.js";
3
+ } from "./chunk-623QEHDB.js";
4
4
  import {
5
5
  encrypt
6
- } from "./chunk-AKKRXT23.js";
6
+ } from "./chunk-RPWMDIGK.js";
7
7
  import {
8
8
  NOYDB_FORMAT_VERSION
9
9
  } from "./chunk-77AEMXFA.js";
10
10
  import {
11
- ConflictError,
12
11
  SequenceContentionError,
13
12
  SequenceNotEnabledError,
14
13
  SequenceOfflineError,
15
- ValidationError
16
- } from "./chunk-QZWTRENR.js";
14
+ ValidationError,
15
+ isConflictError
16
+ } from "./chunk-AR5D76T2.js";
17
17
 
18
18
  // src/with-commit/sequence/active.ts
19
19
  function withSequence() {
@@ -154,7 +154,7 @@ var SequenceStore = class {
154
154
  await this.adapter.put(this.vault, SEQUENCE_COLLECTION, name, envelope, expectedVersion);
155
155
  return nextValue;
156
156
  } catch (err) {
157
- if (err instanceof ConflictError) {
157
+ if (isConflictError(err)) {
158
158
  lastConflict = err;
159
159
  if (attempt < MAX_NEXT_ATTEMPTS - 1) await sleepBackoff(attempt);
160
160
  continue;
@@ -178,7 +178,7 @@ var SequenceStore = class {
178
178
  await this.adapter.put(this.vault, SEQUENCE_COLLECTION, name, envelope, expectedVersion);
179
179
  return;
180
180
  } catch (err) {
181
- if (err instanceof ConflictError) {
181
+ if (isConflictError(err)) {
182
182
  lastConflict = err;
183
183
  if (attempt < MAX_NEXT_ATTEMPTS - 1) await sleepBackoff(attempt);
184
184
  continue;
@@ -199,4 +199,4 @@ export {
199
199
  resolveSequenceKey,
200
200
  SequenceStore
201
201
  };
202
- //# sourceMappingURL=chunk-NBXFCQX4.js.map
202
+ //# sourceMappingURL=chunk-RQILGK3N.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/with-commit/sequence/active.ts","../src/with-commit/sequence/strategy.ts","../src/with-commit/sequence/index.ts"],"sourcesContent":["/**\n * Enable the atomic-sequence capability.\n * Pass to `createNoydb({ sequenceStrategy: withSequence() })` to make\n * `vault.sequence('name').next()` / `.peek()` / `.seedTo()` live. The\n * {@link SequenceStore} CAS engine is statically imported here, so it is pulled\n * into the bundle only when `withSequence()` is referenced (the floor never\n * imports it).\n */\nimport type { SequenceStrategy } from './strategy.js'\nimport { SequenceStore } from './index.js'\n\nexport function withSequence(): SequenceStrategy {\n return {\n createStore(opts) {\n return new SequenceStore(opts)\n },\n }\n}\n","/**\n * Sequence capability strategy — the single on-demand factory the vault routes\n * `vault.sequence()` through to build its atomic-CAS {@link SequenceStore}. The\n * active engine ({@link withSequence}) constructs the real store (kept out of\n * the floor bundle — the store class is reached only via the opt-in\n * `active.ts` chunk); {@link NO_SEQUENCE} throws. The vault always assembles the\n * per-call {@link SequenceStoreOptions} and delegates here, so an un-opted-in\n * caller hits `NO_SEQUENCE`'s throw at `vault.sequence()`.\n *\n * Note: `vault.sequence()` is synchronous, so the factory is a plain (sync)\n * constructor — the engine is tree-shaken by reachability (only `withSequence()`\n * pulls `active.ts`, which statically imports the store), not by a dynamic\n * import. Deferred-numbering series (`withDeferredNumbering`) are a distinct\n * capability and are NOT routed through this strategy.\n * @internal\n */\nimport type { SequenceStore, SequenceStoreOptions } from './index.js'\nimport { SequenceNotEnabledError } from '../../kernel/errors.js'\n\nexport interface SequenceStrategy {\n createStore(opts: SequenceStoreOptions): SequenceStore\n}\n\n/**\n * No-op stub — the floor default. The capability factory throws\n * {@link SequenceNotEnabledError}; opt in with `sequenceStrategy: withSequence()`\n * in createNoydb. @internal\n */\nexport const NO_SEQUENCE: SequenceStrategy = {\n createStore(): SequenceStore {\n throw new SequenceNotEnabledError()\n },\n}\n","/**\n * Atomic sequence primitive — online-coordinated gap-free numbering.\n *\n * `vault.sequence('invoice-2026').next()` returns 1, 2, 3, … with no\n * gaps and no duplicates, even under concurrent callers. Each named\n * sequence is an independent counter record at `_sequences/<name>`,\n * incremented with an optimistic compare-and-swap retry loop — the same\n * proven pattern as the ledger head (`history/ledger/store.ts`).\n *\n * **Explicitly online-only.** Gap-free numbering requires single-authority\n * serialization, which an offline / non-CAS store cannot provide. `next()`\n * throws {@link SequenceOfflineError} unless the backing store advertises\n * `capabilities.casAtomic`. This is a deliberate, honest wall — an offline\n * writer cannot safely allocate a global sequence number.\n *\n * Note on \"gap-free\": the *sequence* is gap-free (each `next()` yields a\n * unique, +1 value). If a caller discards a value without using it, that\n * is a gap in *usage*, not in the sequence — assign each `next()` result\n * to its record in the same operation.\n */\n\nimport type { NoydbStore, EncryptedEnvelope } from '../../kernel/types.js'\nimport { NOYDB_FORMAT_VERSION } from '../../kernel/types.js'\nimport { encrypt, openEnvelopeJson, type EnclaveKey } from '../../kernel/enclave/index.js'\nimport type { ConflictError} from '../../kernel/errors.js';\nimport { isConflictError, SequenceContentionError, SequenceOfflineError, ValidationError } from '../../kernel/errors.js'\n\n// Capability opt-in seam (S4): `vault.sequence()` builds its CAS store through\n// the sequenceStrategy, so it throws SequenceNotEnabledError unless opted in.\nexport { withSequence } from './active.js'\nexport { NO_SEQUENCE, type SequenceStrategy } from './strategy.js'\nexport { SequenceNotEnabledError } from '../../kernel/errors.js'\n\nexport const SEQUENCE_COLLECTION = '_sequences'\n// A sequence is a single hot CAS row — higher contention than a ledger\n// append. A larger budget + jittered backoff absorbs moderate concurrency;\n// a genuine burst beyond this surfaces SequenceContentionError so the\n// caller can retry / queue (the honest online-only contract).\nconst MAX_NEXT_ATTEMPTS = 16\n\ninterface SequenceState {\n value: number\n}\n\n/** Options for `SequenceHandle.next`. Deferred-numbering series use `for`; the CAS counter ignores all of these. */\nexport interface NextOptions {\n /** Deferred mode: the record id to number. Ignored by the CAS counter. */\n readonly for?: string\n /** Deferred mode: reject after this many ms if still unsealed (reserved; not yet enforced in this slice). */\n readonly timeoutMs?: number\n}\n\n/**\n * Partitioning for a CAS sequence. A partitioned sequence is an\n * independent counter scoped to one tuple of values — e.g.\n * `sequence('invoice', { partition: [2026, 'EU'] })` numbers EU-2026 invoices\n * separately from `[2026, 'US']` and from the bare `invoice` series.\n *\n * Partition components are URI-encoded (so `/`, null bytes and other\n * separators in a value can never collide with the structural separators) and\n * `'/'`-joined, then appended to the series with a null-byte (`\\x00`)\n * separator. The null byte is illegal in a plain series name, which guarantees\n * a partitioned key is always disjoint from any unpartitioned series.\n */\nexport interface SequenceOptions {\n /** Partition tuple. Each component is URI-encoded and `'/'`-joined. */\n readonly partition?: readonly (string | number)[]\n /**\n * Render template for the serial string. When set, `vault.sequence`\n * returns a {@link FormattedSequenceHandle} whose `next()` resolves to\n * `{ serial, formatted }`. Tokens:\n * - `{seq}` — the allocated integer\n * - `{seq:0N}` — zero-padded to width N (e.g. `{seq:04}` → `0001`)\n * - `{partition.i}` — the i-th `partition` component (original value)\n *\n * Any other token, or a `{partition.i}` index beyond the supplied\n * `partition`, throws `ValidationError` at `vault.sequence()` construction.\n * Per-partition reset is inherent: a new partition tuple starts at 1.\n */\n readonly format?: string\n}\n\n/**\n * A formatted sequence handle. Identical to {@link SequenceHandle}\n * except `next()` also returns the rendered `formatted` string. `peek()` /\n * `seedTo()` operate on the underlying integer counter, unchanged.\n */\nexport interface FormattedSequenceHandle {\n /** Allocate the next value and return it with its rendered serial string. */\n next(opts?: NextOptions): Promise<{ serial: number; formatted: string }>\n /** Read the current integer value without allocating. Returns 0 if never used. */\n peek(): Promise<number>\n /** Set-if-greater on the underlying integer counter. See {@link SequenceHandle.seedTo}. */\n seedTo(n: number): Promise<void>\n}\n\n// Matches a single `{...}` token with no nested braces.\nconst SEQ_FORMAT_TOKEN = /\\{([^{}]*)\\}/g\nconst SEQ_PAD_TOKEN = /^seq:0(\\d+)$/\nconst SEQ_PARTITION_TOKEN = /^partition\\.(\\d+)$/\n\n/**\n * Validate a sequence `format` against the supplied partition and return a\n * pure `(serial) => string` renderer. Eager validation: every token is\n * checked now, so a bad pattern throws `ValidationError` at construction —\n * never at `next()` time.\n */\nexport function compileSequenceFormat(\n format: string,\n series: string,\n partition: readonly (string | number)[] | undefined,\n): (serial: number) => string {\n const parts = partition ?? []\n for (const m of format.matchAll(SEQ_FORMAT_TOKEN)) {\n const token = m[1] ?? ''\n if (token === 'seq') continue\n if (SEQ_PAD_TOKEN.test(token)) continue\n const partMatch = SEQ_PARTITION_TOKEN.exec(token)\n if (partMatch) {\n const idx = Number(partMatch[1])\n if (idx >= parts.length) {\n throw new ValidationError(\n `sequence(\"${series}\"): format token \"{${token}}\" references partition index ${idx}, ` +\n `but only ${parts.length} partition component(s) were supplied.`,\n )\n }\n continue\n }\n throw new ValidationError(\n `sequence(\"${series}\"): format contains unknown token \"{${token}}\". ` +\n `Accepted tokens: {seq}, {seq:0N}, {partition.i}.`,\n )\n }\n return (serial: number): string =>\n format.replace(SEQ_FORMAT_TOKEN, (full, token: string) => {\n if (token === 'seq') return String(serial)\n const padMatch = SEQ_PAD_TOKEN.exec(token)\n if (padMatch) return String(serial).padStart(Number(padMatch[1]), '0')\n const partMatch = SEQ_PARTITION_TOKEN.exec(token)\n if (partMatch) return String(parts[Number(partMatch[1])])\n return full // unreachable — validated above\n })\n}\n\n/**\n * Resolve the CAS storage key for a (series, partition) pair.\n *\n * With no partition the key is `series` verbatim. With a partition the key is\n * `${series}\\x00${parts}` where `parts` is each component passed through\n * `encodeURIComponent(String(part))` and `'/'`-joined. The null-byte separator\n * is illegal in a plain series name, so partitioned keys never collide with\n * unpartitioned ones; URI-encoding keeps any component containing `/` distinct\n * from a multi-component partition.\n *\n * @throws {ValidationError} if any partition component is empty after `String()`\n * or is a non-finite number (`NaN`, `±Infinity`).\n */\nexport function resolveSequenceKey(series: string, opts?: SequenceOptions): string {\n const partition = opts?.partition\n if (!partition || partition.length === 0) return series\n const parts = partition.map((p) => {\n if (typeof p === 'number' && !Number.isFinite(p)) {\n throw new ValidationError(`sequence partition component must be a finite number, got ${p}`)\n }\n const s = String(p)\n if (s === '') {\n throw new ValidationError('sequence partition component must not be empty')\n }\n return encodeURIComponent(s)\n })\n return `${series}\\x00${parts.join('/')}`\n}\n\nexport interface SequenceHandle {\n /** Atomically allocate and return the next value (1, 2, 3, …). Deferred series resolve at the next pass. */\n next(opts?: NextOptions): Promise<number>\n /** Read the current value without allocating. Returns 0 if never used. */\n peek(): Promise<number>\n /**\n * Set-if-greater: advance the counter to at least `n`. A no-op if the\n * current value is already `>= n` (so it never rewinds), and `seedTo(0)` is\n * a no-op. Idempotent and CAS-safe under concurrent `next()` / `seedTo()`.\n *\n * Use after a bundle / CSV import to fast-forward the counter past the\n * highest imported serial, so subsequent `next()` calls cannot re-use a\n * number that is already on a record.\n *\n * Online-only: throws {@link SequenceOfflineError} on a non-CAS store.\n */\n seedTo(n: number): Promise<void>\n}\n\nasync function sleepBackoff(attempt: number): Promise<void> {\n // Exponential backoff with full jitter to break the thundering herd\n // when many writers contend on the same counter row.\n const ceil = Math.min(2 ** attempt, 32)\n const ms = Math.floor(Math.random() * ceil)\n await new Promise((r) => setTimeout(r, ms))\n}\n\n/** Per-call context the vault assembles to build a {@link SequenceStore}. */\nexport interface SequenceStoreOptions {\n adapter: NoydbStore\n vault: string\n encrypted: boolean\n getDEK: (collectionName: string) => Promise<EnclaveKey>\n actor: string\n}\n\nexport class SequenceStore {\n private readonly adapter: NoydbStore\n private readonly vault: string\n private readonly encrypted: boolean\n private readonly getDEK: (collectionName: string) => Promise<EnclaveKey>\n private readonly actor: string\n /**\n * Memoized DEK promise. The `_sequences` collection DEK is created on\n * first access; without sharing one promise, a burst of concurrent\n * `next()` calls would each trigger DEK creation and diverge (one\n * writer's ciphertext unreadable by another). One shared promise → one\n * DEK.\n */\n private dekPromise: Promise<EnclaveKey> | null = null\n\n constructor(opts: SequenceStoreOptions) {\n this.adapter = opts.adapter\n this.vault = opts.vault\n this.encrypted = opts.encrypted\n this.getDEK = opts.getDEK\n this.actor = opts.actor\n }\n\n /** A handle bound to one sequence name. */\n handle(name: string): SequenceHandle {\n return {\n next: () => this.next(name),\n peek: () => this.peek(name),\n seedTo: (n) => this.seedTo(name, n),\n }\n }\n\n private assertOnline(): void {\n if (this.adapter.capabilities?.casAtomic !== true) {\n throw new SequenceOfflineError()\n }\n }\n\n private dek(): Promise<EnclaveKey> {\n if (!this.dekPromise) this.dekPromise = this.getDEK(SEQUENCE_COLLECTION)\n return this.dekPromise\n }\n\n private async read(name: string): Promise<{ env: EncryptedEnvelope | null; value: number }> {\n const env = await this.adapter.get(this.vault, SEQUENCE_COLLECTION, name)\n if (!env) return { env: null, value: 0 }\n const json = this.encrypted ? await openEnvelopeJson(env, await this.dek()) : env._data\n const state = JSON.parse(json) as SequenceState\n return { env, value: state.value }\n }\n\n private async encryptState(state: SequenceState, version: number): Promise<EncryptedEnvelope> {\n const json = JSON.stringify(state)\n if (!this.encrypted) {\n return { _noydb: NOYDB_FORMAT_VERSION, _v: version, _ts: new Date().toISOString(), _iv: '', _data: json, _by: this.actor }\n }\n const { iv, data } = await encrypt(json, await this.dek())\n return { _noydb: NOYDB_FORMAT_VERSION, _v: version, _ts: new Date().toISOString(), _iv: iv, _data: data, _by: this.actor }\n }\n\n async peek(name: string): Promise<number> {\n return (await this.read(name)).value\n }\n\n async next(name: string): Promise<number> {\n this.assertOnline()\n let lastConflict: ConflictError | undefined\n for (let attempt = 0; attempt < MAX_NEXT_ATTEMPTS; attempt++) {\n const { env, value } = await this.read(name)\n const nextValue = value + 1\n const expectedVersion = env?._v ?? 0 // 0 ≡ \"must not yet exist\" (create)\n const envelope = await this.encryptState({ value: nextValue }, expectedVersion + 1)\n try {\n await this.adapter.put(this.vault, SEQUENCE_COLLECTION, name, envelope, expectedVersion)\n return nextValue\n } catch (err) {\n if (isConflictError(err)) {\n lastConflict = err\n if (attempt < MAX_NEXT_ATTEMPTS - 1) await sleepBackoff(attempt)\n continue\n }\n throw err\n }\n }\n void lastConflict\n throw new SequenceContentionError(name, MAX_NEXT_ATTEMPTS)\n }\n\n async seedTo(name: string, n: number): Promise<void> {\n this.assertOnline()\n if (n <= 0) return // set-if-greater: 0 (and any non-positive seed) is a no-op\n let lastConflict: ConflictError | undefined\n for (let attempt = 0; attempt < MAX_NEXT_ATTEMPTS; attempt++) {\n const { env, value } = await this.read(name)\n if (value >= n) return // already at or past the floor — no write, idempotent\n const expectedVersion = env?._v ?? 0 // 0 ≡ \"must not yet exist\" (create)\n const envelope = await this.encryptState({ value: n }, expectedVersion + 1)\n try {\n await this.adapter.put(this.vault, SEQUENCE_COLLECTION, name, envelope, expectedVersion)\n return\n } catch (err) {\n if (isConflictError(err)) {\n lastConflict = err\n if (attempt < MAX_NEXT_ATTEMPTS - 1) await sleepBackoff(attempt)\n continue\n }\n throw err\n }\n }\n void lastConflict\n throw new SequenceContentionError(name, MAX_NEXT_ATTEMPTS)\n }\n}\n"],"mappings":"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","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ValidationError
3
- } from "./chunk-QZWTRENR.js";
3
+ } from "./chunk-AR5D76T2.js";
4
4
 
5
5
  // src/with-audit/periods/window.ts
6
6
  var PERIODS_COLLECTION = "_periods";
@@ -21,4 +21,4 @@ export {
21
21
  PERIOD_TARGET_PURGES_COLLECTION,
22
22
  periodExclusiveUpperBound
23
23
  };
24
- //# sourceMappingURL=chunk-NM5UYF6Q.js.map
24
+ //# sourceMappingURL=chunk-SBGXQK5I.js.map
@@ -4,10 +4,10 @@ import {
4
4
  persistUserVisibility,
5
5
  readUserVisibility,
6
6
  saveUserEnvelope
7
- } from "./chunk-2BET5QTS.js";
7
+ } from "./chunk-6PFST3FC.js";
8
8
  import {
9
9
  PolicyDeniedError
10
- } from "./chunk-QZWTRENR.js";
10
+ } from "./chunk-AR5D76T2.js";
11
11
 
12
12
  // src/with-party/directory/user-envelope/api.ts
13
13
  var UserApi = class {
@@ -379,4 +379,4 @@ export {
379
379
  UserApi,
380
380
  createUserApi
381
381
  };
382
- //# sourceMappingURL=chunk-SF2ZIRD6.js.map
382
+ //# sourceMappingURL=chunk-SL3PLML2.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  SCHEMAS_COLLECTION
3
- } from "./chunk-KD4HGBJV.js";
3
+ } from "./chunk-Q6MXHDSE.js";
4
4
  import {
5
5
  BLOB_CHUNKS_COLLECTION,
6
6
  BLOB_COLLECTION,
@@ -8,11 +8,11 @@ import {
8
8
  BLOB_INTENT_COLLECTION,
9
9
  BLOB_SLOTS_PREFIX,
10
10
  BLOB_VERSIONS_PREFIX
11
- } from "./chunk-WYUAEZSC.js";
11
+ } from "./chunk-ELJOLQIG.js";
12
12
  import {
13
13
  assembleBundleContainer,
14
14
  buildExtractedPartitionWrapper
15
- } from "./chunk-JEI6JJNI.js";
15
+ } from "./chunk-KDWBVCIX.js";
16
16
  import {
17
17
  generateULID
18
18
  } from "./chunk-ZJADGNYF.js";
@@ -23,11 +23,11 @@ import {
23
23
  canonicalJson,
24
24
  envelopePayloadHash,
25
25
  hashEntry
26
- } from "./chunk-DQZXPGGZ.js";
26
+ } from "./chunk-V3EGXDFN.js";
27
27
  import {
28
28
  openEnvelopeJson,
29
29
  writeEnvelopeBody
30
- } from "./chunk-SU6SGWXM.js";
30
+ } from "./chunk-623QEHDB.js";
31
31
  import {
32
32
  bufferToBase64,
33
33
  decrypt,
@@ -37,14 +37,14 @@ import {
37
37
  generateDEK,
38
38
  unwrapCek,
39
39
  wrapCek
40
- } from "./chunk-AKKRXT23.js";
40
+ } from "./chunk-RPWMDIGK.js";
41
41
  import {
42
42
  NOYDB_BACKUP_VERSION,
43
43
  NOYDB_FORMAT_VERSION
44
44
  } from "./chunk-77AEMXFA.js";
45
45
  import {
46
46
  PartitionExtractionError
47
- } from "./chunk-QZWTRENR.js";
47
+ } from "./chunk-AR5D76T2.js";
48
48
 
49
49
  // src/with-cargo/walk-closure.ts
50
50
  async function walkClosure(vault, opts) {
@@ -492,4 +492,4 @@ export {
492
492
  extractPartition,
493
493
  extractPartitionCore
494
494
  };
495
- //# sourceMappingURL=chunk-3ECU57YH.js.map
495
+ //# sourceMappingURL=chunk-TJOUKMWF.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  SealedRecordNotEnabledError
3
- } from "./chunk-QZWTRENR.js";
3
+ } from "./chunk-AR5D76T2.js";
4
4
 
5
5
  // src/with-audit/sealed-record/strategy.ts
6
6
  var NO_SEALED_RECORD = {
@@ -18,4 +18,4 @@ var NO_SEALED_RECORD = {
18
18
  export {
19
19
  NO_SEALED_RECORD
20
20
  };
21
- //# sourceMappingURL=chunk-QD46HPZG.js.map
21
+ //# sourceMappingURL=chunk-U2ID5A2I.js.map
@@ -4,13 +4,13 @@ import {
4
4
  import {
5
5
  base64ToBuffer,
6
6
  bufferToBase64
7
- } from "./chunk-AKKRXT23.js";
7
+ } from "./chunk-RPWMDIGK.js";
8
8
  import {
9
9
  SessionExpiredError,
10
10
  SessionNotFoundError,
11
11
  SessionPolicyError,
12
12
  ValidationError
13
- } from "./chunk-QZWTRENR.js";
13
+ } from "./chunk-AR5D76T2.js";
14
14
 
15
15
  // src/with-party/session/session.ts
16
16
  var subtle = globalThis.crypto.subtle;
@@ -364,4 +364,4 @@ export {
364
364
  clearDevUnlock,
365
365
  isDevUnlockActive
366
366
  };
367
- //# sourceMappingURL=chunk-X4MVWPHV.js.map
367
+ //# sourceMappingURL=chunk-UC5Y7OEJ.js.map
@@ -2,7 +2,7 @@ import {
2
2
  grant,
3
3
  revoke,
4
4
  rotateKeys
5
- } from "./chunk-Q5YJCVJY.js";
5
+ } from "./chunk-FZAP4JNC.js";
6
6
 
7
7
  // src/with-party/team/active.ts
8
8
  function withTeam() {
@@ -22,4 +22,4 @@ function withTeam() {
22
22
  export {
23
23
  withTeam
24
24
  };
25
- //# sourceMappingURL=chunk-SBHN6QUT.js.map
25
+ //# sourceMappingURL=chunk-US2AR4BI.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  envelopeBodyForHash
3
- } from "./chunk-SU6SGWXM.js";
3
+ } from "./chunk-623QEHDB.js";
4
4
  import {
5
5
  sha256Hex
6
- } from "./chunk-AKKRXT23.js";
6
+ } from "./chunk-RPWMDIGK.js";
7
7
 
8
8
  // src/with-commit/history/ledger/entry.ts
9
9
  function canonicalJson(value) {
@@ -67,4 +67,4 @@ export {
67
67
  parseIndex,
68
68
  envelopePayloadHash
69
69
  };
70
- //# sourceMappingURL=chunk-DQZXPGGZ.js.map
70
+ //# sourceMappingURL=chunk-V3EGXDFN.js.map
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  openEnvelopeJson
3
- } from "./chunk-SU6SGWXM.js";
3
+ } from "./chunk-623QEHDB.js";
4
4
  import {
5
5
  encrypt,
6
6
  hmacSha256Hex,
7
7
  sha256Hex
8
- } from "./chunk-AKKRXT23.js";
8
+ } from "./chunk-RPWMDIGK.js";
9
9
  import {
10
10
  NOYDB_FORMAT_VERSION
11
11
  } from "./chunk-77AEMXFA.js";
@@ -147,4 +147,4 @@ export {
147
147
  coerceSubjectId,
148
148
  readDottedPath
149
149
  };
150
- //# sourceMappingURL=chunk-ZHDSUZQU.js.map
150
+ //# sourceMappingURL=chunk-V4O6YZSP.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  sha256Hex
3
- } from "./chunk-AKKRXT23.js";
3
+ } from "./chunk-RPWMDIGK.js";
4
4
  import {
5
5
  MaterializedViewSourceUnknownError
6
- } from "./chunk-QZWTRENR.js";
6
+ } from "./chunk-AR5D76T2.js";
7
7
 
8
8
  // src/with-formula/materialized-views/dependency-analyzer.ts
9
9
  function analyzeDependencies(query) {
@@ -366,4 +366,4 @@ export {
366
366
  MaterializedViewRegistry,
367
367
  wrapDbWithPredicates
368
368
  };
369
- //# sourceMappingURL=chunk-3HUYRN24.js.map
369
+ //# sourceMappingURL=chunk-W7C7MMIS.js.map
@@ -7,10 +7,10 @@ import {
7
7
  PERIOD_FREEZES_COLLECTION,
8
8
  PERIOD_TARGET_PURGES_COLLECTION,
9
9
  periodExclusiveUpperBound
10
- } from "./chunk-NM5UYF6Q.js";
10
+ } from "./chunk-SBGXQK5I.js";
11
11
  import {
12
12
  envelopeBodySize
13
- } from "./chunk-SU6SGWXM.js";
13
+ } from "./chunk-623QEHDB.js";
14
14
  import {
15
15
  isDeleteMarker,
16
16
  isTombstoneShape
@@ -21,14 +21,14 @@ import {
21
21
  derivePresenceKey,
22
22
  encrypt,
23
23
  generateIV
24
- } from "./chunk-AKKRXT23.js";
24
+ } from "./chunk-RPWMDIGK.js";
25
25
  import {
26
26
  NOYDB_SYNC_VERSION
27
27
  } from "./chunk-77AEMXFA.js";
28
28
  import {
29
- ConflictError,
30
- ValidationError
31
- } from "./chunk-QZWTRENR.js";
29
+ ValidationError,
30
+ isConflictError
31
+ } from "./chunk-AR5D76T2.js";
32
32
 
33
33
  // src/with-sync/presence.ts
34
34
  var PresenceHandle = class {
@@ -502,7 +502,7 @@ var SyncEngine = class {
502
502
  completed.push(i);
503
503
  pushed++;
504
504
  } catch (err) {
505
- if (err instanceof ConflictError) {
505
+ if (isConflictError(err)) {
506
506
  const remoteEnvelope = await this.remote.get(this.vault, entry.collection, entry.id);
507
507
  if (remoteEnvelope) {
508
508
  if (isTombstoneShape(remoteEnvelope)) {
@@ -528,7 +528,9 @@ var SyncEngine = class {
528
528
  );
529
529
  conflicts.push(conflict);
530
530
  if (handled === "local") {
531
- await this.remote.put(this.vault, entry.collection, entry.id, conflict.local);
531
+ const winner = this.advancePastRemote(conflict.local, remoteEnvelope);
532
+ await this.remote.put(this.vault, entry.collection, entry.id, winner);
533
+ if (winner !== conflict.local) await this.applyRemote(entry.collection, entry.id, winner);
532
534
  completed.push(i);
533
535
  pushed++;
534
536
  } else if (handled === "remote") {
@@ -787,7 +789,7 @@ var SyncEngine = class {
787
789
  completed.push(i);
788
790
  pushed++;
789
791
  } catch (err) {
790
- if (err instanceof ConflictError) {
792
+ if (isConflictError(err)) {
791
793
  const remoteEnvelope = await this.remote.get(this.vault, entry.collection, entry.id);
792
794
  if (remoteEnvelope) {
793
795
  if (isTombstoneShape(remoteEnvelope)) {
@@ -813,7 +815,9 @@ var SyncEngine = class {
813
815
  );
814
816
  conflicts.push(conflict);
815
817
  if (handled === "local") {
816
- await this.remote.put(this.vault, entry.collection, entry.id, conflict.local);
818
+ const winner = this.advancePastRemote(conflict.local, remoteEnvelope);
819
+ await this.remote.put(this.vault, entry.collection, entry.id, winner);
820
+ if (winner !== conflict.local) await this.applyRemote(entry.collection, entry.id, winner);
817
821
  completed.push(i);
818
822
  pushed++;
819
823
  } else if (handled === "remote") {
@@ -899,6 +903,21 @@ var SyncEngine = class {
899
903
  * ordinary put. `isTombstoneShape` covers a forgotten-elsewhere record arriving as a shred;
900
904
  * `isDeleteMarker` covers an ordinary (#589) delete — both route to the SAME 'delete' action
901
905
  * (sync delete ≠ forget: freshness only, no shred/residue channel on the receiving side). */
906
+ /**
907
+ * #936 — a local-wins resolution write must SUPERSEDE the remote, never
908
+ * overwrite it in place: when the winner's `_v` does not already exceed
909
+ * the remote's (the same-`_v` push tie), re-stamp it at `remote._v + 1`.
910
+ * Without this the loser's next pull sees no delta (`_v`-based
911
+ * detection) and the peers stay silently diverged at the same version.
912
+ * `_v` is envelope metadata — AEAD-unbound, and `_vdig` is deliberately
913
+ * `_v`-independent — so the engine may restamp ciphertext. Callers must
914
+ * mirror the advanced envelope locally (`applyRemote`) so both sides
915
+ * agree. The 'merged' branch needs none of this: resolver output is
916
+ * already stamped `max(local, remote) + 1`.
917
+ */
918
+ advancePastRemote(winner, remote) {
919
+ return winner._v > remote._v ? winner : { ...winner, _v: remote._v + 1 };
920
+ }
902
921
  async applyRemote(collection, id, envelope) {
903
922
  await this.local.put(this.vault, collection, id, envelope);
904
923
  if (this.pullByteSink !== null) {
@@ -1083,4 +1102,4 @@ export {
1083
1102
  SyncEngine,
1084
1103
  SyncTransaction
1085
1104
  };
1086
- //# sourceMappingURL=chunk-NLYALJMY.js.map
1105
+ //# sourceMappingURL=chunk-WFYKIDCS.js.map