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

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 (611) hide show
  1. package/README.md +3 -4
  2. package/dist/api-ZDKTWNBB.js +20 -0
  3. package/dist/attestation/index.js +18 -18
  4. package/dist/{backup-YPUEKIJC.js → backup-2UX7PRM5.js} +13 -13
  5. package/dist/blobs/index.js +30 -15
  6. package/dist/blobs/index.js.map +1 -1
  7. package/dist/broker/index.js +12 -12
  8. package/dist/broker/index.js.map +1 -1
  9. package/dist/cargo/index.js +58 -29
  10. package/dist/{chunk-IY23KFNZ.js → chunk-35NMVJ7I.js} +3 -3
  11. package/dist/{chunk-S3BFKGET.js → chunk-3HUYRN24.js} +4 -4
  12. package/dist/chunk-3HUYRN24.js.map +1 -0
  13. package/dist/{walk-IPLXE36W.js → chunk-3V3XR4S4.js} +4 -13
  14. package/dist/{walk-IPLXE36W.js.map → chunk-3V3XR4S4.js.map} +1 -1
  15. package/dist/{chunk-RTEK4C4I.js → chunk-4JQK3L4V.js} +2 -2
  16. package/dist/{chunk-3ELCWU56.js → chunk-4ZKNC6A6.js} +2 -2
  17. package/dist/{chunk-VQNJ7UZL.js → chunk-55LKVALY.js} +106 -10
  18. package/dist/chunk-55LKVALY.js.map +1 -0
  19. package/dist/{chunk-VAIS3SOM.js → chunk-55LX6FSX.js} +2 -2
  20. package/dist/chunk-5D2ALSM5.js +19 -0
  21. package/dist/chunk-5D2ALSM5.js.map +1 -0
  22. package/dist/{chunk-6HPG2YNX.js → chunk-5DRROK5W.js} +2 -2
  23. package/dist/{chunk-S6Q37VGE.js → chunk-5GQEU4DN.js} +2 -2
  24. package/dist/chunk-5JOFWL4G.js +25 -0
  25. package/dist/chunk-5JOFWL4G.js.map +1 -0
  26. package/dist/{chunk-ZXEZCY6F.js → chunk-63FE525P.js} +6 -6
  27. package/dist/chunk-6LJY7X5A.js +18 -0
  28. package/dist/chunk-6LJY7X5A.js.map +1 -0
  29. package/dist/{chunk-JVBO4SZL.js → chunk-6UBZ6I5Z.js} +2 -2
  30. package/dist/{chunk-BOKIKJJB.js → chunk-6ZNSB3H6.js} +5 -17
  31. package/dist/chunk-6ZNSB3H6.js.map +1 -0
  32. package/dist/{chunk-IK43HLDQ.js → chunk-7YVBQJ7K.js} +13 -355
  33. package/dist/chunk-7YVBQJ7K.js.map +1 -0
  34. package/dist/{chunk-VRBTNCM4.js → chunk-ABS7FMMD.js} +6 -6
  35. package/dist/chunk-AFHQATY4.js +47 -0
  36. package/dist/chunk-AFHQATY4.js.map +1 -0
  37. package/dist/{chunk-HOONYZY2.js → chunk-AKKRXT23.js} +7 -7
  38. package/dist/chunk-AKKRXT23.js.map +1 -0
  39. package/dist/{chunk-DDHM2TLX.js → chunk-AT2JJEKJ.js} +4 -4
  40. package/dist/chunk-AT2JJEKJ.js.map +1 -0
  41. package/dist/{chunk-M75ZZHSR.js → chunk-BLBAQRBM.js} +2 -2
  42. package/dist/{chunk-554KLAAN.js → chunk-BLCWSJLN.js} +88 -81
  43. package/dist/chunk-BLCWSJLN.js.map +1 -0
  44. package/dist/chunk-CADUYBQD.js +151 -0
  45. package/dist/chunk-CADUYBQD.js.map +1 -0
  46. package/dist/{chunk-WOM2HTML.js → chunk-CI32CAFS.js} +5 -5
  47. package/dist/{chunk-FH52K7EG.js → chunk-CUZLNGD5.js} +2 -6
  48. package/dist/{chunk-FH52K7EG.js.map → chunk-CUZLNGD5.js.map} +1 -1
  49. package/dist/{chunk-U6JMEH2P.js → chunk-CXQW2NWO.js} +145 -3
  50. package/dist/chunk-CXQW2NWO.js.map +1 -0
  51. package/dist/{chunk-EO43ANYJ.js → chunk-DABACXEF.js} +3 -3
  52. package/dist/{chunk-CJ5KKU6X.js → chunk-DMH3VZU5.js} +4 -4
  53. package/dist/chunk-DSDXAKIP.js +50 -0
  54. package/dist/chunk-DSDXAKIP.js.map +1 -0
  55. package/dist/{chunk-WZSHL6DQ.js → chunk-DZ2JXHWK.js} +5 -5
  56. package/dist/chunk-DZFQVICS.js +23 -0
  57. package/dist/chunk-DZFQVICS.js.map +1 -0
  58. package/dist/chunk-E23UGFVC.js +63 -0
  59. package/dist/chunk-E23UGFVC.js.map +1 -0
  60. package/dist/{chunk-Z4PD65VQ.js → chunk-EE7UHLKH.js} +4 -4
  61. package/dist/chunk-EIPVYUEP.js +654 -0
  62. package/dist/chunk-EIPVYUEP.js.map +1 -0
  63. package/dist/{chunk-RNG4VRP4.js → chunk-EKRSCRNM.js} +3 -3
  64. package/dist/{chunk-YMUGBZN2.js → chunk-FQ5CHJR7.js} +1 -1
  65. package/dist/chunk-FQ5CHJR7.js.map +1 -0
  66. package/dist/{chunk-RFI7GGFO.js → chunk-FQZ6XTQ7.js} +17 -20
  67. package/dist/chunk-FQZ6XTQ7.js.map +1 -0
  68. package/dist/{chunk-MT62YSPZ.js → chunk-FRMPM7WG.js} +4 -4
  69. package/dist/{chunk-W4TCUGQR.js → chunk-G2JUIDFA.js} +13 -9
  70. package/dist/{chunk-W4TCUGQR.js.map → chunk-G2JUIDFA.js.map} +1 -1
  71. package/dist/{chunk-T3GY65MA.js → chunk-G6WWZNJP.js} +13 -13
  72. package/dist/chunk-G6WWZNJP.js.map +1 -0
  73. package/dist/chunk-GJW4HX2O.js +1 -0
  74. package/dist/{chunk-KS6SAVCZ.js → chunk-GU3IP74F.js} +6 -6
  75. package/dist/{chunk-UHNGNKLV.js → chunk-GWWOGNBK.js} +308 -18
  76. package/dist/chunk-GWWOGNBK.js.map +1 -0
  77. package/dist/{chunk-5PFOMHTB.js → chunk-H2GPHUZD.js} +12 -13
  78. package/dist/chunk-H2GPHUZD.js.map +1 -0
  79. package/dist/{chunk-H2KSZMIX.js → chunk-HMU5P6RL.js} +5 -5
  80. package/dist/chunk-HMU5P6RL.js.map +1 -0
  81. package/dist/{chunk-JFCV5QIK.js → chunk-I5GEJX3R.js} +5 -5
  82. package/dist/chunk-I5GEJX3R.js.map +1 -0
  83. package/dist/{chunk-GWKAVKHI.js → chunk-IG6KUWBX.js} +2 -2
  84. package/dist/chunk-IG6KUWBX.js.map +1 -0
  85. package/dist/{chunk-LVGTA624.js → chunk-IPUG56GJ.js} +15 -5
  86. package/dist/{chunk-LVGTA624.js.map → chunk-IPUG56GJ.js.map} +1 -1
  87. package/dist/{chunk-SMIRGMS7.js → chunk-IXNCZTWA.js} +2 -2
  88. package/dist/{chunk-WQIYTNJV.js → chunk-IXTSNGYY.js} +3 -3
  89. package/dist/{chunk-WHXXI3W5.js → chunk-IYZISPGD.js} +7 -5
  90. package/dist/chunk-IYZISPGD.js.map +1 -0
  91. package/dist/{chunk-HQBM64EE.js → chunk-JDOMW53O.js} +145 -16
  92. package/dist/chunk-JDOMW53O.js.map +1 -0
  93. package/dist/{chunk-NCCBLYEB.js → chunk-JJZGIE4U.js} +6 -5
  94. package/dist/{chunk-DRWBEDYO.js → chunk-JYJFGD2H.js} +2 -2
  95. package/dist/{chunk-TAGR72IR.js → chunk-KRCBZYTZ.js} +26 -177
  96. package/dist/chunk-KRCBZYTZ.js.map +1 -0
  97. package/dist/{chunk-DSBQODMZ.js → chunk-L2DGWBCT.js} +14 -14
  98. package/dist/chunk-L2DGWBCT.js.map +1 -0
  99. package/dist/{chunk-VEALDPHW.js → chunk-L3YYLT4E.js} +15 -2
  100. package/dist/chunk-L3YYLT4E.js.map +1 -0
  101. package/dist/{chunk-FXZDAV62.js → chunk-LNPUSMZL.js} +29 -31
  102. package/dist/chunk-LNPUSMZL.js.map +1 -0
  103. package/dist/{chunk-XJMBYYQK.js → chunk-LNZKOUJR.js} +2 -2
  104. package/dist/{chunk-R3BLCFD2.js → chunk-MBKVNOJS.js} +6 -6
  105. package/dist/chunk-MCHBCNCE.js +367 -0
  106. package/dist/chunk-MCHBCNCE.js.map +1 -0
  107. package/dist/{chunk-VCBHAE4R.js → chunk-MHMLXJ3I.js} +2 -2
  108. package/dist/chunk-MHMLXJ3I.js.map +1 -0
  109. package/dist/{chunk-WNGGJWF7.js → chunk-MSMJJB4J.js} +2 -2
  110. package/dist/chunk-MSMJJB4J.js.map +1 -0
  111. package/dist/{chunk-T36RFODW.js → chunk-MXUT7FTE.js} +2 -2
  112. package/dist/chunk-MXUT7FTE.js.map +1 -0
  113. package/dist/{chunk-WG4QBZDN.js → chunk-N4BBNYIB.js} +11 -9
  114. package/dist/chunk-N4BBNYIB.js.map +1 -0
  115. package/dist/{chunk-PK6JIDQ4.js → chunk-NFIBXF4V.js} +1084 -1583
  116. package/dist/chunk-NFIBXF4V.js.map +1 -0
  117. package/dist/{chunk-VKCADNMR.js → chunk-NFNJLRY7.js} +368 -52
  118. package/dist/chunk-NFNJLRY7.js.map +1 -0
  119. package/dist/{chunk-N6WF5PKC.js → chunk-NFZGZ4AK.js} +2 -2
  120. package/dist/{chunk-JRBNCUNT.js → chunk-NGSJZFGL.js} +21 -4
  121. package/dist/chunk-NGSJZFGL.js.map +1 -0
  122. package/dist/chunk-NJ4DYYO5.js +81 -0
  123. package/dist/chunk-NJ4DYYO5.js.map +1 -0
  124. package/dist/chunk-NM5UYF6Q.js +24 -0
  125. package/dist/chunk-NM5UYF6Q.js.map +1 -0
  126. package/dist/{chunk-JBBSYJHP.js → chunk-NYEFP7DY.js} +4 -4
  127. package/dist/chunk-NYEFP7DY.js.map +1 -0
  128. package/dist/{chunk-GDG5VVYG.js → chunk-NZ24MX4J.js} +8 -46
  129. package/dist/chunk-NZ24MX4J.js.map +1 -0
  130. package/dist/{chunk-IFJTPAQQ.js → chunk-OLEPKFTW.js} +4 -4
  131. package/dist/chunk-OLEPKFTW.js.map +1 -0
  132. package/dist/{chunk-THVIPWRF.js → chunk-PEATRIYJ.js} +9 -9
  133. package/dist/chunk-PEOZ34EM.js +13 -0
  134. package/dist/chunk-PEOZ34EM.js.map +1 -0
  135. package/dist/{chunk-UC2ETWF3.js → chunk-PTHKZWEH.js} +2 -14
  136. package/dist/{chunk-UC2ETWF3.js.map → chunk-PTHKZWEH.js.map} +1 -1
  137. package/dist/chunk-PVEWA2DU.js +23 -0
  138. package/dist/chunk-PVEWA2DU.js.map +1 -0
  139. package/dist/{chunk-VCTXU4AT.js → chunk-QBAC3GXA.js} +1 -1
  140. package/dist/chunk-QBAC3GXA.js.map +1 -0
  141. package/dist/{chunk-RDXW3OBQ.js → chunk-QD46HPZG.js} +2 -2
  142. package/dist/chunk-QD46HPZG.js.map +1 -0
  143. package/dist/{chunk-YZQOGE2L.js → chunk-QDIH2744.js} +2 -2
  144. package/dist/{chunk-6HY2X62D.js → chunk-QJNCB5SK.js} +2 -2
  145. package/dist/{chunk-IAO54J4R.js → chunk-QX76XVQH.js} +6 -6
  146. package/dist/chunk-QX76XVQH.js.map +1 -0
  147. package/dist/{chunk-W2OG6JOL.js → chunk-QZWTRENR.js} +24 -7
  148. package/dist/chunk-QZWTRENR.js.map +1 -0
  149. package/dist/{chunk-6NQMXTYC.js → chunk-RO5NM6UI.js} +2 -2
  150. package/dist/chunk-RO5NM6UI.js.map +1 -0
  151. package/dist/chunk-SGDPRCC4.js +1075 -0
  152. package/dist/chunk-SGDPRCC4.js.map +1 -0
  153. package/dist/{chunk-2PCAVW2I.js → chunk-SHEEBRZ4.js} +2 -2
  154. package/dist/chunk-SMY5X46Z.js +14 -0
  155. package/dist/chunk-SMY5X46Z.js.map +1 -0
  156. package/dist/{chunk-ISMV2QVG.js → chunk-TG634KCO.js} +11 -2
  157. package/dist/chunk-TG634KCO.js.map +1 -0
  158. package/dist/{chunk-XUW3PXHU.js → chunk-TUXQSFHZ.js} +4 -16
  159. package/dist/{chunk-XUW3PXHU.js.map → chunk-TUXQSFHZ.js.map} +1 -1
  160. package/dist/{chunk-GULTLPFB.js → chunk-UADPR6F4.js} +3 -3
  161. package/dist/{chunk-GULTLPFB.js.map → chunk-UADPR6F4.js.map} +1 -1
  162. package/dist/{chunk-XTHCN77N.js → chunk-UDHBXYGG.js} +29 -19
  163. package/dist/chunk-UDHBXYGG.js.map +1 -0
  164. package/dist/{chunk-RA5VTXXG.js → chunk-V6UQZA2H.js} +2 -2
  165. package/dist/chunk-VG2ZSFYD.js +32 -0
  166. package/dist/chunk-VG2ZSFYD.js.map +1 -0
  167. package/dist/chunk-VKQCVU2Z.js +21 -0
  168. package/dist/chunk-VKQCVU2Z.js.map +1 -0
  169. package/dist/{chunk-QDPZWTN2.js → chunk-W3G5REIU.js} +2 -2
  170. package/dist/{chunk-A4FXFAKF.js → chunk-W3L64Y3J.js} +2 -2
  171. package/dist/{chunk-ONTBCHCP.js → chunk-W66AM5IB.js} +2 -2
  172. package/dist/chunk-W66AM5IB.js.map +1 -0
  173. package/dist/{chunk-A5BDDEXK.js → chunk-WBKZUO5V.js} +26 -43
  174. package/dist/chunk-WBKZUO5V.js.map +1 -0
  175. package/dist/{chunk-XDIAFPUM.js → chunk-WLXMTYGO.js} +2 -2
  176. package/dist/{chunk-RJ6K6K5M.js → chunk-X3F5YJG2.js} +2 -2
  177. package/dist/{chunk-WKGF2TJR.js → chunk-X45JYIAY.js} +3 -3
  178. package/dist/chunk-X45JYIAY.js.map +1 -0
  179. package/dist/{chunk-6XE5TMPR.js → chunk-X4MVWPHV.js} +3 -3
  180. package/dist/chunk-X4MVWPHV.js.map +1 -0
  181. package/dist/chunk-XZHEOSQ2.js +16 -0
  182. package/dist/chunk-XZHEOSQ2.js.map +1 -0
  183. package/dist/chunk-Y2NBBT6K.js +18 -0
  184. package/dist/chunk-Y2NBBT6K.js.map +1 -0
  185. package/dist/{chunk-CZTLE22N.js → chunk-Y2NJBNX3.js} +8 -8
  186. package/dist/{chunk-CZTLE22N.js.map → chunk-Y2NJBNX3.js.map} +1 -1
  187. package/dist/{chunk-YTGDPCPW.js → chunk-Y6B6HVKC.js} +2 -2
  188. package/dist/chunk-YMUFFJCO.js +23 -0
  189. package/dist/chunk-YMUFFJCO.js.map +1 -0
  190. package/dist/{chunk-SV6EAJEP.js → chunk-YWWQM7KP.js} +5 -14
  191. package/dist/chunk-YWWQM7KP.js.map +1 -0
  192. package/dist/{chunk-UDSR4X4L.js → chunk-YZJSJOUI.js} +239 -16
  193. package/dist/chunk-YZJSJOUI.js.map +1 -0
  194. package/dist/{chunk-5WZXVULX.js → chunk-ZTLOXFPB.js} +2 -2
  195. package/dist/chunk-ZTLOXFPB.js.map +1 -0
  196. package/dist/classified/index.js +5 -5
  197. package/dist/{classified-marker-QWMASIT7.js → classified-marker-7PKJBFCG.js} +3 -3
  198. package/dist/collection-facade-6I5K5IOD.js +45 -0
  199. package/dist/{computed-DSMPXG2Y.js → computed-AB45PS4V.js} +3 -3
  200. package/dist/consent/index.js +13 -9
  201. package/dist/consent/index.js.map +1 -1
  202. package/dist/cover/index.js +37 -0
  203. package/dist/crdt/index.js +4 -0
  204. package/dist/crdt/index.js.map +1 -1
  205. package/dist/custody/index.js +26 -0
  206. package/dist/{dead-filter-66VGI6JV.js → dead-filter-FL3WIUZS.js} +2 -2
  207. package/dist/{chunk-OCVM6KDH.js → delegation-QXZ4MPPH.js} +12 -6
  208. package/dist/{chunk-OCVM6KDH.js.map → delegation-QXZ4MPPH.js.map} +1 -1
  209. package/dist/derivations/index.js +12 -12
  210. package/dist/derive-VGS7FKE3.js +22 -0
  211. package/dist/directory/index.js +46 -0
  212. package/dist/dispatch-EGGC7UD7.js +72 -0
  213. package/dist/dispatch-EGGC7UD7.js.map +1 -0
  214. package/dist/dispatch-GDSTUTVP.js +194 -0
  215. package/dist/dispatch-GDSTUTVP.js.map +1 -0
  216. package/dist/{enclave-TKPN2G2U.js → enclave-SPEEDYZ4.js} +13 -11
  217. package/dist/executor-IEBLTBCW.js +9 -0
  218. package/dist/executor-OTF556PL.js +28 -0
  219. package/dist/executor-RM7XWQDU.js +9 -0
  220. package/dist/export-accessible-P42BQ4PB.js +23 -0
  221. package/dist/extract-partition-TCYXRWBN.js +38 -0
  222. package/dist/{fanout-sidecar-B5LVUMQX.js → fanout-sidecar-SSMRSC2L.js} +9 -9
  223. package/dist/find-OZMTRIK3.js +11 -0
  224. package/dist/forget/index.js +11 -11
  225. package/dist/forget/index.js.map +1 -1
  226. package/dist/guards/index.js +4 -4
  227. package/dist/history/index.js +16 -12
  228. package/dist/history/index.js.map +1 -1
  229. package/dist/i18n/index.js +16 -14
  230. package/dist/i18n/index.js.map +1 -1
  231. package/dist/index.d.ts +42 -42
  232. package/dist/index.js +332 -2106
  233. package/dist/index.js.map +1 -1
  234. package/dist/indexing/index.js +4 -2
  235. package/dist/indexing/index.js.map +1 -1
  236. package/dist/introspection/index.js +28 -0
  237. package/dist/issue-FCKN5O6C.js +19 -0
  238. package/dist/kernel/best-effort-revert.d.ts +9 -1
  239. package/dist/kernel/collection-config.d.ts +12 -70
  240. package/dist/kernel/collection.d.ts +11 -23
  241. package/dist/kernel/enclave/crypto.d.ts +8 -8
  242. package/dist/kernel/enclave/index.d.ts +4 -4
  243. package/dist/kernel/enclave/record-keys/envelope-body.d.ts +8 -0
  244. package/dist/kernel/errors.d.ts +41 -22
  245. package/dist/kernel/lazy.d.ts +30 -0
  246. package/dist/kernel/noydb.d.ts +81 -124
  247. package/dist/kernel/query/builder.d.ts +10 -10
  248. package/dist/kernel/query/index.d.ts +0 -6
  249. package/dist/kernel/query/scan-builder.d.ts +4 -4
  250. package/dist/kernel/sync-policy.d.ts +76 -4
  251. package/dist/kernel/types.d.ts +187 -86
  252. package/dist/kernel/validation.d.ts +33 -33
  253. package/dist/kernel/vault.d.ts +41 -229
  254. package/dist/kernel/via/dispatch.d.ts +7 -0
  255. package/dist/{ledger-PTK7XZYT.js → ledger-6XBEVWYP.js} +11 -11
  256. package/dist/liberate-CYUOS4NC.js +24 -0
  257. package/dist/{link-set-SLJHDNRB.js → link-set-NK6L2A5S.js} +11 -11
  258. package/dist/materialized-views/index.js +22 -19
  259. package/dist/money/index.js +31 -0
  260. package/dist/noydb-FZZIMLCI.js +81 -0
  261. package/dist/overlay-views/index.js +4 -4
  262. package/dist/periods/index.js +21 -17
  263. package/dist/pod/index.js +26 -12
  264. package/dist/{policy-YDLCOX4P.js → policy/index.js} +6 -6
  265. package/dist/port/with/archive-strategy.d.ts +31 -0
  266. package/dist/port/with/blob-strategy.d.ts +15 -5
  267. package/dist/port/with/collection-options.d.ts +171 -0
  268. package/dist/port/with/collection-registries.d.ts +62 -0
  269. package/dist/port/with/strategies.d.ts +134 -0
  270. package/dist/port/with/team-strategy.d.ts +3 -2
  271. package/dist/portability/index.js +8 -8
  272. package/dist/{post-register-2YHSADFI.js → post-register-VFIYISUK.js} +6 -6
  273. package/dist/query/index.js +6 -46
  274. package/dist/{aggregate → reduce}/index.js +24 -17
  275. package/dist/reduce/index.js.map +1 -0
  276. package/dist/register-UKU2J6MN.js +25 -0
  277. package/dist/registry-2VCWVHZS.js +19 -0
  278. package/dist/registry-7Y5WF7GS.js +9 -0
  279. package/dist/{registry-VW6P6A3J.js → registry-BWD2ED52.js} +2 -2
  280. package/dist/registry-DTWRJLSF.js +18 -0
  281. package/dist/request-withdrawal-JYDZ5XY2.js +31 -0
  282. package/dist/{reveal-HWO4YMTJ.js → reveal-CL2BCW6A.js} +6 -6
  283. package/dist/revoke-2TSAD2T4.js +24 -0
  284. package/dist/satellites/index.js +1 -1
  285. package/dist/schema-update/index.js +26 -0
  286. package/dist/sealed-record/index.js +12 -12
  287. package/dist/search/index.js +36 -0
  288. package/dist/{seed-3ZMF5EQA.js → seed-NUVJEL7T.js} +12 -12
  289. package/dist/seed-NUVJEL7T.js.map +1 -0
  290. package/dist/sequence/index.js +30 -0
  291. package/dist/session/index.js +13 -9
  292. package/dist/session/index.js.map +1 -1
  293. package/dist/shadow/index.js +6 -2
  294. package/dist/shadow/index.js.map +1 -1
  295. package/dist/share-link/index.d.ts +19 -0
  296. package/dist/share-link/index.js +201 -0
  297. package/dist/share-link/index.js.map +1 -0
  298. package/dist/share-link/share-link.d.ts +123 -0
  299. package/dist/signer-K7Z2EOMG.js +25 -0
  300. package/dist/snapshots/index.js +14 -10
  301. package/dist/snapshots/index.js.map +1 -1
  302. package/dist/{stale-VZL4OGUB.js → stale-A4J26OIC.js} +11 -10
  303. package/dist/storage-YVHZUISN.js +23 -0
  304. package/dist/store/index.js +22 -0
  305. package/dist/{store-coordination-provider-FKX3F6TQ.js → store-coordination-provider-EWRZL7XF.js} +3 -3
  306. package/dist/sync/index.js +15 -11
  307. package/dist/sync/index.js.map +1 -1
  308. package/dist/team/index.js +33 -47
  309. package/dist/tiers/index.js +10 -10
  310. package/dist/to/index.js +1 -1
  311. package/dist/{tx → transactions}/index.js +7 -3
  312. package/dist/transactions/index.js.map +1 -0
  313. package/dist/util/index.js +1 -1
  314. package/dist/{verify-26Y5GNMK.js → verify-7XWHJWUN.js} +5 -5
  315. package/dist/via/blob/active.d.ts +23 -7
  316. package/dist/via/blob/binding.d.ts +1 -1
  317. package/dist/via/blob/index.d.ts +7 -1
  318. package/dist/via/i18n/core.d.ts +1 -1
  319. package/dist/via/i18n/index.d.ts +2 -0
  320. package/dist/via/money/money-reducer.d.ts +2 -2
  321. package/dist/walk-P5D6CF4V.js +21 -0
  322. package/dist/with-audit/consent/index.d.ts +2 -0
  323. package/dist/with-audit/forget/active.d.ts +3 -3
  324. package/dist/with-audit/forget/index.d.ts +6 -5
  325. package/dist/with-audit/forget/strategy.d.ts +3 -3
  326. package/dist/with-audit/guards/executor.d.ts +4 -4
  327. package/dist/with-audit/guards/immutable-guard.d.ts +3 -3
  328. package/dist/with-audit/guards/index.d.ts +1 -1
  329. package/dist/with-audit/guards/registry.d.ts +3 -3
  330. package/dist/with-audit/guards/transition-guard.d.ts +3 -3
  331. package/dist/with-audit/guards/types.d.ts +10 -10
  332. package/dist/with-audit/guards/with-guard.d.ts +2 -2
  333. package/dist/with-audit/periods/index.d.ts +2 -0
  334. package/dist/with-audit/periods/periods.d.ts +1 -16
  335. package/dist/with-audit/periods/vault-facade.d.ts +6 -0
  336. package/dist/with-audit/periods/window.d.ts +16 -0
  337. package/dist/with-audit/portability/export-accessible.d.ts +4 -4
  338. package/dist/with-audit/portability/request-withdrawal.d.ts +3 -3
  339. package/dist/with-audit/portability/withdraw-accessible.d.ts +2 -2
  340. package/dist/with-audit/sealed-record/strategy.d.ts +1 -1
  341. package/dist/with-audit/tiers/index.d.ts +1 -0
  342. package/dist/with-cargo/adopt-partition.d.ts +7 -7
  343. package/dist/{legacy/kernel.d.ts → with-cargo/floor.d.ts} +4 -4
  344. package/dist/with-cargo/index.d.ts +15 -2
  345. package/dist/with-commit/crdt/index.d.ts +2 -0
  346. package/dist/with-commit/history/index.d.ts +2 -0
  347. package/dist/with-commit/history/time-machine.d.ts +2 -2
  348. package/dist/with-commit/numbering/descriptor.d.ts +16 -6
  349. package/dist/with-commit/tx/active.d.ts +5 -5
  350. package/dist/with-commit/tx/index.d.ts +2 -2
  351. package/dist/with-commit/tx/invariants.d.ts +1 -1
  352. package/dist/with-commit/tx/strategy.d.ts +3 -3
  353. package/dist/with-fork/shadow/index.d.ts +2 -0
  354. package/dist/with-fork/snapshots/active.d.ts +2 -2
  355. package/dist/with-fork/snapshots/index.d.ts +3 -1
  356. package/dist/with-fork/snapshots/noydb-facade.d.ts +3 -3
  357. package/dist/with-fork/snapshots/strategy.d.ts +2 -2
  358. package/dist/with-formula/derivations/dispatch.d.ts +98 -0
  359. package/dist/with-formula/derivations/executor.d.ts +2 -2
  360. package/dist/with-formula/derivations/index.d.ts +4 -1
  361. package/dist/with-formula/derivations/registry.d.ts +3 -3
  362. package/dist/with-formula/derivations/stale.d.ts +2 -2
  363. package/dist/with-formula/derivations/types.d.ts +3 -3
  364. package/dist/with-formula/derivations/with-derivation.d.ts +2 -2
  365. package/dist/with-formula/derivations/with-rollup.d.ts +15 -8
  366. package/dist/with-formula/materialized-views/dependency-analyzer.d.ts +3 -3
  367. package/dist/with-formula/materialized-views/dispatch.d.ts +75 -0
  368. package/dist/with-formula/materialized-views/index.d.ts +2 -1
  369. package/dist/with-formula/materialized-views/registry.d.ts +4 -4
  370. package/dist/with-formula/materialized-views/types.d.ts +11 -11
  371. package/dist/with-formula/materialized-views/with-materialized-view.d.ts +2 -2
  372. package/dist/with-formula/overlay-views/index.d.ts +1 -1
  373. package/dist/with-formula/overlay-views/registry.d.ts +4 -4
  374. package/dist/with-formula/overlay-views/types.d.ts +3 -3
  375. package/dist/with-formula/overlay-views/virtual-collection.d.ts +2 -2
  376. package/dist/with-formula/overlay-views/with-overlayed-view.d.ts +2 -2
  377. package/dist/with-lookup/indexing/active.d.ts +5 -5
  378. package/dist/with-lookup/indexing/index.d.ts +3 -1
  379. package/dist/with-lookup/indexing/strategy.d.ts +3 -3
  380. package/dist/with-lookup/{aggregate → reduce}/active.d.ts +8 -8
  381. package/dist/with-lookup/{aggregate → reduce}/groupby.d.ts +21 -21
  382. package/dist/with-lookup/reduce/index.d.ts +34 -0
  383. package/dist/with-lookup/{aggregate → reduce}/reducers.d.ts +11 -12
  384. package/dist/with-lookup/{aggregate/aggregation.d.ts → reduce/reduction.d.ts} +21 -21
  385. package/dist/with-lookup/{aggregate → reduce}/strategy.d.ts +15 -15
  386. package/dist/with-lookup/search/build-docs.d.ts +7 -2
  387. package/dist/with-lookup/search/index.d.ts +1 -1
  388. package/dist/with-party/broker/index.d.ts +1 -0
  389. package/dist/with-party/broker/seed.d.ts +1 -1
  390. package/dist/with-party/custody/liberate.d.ts +3 -3
  391. package/dist/with-party/directory/cover/index.d.ts +1 -5
  392. package/dist/with-party/directory/cover/schema.d.ts +0 -6
  393. package/dist/with-party/directory/cover/storage.d.ts +0 -8
  394. package/dist/with-party/directory/cover/types.d.ts +0 -21
  395. package/dist/with-party/directory/index.d.ts +2 -0
  396. package/dist/with-party/session/dev-unlock.d.ts +2 -2
  397. package/dist/with-party/session/index.d.ts +2 -0
  398. package/dist/with-party/session/session.d.ts +2 -2
  399. package/dist/with-party/team/deed.d.ts +8 -8
  400. package/dist/with-party/team/index.d.ts +4 -7
  401. package/dist/with-party/team/keyring.d.ts +83 -35
  402. package/dist/with-party/team/{managed-passphrase.d.ts → managed-secret.d.ts} +27 -27
  403. package/dist/with-party/team/noydb-facade.d.ts +43 -42
  404. package/dist/with-party/team/peer-recover.d.ts +13 -13
  405. package/dist/with-party/team/recovery.d.ts +5 -5
  406. package/dist/with-party/team/rotate-recover.d.ts +30 -30
  407. package/dist/with-pod/bundle.d.ts +30 -32
  408. package/dist/with-pod/format.d.ts +2 -2
  409. package/dist/with-pod/index.d.ts +2 -1
  410. package/dist/with-shape/blobs/blob-compaction.d.ts +43 -3
  411. package/dist/with-shape/blobs/blob-pinning.d.ts +112 -0
  412. package/dist/with-shape/blobs/blob-set.d.ts +86 -2
  413. package/dist/with-shape/introspection/index.d.ts +6 -0
  414. package/dist/with-shape/schema-update/index.d.ts +1 -0
  415. package/dist/with-store/index.d.ts +3 -2
  416. package/dist/with-store/route-store.d.ts +1 -1
  417. package/dist/{with-party/team/sync-active.d.ts → with-sync/active.d.ts} +1 -1
  418. package/dist/{with-party/team/sync-credentials.d.ts → with-sync/credentials.d.ts} +3 -3
  419. package/dist/{with-party/team/sync.d.ts → with-sync/engine.d.ts} +17 -4
  420. package/dist/{with-party/sync → with-sync}/index.d.ts +4 -2
  421. package/dist/with-sync/period-scope.d.ts +78 -0
  422. package/dist/{with-party/team → with-sync}/presence.d.ts +2 -2
  423. package/dist/{with-party/team/sync-strategy.d.ts → with-sync/strategy.d.ts} +6 -6
  424. package/dist/{with-party/team/sync-transaction.d.ts → with-sync/transaction.d.ts} +3 -3
  425. package/dist/withdraw-accessible-A2PWF5MZ.js +28 -0
  426. package/dist/withdraw-accessible-A2PWF5MZ.js.map +1 -0
  427. package/package.json +49 -36
  428. package/dist/aggregate/index.js.map +0 -1
  429. package/dist/api-3A3S4SHH.js +0 -20
  430. package/dist/as/index.js +0 -30
  431. package/dist/at/index.js +0 -1
  432. package/dist/bundle/index.js +0 -153
  433. package/dist/bundle/index.js.map +0 -1
  434. package/dist/by/index.js +0 -11
  435. package/dist/chunk-554KLAAN.js.map +0 -1
  436. package/dist/chunk-5PFOMHTB.js.map +0 -1
  437. package/dist/chunk-5WZXVULX.js.map +0 -1
  438. package/dist/chunk-6NQMXTYC.js.map +0 -1
  439. package/dist/chunk-6XE5TMPR.js.map +0 -1
  440. package/dist/chunk-A5BDDEXK.js.map +0 -1
  441. package/dist/chunk-ANATMTOA.js +0 -205
  442. package/dist/chunk-ANATMTOA.js.map +0 -1
  443. package/dist/chunk-BOKIKJJB.js.map +0 -1
  444. package/dist/chunk-CHFZDSE4.js +0 -1
  445. package/dist/chunk-DDHM2TLX.js.map +0 -1
  446. package/dist/chunk-DSBQODMZ.js.map +0 -1
  447. package/dist/chunk-EWPOHMN2.js +0 -255
  448. package/dist/chunk-EWPOHMN2.js.map +0 -1
  449. package/dist/chunk-FXZDAV62.js.map +0 -1
  450. package/dist/chunk-GDG5VVYG.js.map +0 -1
  451. package/dist/chunk-GWKAVKHI.js.map +0 -1
  452. package/dist/chunk-H2KSZMIX.js.map +0 -1
  453. package/dist/chunk-HOONYZY2.js.map +0 -1
  454. package/dist/chunk-HQBM64EE.js.map +0 -1
  455. package/dist/chunk-IAO54J4R.js.map +0 -1
  456. package/dist/chunk-IFJTPAQQ.js.map +0 -1
  457. package/dist/chunk-IK43HLDQ.js.map +0 -1
  458. package/dist/chunk-ISMV2QVG.js.map +0 -1
  459. package/dist/chunk-JBBSYJHP.js.map +0 -1
  460. package/dist/chunk-JFCV5QIK.js.map +0 -1
  461. package/dist/chunk-JRBNCUNT.js.map +0 -1
  462. package/dist/chunk-LB7FD65R.js +0 -163
  463. package/dist/chunk-LB7FD65R.js.map +0 -1
  464. package/dist/chunk-ONTBCHCP.js.map +0 -1
  465. package/dist/chunk-PK6JIDQ4.js.map +0 -1
  466. package/dist/chunk-RDXW3OBQ.js.map +0 -1
  467. package/dist/chunk-RFI7GGFO.js.map +0 -1
  468. package/dist/chunk-S3BFKGET.js.map +0 -1
  469. package/dist/chunk-SV6EAJEP.js.map +0 -1
  470. package/dist/chunk-T36RFODW.js.map +0 -1
  471. package/dist/chunk-T3GY65MA.js.map +0 -1
  472. package/dist/chunk-TAGR72IR.js.map +0 -1
  473. package/dist/chunk-TIGPQDYP.js +0 -14
  474. package/dist/chunk-TIGPQDYP.js.map +0 -1
  475. package/dist/chunk-U6JMEH2P.js.map +0 -1
  476. package/dist/chunk-UDSR4X4L.js.map +0 -1
  477. package/dist/chunk-UHNGNKLV.js.map +0 -1
  478. package/dist/chunk-VCBHAE4R.js.map +0 -1
  479. package/dist/chunk-VCTXU4AT.js.map +0 -1
  480. package/dist/chunk-VEALDPHW.js.map +0 -1
  481. package/dist/chunk-VKCADNMR.js.map +0 -1
  482. package/dist/chunk-VQNJ7UZL.js.map +0 -1
  483. package/dist/chunk-W2OG6JOL.js.map +0 -1
  484. package/dist/chunk-WG4QBZDN.js.map +0 -1
  485. package/dist/chunk-WHXXI3W5.js.map +0 -1
  486. package/dist/chunk-WKGF2TJR.js.map +0 -1
  487. package/dist/chunk-WNGGJWF7.js.map +0 -1
  488. package/dist/chunk-XTHCN77N.js.map +0 -1
  489. package/dist/chunk-YCH5GBN6.js +0 -99
  490. package/dist/chunk-YCH5GBN6.js.map +0 -1
  491. package/dist/chunk-YMUGBZN2.js.map +0 -1
  492. package/dist/collection-facade-KMBWNCYP.js +0 -44
  493. package/dist/cover-QJRXINN5.js +0 -52
  494. package/dist/delegation-SU6CV3W7.js +0 -25
  495. package/dist/derive-6RWU4EOA.js +0 -21
  496. package/dist/executor-KGNLJD6M.js +0 -9
  497. package/dist/executor-UX4FASYZ.js +0 -26
  498. package/dist/executor-XGIS6CR7.js +0 -9
  499. package/dist/export-accessible-LKW3QV22.js +0 -23
  500. package/dist/extract-partition-UP2ARO75.js +0 -38
  501. package/dist/find-YS6XWB46.js +0 -11
  502. package/dist/in/index.js +0 -1
  503. package/dist/issue-3ACYX7LO.js +0 -19
  504. package/dist/legacy/bundle.d.ts +0 -30
  505. package/dist/liberate-MQQXBUCY.js +0 -24
  506. package/dist/noydb-ANIW5FLE.js +0 -69
  507. package/dist/on/index.js +0 -17
  508. package/dist/port/as/index.d.ts +0 -26
  509. package/dist/port/at/index.d.ts +0 -18
  510. package/dist/port/in/index.d.ts +0 -21
  511. package/dist/port/on/index.d.ts +0 -27
  512. package/dist/port/ui/index.d.ts +0 -21
  513. package/dist/port/with/index.d.ts +0 -18
  514. package/dist/register-PAM3ASRZ.js +0 -23
  515. package/dist/registry-4S2U2TR4.js +0 -19
  516. package/dist/registry-NPOWJHC4.js +0 -9
  517. package/dist/registry-VZ3CCI2R.js +0 -18
  518. package/dist/request-withdrawal-DI3H5WUI.js +0 -31
  519. package/dist/revoke-R5CZSVUT.js +0 -24
  520. package/dist/seed-3ZMF5EQA.js.map +0 -1
  521. package/dist/signer-MBVHW4WE.js +0 -25
  522. package/dist/storage-3MEJUENZ.js +0 -23
  523. package/dist/tx/index.js.map +0 -1
  524. package/dist/ui/index.js +0 -1
  525. package/dist/with/index.js +0 -31
  526. package/dist/with-lookup/aggregate/index.d.ts +0 -23
  527. package/dist/withdraw-accessible-TZDATQVR.js +0 -28
  528. /package/dist/{api-3A3S4SHH.js.map → api-ZDKTWNBB.js.map} +0 -0
  529. /package/dist/{backup-YPUEKIJC.js.map → backup-2UX7PRM5.js.map} +0 -0
  530. /package/dist/{chunk-IY23KFNZ.js.map → chunk-35NMVJ7I.js.map} +0 -0
  531. /package/dist/{chunk-RTEK4C4I.js.map → chunk-4JQK3L4V.js.map} +0 -0
  532. /package/dist/{chunk-3ELCWU56.js.map → chunk-4ZKNC6A6.js.map} +0 -0
  533. /package/dist/{chunk-VAIS3SOM.js.map → chunk-55LX6FSX.js.map} +0 -0
  534. /package/dist/{chunk-6HPG2YNX.js.map → chunk-5DRROK5W.js.map} +0 -0
  535. /package/dist/{chunk-S6Q37VGE.js.map → chunk-5GQEU4DN.js.map} +0 -0
  536. /package/dist/{chunk-ZXEZCY6F.js.map → chunk-63FE525P.js.map} +0 -0
  537. /package/dist/{chunk-JVBO4SZL.js.map → chunk-6UBZ6I5Z.js.map} +0 -0
  538. /package/dist/{chunk-VRBTNCM4.js.map → chunk-ABS7FMMD.js.map} +0 -0
  539. /package/dist/{chunk-M75ZZHSR.js.map → chunk-BLBAQRBM.js.map} +0 -0
  540. /package/dist/{chunk-WOM2HTML.js.map → chunk-CI32CAFS.js.map} +0 -0
  541. /package/dist/{chunk-EO43ANYJ.js.map → chunk-DABACXEF.js.map} +0 -0
  542. /package/dist/{chunk-CJ5KKU6X.js.map → chunk-DMH3VZU5.js.map} +0 -0
  543. /package/dist/{chunk-WZSHL6DQ.js.map → chunk-DZ2JXHWK.js.map} +0 -0
  544. /package/dist/{chunk-Z4PD65VQ.js.map → chunk-EE7UHLKH.js.map} +0 -0
  545. /package/dist/{chunk-RNG4VRP4.js.map → chunk-EKRSCRNM.js.map} +0 -0
  546. /package/dist/{chunk-MT62YSPZ.js.map → chunk-FRMPM7WG.js.map} +0 -0
  547. /package/dist/{as/index.js.map → chunk-GJW4HX2O.js.map} +0 -0
  548. /package/dist/{chunk-KS6SAVCZ.js.map → chunk-GU3IP74F.js.map} +0 -0
  549. /package/dist/{chunk-SMIRGMS7.js.map → chunk-IXNCZTWA.js.map} +0 -0
  550. /package/dist/{chunk-WQIYTNJV.js.map → chunk-IXTSNGYY.js.map} +0 -0
  551. /package/dist/{chunk-NCCBLYEB.js.map → chunk-JJZGIE4U.js.map} +0 -0
  552. /package/dist/{chunk-DRWBEDYO.js.map → chunk-JYJFGD2H.js.map} +0 -0
  553. /package/dist/{chunk-XJMBYYQK.js.map → chunk-LNZKOUJR.js.map} +0 -0
  554. /package/dist/{chunk-R3BLCFD2.js.map → chunk-MBKVNOJS.js.map} +0 -0
  555. /package/dist/{chunk-N6WF5PKC.js.map → chunk-NFZGZ4AK.js.map} +0 -0
  556. /package/dist/{chunk-THVIPWRF.js.map → chunk-PEATRIYJ.js.map} +0 -0
  557. /package/dist/{chunk-YZQOGE2L.js.map → chunk-QDIH2744.js.map} +0 -0
  558. /package/dist/{chunk-6HY2X62D.js.map → chunk-QJNCB5SK.js.map} +0 -0
  559. /package/dist/{chunk-2PCAVW2I.js.map → chunk-SHEEBRZ4.js.map} +0 -0
  560. /package/dist/{chunk-RA5VTXXG.js.map → chunk-V6UQZA2H.js.map} +0 -0
  561. /package/dist/{chunk-QDPZWTN2.js.map → chunk-W3G5REIU.js.map} +0 -0
  562. /package/dist/{chunk-A4FXFAKF.js.map → chunk-W3L64Y3J.js.map} +0 -0
  563. /package/dist/{chunk-XDIAFPUM.js.map → chunk-WLXMTYGO.js.map} +0 -0
  564. /package/dist/{chunk-RJ6K6K5M.js.map → chunk-X3F5YJG2.js.map} +0 -0
  565. /package/dist/{chunk-YTGDPCPW.js.map → chunk-Y6B6HVKC.js.map} +0 -0
  566. /package/dist/{classified-marker-QWMASIT7.js.map → classified-marker-7PKJBFCG.js.map} +0 -0
  567. /package/dist/{at/index.js.map → collection-facade-6I5K5IOD.js.map} +0 -0
  568. /package/dist/{by/index.js.map → computed-AB45PS4V.js.map} +0 -0
  569. /package/dist/{in → cover}/index.js.map +0 -0
  570. /package/dist/{on → custody}/index.js.map +0 -0
  571. /package/dist/{dead-filter-66VGI6JV.js.map → dead-filter-FL3WIUZS.js.map} +0 -0
  572. /package/dist/{chunk-CHFZDSE4.js.map → derive-VGS7FKE3.js.map} +0 -0
  573. /package/dist/{ui → directory}/index.js.map +0 -0
  574. /package/dist/{collection-facade-KMBWNCYP.js.map → enclave-SPEEDYZ4.js.map} +0 -0
  575. /package/dist/{computed-DSMPXG2Y.js.map → executor-IEBLTBCW.js.map} +0 -0
  576. /package/dist/{cover-QJRXINN5.js.map → executor-OTF556PL.js.map} +0 -0
  577. /package/dist/{delegation-SU6CV3W7.js.map → executor-RM7XWQDU.js.map} +0 -0
  578. /package/dist/{derive-6RWU4EOA.js.map → export-accessible-P42BQ4PB.js.map} +0 -0
  579. /package/dist/{enclave-TKPN2G2U.js.map → extract-partition-TCYXRWBN.js.map} +0 -0
  580. /package/dist/{fanout-sidecar-B5LVUMQX.js.map → fanout-sidecar-SSMRSC2L.js.map} +0 -0
  581. /package/dist/{executor-KGNLJD6M.js.map → find-OZMTRIK3.js.map} +0 -0
  582. /package/dist/{with → introspection}/index.js.map +0 -0
  583. /package/dist/{executor-UX4FASYZ.js.map → issue-FCKN5O6C.js.map} +0 -0
  584. /package/dist/{executor-XGIS6CR7.js.map → ledger-6XBEVWYP.js.map} +0 -0
  585. /package/dist/{export-accessible-LKW3QV22.js.map → liberate-CYUOS4NC.js.map} +0 -0
  586. /package/dist/{extract-partition-UP2ARO75.js.map → link-set-NK6L2A5S.js.map} +0 -0
  587. /package/dist/{find-YS6XWB46.js.map → money/index.js.map} +0 -0
  588. /package/dist/{issue-3ACYX7LO.js.map → noydb-FZZIMLCI.js.map} +0 -0
  589. /package/dist/{ledger-PTK7XZYT.js.map → policy/index.js.map} +0 -0
  590. /package/dist/{post-register-2YHSADFI.js.map → post-register-VFIYISUK.js.map} +0 -0
  591. /package/dist/{liberate-MQQXBUCY.js.map → register-UKU2J6MN.js.map} +0 -0
  592. /package/dist/{link-set-SLJHDNRB.js.map → registry-2VCWVHZS.js.map} +0 -0
  593. /package/dist/{noydb-ANIW5FLE.js.map → registry-7Y5WF7GS.js.map} +0 -0
  594. /package/dist/{policy-YDLCOX4P.js.map → registry-BWD2ED52.js.map} +0 -0
  595. /package/dist/{register-PAM3ASRZ.js.map → registry-DTWRJLSF.js.map} +0 -0
  596. /package/dist/{registry-4S2U2TR4.js.map → request-withdrawal-JYDZ5XY2.js.map} +0 -0
  597. /package/dist/{reveal-HWO4YMTJ.js.map → reveal-CL2BCW6A.js.map} +0 -0
  598. /package/dist/{registry-NPOWJHC4.js.map → revoke-2TSAD2T4.js.map} +0 -0
  599. /package/dist/{registry-VW6P6A3J.js.map → schema-update/index.js.map} +0 -0
  600. /package/dist/{registry-VZ3CCI2R.js.map → search/index.js.map} +0 -0
  601. /package/dist/{request-withdrawal-DI3H5WUI.js.map → sequence/index.js.map} +0 -0
  602. /package/dist/{revoke-R5CZSVUT.js.map → signer-K7Z2EOMG.js.map} +0 -0
  603. /package/dist/{signer-MBVHW4WE.js.map → stale-A4J26OIC.js.map} +0 -0
  604. /package/dist/{stale-VZL4OGUB.js.map → storage-YVHZUISN.js.map} +0 -0
  605. /package/dist/{storage-3MEJUENZ.js.map → store/index.js.map} +0 -0
  606. /package/dist/{store-coordination-provider-FKX3F6TQ.js.map → store-coordination-provider-EWRZL7XF.js.map} +0 -0
  607. /package/dist/{verify-26Y5GNMK.js.map → verify-7XWHJWUN.js.map} +0 -0
  608. /package/dist/{withdraw-accessible-TZDATQVR.js.map → walk-P5D6CF4V.js.map} +0 -0
  609. /package/dist/with-lookup/{aggregate → reduce}/canonical-key.d.ts +0 -0
  610. /package/dist/{with-party → with-sync}/tab-coordination.d.ts +0 -0
  611. /package/dist/{with-party → with-sync}/tab-write-relay.d.ts +0 -0
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  SatelliteConfigError
3
- } from "../chunk-W2OG6JOL.js";
3
+ } from "../chunk-QZWTRENR.js";
4
4
  import "../chunk-PZ5AY32C.js";
5
5
  export {
6
6
  SatelliteConfigError
@@ -0,0 +1,26 @@
1
+ import {
2
+ additiveOnly,
3
+ blindUpdate,
4
+ coordinatedCutover,
5
+ lockSchema
6
+ } from "../chunk-E23UGFVC.js";
7
+ import {
8
+ SchemaUpdateGate
9
+ } from "../chunk-6LJY7X5A.js";
10
+ import {
11
+ computeSchemaDelta,
12
+ evaluateStrategies
13
+ } from "../chunk-DSDXAKIP.js";
14
+ import "../chunk-Y2NBBT6K.js";
15
+ import "../chunk-QZWTRENR.js";
16
+ import "../chunk-PZ5AY32C.js";
17
+ export {
18
+ SchemaUpdateGate,
19
+ additiveOnly,
20
+ blindUpdate,
21
+ computeSchemaDelta,
22
+ coordinatedCutover,
23
+ evaluateStrategies,
24
+ lockSchema
25
+ };
26
+ //# sourceMappingURL=index.js.map
@@ -1,38 +1,38 @@
1
1
  import {
2
2
  NO_SEALED_RECORD
3
- } from "../chunk-RDXW3OBQ.js";
4
- import "../chunk-W4TCUGQR.js";
5
- import "../chunk-A4FXFAKF.js";
6
- import "../chunk-IY23KFNZ.js";
7
- import "../chunk-N6WF5PKC.js";
8
- import "../chunk-6HY2X62D.js";
3
+ } from "../chunk-QD46HPZG.js";
4
+ import "../chunk-G2JUIDFA.js";
5
+ import "../chunk-W3L64Y3J.js";
6
+ import "../chunk-35NMVJ7I.js";
7
+ import "../chunk-NFZGZ4AK.js";
8
+ import "../chunk-QJNCB5SK.js";
9
9
  import "../chunk-LP7BEXCT.js";
10
10
  import {
11
11
  base64ToBuffer,
12
12
  decrypt,
13
13
  importCek
14
- } from "../chunk-HOONYZY2.js";
15
- import "../chunk-VCTXU4AT.js";
14
+ } from "../chunk-AKKRXT23.js";
15
+ import "../chunk-QBAC3GXA.js";
16
16
  import {
17
17
  SealedRecordExpiredError,
18
18
  SealedRecordMismatchError,
19
19
  SealedRecordNotEnabledError
20
- } from "../chunk-W2OG6JOL.js";
20
+ } from "../chunk-QZWTRENR.js";
21
21
  import "../chunk-PZ5AY32C.js";
22
22
 
23
23
  // src/with-audit/sealed-record/active.ts
24
24
  function withSealedRecord() {
25
25
  return {
26
26
  async sealRecordToHost(ctx, collection, id, hostSealer, opts) {
27
- const { sealRecordToHost } = await import("../enclave-TKPN2G2U.js");
27
+ const { sealRecordToHost } = await import("../enclave-SPEEDYZ4.js");
28
28
  return sealRecordToHost(ctx, collection, id, hostSealer, opts);
29
29
  },
30
30
  async revokeSealedRecord(ctx, collection, id, pid, opts) {
31
- const { revokeSealedRecord } = await import("../enclave-TKPN2G2U.js");
31
+ const { revokeSealedRecord } = await import("../enclave-SPEEDYZ4.js");
32
32
  return revokeSealedRecord(ctx, collection, id, pid, opts);
33
33
  },
34
34
  async rotateRecordCek(ctx, collection, id) {
35
- const { rotateRecordCek } = await import("../enclave-TKPN2G2U.js");
35
+ const { rotateRecordCek } = await import("../enclave-SPEEDYZ4.js");
36
36
  return rotateRecordCek(ctx, collection, id);
37
37
  }
38
38
  };
@@ -0,0 +1,36 @@
1
+ import {
2
+ InvertedIndex,
3
+ MemoryIndexStore,
4
+ NO_SEARCH,
5
+ buildStringFieldEntries,
6
+ extractSnippet,
7
+ searchScan,
8
+ segmentTokenizer,
9
+ segmentTokens,
10
+ tokenize,
11
+ withSearch
12
+ } from "../chunk-MCHBCNCE.js";
13
+ import {
14
+ fuseRetrieval
15
+ } from "../chunk-AURFOK3D.js";
16
+ import "../chunk-UADPR6F4.js";
17
+ import "../chunk-6UBZ6I5Z.js";
18
+ import {
19
+ SearchNotEnabledError
20
+ } from "../chunk-QZWTRENR.js";
21
+ import "../chunk-PZ5AY32C.js";
22
+ export {
23
+ InvertedIndex,
24
+ MemoryIndexStore,
25
+ NO_SEARCH,
26
+ SearchNotEnabledError,
27
+ buildStringFieldEntries,
28
+ extractSnippet,
29
+ fuseRetrieval,
30
+ searchScan,
31
+ segmentTokenizer,
32
+ segmentTokens,
33
+ tokenize,
34
+ withSearch
35
+ };
36
+ //# sourceMappingURL=index.js.map
@@ -1,26 +1,26 @@
1
1
  import {
2
2
  BROKER_COLLECTION,
3
3
  ensureCollectionDEK
4
- } from "./chunk-554KLAAN.js";
5
- import "./chunk-NCCBLYEB.js";
4
+ } from "./chunk-BLCWSJLN.js";
5
+ import "./chunk-JJZGIE4U.js";
6
6
  import {
7
7
  computeBrokerProof,
8
8
  deriveBrokerProofBits,
9
9
  openEnvelopeJson,
10
10
  writeEnvelopeBody
11
- } from "./chunk-W4TCUGQR.js";
12
- import "./chunk-A4FXFAKF.js";
13
- import "./chunk-IY23KFNZ.js";
14
- import "./chunk-N6WF5PKC.js";
15
- import "./chunk-6HY2X62D.js";
11
+ } from "./chunk-G2JUIDFA.js";
12
+ import "./chunk-W3L64Y3J.js";
13
+ import "./chunk-35NMVJ7I.js";
14
+ import "./chunk-NFZGZ4AK.js";
15
+ import "./chunk-QJNCB5SK.js";
16
16
  import "./chunk-LP7BEXCT.js";
17
17
  import {
18
18
  base64ToBuffer,
19
19
  bufferToBase64
20
- } from "./chunk-HOONYZY2.js";
20
+ } from "./chunk-AKKRXT23.js";
21
21
  import {
22
22
  NOYDB_FORMAT_VERSION
23
- } from "./chunk-VCTXU4AT.js";
23
+ } from "./chunk-QBAC3GXA.js";
24
24
  import {
25
25
  BrokerEnrolmentError,
26
26
  BrokerProofError,
@@ -28,7 +28,7 @@ import {
28
28
  NetworkError,
29
29
  PermissionDeniedError,
30
30
  ValidationError
31
- } from "./chunk-W2OG6JOL.js";
31
+ } from "./chunk-QZWTRENR.js";
32
32
  import "./chunk-PZ5AY32C.js";
33
33
 
34
34
  // src/with-party/broker/seed.ts
@@ -57,7 +57,7 @@ async function brokerDek(store, vault, keyring) {
57
57
  } catch (err) {
58
58
  if (err instanceof ValidationError) {
59
59
  throw new BrokerEnrolmentError(
60
- "enroll()/rotate() need the KEK to provision the _broker DEK on first use \u2014 re-authenticate at tier 1 (passphrase) before enrolling. Using an already-enrolled seed (credentialSource()) needs only the DEK."
60
+ "enroll()/rotate() need the KEK to provision the _broker DEK on first use \u2014 re-authenticate at tier 1 (secret) before enrolling. Using an already-enrolled seed (credentialSource()) needs only the DEK."
61
61
  );
62
62
  }
63
63
  throw err;
@@ -228,4 +228,4 @@ export {
228
228
  mintStoreCredentials,
229
229
  rotateSeed
230
230
  };
231
- //# sourceMappingURL=seed-3ZMF5EQA.js.map
231
+ //# sourceMappingURL=seed-NUVJEL7T.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/with-party/broker/seed.ts"],"sourcesContent":["/**\n * `_broker` reserved-collection seed lifecycle (#479, credential-broker\n * spec §2/§3). Modeled on `with-sync/credentials.ts`: a\n * `_`-prefixed reserved collection, record id = `brokerId`, encrypted under\n * the collection's own DEK, `requireAdminAccess` role gate (owner/admin\n * only — custodian intentionally excluded, same rationale as\n * `_sync_credentials`: this is transport-auth material, not the\n * custodian's operational scope).\n *\n * Three operations, each a free function taking a {@link BrokerSeedCtx}\n * (the {@link BrokerCtx} threaded through `with-party/broker/active.ts`,\n * augmented there with the `config` its closure was built with):\n *\n * - {@link enrollSeed} — two-phase commit (I9): create-if-absent CAS the\n * seed (I4), then register its derived proof key with the broker host,\n * then (only on a 2xx) mark the record `registered: true`. A seed\n * persisted whose `/enroll` POST failed stays `registered: false` so a\n * later `credentialSource()` fails fast instead of degrading into an\n * opaque `BrokerProofError` (I9/V23).\n * - {@link rotateSeed} — quiesce-then-swap (I5): mint a fresh seed,\n * register-new-first, THEN overwrite the local record — closing the\n * torn-proof window a naive local-overwrite-then-register order would\n * open. The single-flight cache quiesce itself (await in-flight, bump\n * epoch) is the caller's job (`with-party/broker/active.ts`) since the\n * cache lives in that closure, not here.\n * - {@link mintStoreCredentials} — the challenge/response round trip\n * (`/challenge` then `/credentials`) that produces one `StoreCredentials`\n * value; the single-flight cache wrapping it lives in `active.ts`.\n *\n * First-seed creation calls `ensureCollectionDEK`, which throws\n * (`ValidationError`) when the keyring's KEK is `null` (PIN quick-resume /\n * session-restore) — this module intercepts that and re-surfaces it as\n * {@link BrokerEnrolmentError} (R-B8/I3): *enrol* needs the KEK; *use* of an\n * already-enrolled seed needs only the DEK.\n *\n * @module\n */\nimport type { NoydbStore, EncryptedEnvelope, StoreCredentials } from '../../kernel/types.js'\nimport { NOYDB_FORMAT_VERSION } from '../../kernel/types.js'\nimport type { UnlockedKeyring } from '../../with-party/team/keyring.js'\nimport { ensureCollectionDEK } from '../../with-party/team/keyring.js'\nimport { BROKER_COLLECTION } from '../../with-party/team/reserved-secret-collections.js'\nimport {\n openEnvelopeJson,\n writeEnvelopeBody,\n bufferToBase64,\n base64ToBuffer,\n deriveBrokerProofBits,\n computeBrokerProof,\n} from '../../kernel/enclave/index.js'\nimport type { EnclaveKey } from '../../kernel/enclave/index.js'\nimport {\n PermissionDeniedError,\n ValidationError,\n ConflictError,\n NetworkError,\n BrokerEnrolmentError,\n BrokerProofError,\n} from '../../kernel/errors.js'\nimport type { BrokerSeedCtx, BrokerConfig } from '../../port/with/broker-strategy.js'\n\n/** The `_broker/<brokerId>` record payload (spec §3). */\nexport interface BrokerSeedRecord {\n readonly brokerId: string\n /** base64(32 random bytes). */\n readonly seed: string\n readonly endpoint: string\n readonly createdAt: string\n /** `true` only once `/enroll` has returned a 2xx for this seed (I9). */\n readonly registered: boolean\n}\n\nfunction requireAdminAccess(keyring: UnlockedKeyring): void {\n // Custodian is INTENTIONALLY excluded — the _broker seed is transport-auth\n // material (mints cloud store credentials), not the custodian's\n // operational data scope. Same rationale as _sync_credentials' FR-6 note.\n if (keyring.role !== 'owner' && keyring.role !== 'admin') {\n throw new PermissionDeniedError(\n `Credential-broker operations require owner or admin role. Current role: \"${keyring.role}\"`,\n )\n }\n}\n\n// `ensureCollectionDEK` only dedupes concurrent first-time DEK creates WITHIN one\n// closure instance — since every call site here asks for a fresh closure, two\n// concurrent `enrollSeed()` calls sharing the same (store, vault, keyring) would\n// otherwise each mint a DIFFERENT `_broker` DEK and race `persistKeyring`, leaving\n// the seed record encrypted under a DEK the keyring no longer holds (TamperedError\n// on the next read). Dedupe across calls here, keyed by store identity + vault\n// (V20 — the CAS enrol vector actually exercises this).\nconst inFlightDekByStore = new WeakMap<NoydbStore, Map<string, Promise<EnclaveKey>>>()\n\nasync function brokerDek(store: NoydbStore, vault: string, keyring: UnlockedKeyring): Promise<EnclaveKey> {\n const existing = keyring.deks.get(BROKER_COLLECTION)\n if (existing) return existing\n\n let perStore = inFlightDekByStore.get(store)\n if (!perStore) { perStore = new Map(); inFlightDekByStore.set(store, perStore) }\n const pending = perStore.get(vault)\n if (pending) return pending\n\n const promise = (async () => {\n try {\n const getDek = await ensureCollectionDEK(store, vault, keyring)\n return await getDek(BROKER_COLLECTION)\n } catch (err) {\n if (err instanceof ValidationError) {\n throw new BrokerEnrolmentError(\n 'enroll()/rotate() need the KEK to provision the _broker DEK on first use — ' +\n 're-authenticate at tier 1 (secret) before enrolling. Using an already-' +\n 'enrolled seed (credentialSource()) needs only the DEK.',\n )\n }\n throw err\n }\n })()\n perStore.set(vault, promise)\n try {\n return await promise\n } finally {\n perStore.delete(vault)\n }\n}\n\nasync function readRecord(\n store: NoydbStore,\n vault: string,\n brokerId: string,\n dek: EnclaveKey,\n): Promise<{ envelope: EncryptedEnvelope; record: BrokerSeedRecord } | null> {\n const envelope = await store.get(vault, BROKER_COLLECTION, brokerId)\n if (!envelope) return null\n const record = JSON.parse(await openEnvelopeJson(envelope, dek)) as BrokerSeedRecord\n return { envelope, record }\n}\n\nasync function persistRecord(\n store: NoydbStore,\n vault: string,\n keyring: UnlockedKeyring,\n dek: EnclaveKey,\n record: BrokerSeedRecord,\n expectedVersion: number,\n): Promise<void> {\n const body = await writeEnvelopeBody(JSON.stringify(record), dek)\n const envelope: EncryptedEnvelope = {\n _noydb: NOYDB_FORMAT_VERSION,\n _v: expectedVersion + 1,\n _ts: new Date().toISOString(),\n ...body,\n _by: keyring.userId,\n }\n await store.put(vault, BROKER_COLLECTION, record.brokerId, envelope, expectedVersion)\n}\n\ninterface SeedState {\n readonly seedBytes: Uint8Array\n readonly record: BrokerSeedRecord\n readonly dek: EnclaveKey\n readonly version: number\n}\n\n/** Create-if-absent CAS (I4/V20): a concurrent enrol that loses the race\n * re-reads the winner's seed instead of persisting a second one. */\nasync function ensureSeedRecord(store: NoydbStore, vault: string, keyring: UnlockedKeyring, config: BrokerConfig): Promise<SeedState> {\n requireAdminAccess(keyring)\n const dek = await brokerDek(store, vault, keyring)\n\n const existing = await readRecord(store, vault, config.brokerId, dek)\n if (existing) {\n return { seedBytes: base64ToBuffer(existing.record.seed), record: existing.record, dek, version: existing.envelope._v }\n }\n\n const seedBytes = globalThis.crypto.getRandomValues(new Uint8Array(32))\n const record: BrokerSeedRecord = {\n brokerId: config.brokerId,\n seed: bufferToBase64(seedBytes),\n endpoint: config.endpoint,\n createdAt: new Date().toISOString(),\n registered: false,\n }\n try {\n await persistRecord(store, vault, keyring, dek, record, 0)\n return { seedBytes, record, dek, version: 1 }\n } catch (err) {\n if (!(err instanceof ConflictError)) throw err\n const winner = await readRecord(store, vault, config.brokerId, dek)\n if (!winner) throw err\n return { seedBytes: base64ToBuffer(winner.record.seed), record: winner.record, dek, version: winner.envelope._v }\n }\n}\n\nasync function postEnroll(config: BrokerConfig, vault: string, proofBits: Uint8Array): Promise<void> {\n const fetchFn = config.fetch ?? globalThis.fetch\n const attestation = config.attestation ? await config.attestation() : undefined\n let res: Response\n try {\n res = await fetchFn(`${config.endpoint}/enroll`, {\n method: 'POST',\n headers: {\n 'content-type': 'application/json',\n ...(attestation !== undefined ? { authorization: `Bearer ${attestation}` } : {}),\n },\n body: JSON.stringify({ vaultId: vault, brokerId: config.brokerId, proofKey: bufferToBase64(proofBits) }),\n })\n } catch (err) {\n throw new BrokerEnrolmentError(`broker /enroll request failed: ${(err as Error).message}`)\n }\n if (!res.ok) {\n throw new BrokerEnrolmentError(`broker refused enrolment (status ${res.status}) — attestation likely missing or invalid`)\n }\n}\n\n/**\n * Enrol (idempotent, two-phase commit — I9): create-if-absent the `_broker`\n * seed (I4), derive+register its proof key with the broker host, and only\n * on a 2xx mark the record `registered: true`. Requires owner/admin role\n * and (for first-seed creation only) the KEK.\n */\nexport async function enrollSeed(ctx: BrokerSeedCtx): Promise<void> {\n const { store, vault, keyring, config } = ctx\n const { seedBytes, record, dek, version } = await ensureSeedRecord(store, vault, keyring, config)\n if (record.registered) {\n seedBytes.fill(0)\n return\n }\n\n const proofBits = await deriveBrokerProofBits(seedBytes, vault, config.brokerId)\n seedBytes.fill(0)\n try {\n await postEnroll(config, vault, proofBits)\n } finally {\n proofBits.fill(0)\n }\n\n try {\n await persistRecord(store, vault, keyring, dek, { ...record, registered: true }, version)\n } catch (err) {\n if (err instanceof ConflictError) {\n const latest = await readRecord(store, vault, config.brokerId, dek)\n if (latest?.record.registered) return // a concurrent enrol already committed the same outcome\n }\n throw err\n }\n}\n\n/**\n * Rotate (quiesce-then-swap — I5): mint a fresh seed, register its proof\n * key with the broker host FIRST, then overwrite the local `_broker`\n * record. The broker host is expected to accept both the old and new\n * registration for a short grace window, so an in-flight proof computed\n * under the old key (from before rotation started) still verifies. Cache\n * quiescing (awaiting any in-flight round-trip, bumping the refresh-cache\n * epoch) is the caller's job — `with-party/broker/active.ts` — since the\n * cache lives in that closure, not here.\n */\nexport async function rotateSeed(ctx: BrokerSeedCtx): Promise<void> {\n const { store, vault, keyring, config } = ctx\n requireAdminAccess(keyring)\n const dek = await brokerDek(store, vault, keyring)\n\n const existing = await readRecord(store, vault, config.brokerId, dek)\n if (!existing) {\n // Nothing to rotate yet — behaves like a first enrol.\n await enrollSeed(ctx)\n return\n }\n\n const newSeedBytes = globalThis.crypto.getRandomValues(new Uint8Array(32))\n const newProofBits = await deriveBrokerProofBits(newSeedBytes, vault, config.brokerId)\n try {\n await postEnroll(config, vault, newProofBits)\n } finally {\n newProofBits.fill(0)\n }\n\n const record: BrokerSeedRecord = {\n brokerId: config.brokerId,\n seed: bufferToBase64(newSeedBytes),\n endpoint: config.endpoint,\n createdAt: new Date().toISOString(),\n registered: true,\n }\n newSeedBytes.fill(0)\n await persistRecord(store, vault, keyring, dek, record, existing.envelope._v)\n}\n\n/**\n * The challenge/response round trip: `POST /challenge`, derive+sign the\n * proof from the decrypted seed, `POST /credentials`. One network round\n * trip per call — the single-flight/cache wrapping lives in `active.ts`.\n *\n * Fails fast with {@link BrokerEnrolmentError} if the seed hasn't completed\n * enrolment yet (`registered !== true` — I9/V23), never degrading into an\n * opaque {@link BrokerProofError}.\n */\nexport async function mintStoreCredentials(ctx: BrokerSeedCtx, profile?: string): Promise<StoreCredentials> {\n const { store, vault, keyring, config } = ctx\n requireAdminAccess(keyring)\n const dek = await brokerDek(store, vault, keyring)\n\n const found = await readRecord(store, vault, config.brokerId, dek)\n if (!found) throw new BrokerEnrolmentError(`No _broker seed enrolled for brokerId \"${config.brokerId}\" — call enroll() first.`)\n if (!found.record.registered) {\n throw new BrokerEnrolmentError(\n `The _broker seed for \"${config.brokerId}\" has not completed enrolment with the broker host — call enroll() again.`,\n )\n }\n\n const fetchFn = config.fetch ?? globalThis.fetch\n const endpointOrigin = new URL(config.endpoint).origin\n\n let challengeRes: Response\n try {\n challengeRes = await fetchFn(`${config.endpoint}/challenge`, {\n method: 'POST',\n headers: { 'content-type': 'application/json' },\n body: JSON.stringify({ vaultId: vault, brokerId: config.brokerId }),\n })\n } catch (err) {\n throw new NetworkError(`broker /challenge request failed: ${(err as Error).message}`)\n }\n if (!challengeRes.ok) throw new NetworkError(`broker /challenge failed with status ${challengeRes.status}`)\n const { challenge, expiresAt } = (await challengeRes.json()) as { challenge: string; expiresAt: string }\n\n const seedBytes = base64ToBuffer(found.record.seed)\n const proof = await computeBrokerProof(seedBytes, vault, config.brokerId, { endpointOrigin, profile, challenge, expiresAt })\n\n let credsRes: Response\n try {\n credsRes = await fetchFn(`${config.endpoint}/credentials`, {\n method: 'POST',\n headers: { 'content-type': 'application/json' },\n body: JSON.stringify({ vaultId: vault, brokerId: config.brokerId, challenge, proof, ...(profile !== undefined ? { profile } : {}) }),\n })\n } catch (err) {\n throw new NetworkError(`broker /credentials request failed: ${(err as Error).message}`)\n }\n if (credsRes.status === 401 || credsRes.status === 403) throw new BrokerProofError('broker rejected the challenge proof')\n if (!credsRes.ok) throw new NetworkError(`broker /credentials failed with status ${credsRes.status}`)\n return (await credsRes.json()) as StoreCredentials\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwEA,SAAS,mBAAmB,SAAgC;AAI1D,MAAI,QAAQ,SAAS,WAAW,QAAQ,SAAS,SAAS;AACxD,UAAM,IAAI;AAAA,MACR,4EAA4E,QAAQ,IAAI;AAAA,IAC1F;AAAA,EACF;AACF;AASA,IAAM,qBAAqB,oBAAI,QAAsD;AAErF,eAAe,UAAU,OAAmB,OAAe,SAA+C;AACxG,QAAM,WAAW,QAAQ,KAAK,IAAI,iBAAiB;AACnD,MAAI,SAAU,QAAO;AAErB,MAAI,WAAW,mBAAmB,IAAI,KAAK;AAC3C,MAAI,CAAC,UAAU;AAAE,eAAW,oBAAI,IA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,GAAI,OAAM,IAAI,aAAa,wCAAwC,aAAa,MAAM,EAAE;AAC1G,QAAM,EAAE,WAAW,UAAU,IAAK,MAAM,aAAa,KAAK;AAE1D,QAAM,YAAY,eAAe,MAAM,OAAO,IAAI;AAClD,QAAM,QAAQ,MAAM,mBAAmB,WAAW,OAAO,OAAO,UAAU,EAAE,gBAAgB,SAAS,WAAW,UAAU,CAAC;AAE3H,MAAI;AACJ,MAAI;AACF,eAAW,MAAM,QAAQ,GAAG,OAAO,QAAQ,gBAAgB;AAAA,MACzD,QAAQ;AAAA,MACR,SAAS,EAAE,gBAAgB,mBAAmB;AAAA,MAC9C,MAAM,KAAK,UAAU,EAAE,SAAS,OAAO,UAAU,OAAO,UAAU,WAAW,OAAO,GAAI,YAAY,SAAY,EAAE,QAAQ,IAAI,CAAC,EAAG,CAAC;AAAA,IACrI,CAAC;AAAA,EACH,SAAS,KAAK;AACZ,UAAM,IAAI,aAAa,uCAAwC,IAAc,OAAO,EAAE;AAAA,EACxF;AACA,MAAI,SAAS,WAAW,OAAO,SAAS,WAAW,IAAK,OAAM,IAAI,iBAAiB,qCAAqC;AACxH,MAAI,CAAC,SAAS,GAAI,OAAM,IAAI,aAAa,0CAA0C,SAAS,MAAM,EAAE;AACpG,SAAQ,MAAM,SAAS,KAAK;AAC9B;","names":[]}
@@ -0,0 +1,30 @@
1
+ import {
2
+ NO_SEQUENCE,
3
+ SEQUENCE_COLLECTION,
4
+ SequenceStore,
5
+ compileSequenceFormat,
6
+ resolveSequenceKey,
7
+ withSequence
8
+ } from "../chunk-L2DGWBCT.js";
9
+ import "../chunk-G2JUIDFA.js";
10
+ import "../chunk-W3L64Y3J.js";
11
+ import "../chunk-35NMVJ7I.js";
12
+ import "../chunk-NFZGZ4AK.js";
13
+ import "../chunk-QJNCB5SK.js";
14
+ import "../chunk-LP7BEXCT.js";
15
+ import "../chunk-AKKRXT23.js";
16
+ import "../chunk-QBAC3GXA.js";
17
+ import {
18
+ SequenceNotEnabledError
19
+ } from "../chunk-QZWTRENR.js";
20
+ import "../chunk-PZ5AY32C.js";
21
+ export {
22
+ NO_SEQUENCE,
23
+ SEQUENCE_COLLECTION,
24
+ SequenceNotEnabledError,
25
+ SequenceStore,
26
+ compileSequenceFormat,
27
+ resolveSequenceKey,
28
+ withSequence
29
+ };
30
+ //# sourceMappingURL=index.js.map
@@ -12,21 +12,24 @@ import {
12
12
  revokeAllSessions,
13
13
  revokeSession,
14
14
  validateSessionPolicy
15
- } from "../chunk-6XE5TMPR.js";
15
+ } from "../chunk-X4MVWPHV.js";
16
+ import {
17
+ NO_SESSION
18
+ } from "../chunk-VKQCVU2Z.js";
16
19
  import "../chunk-ZJADGNYF.js";
17
- import "../chunk-W4TCUGQR.js";
18
- import "../chunk-A4FXFAKF.js";
19
- import "../chunk-IY23KFNZ.js";
20
- import "../chunk-N6WF5PKC.js";
21
- import "../chunk-6HY2X62D.js";
20
+ import "../chunk-G2JUIDFA.js";
21
+ import "../chunk-W3L64Y3J.js";
22
+ import "../chunk-35NMVJ7I.js";
23
+ import "../chunk-NFZGZ4AK.js";
24
+ import "../chunk-QJNCB5SK.js";
22
25
  import "../chunk-LP7BEXCT.js";
23
- import "../chunk-HOONYZY2.js";
24
- import "../chunk-VCTXU4AT.js";
26
+ import "../chunk-AKKRXT23.js";
27
+ import "../chunk-QBAC3GXA.js";
25
28
  import {
26
29
  SessionExpiredError,
27
30
  SessionNotFoundError,
28
31
  SessionPolicyError
29
- } from "../chunk-W2OG6JOL.js";
32
+ } from "../chunk-QZWTRENR.js";
30
33
  import "../chunk-PZ5AY32C.js";
31
34
 
32
35
  // src/with-party/session/active.ts
@@ -38,6 +41,7 @@ function withSession() {
38
41
  };
39
42
  }
40
43
  export {
44
+ NO_SESSION,
41
45
  PolicyEnforcer,
42
46
  SessionExpiredError,
43
47
  SessionNotFoundError,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/with-party/session/active.ts"],"sourcesContent":["/**\n * Active session strategy — `withSession()` returns the real\n * implementation that wires `SessionPolicy` validation, the\n * `PolicyEnforcer`, and the global session-token registry into the\n * Noydb lifecycle.\n *\n * Consumers opt in by:\n *\n * ```ts\n * import { createNoydb } from '@noy-db/hub'\n * import { withSession } from '@noy-db/hub/session'\n *\n * const db = await createNoydb({\n * store: ...,\n * user: ...,\n * sessionPolicy: { idleTimeoutMs: 15 * 60_000 },\n * sessionStrategy: withSession(),\n * })\n * ```\n *\n * The factory delegates to the existing `session-policy.ts` and\n * `session.ts` modules. Splitting the import chain through this file\n * is what lets tsup tree-shake the ~495 LOC of policy + token code\n * out of the default bundle when no `withSession()` import is\n * present.\n *\n * Note: dev-unlock (`devUnlock`, `cancelDevUnlock`) is a separate\n * named import from `@noy-db/hub` and tree-shakes independently —\n * apps that don't import it never include it.\n *\n * @public\n */\n\nimport type { SessionStrategy } from './strategy.js'\nimport { createEnforcer, validateSessionPolicy } from './session-policy.js'\nimport { revokeAllSessions } from './session.js'\n\nexport function withSession(): SessionStrategy {\n return {\n validateSessionPolicy,\n createEnforcer,\n revokeAllSessions,\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCO,SAAS,cAA+B;AAC7C,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;","names":[]}
1
+ {"version":3,"sources":["../../src/with-party/session/active.ts"],"sourcesContent":["/**\n * Active session strategy — `withSession()` returns the real\n * implementation that wires `SessionPolicy` validation, the\n * `PolicyEnforcer`, and the global session-token registry into the\n * Noydb lifecycle.\n *\n * Consumers opt in by:\n *\n * ```ts\n * import { createNoydb } from '@noy-db/hub'\n * import { withSession } from '@noy-db/hub/session'\n *\n * const db = await createNoydb({\n * store: ...,\n * user: ...,\n * sessionPolicy: { idleTimeoutMs: 15 * 60_000 },\n * sessionStrategy: withSession(),\n * })\n * ```\n *\n * The factory delegates to the existing `session-policy.ts` and\n * `session.ts` modules. Splitting the import chain through this file\n * is what lets tsup tree-shake the ~495 LOC of policy + token code\n * out of the default bundle when no `withSession()` import is\n * present.\n *\n * Note: dev-unlock (`devUnlock`, `cancelDevUnlock`) is a separate\n * named import from `@noy-db/hub` and tree-shakes independently —\n * apps that don't import it never include it.\n *\n * @public\n */\n\nimport type { SessionStrategy } from './strategy.js'\nimport { createEnforcer, validateSessionPolicy } from './session-policy.js'\nimport { revokeAllSessions } from './session.js'\n\nexport function withSession(): SessionStrategy {\n return {\n validateSessionPolicy,\n createEnforcer,\n revokeAllSessions,\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCO,SAAS,cAA+B;AAC7C,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;","names":[]}
@@ -1,8 +1,11 @@
1
1
  import {
2
2
  CollectionFrame,
3
3
  VaultFrame
4
- } from "../chunk-VAIS3SOM.js";
5
- import "../chunk-W2OG6JOL.js";
4
+ } from "../chunk-55LX6FSX.js";
5
+ import {
6
+ NO_SHADOW
7
+ } from "../chunk-SMY5X46Z.js";
8
+ import "../chunk-QZWTRENR.js";
6
9
  import "../chunk-PZ5AY32C.js";
7
10
 
8
11
  // src/with-fork/shadow/active.ts
@@ -15,6 +18,7 @@ function withShadow() {
15
18
  }
16
19
  export {
17
20
  CollectionFrame,
21
+ NO_SHADOW,
18
22
  VaultFrame,
19
23
  withShadow
20
24
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/with-fork/shadow/active.ts"],"sourcesContent":["/**\n * Active shadow strategy — the only place `VaultFrame` is constructed.\n * Only reachable through `@noy-db/hub/shadow`.\n */\n\nimport { VaultFrame } from './vault-frame.js'\nimport type { ShadowStrategy } from './strategy.js'\nimport type { Vault } from '../../kernel/vault.js'\n\nexport function withShadow(): ShadowStrategy {\n return {\n buildFrame(vault) { return new VaultFrame(vault as Vault) },\n }\n}\n"],"mappings":";;;;;;;;AASO,SAAS,aAA6B;AAC3C,SAAO;AAAA,IACL,WAAW,OAAO;AAAE,aAAO,IAAI,WAAW,KAAc;AAAA,IAAE;AAAA,EAC5D;AACF;","names":[]}
1
+ {"version":3,"sources":["../../src/with-fork/shadow/active.ts"],"sourcesContent":["/**\n * Active shadow strategy — the only place `VaultFrame` is constructed.\n * Only reachable through `@noy-db/hub/shadow`.\n */\n\nimport { VaultFrame } from './vault-frame.js'\nimport type { ShadowStrategy } from './strategy.js'\nimport type { Vault } from '../../kernel/vault.js'\n\nexport function withShadow(): ShadowStrategy {\n return {\n buildFrame(vault) { return new VaultFrame(vault as Vault) },\n }\n}\n"],"mappings":";;;;;;;;;;;AASO,SAAS,aAA6B;AAC3C,SAAO;AAAA,IACL,WAAW,OAAO;AAAE,aAAO,IAAI,WAAW,KAAc;AAAA,IAAE;AAAA,EAC5D;AACF;","names":[]}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * `@noy-db/hub/share-link` — the portal share-link grammar (#806).
3
+ *
4
+ * A standalone subpath: pure string/`URL` code addressing
5
+ * `vault / period / collection / record` as one canonical link shape
6
+ * (`/r/{vaultHandle}/{collection}/{recordId}?period=…&v=…#g={token}`)
7
+ * shared by the LIFF permalink, PWA, and vendor-console surfaces. The
8
+ * single-use grant token travels ONLY in the URL fragment (the
9
+ * on-magic-link transport rule — fragments never reach server logs).
10
+ *
11
+ * No crypto, no store, no hub floor — import this from a LIFF shell,
12
+ * a PWA, or klum-db without dragging anything else. The grammar is a
13
+ * frozen contract: the export surface is pinned by
14
+ * `__tests__/share-link-surface-golden.test.ts`.
15
+ *
16
+ * @module
17
+ */
18
+ export { buildShareLink, parseShareLink, ShareLinkParseError } from './share-link.js';
19
+ export type { ShareLink, ShareLinkParts, ShareLinkErrorCode } from './share-link.js';
@@ -0,0 +1,201 @@
1
+ import {
2
+ isULID
3
+ } from "../chunk-ZJADGNYF.js";
4
+ import "../chunk-PZ5AY32C.js";
5
+
6
+ // src/share-link/share-link.ts
7
+ var ShareLinkParseError = class extends Error {
8
+ /** Machine-readable error code. Stable across library versions. */
9
+ code;
10
+ constructor(code, message) {
11
+ super(message);
12
+ this.name = "ShareLinkParseError";
13
+ this.code = code;
14
+ }
15
+ };
16
+ var DUMMY_BASE = "https://share-link.invalid";
17
+ function encodeQueryValue(value) {
18
+ return encodeURIComponent(value).replace(/'/g, "%27");
19
+ }
20
+ function decodeCanonical(raw, code, what, { redact = false, encode = encodeURIComponent } = {}) {
21
+ const shown = redact ? "(redacted)" : `"${raw}"`;
22
+ let decoded;
23
+ try {
24
+ decoded = decodeURIComponent(raw);
25
+ } catch {
26
+ throw new ShareLinkParseError(code, `${what}: malformed percent-encoding in ${shown}`);
27
+ }
28
+ if (decoded === "") {
29
+ throw new ShareLinkParseError(code, `${what}: empty`);
30
+ }
31
+ if (encode(decoded) !== raw) {
32
+ throw new ShareLinkParseError(
33
+ code,
34
+ `${what}: ${shown} is not canonical encodeURIComponent output`
35
+ );
36
+ }
37
+ return decoded;
38
+ }
39
+ function decodePathSegment(raw, what) {
40
+ const decoded = decodeCanonical(raw, "MALFORMED_SEGMENT", what);
41
+ if (decoded === "." || decoded === "..") {
42
+ throw new ShareLinkParseError("MALFORMED_SEGMENT", `${what}: "${decoded}" is a dot segment`);
43
+ }
44
+ return decoded;
45
+ }
46
+ function parseVersion(raw) {
47
+ if (!/^(?:0|[1-9][0-9]*)$/.test(raw)) {
48
+ throw new ShareLinkParseError(
49
+ "INVALID_VERSION",
50
+ `version "${raw}" is not a canonical base-10 integer`
51
+ );
52
+ }
53
+ const version = Number(raw);
54
+ if (!Number.isSafeInteger(version)) {
55
+ throw new ShareLinkParseError("INVALID_VERSION", `version "${raw}" exceeds 2^53 - 1`);
56
+ }
57
+ return version;
58
+ }
59
+ function toUrl(input) {
60
+ if (input instanceof URL) {
61
+ if (input.protocol !== "http:" && input.protocol !== "https:") {
62
+ throw new ShareLinkParseError(
63
+ "UNKNOWN_PREFIX",
64
+ `unsupported protocol "${input.protocol}" \u2014 share links are http(s) URLs or bare /r/ paths`
65
+ );
66
+ }
67
+ return input;
68
+ }
69
+ if (input.startsWith("/")) {
70
+ try {
71
+ return new URL(input, DUMMY_BASE);
72
+ } catch {
73
+ throw new ShareLinkParseError("MALFORMED_URL", "unparseable share path");
74
+ }
75
+ }
76
+ if (/^https?:\/\//i.test(input)) {
77
+ try {
78
+ return new URL(input);
79
+ } catch {
80
+ throw new ShareLinkParseError("MALFORMED_URL", "unparseable share URL");
81
+ }
82
+ }
83
+ throw new ShareLinkParseError(
84
+ "UNKNOWN_PREFIX",
85
+ 'input is neither a "/"-rooted share path nor an http(s) URL'
86
+ );
87
+ }
88
+ function parseShareLink(input) {
89
+ const url = toUrl(input);
90
+ let pathname = url.pathname;
91
+ if (!pathname.startsWith("/r/")) {
92
+ const idx = pathname.indexOf("/r/");
93
+ if (idx === -1) {
94
+ throw new ShareLinkParseError(
95
+ "UNKNOWN_PREFIX",
96
+ `path "${pathname}" has no /r/ share prefix`
97
+ );
98
+ }
99
+ pathname = pathname.slice(idx);
100
+ }
101
+ const rawSegments = pathname.split("/");
102
+ if (rawSegments.length !== 5) {
103
+ throw new ShareLinkParseError(
104
+ "MALFORMED_PATH",
105
+ `expected /r/{vaultHandle}/{collection}/{recordId} \u2014 got ${rawSegments.length - 2} segment(s) after /r/`
106
+ );
107
+ }
108
+ const vaultHandle = decodePathSegment(rawSegments[2], "vault handle");
109
+ if (!isULID(vaultHandle)) {
110
+ throw new ShareLinkParseError(
111
+ "INVALID_VAULT_HANDLE",
112
+ `vault handle "${vaultHandle}" is not a ULID`
113
+ );
114
+ }
115
+ const collection = decodePathSegment(rawSegments[3], "collection");
116
+ const recordId = decodePathSegment(rawSegments[4], "record id");
117
+ let period;
118
+ let version;
119
+ if (url.search !== "") {
120
+ const seen = /* @__PURE__ */ new Set();
121
+ for (const pair of url.search.slice(1).split("&")) {
122
+ const eq = pair.indexOf("=");
123
+ if (eq <= 0) {
124
+ throw new ShareLinkParseError("MALFORMED_QUERY", `query pair "${pair}" is not key=value`);
125
+ }
126
+ const key = pair.slice(0, eq);
127
+ const rawValue = pair.slice(eq + 1);
128
+ if (key !== "period" && key !== "v") {
129
+ throw new ShareLinkParseError("UNKNOWN_QUERY_KEY", `unknown query key "${key}"`);
130
+ }
131
+ if (seen.has(key)) {
132
+ throw new ShareLinkParseError("DUPLICATE_QUERY_KEY", `duplicate query key "${key}"`);
133
+ }
134
+ seen.add(key);
135
+ if (key === "period") {
136
+ period = decodeCanonical(rawValue, "MALFORMED_QUERY", "period", {
137
+ encode: encodeQueryValue
138
+ });
139
+ } else {
140
+ version = parseVersion(rawValue);
141
+ }
142
+ }
143
+ }
144
+ let grantToken;
145
+ if (url.hash !== "" && url.hash !== "#") {
146
+ const fragment = url.hash.slice(1);
147
+ if (!fragment.startsWith("g=")) {
148
+ throw new ShareLinkParseError(
149
+ "MALFORMED_FRAGMENT",
150
+ "fragment is not a g={token} grant carrier"
151
+ );
152
+ }
153
+ grantToken = decodeCanonical(fragment.slice(2), "MALFORMED_FRAGMENT", "grant token", {
154
+ redact: true
155
+ });
156
+ }
157
+ return {
158
+ vaultHandle,
159
+ collection,
160
+ recordId,
161
+ ...period !== void 0 ? { period } : {},
162
+ ...version !== void 0 ? { version } : {},
163
+ ...grantToken !== void 0 ? { grantToken } : {}
164
+ };
165
+ }
166
+ function requirePart(value, what, dotSegmentRefused = false) {
167
+ if (typeof value !== "string" || value === "") {
168
+ throw new ShareLinkParseError("INVALID_PARTS", `${what} must be a non-empty string`);
169
+ }
170
+ if (dotSegmentRefused && (value === "." || value === "..")) {
171
+ throw new ShareLinkParseError("INVALID_PARTS", `${what}: "${value}" is a dot segment`);
172
+ }
173
+ return value;
174
+ }
175
+ function buildShareLink(parts, base) {
176
+ const { vaultHandle, collection, recordId, period, version, grantToken } = parts;
177
+ if (typeof vaultHandle !== "string" || !isULID(vaultHandle)) {
178
+ throw new ShareLinkParseError("INVALID_PARTS", "vaultHandle is not a ULID");
179
+ }
180
+ const path = `/r/${vaultHandle}/${encodeURIComponent(
181
+ requirePart(collection, "collection", true)
182
+ )}/${encodeURIComponent(requirePart(recordId, "recordId", true))}`;
183
+ const query = [];
184
+ if (period !== void 0) {
185
+ query.push(`period=${encodeQueryValue(requirePart(period, "period"))}`);
186
+ }
187
+ if (version !== void 0) {
188
+ if (typeof version !== "number" || !Number.isSafeInteger(version) || version < 0) {
189
+ throw new ShareLinkParseError("INVALID_PARTS", "version must be a non-negative safe integer");
190
+ }
191
+ query.push(`v=${version}`);
192
+ }
193
+ const fragment = grantToken !== void 0 ? `#g=${encodeURIComponent(requirePart(grantToken, "grantToken"))}` : "";
194
+ return (base ?? "") + path + (query.length > 0 ? `?${query.join("&")}` : "") + fragment;
195
+ }
196
+ export {
197
+ ShareLinkParseError,
198
+ buildShareLink,
199
+ parseShareLink
200
+ };
201
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/share-link/share-link.ts"],"sourcesContent":["/**\n * Portal share-link grammar + parse/build helper (#806).\n *\n * ONE canonical link grammar addresses `vault / period / collection /\n * record` across all three portal surfaces — the LIFF permalink path\n * (`https://liff.line.me/{liffId}/r/…`), the installed-PWA same-origin\n * path (`https://{portal-origin}/r/…`), and the vendor backend console.\n * The link SHAPE is identical everywhere; only the origin prefix\n * differs, and callers own the prefix.\n *\n * ## Grammar (frozen — see `__tests__/share-link-surface.golden.json`)\n *\n * ```\n * share-link = [ base ] \"/r/\" vault \"/\" collection \"/\" record\n * [ \"?\" query ] [ \"#\" fragment ]\n * vault = ULID ; 26 uppercase Crockford base32 chars\n * collection = segment ; opaque, non-empty after decode\n * record = segment ; opaque, non-empty after decode\n * query = pair *( \"&\" pair ) ; keys unique; ONLY these two keys\n * pair = \"period=\" component ; opaque period id\n * / \"v=\" version ; record version\n * version = \"0\" / %x31-39 *DIGIT ; base-10 integer, ≤ 2^53 − 1\n * fragment = \"g=\" component ; single-use grant token (opaque)\n * ```\n *\n * `segment` / `component` are strict-canonical `encodeURIComponent`\n * output: decoding then re-encoding MUST reproduce the raw text exactly\n * (uppercase-hex escapes, `+` is a literal plus never a space, `%2F`\n * inside a segment never creates an extra segment). Path segments\n * additionally may not decode to `.` or `..`. Links produced by\n * {@link buildShareLink} always satisfy this; hand-written links using\n * only unreserved characters (`inv-001`, ULIDs, …) do too.\n *\n * ## Transport rule for the grant token\n *\n * The optional single-use grant token travels ONLY in the URL fragment\n * (`#g={token}`) — never in the path or query — because fragments are\n * not sent to servers, so the token never reaches server logs, CDNs, or\n * LINE's infrastructure. Same rule `on-magic-link` follows. The token is\n * fully OPAQUE here: no validation beyond non-empty, no decoding of its\n * semantics — grant semantics live in `on-magic-link` (not imported).\n *\n * ## Fail closed\n *\n * {@link parseShareLink} throws a typed {@link ShareLinkParseError} for\n * ANYTHING that is not exactly the grammar above — unknown prefix,\n * missing/extra/empty/malformed segments, a non-ULID vault handle,\n * duplicate or unknown query keys, malformed fragments. There is never a\n * default-vault (or any other) fallback; the app maps the error to a 404.\n *\n * Zero dependencies on the hub floor: pure string/`URL` code, no crypto,\n * no store — LIFF shells, PWAs, and klum-db can import this subpath\n * without dragging anything else. (The one internal import is the pure,\n * leaf ULID shape check shared with the pod format.)\n */\n\nimport { isULID } from '../with-pod/ulid.js'\n\n/** Machine-readable {@link ShareLinkParseError} discriminant. */\nexport type ShareLinkErrorCode =\n | 'MALFORMED_URL'\n | 'UNKNOWN_PREFIX'\n | 'MALFORMED_PATH'\n | 'MALFORMED_SEGMENT'\n | 'INVALID_VAULT_HANDLE'\n | 'MALFORMED_QUERY'\n | 'DUPLICATE_QUERY_KEY'\n | 'UNKNOWN_QUERY_KEY'\n | 'INVALID_VERSION'\n | 'MALFORMED_FRAGMENT'\n | 'INVALID_PARTS'\n\n/**\n * Typed failure for the share-link grammar. Thrown by\n * {@link parseShareLink} for any input outside the grammar (fail closed —\n * map to an app-level 404, never a default-vault fallback), and by\n * {@link buildShareLink} with code `'INVALID_PARTS'` when the caller\n * hands it parts that could not round-trip.\n *\n * Standalone (`extends Error`, not `NoydbError`) so this subpath stays\n * import-light; the `code` field follows the same machine-readable\n * convention as the kernel error classes.\n */\nexport class ShareLinkParseError extends Error {\n /** Machine-readable error code. Stable across library versions. */\n readonly code: ShareLinkErrorCode\n\n constructor(code: ShareLinkErrorCode, message: string) {\n super(message)\n this.name = 'ShareLinkParseError'\n this.code = code\n }\n}\n\n/**\n * The logical address a share link carries. Input to\n * {@link buildShareLink}; {@link parseShareLink} returns the same shape\n * (as the readonly {@link ShareLink} alias) with optional fields OMITTED\n * (not `undefined`) when absent from the link.\n */\nexport interface ShareLinkParts {\n /** Vault handle — a 26-character uppercase Crockford-base32 ULID. */\n vaultHandle: string\n /** Collection name — opaque, non-empty. */\n collection: string\n /** Record id — opaque, non-empty. */\n recordId: string\n /** Optional period id (`?period=`) — opaque, non-empty. */\n period?: string\n /** Optional record version (`?v=`) — non-negative safe integer. */\n version?: number\n /**\n * Optional single-use grant token (`#g=`) — opaque, non-empty. Carried\n * ONLY in the URL fragment; semantics belong to `on-magic-link`.\n */\n grantToken?: string\n}\n\n/** A successfully parsed share link. See {@link ShareLinkParts}. */\nexport type ShareLink = Readonly<ShareLinkParts>\n\n// Dummy base for parsing bare `/r/…` paths with the WHATWG URL parser.\n// `.invalid` is reserved (RFC 2606) — it can never collide with a real\n// origin, and the host is discarded anyway (only path/query/fragment\n// matter to the grammar).\nconst DUMMY_BASE = 'https://share-link.invalid'\n\n/**\n * Canonical encoding of a QUERY value. `encodeURIComponent`, plus `'`\n * → `%27`: the WHATWG URL parser percent-encodes the apostrophe inside\n * the query component of special (http/https) URLs — if we emitted a\n * raw `'`, any URL-object round-trip (browser address bar, `new URL`)\n * would rewrite the link into a form the strict parser then rejects.\n * Path and fragment components don't need this — every character the\n * URL parser escapes there is already escaped by `encodeURIComponent`.\n */\nfunction encodeQueryValue(value: string): string {\n return encodeURIComponent(value).replace(/'/g, '%27')\n}\n\n/**\n * Strict-canonical decode: `raw` must be exactly what the given\n * canonical `encode` produces for the decoded text — no `+`-for-space,\n * no lowercase hex escapes, no unencoded reserved characters,\n * non-empty. `redact` keeps the raw text out of the error message\n * (grant tokens).\n */\nfunction decodeCanonical(\n raw: string,\n code: ShareLinkErrorCode,\n what: string,\n { redact = false, encode = encodeURIComponent }: {\n redact?: boolean\n encode?: (value: string) => string\n } = {},\n): string {\n const shown = redact ? '(redacted)' : `\"${raw}\"`\n let decoded: string\n try {\n decoded = decodeURIComponent(raw)\n } catch {\n throw new ShareLinkParseError(code, `${what}: malformed percent-encoding in ${shown}`)\n }\n if (decoded === '') {\n throw new ShareLinkParseError(code, `${what}: empty`)\n }\n if (encode(decoded) !== raw) {\n throw new ShareLinkParseError(\n code,\n `${what}: ${shown} is not canonical encodeURIComponent output`,\n )\n }\n return decoded\n}\n\n/** Path-segment decode — canonical, plus the dot-segment refusal. */\nfunction decodePathSegment(raw: string, what: string): string {\n const decoded = decodeCanonical(raw, 'MALFORMED_SEGMENT', what)\n if (decoded === '.' || decoded === '..') {\n throw new ShareLinkParseError('MALFORMED_SEGMENT', `${what}: \"${decoded}\" is a dot segment`)\n }\n return decoded\n}\n\n/** `v=` value → non-negative safe integer. Canonical base-10 only. */\nfunction parseVersion(raw: string): number {\n if (!/^(?:0|[1-9][0-9]*)$/.test(raw)) {\n throw new ShareLinkParseError(\n 'INVALID_VERSION',\n `version \"${raw}\" is not a canonical base-10 integer`,\n )\n }\n const version = Number(raw)\n if (!Number.isSafeInteger(version)) {\n throw new ShareLinkParseError('INVALID_VERSION', `version \"${raw}\" exceeds 2^53 - 1`)\n }\n return version\n}\n\n/** Resolve string | URL input to a URL object, fail closed. */\nfunction toUrl(input: string | URL): URL {\n if (input instanceof URL) {\n if (input.protocol !== 'http:' && input.protocol !== 'https:') {\n throw new ShareLinkParseError(\n 'UNKNOWN_PREFIX',\n `unsupported protocol \"${input.protocol}\" — share links are http(s) URLs or bare /r/ paths`,\n )\n }\n return input\n }\n if (input.startsWith('/')) {\n try {\n return new URL(input, DUMMY_BASE)\n } catch {\n throw new ShareLinkParseError('MALFORMED_URL', 'unparseable share path')\n }\n }\n if (/^https?:\\/\\//i.test(input)) {\n try {\n return new URL(input)\n } catch {\n throw new ShareLinkParseError('MALFORMED_URL', 'unparseable share URL')\n }\n }\n throw new ShareLinkParseError(\n 'UNKNOWN_PREFIX',\n 'input is neither a \"/\"-rooted share path nor an http(s) URL',\n )\n}\n\n/**\n * Parse a share link — full URL, `URL` instance, or bare `/r/…` path.\n *\n * A LIFF permalink prefix is tolerated: when the path does not start\n * with `/r/` directly, the share path is taken from the FIRST `/r/`\n * segment boundary (`https://liff.line.me/{liffId}/r/…` → `/r/…`). No\n * fuzzy matching beyond that single rule.\n *\n * Fail closed: anything outside the grammar throws\n * {@link ShareLinkParseError}. Never a default-vault fallback.\n */\nexport function parseShareLink(input: string | URL): ShareLink {\n const url = toUrl(input)\n\n let pathname = url.pathname\n if (!pathname.startsWith('/r/')) {\n // LIFF permalink tolerance — only after the direct parse failed. An\n // indexOf hit is always a whole `r` segment (the match is slash-\n // delimited on both sides), so this cannot fire mid-segment.\n const idx = pathname.indexOf('/r/')\n if (idx === -1) {\n throw new ShareLinkParseError(\n 'UNKNOWN_PREFIX',\n `path \"${pathname}\" has no /r/ share prefix`,\n )\n }\n pathname = pathname.slice(idx)\n }\n\n // \"/r/{vault}/{collection}/{record}\" splits into exactly 5 parts:\n // ['', 'r', vault, collection, record].\n const rawSegments = pathname.split('/')\n if (rawSegments.length !== 5) {\n throw new ShareLinkParseError(\n 'MALFORMED_PATH',\n `expected /r/{vaultHandle}/{collection}/{recordId} — got ${rawSegments.length - 2} segment(s) after /r/`,\n )\n }\n\n const vaultHandle = decodePathSegment(rawSegments[2]!, 'vault handle')\n if (!isULID(vaultHandle)) {\n throw new ShareLinkParseError(\n 'INVALID_VAULT_HANDLE',\n `vault handle \"${vaultHandle}\" is not a ULID`,\n )\n }\n const collection = decodePathSegment(rawSegments[3]!, 'collection')\n const recordId = decodePathSegment(rawSegments[4]!, 'record id')\n\n // Query — manual parse of url.search (NOT URLSearchParams, whose\n // form-urlencoded rules decode \"+\" as a space and hide duplicates).\n let period: string | undefined\n let version: number | undefined\n if (url.search !== '') {\n const seen = new Set<string>()\n for (const pair of url.search.slice(1).split('&')) {\n const eq = pair.indexOf('=')\n if (eq <= 0) {\n throw new ShareLinkParseError('MALFORMED_QUERY', `query pair \"${pair}\" is not key=value`)\n }\n const key = pair.slice(0, eq)\n const rawValue = pair.slice(eq + 1)\n if (key !== 'period' && key !== 'v') {\n throw new ShareLinkParseError('UNKNOWN_QUERY_KEY', `unknown query key \"${key}\"`)\n }\n if (seen.has(key)) {\n throw new ShareLinkParseError('DUPLICATE_QUERY_KEY', `duplicate query key \"${key}\"`)\n }\n seen.add(key)\n if (key === 'period') {\n period = decodeCanonical(rawValue, 'MALFORMED_QUERY', 'period', {\n encode: encodeQueryValue,\n })\n } else {\n version = parseVersion(rawValue)\n }\n }\n }\n\n // Fragment — the ONLY place a grant token may appear.\n let grantToken: string | undefined\n if (url.hash !== '' && url.hash !== '#') {\n const fragment = url.hash.slice(1)\n if (!fragment.startsWith('g=')) {\n throw new ShareLinkParseError(\n 'MALFORMED_FRAGMENT',\n 'fragment is not a g={token} grant carrier',\n )\n }\n grantToken = decodeCanonical(fragment.slice(2), 'MALFORMED_FRAGMENT', 'grant token', {\n redact: true,\n })\n }\n\n return {\n vaultHandle,\n collection,\n recordId,\n ...(period !== undefined ? { period } : {}),\n ...(version !== undefined ? { version } : {}),\n ...(grantToken !== undefined ? { grantToken } : {}),\n }\n}\n\n/** Build-side part validation. Returns the (narrowed) string value. */\nfunction requirePart(value: unknown, what: string, dotSegmentRefused = false): string {\n if (typeof value !== 'string' || value === '') {\n throw new ShareLinkParseError('INVALID_PARTS', `${what} must be a non-empty string`)\n }\n if (dotSegmentRefused && (value === '.' || value === '..')) {\n throw new ShareLinkParseError('INVALID_PARTS', `${what}: \"${value}\" is a dot segment`)\n }\n return value\n}\n\n/**\n * Build a RELATIVE share link (`/r/…`) from typed parts. Callers prefix\n * their surface origin — the LIFF permalink base, the PWA origin, or the\n * vendor console — either themselves or via `base`, which is prepended\n * VERBATIM (no validation, no joining logic; pass it without a trailing\n * slash, e.g. `https://liff.line.me/{liffId}`).\n *\n * The grant token, when present, is emitted ONLY as the `#g=` fragment.\n * Invalid parts throw {@link ShareLinkParseError} with code\n * `'INVALID_PARTS'` — every built link is guaranteed to round-trip\n * through {@link parseShareLink}.\n */\nexport function buildShareLink(parts: ShareLinkParts, base?: string): string {\n const { vaultHandle, collection, recordId, period, version, grantToken } = parts\n\n if (typeof vaultHandle !== 'string' || !isULID(vaultHandle)) {\n throw new ShareLinkParseError('INVALID_PARTS', 'vaultHandle is not a ULID')\n }\n const path = `/r/${vaultHandle}/${encodeURIComponent(\n requirePart(collection, 'collection', true),\n )}/${encodeURIComponent(requirePart(recordId, 'recordId', true))}`\n\n const query: string[] = []\n if (period !== undefined) {\n query.push(`period=${encodeQueryValue(requirePart(period, 'period'))}`)\n }\n if (version !== undefined) {\n if (typeof version !== 'number' || !Number.isSafeInteger(version) || version < 0) {\n throw new ShareLinkParseError('INVALID_PARTS', 'version must be a non-negative safe integer')\n }\n query.push(`v=${version}`)\n }\n\n const fragment =\n grantToken !== undefined\n ? `#g=${encodeURIComponent(requirePart(grantToken, 'grantToken'))}`\n : ''\n\n return (base ?? '') + path + (query.length > 0 ? `?${query.join('&')}` : '') + fragment\n}\n"],"mappings":";;;;;;AAmFO,IAAM,sBAAN,cAAkC,MAAM;AAAA;AAAA,EAEpC;AAAA,EAET,YAAY,MAA0B,SAAiB;AACrD,UAAM,OAAO;AACb,SAAK,OAAO;AACZ,SAAK,OAAO;AAAA,EACd;AACF;AAiCA,IAAM,aAAa;AAWnB,SAAS,iBAAiB,OAAuB;AAC/C,SAAO,mBAAmB,KAAK,EAAE,QAAQ,MAAM,KAAK;AACtD;AASA,SAAS,gBACP,KACA,MACA,MACA,EAAE,SAAS,OAAO,SAAS,mBAAmB,IAG1C,CAAC,GACG;AACR,QAAM,QAAQ,SAAS,eAAe,IAAI,GAAG;AAC7C,MAAI;AACJ,MAAI;A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