@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.
- package/README.md +3 -4
- package/dist/api-ZDKTWNBB.js +20 -0
- package/dist/attestation/index.js +18 -18
- package/dist/{backup-YPUEKIJC.js → backup-2UX7PRM5.js} +13 -13
- package/dist/blobs/index.js +30 -15
- package/dist/blobs/index.js.map +1 -1
- package/dist/broker/index.js +12 -12
- package/dist/broker/index.js.map +1 -1
- package/dist/cargo/index.js +58 -29
- package/dist/{chunk-IY23KFNZ.js → chunk-35NMVJ7I.js} +3 -3
- package/dist/{chunk-S3BFKGET.js → chunk-3HUYRN24.js} +4 -4
- package/dist/chunk-3HUYRN24.js.map +1 -0
- package/dist/{walk-IPLXE36W.js → chunk-3V3XR4S4.js} +4 -13
- package/dist/{walk-IPLXE36W.js.map → chunk-3V3XR4S4.js.map} +1 -1
- package/dist/{chunk-RTEK4C4I.js → chunk-4JQK3L4V.js} +2 -2
- package/dist/{chunk-3ELCWU56.js → chunk-4ZKNC6A6.js} +2 -2
- package/dist/{chunk-VQNJ7UZL.js → chunk-55LKVALY.js} +106 -10
- package/dist/chunk-55LKVALY.js.map +1 -0
- package/dist/{chunk-VAIS3SOM.js → chunk-55LX6FSX.js} +2 -2
- package/dist/chunk-5D2ALSM5.js +19 -0
- package/dist/chunk-5D2ALSM5.js.map +1 -0
- package/dist/{chunk-6HPG2YNX.js → chunk-5DRROK5W.js} +2 -2
- package/dist/{chunk-S6Q37VGE.js → chunk-5GQEU4DN.js} +2 -2
- package/dist/chunk-5JOFWL4G.js +25 -0
- package/dist/chunk-5JOFWL4G.js.map +1 -0
- package/dist/{chunk-ZXEZCY6F.js → chunk-63FE525P.js} +6 -6
- package/dist/chunk-6LJY7X5A.js +18 -0
- package/dist/chunk-6LJY7X5A.js.map +1 -0
- package/dist/{chunk-JVBO4SZL.js → chunk-6UBZ6I5Z.js} +2 -2
- package/dist/{chunk-BOKIKJJB.js → chunk-6ZNSB3H6.js} +5 -17
- package/dist/chunk-6ZNSB3H6.js.map +1 -0
- package/dist/{chunk-IK43HLDQ.js → chunk-7YVBQJ7K.js} +13 -355
- package/dist/chunk-7YVBQJ7K.js.map +1 -0
- package/dist/{chunk-VRBTNCM4.js → chunk-ABS7FMMD.js} +6 -6
- package/dist/chunk-AFHQATY4.js +47 -0
- package/dist/chunk-AFHQATY4.js.map +1 -0
- package/dist/{chunk-HOONYZY2.js → chunk-AKKRXT23.js} +7 -7
- package/dist/chunk-AKKRXT23.js.map +1 -0
- package/dist/{chunk-DDHM2TLX.js → chunk-AT2JJEKJ.js} +4 -4
- package/dist/chunk-AT2JJEKJ.js.map +1 -0
- package/dist/{chunk-M75ZZHSR.js → chunk-BLBAQRBM.js} +2 -2
- package/dist/{chunk-554KLAAN.js → chunk-BLCWSJLN.js} +88 -81
- package/dist/chunk-BLCWSJLN.js.map +1 -0
- package/dist/chunk-CADUYBQD.js +151 -0
- package/dist/chunk-CADUYBQD.js.map +1 -0
- package/dist/{chunk-WOM2HTML.js → chunk-CI32CAFS.js} +5 -5
- package/dist/{chunk-FH52K7EG.js → chunk-CUZLNGD5.js} +2 -6
- package/dist/{chunk-FH52K7EG.js.map → chunk-CUZLNGD5.js.map} +1 -1
- package/dist/{chunk-U6JMEH2P.js → chunk-CXQW2NWO.js} +145 -3
- package/dist/chunk-CXQW2NWO.js.map +1 -0
- package/dist/{chunk-EO43ANYJ.js → chunk-DABACXEF.js} +3 -3
- package/dist/{chunk-CJ5KKU6X.js → chunk-DMH3VZU5.js} +4 -4
- package/dist/chunk-DSDXAKIP.js +50 -0
- package/dist/chunk-DSDXAKIP.js.map +1 -0
- package/dist/{chunk-WZSHL6DQ.js → chunk-DZ2JXHWK.js} +5 -5
- package/dist/chunk-DZFQVICS.js +23 -0
- package/dist/chunk-DZFQVICS.js.map +1 -0
- package/dist/chunk-E23UGFVC.js +63 -0
- package/dist/chunk-E23UGFVC.js.map +1 -0
- package/dist/{chunk-Z4PD65VQ.js → chunk-EE7UHLKH.js} +4 -4
- package/dist/chunk-EIPVYUEP.js +654 -0
- package/dist/chunk-EIPVYUEP.js.map +1 -0
- package/dist/{chunk-RNG4VRP4.js → chunk-EKRSCRNM.js} +3 -3
- package/dist/{chunk-YMUGBZN2.js → chunk-FQ5CHJR7.js} +1 -1
- package/dist/chunk-FQ5CHJR7.js.map +1 -0
- package/dist/{chunk-RFI7GGFO.js → chunk-FQZ6XTQ7.js} +17 -20
- package/dist/chunk-FQZ6XTQ7.js.map +1 -0
- package/dist/{chunk-MT62YSPZ.js → chunk-FRMPM7WG.js} +4 -4
- package/dist/{chunk-W4TCUGQR.js → chunk-G2JUIDFA.js} +13 -9
- package/dist/{chunk-W4TCUGQR.js.map → chunk-G2JUIDFA.js.map} +1 -1
- package/dist/{chunk-T3GY65MA.js → chunk-G6WWZNJP.js} +13 -13
- package/dist/chunk-G6WWZNJP.js.map +1 -0
- package/dist/chunk-GJW4HX2O.js +1 -0
- package/dist/{chunk-KS6SAVCZ.js → chunk-GU3IP74F.js} +6 -6
- package/dist/{chunk-UHNGNKLV.js → chunk-GWWOGNBK.js} +308 -18
- package/dist/chunk-GWWOGNBK.js.map +1 -0
- package/dist/{chunk-5PFOMHTB.js → chunk-H2GPHUZD.js} +12 -13
- package/dist/chunk-H2GPHUZD.js.map +1 -0
- package/dist/{chunk-H2KSZMIX.js → chunk-HMU5P6RL.js} +5 -5
- package/dist/chunk-HMU5P6RL.js.map +1 -0
- package/dist/{chunk-JFCV5QIK.js → chunk-I5GEJX3R.js} +5 -5
- package/dist/chunk-I5GEJX3R.js.map +1 -0
- package/dist/{chunk-GWKAVKHI.js → chunk-IG6KUWBX.js} +2 -2
- package/dist/chunk-IG6KUWBX.js.map +1 -0
- package/dist/{chunk-LVGTA624.js → chunk-IPUG56GJ.js} +15 -5
- package/dist/{chunk-LVGTA624.js.map → chunk-IPUG56GJ.js.map} +1 -1
- package/dist/{chunk-SMIRGMS7.js → chunk-IXNCZTWA.js} +2 -2
- package/dist/{chunk-WQIYTNJV.js → chunk-IXTSNGYY.js} +3 -3
- package/dist/{chunk-WHXXI3W5.js → chunk-IYZISPGD.js} +7 -5
- package/dist/chunk-IYZISPGD.js.map +1 -0
- package/dist/{chunk-HQBM64EE.js → chunk-JDOMW53O.js} +145 -16
- package/dist/chunk-JDOMW53O.js.map +1 -0
- package/dist/{chunk-NCCBLYEB.js → chunk-JJZGIE4U.js} +6 -5
- package/dist/{chunk-DRWBEDYO.js → chunk-JYJFGD2H.js} +2 -2
- package/dist/{chunk-TAGR72IR.js → chunk-KRCBZYTZ.js} +26 -177
- package/dist/chunk-KRCBZYTZ.js.map +1 -0
- package/dist/{chunk-DSBQODMZ.js → chunk-L2DGWBCT.js} +14 -14
- package/dist/chunk-L2DGWBCT.js.map +1 -0
- package/dist/{chunk-VEALDPHW.js → chunk-L3YYLT4E.js} +15 -2
- package/dist/chunk-L3YYLT4E.js.map +1 -0
- package/dist/{chunk-FXZDAV62.js → chunk-LNPUSMZL.js} +29 -31
- package/dist/chunk-LNPUSMZL.js.map +1 -0
- package/dist/{chunk-XJMBYYQK.js → chunk-LNZKOUJR.js} +2 -2
- package/dist/{chunk-R3BLCFD2.js → chunk-MBKVNOJS.js} +6 -6
- package/dist/chunk-MCHBCNCE.js +367 -0
- package/dist/chunk-MCHBCNCE.js.map +1 -0
- package/dist/{chunk-VCBHAE4R.js → chunk-MHMLXJ3I.js} +2 -2
- package/dist/chunk-MHMLXJ3I.js.map +1 -0
- package/dist/{chunk-WNGGJWF7.js → chunk-MSMJJB4J.js} +2 -2
- package/dist/chunk-MSMJJB4J.js.map +1 -0
- package/dist/{chunk-T36RFODW.js → chunk-MXUT7FTE.js} +2 -2
- package/dist/chunk-MXUT7FTE.js.map +1 -0
- package/dist/{chunk-WG4QBZDN.js → chunk-N4BBNYIB.js} +11 -9
- package/dist/chunk-N4BBNYIB.js.map +1 -0
- package/dist/{chunk-PK6JIDQ4.js → chunk-NFIBXF4V.js} +1084 -1583
- package/dist/chunk-NFIBXF4V.js.map +1 -0
- package/dist/{chunk-VKCADNMR.js → chunk-NFNJLRY7.js} +368 -52
- package/dist/chunk-NFNJLRY7.js.map +1 -0
- package/dist/{chunk-N6WF5PKC.js → chunk-NFZGZ4AK.js} +2 -2
- package/dist/{chunk-JRBNCUNT.js → chunk-NGSJZFGL.js} +21 -4
- package/dist/chunk-NGSJZFGL.js.map +1 -0
- package/dist/chunk-NJ4DYYO5.js +81 -0
- package/dist/chunk-NJ4DYYO5.js.map +1 -0
- package/dist/chunk-NM5UYF6Q.js +24 -0
- package/dist/chunk-NM5UYF6Q.js.map +1 -0
- package/dist/{chunk-JBBSYJHP.js → chunk-NYEFP7DY.js} +4 -4
- package/dist/chunk-NYEFP7DY.js.map +1 -0
- package/dist/{chunk-GDG5VVYG.js → chunk-NZ24MX4J.js} +8 -46
- package/dist/chunk-NZ24MX4J.js.map +1 -0
- package/dist/{chunk-IFJTPAQQ.js → chunk-OLEPKFTW.js} +4 -4
- package/dist/chunk-OLEPKFTW.js.map +1 -0
- package/dist/{chunk-THVIPWRF.js → chunk-PEATRIYJ.js} +9 -9
- package/dist/chunk-PEOZ34EM.js +13 -0
- package/dist/chunk-PEOZ34EM.js.map +1 -0
- package/dist/{chunk-UC2ETWF3.js → chunk-PTHKZWEH.js} +2 -14
- package/dist/{chunk-UC2ETWF3.js.map → chunk-PTHKZWEH.js.map} +1 -1
- package/dist/chunk-PVEWA2DU.js +23 -0
- package/dist/chunk-PVEWA2DU.js.map +1 -0
- package/dist/{chunk-VCTXU4AT.js → chunk-QBAC3GXA.js} +1 -1
- package/dist/chunk-QBAC3GXA.js.map +1 -0
- package/dist/{chunk-RDXW3OBQ.js → chunk-QD46HPZG.js} +2 -2
- package/dist/chunk-QD46HPZG.js.map +1 -0
- package/dist/{chunk-YZQOGE2L.js → chunk-QDIH2744.js} +2 -2
- package/dist/{chunk-6HY2X62D.js → chunk-QJNCB5SK.js} +2 -2
- package/dist/{chunk-IAO54J4R.js → chunk-QX76XVQH.js} +6 -6
- package/dist/chunk-QX76XVQH.js.map +1 -0
- package/dist/{chunk-W2OG6JOL.js → chunk-QZWTRENR.js} +24 -7
- package/dist/chunk-QZWTRENR.js.map +1 -0
- package/dist/{chunk-6NQMXTYC.js → chunk-RO5NM6UI.js} +2 -2
- package/dist/chunk-RO5NM6UI.js.map +1 -0
- package/dist/chunk-SGDPRCC4.js +1075 -0
- package/dist/chunk-SGDPRCC4.js.map +1 -0
- package/dist/{chunk-2PCAVW2I.js → chunk-SHEEBRZ4.js} +2 -2
- package/dist/chunk-SMY5X46Z.js +14 -0
- package/dist/chunk-SMY5X46Z.js.map +1 -0
- package/dist/{chunk-ISMV2QVG.js → chunk-TG634KCO.js} +11 -2
- package/dist/chunk-TG634KCO.js.map +1 -0
- package/dist/{chunk-XUW3PXHU.js → chunk-TUXQSFHZ.js} +4 -16
- package/dist/{chunk-XUW3PXHU.js.map → chunk-TUXQSFHZ.js.map} +1 -1
- package/dist/{chunk-GULTLPFB.js → chunk-UADPR6F4.js} +3 -3
- package/dist/{chunk-GULTLPFB.js.map → chunk-UADPR6F4.js.map} +1 -1
- package/dist/{chunk-XTHCN77N.js → chunk-UDHBXYGG.js} +29 -19
- package/dist/chunk-UDHBXYGG.js.map +1 -0
- package/dist/{chunk-RA5VTXXG.js → chunk-V6UQZA2H.js} +2 -2
- package/dist/chunk-VG2ZSFYD.js +32 -0
- package/dist/chunk-VG2ZSFYD.js.map +1 -0
- package/dist/chunk-VKQCVU2Z.js +21 -0
- package/dist/chunk-VKQCVU2Z.js.map +1 -0
- package/dist/{chunk-QDPZWTN2.js → chunk-W3G5REIU.js} +2 -2
- package/dist/{chunk-A4FXFAKF.js → chunk-W3L64Y3J.js} +2 -2
- package/dist/{chunk-ONTBCHCP.js → chunk-W66AM5IB.js} +2 -2
- package/dist/chunk-W66AM5IB.js.map +1 -0
- package/dist/{chunk-A5BDDEXK.js → chunk-WBKZUO5V.js} +26 -43
- package/dist/chunk-WBKZUO5V.js.map +1 -0
- package/dist/{chunk-XDIAFPUM.js → chunk-WLXMTYGO.js} +2 -2
- package/dist/{chunk-RJ6K6K5M.js → chunk-X3F5YJG2.js} +2 -2
- package/dist/{chunk-WKGF2TJR.js → chunk-X45JYIAY.js} +3 -3
- package/dist/chunk-X45JYIAY.js.map +1 -0
- package/dist/{chunk-6XE5TMPR.js → chunk-X4MVWPHV.js} +3 -3
- package/dist/chunk-X4MVWPHV.js.map +1 -0
- package/dist/chunk-XZHEOSQ2.js +16 -0
- package/dist/chunk-XZHEOSQ2.js.map +1 -0
- package/dist/chunk-Y2NBBT6K.js +18 -0
- package/dist/chunk-Y2NBBT6K.js.map +1 -0
- package/dist/{chunk-CZTLE22N.js → chunk-Y2NJBNX3.js} +8 -8
- package/dist/{chunk-CZTLE22N.js.map → chunk-Y2NJBNX3.js.map} +1 -1
- package/dist/{chunk-YTGDPCPW.js → chunk-Y6B6HVKC.js} +2 -2
- package/dist/chunk-YMUFFJCO.js +23 -0
- package/dist/chunk-YMUFFJCO.js.map +1 -0
- package/dist/{chunk-SV6EAJEP.js → chunk-YWWQM7KP.js} +5 -14
- package/dist/chunk-YWWQM7KP.js.map +1 -0
- package/dist/{chunk-UDSR4X4L.js → chunk-YZJSJOUI.js} +239 -16
- package/dist/chunk-YZJSJOUI.js.map +1 -0
- package/dist/{chunk-5WZXVULX.js → chunk-ZTLOXFPB.js} +2 -2
- package/dist/chunk-ZTLOXFPB.js.map +1 -0
- package/dist/classified/index.js +5 -5
- package/dist/{classified-marker-QWMASIT7.js → classified-marker-7PKJBFCG.js} +3 -3
- package/dist/collection-facade-6I5K5IOD.js +45 -0
- package/dist/{computed-DSMPXG2Y.js → computed-AB45PS4V.js} +3 -3
- package/dist/consent/index.js +13 -9
- package/dist/consent/index.js.map +1 -1
- package/dist/cover/index.js +37 -0
- package/dist/crdt/index.js +4 -0
- package/dist/crdt/index.js.map +1 -1
- package/dist/custody/index.js +26 -0
- package/dist/{dead-filter-66VGI6JV.js → dead-filter-FL3WIUZS.js} +2 -2
- package/dist/{chunk-OCVM6KDH.js → delegation-QXZ4MPPH.js} +12 -6
- package/dist/{chunk-OCVM6KDH.js.map → delegation-QXZ4MPPH.js.map} +1 -1
- package/dist/derivations/index.js +12 -12
- package/dist/derive-VGS7FKE3.js +22 -0
- package/dist/directory/index.js +46 -0
- package/dist/dispatch-EGGC7UD7.js +72 -0
- package/dist/dispatch-EGGC7UD7.js.map +1 -0
- package/dist/dispatch-GDSTUTVP.js +194 -0
- package/dist/dispatch-GDSTUTVP.js.map +1 -0
- package/dist/{enclave-TKPN2G2U.js → enclave-SPEEDYZ4.js} +13 -11
- package/dist/executor-IEBLTBCW.js +9 -0
- package/dist/executor-OTF556PL.js +28 -0
- package/dist/executor-RM7XWQDU.js +9 -0
- package/dist/export-accessible-P42BQ4PB.js +23 -0
- package/dist/extract-partition-TCYXRWBN.js +38 -0
- package/dist/{fanout-sidecar-B5LVUMQX.js → fanout-sidecar-SSMRSC2L.js} +9 -9
- package/dist/find-OZMTRIK3.js +11 -0
- package/dist/forget/index.js +11 -11
- package/dist/forget/index.js.map +1 -1
- package/dist/guards/index.js +4 -4
- package/dist/history/index.js +16 -12
- package/dist/history/index.js.map +1 -1
- package/dist/i18n/index.js +16 -14
- package/dist/i18n/index.js.map +1 -1
- package/dist/index.d.ts +42 -42
- package/dist/index.js +332 -2106
- package/dist/index.js.map +1 -1
- package/dist/indexing/index.js +4 -2
- package/dist/indexing/index.js.map +1 -1
- package/dist/introspection/index.js +28 -0
- package/dist/issue-FCKN5O6C.js +19 -0
- package/dist/kernel/best-effort-revert.d.ts +9 -1
- package/dist/kernel/collection-config.d.ts +12 -70
- package/dist/kernel/collection.d.ts +11 -23
- package/dist/kernel/enclave/crypto.d.ts +8 -8
- package/dist/kernel/enclave/index.d.ts +4 -4
- package/dist/kernel/enclave/record-keys/envelope-body.d.ts +8 -0
- package/dist/kernel/errors.d.ts +41 -22
- package/dist/kernel/lazy.d.ts +30 -0
- package/dist/kernel/noydb.d.ts +81 -124
- package/dist/kernel/query/builder.d.ts +10 -10
- package/dist/kernel/query/index.d.ts +0 -6
- package/dist/kernel/query/scan-builder.d.ts +4 -4
- package/dist/kernel/sync-policy.d.ts +76 -4
- package/dist/kernel/types.d.ts +187 -86
- package/dist/kernel/validation.d.ts +33 -33
- package/dist/kernel/vault.d.ts +41 -229
- package/dist/kernel/via/dispatch.d.ts +7 -0
- package/dist/{ledger-PTK7XZYT.js → ledger-6XBEVWYP.js} +11 -11
- package/dist/liberate-CYUOS4NC.js +24 -0
- package/dist/{link-set-SLJHDNRB.js → link-set-NK6L2A5S.js} +11 -11
- package/dist/materialized-views/index.js +22 -19
- package/dist/money/index.js +31 -0
- package/dist/noydb-FZZIMLCI.js +81 -0
- package/dist/overlay-views/index.js +4 -4
- package/dist/periods/index.js +21 -17
- package/dist/pod/index.js +26 -12
- package/dist/{policy-YDLCOX4P.js → policy/index.js} +6 -6
- package/dist/port/with/archive-strategy.d.ts +31 -0
- package/dist/port/with/blob-strategy.d.ts +15 -5
- package/dist/port/with/collection-options.d.ts +171 -0
- package/dist/port/with/collection-registries.d.ts +62 -0
- package/dist/port/with/strategies.d.ts +134 -0
- package/dist/port/with/team-strategy.d.ts +3 -2
- package/dist/portability/index.js +8 -8
- package/dist/{post-register-2YHSADFI.js → post-register-VFIYISUK.js} +6 -6
- package/dist/query/index.js +6 -46
- package/dist/{aggregate → reduce}/index.js +24 -17
- package/dist/reduce/index.js.map +1 -0
- package/dist/register-UKU2J6MN.js +25 -0
- package/dist/registry-2VCWVHZS.js +19 -0
- package/dist/registry-7Y5WF7GS.js +9 -0
- package/dist/{registry-VW6P6A3J.js → registry-BWD2ED52.js} +2 -2
- package/dist/registry-DTWRJLSF.js +18 -0
- package/dist/request-withdrawal-JYDZ5XY2.js +31 -0
- package/dist/{reveal-HWO4YMTJ.js → reveal-CL2BCW6A.js} +6 -6
- package/dist/revoke-2TSAD2T4.js +24 -0
- package/dist/satellites/index.js +1 -1
- package/dist/schema-update/index.js +26 -0
- package/dist/sealed-record/index.js +12 -12
- package/dist/search/index.js +36 -0
- package/dist/{seed-3ZMF5EQA.js → seed-NUVJEL7T.js} +12 -12
- package/dist/seed-NUVJEL7T.js.map +1 -0
- package/dist/sequence/index.js +30 -0
- package/dist/session/index.js +13 -9
- package/dist/session/index.js.map +1 -1
- package/dist/shadow/index.js +6 -2
- package/dist/shadow/index.js.map +1 -1
- package/dist/share-link/index.d.ts +19 -0
- package/dist/share-link/index.js +201 -0
- package/dist/share-link/index.js.map +1 -0
- package/dist/share-link/share-link.d.ts +123 -0
- package/dist/signer-K7Z2EOMG.js +25 -0
- package/dist/snapshots/index.js +14 -10
- package/dist/snapshots/index.js.map +1 -1
- package/dist/{stale-VZL4OGUB.js → stale-A4J26OIC.js} +11 -10
- package/dist/storage-YVHZUISN.js +23 -0
- package/dist/store/index.js +22 -0
- package/dist/{store-coordination-provider-FKX3F6TQ.js → store-coordination-provider-EWRZL7XF.js} +3 -3
- package/dist/sync/index.js +15 -11
- package/dist/sync/index.js.map +1 -1
- package/dist/team/index.js +33 -47
- package/dist/tiers/index.js +10 -10
- package/dist/to/index.js +1 -1
- package/dist/{tx → transactions}/index.js +7 -3
- package/dist/transactions/index.js.map +1 -0
- package/dist/util/index.js +1 -1
- package/dist/{verify-26Y5GNMK.js → verify-7XWHJWUN.js} +5 -5
- package/dist/via/blob/active.d.ts +23 -7
- package/dist/via/blob/binding.d.ts +1 -1
- package/dist/via/blob/index.d.ts +7 -1
- package/dist/via/i18n/core.d.ts +1 -1
- package/dist/via/i18n/index.d.ts +2 -0
- package/dist/via/money/money-reducer.d.ts +2 -2
- package/dist/walk-P5D6CF4V.js +21 -0
- package/dist/with-audit/consent/index.d.ts +2 -0
- package/dist/with-audit/forget/active.d.ts +3 -3
- package/dist/with-audit/forget/index.d.ts +6 -5
- package/dist/with-audit/forget/strategy.d.ts +3 -3
- package/dist/with-audit/guards/executor.d.ts +4 -4
- package/dist/with-audit/guards/immutable-guard.d.ts +3 -3
- package/dist/with-audit/guards/index.d.ts +1 -1
- package/dist/with-audit/guards/registry.d.ts +3 -3
- package/dist/with-audit/guards/transition-guard.d.ts +3 -3
- package/dist/with-audit/guards/types.d.ts +10 -10
- package/dist/with-audit/guards/with-guard.d.ts +2 -2
- package/dist/with-audit/periods/index.d.ts +2 -0
- package/dist/with-audit/periods/periods.d.ts +1 -16
- package/dist/with-audit/periods/vault-facade.d.ts +6 -0
- package/dist/with-audit/periods/window.d.ts +16 -0
- package/dist/with-audit/portability/export-accessible.d.ts +4 -4
- package/dist/with-audit/portability/request-withdrawal.d.ts +3 -3
- package/dist/with-audit/portability/withdraw-accessible.d.ts +2 -2
- package/dist/with-audit/sealed-record/strategy.d.ts +1 -1
- package/dist/with-audit/tiers/index.d.ts +1 -0
- package/dist/with-cargo/adopt-partition.d.ts +7 -7
- package/dist/{legacy/kernel.d.ts → with-cargo/floor.d.ts} +4 -4
- package/dist/with-cargo/index.d.ts +15 -2
- package/dist/with-commit/crdt/index.d.ts +2 -0
- package/dist/with-commit/history/index.d.ts +2 -0
- package/dist/with-commit/history/time-machine.d.ts +2 -2
- package/dist/with-commit/numbering/descriptor.d.ts +16 -6
- package/dist/with-commit/tx/active.d.ts +5 -5
- package/dist/with-commit/tx/index.d.ts +2 -2
- package/dist/with-commit/tx/invariants.d.ts +1 -1
- package/dist/with-commit/tx/strategy.d.ts +3 -3
- package/dist/with-fork/shadow/index.d.ts +2 -0
- package/dist/with-fork/snapshots/active.d.ts +2 -2
- package/dist/with-fork/snapshots/index.d.ts +3 -1
- package/dist/with-fork/snapshots/noydb-facade.d.ts +3 -3
- package/dist/with-fork/snapshots/strategy.d.ts +2 -2
- package/dist/with-formula/derivations/dispatch.d.ts +98 -0
- package/dist/with-formula/derivations/executor.d.ts +2 -2
- package/dist/with-formula/derivations/index.d.ts +4 -1
- package/dist/with-formula/derivations/registry.d.ts +3 -3
- package/dist/with-formula/derivations/stale.d.ts +2 -2
- package/dist/with-formula/derivations/types.d.ts +3 -3
- package/dist/with-formula/derivations/with-derivation.d.ts +2 -2
- package/dist/with-formula/derivations/with-rollup.d.ts +15 -8
- package/dist/with-formula/materialized-views/dependency-analyzer.d.ts +3 -3
- package/dist/with-formula/materialized-views/dispatch.d.ts +75 -0
- package/dist/with-formula/materialized-views/index.d.ts +2 -1
- package/dist/with-formula/materialized-views/registry.d.ts +4 -4
- package/dist/with-formula/materialized-views/types.d.ts +11 -11
- package/dist/with-formula/materialized-views/with-materialized-view.d.ts +2 -2
- package/dist/with-formula/overlay-views/index.d.ts +1 -1
- package/dist/with-formula/overlay-views/registry.d.ts +4 -4
- package/dist/with-formula/overlay-views/types.d.ts +3 -3
- package/dist/with-formula/overlay-views/virtual-collection.d.ts +2 -2
- package/dist/with-formula/overlay-views/with-overlayed-view.d.ts +2 -2
- package/dist/with-lookup/indexing/active.d.ts +5 -5
- package/dist/with-lookup/indexing/index.d.ts +3 -1
- package/dist/with-lookup/indexing/strategy.d.ts +3 -3
- package/dist/with-lookup/{aggregate → reduce}/active.d.ts +8 -8
- package/dist/with-lookup/{aggregate → reduce}/groupby.d.ts +21 -21
- package/dist/with-lookup/reduce/index.d.ts +34 -0
- package/dist/with-lookup/{aggregate → reduce}/reducers.d.ts +11 -12
- package/dist/with-lookup/{aggregate/aggregation.d.ts → reduce/reduction.d.ts} +21 -21
- package/dist/with-lookup/{aggregate → reduce}/strategy.d.ts +15 -15
- package/dist/with-lookup/search/build-docs.d.ts +7 -2
- package/dist/with-lookup/search/index.d.ts +1 -1
- package/dist/with-party/broker/index.d.ts +1 -0
- package/dist/with-party/broker/seed.d.ts +1 -1
- package/dist/with-party/custody/liberate.d.ts +3 -3
- package/dist/with-party/directory/cover/index.d.ts +1 -5
- package/dist/with-party/directory/cover/schema.d.ts +0 -6
- package/dist/with-party/directory/cover/storage.d.ts +0 -8
- package/dist/with-party/directory/cover/types.d.ts +0 -21
- package/dist/with-party/directory/index.d.ts +2 -0
- package/dist/with-party/session/dev-unlock.d.ts +2 -2
- package/dist/with-party/session/index.d.ts +2 -0
- package/dist/with-party/session/session.d.ts +2 -2
- package/dist/with-party/team/deed.d.ts +8 -8
- package/dist/with-party/team/index.d.ts +4 -7
- package/dist/with-party/team/keyring.d.ts +83 -35
- package/dist/with-party/team/{managed-passphrase.d.ts → managed-secret.d.ts} +27 -27
- package/dist/with-party/team/noydb-facade.d.ts +43 -42
- package/dist/with-party/team/peer-recover.d.ts +13 -13
- package/dist/with-party/team/recovery.d.ts +5 -5
- package/dist/with-party/team/rotate-recover.d.ts +30 -30
- package/dist/with-pod/bundle.d.ts +30 -32
- package/dist/with-pod/format.d.ts +2 -2
- package/dist/with-pod/index.d.ts +2 -1
- package/dist/with-shape/blobs/blob-compaction.d.ts +43 -3
- package/dist/with-shape/blobs/blob-pinning.d.ts +112 -0
- package/dist/with-shape/blobs/blob-set.d.ts +86 -2
- package/dist/with-shape/introspection/index.d.ts +6 -0
- package/dist/with-shape/schema-update/index.d.ts +1 -0
- package/dist/with-store/index.d.ts +3 -2
- package/dist/with-store/route-store.d.ts +1 -1
- package/dist/{with-party/team/sync-active.d.ts → with-sync/active.d.ts} +1 -1
- package/dist/{with-party/team/sync-credentials.d.ts → with-sync/credentials.d.ts} +3 -3
- package/dist/{with-party/team/sync.d.ts → with-sync/engine.d.ts} +17 -4
- package/dist/{with-party/sync → with-sync}/index.d.ts +4 -2
- package/dist/with-sync/period-scope.d.ts +78 -0
- package/dist/{with-party/team → with-sync}/presence.d.ts +2 -2
- package/dist/{with-party/team/sync-strategy.d.ts → with-sync/strategy.d.ts} +6 -6
- package/dist/{with-party/team/sync-transaction.d.ts → with-sync/transaction.d.ts} +3 -3
- package/dist/withdraw-accessible-A2PWF5MZ.js +28 -0
- package/dist/withdraw-accessible-A2PWF5MZ.js.map +1 -0
- package/package.json +49 -36
- package/dist/aggregate/index.js.map +0 -1
- package/dist/api-3A3S4SHH.js +0 -20
- package/dist/as/index.js +0 -30
- package/dist/at/index.js +0 -1
- package/dist/bundle/index.js +0 -153
- package/dist/bundle/index.js.map +0 -1
- package/dist/by/index.js +0 -11
- package/dist/chunk-554KLAAN.js.map +0 -1
- package/dist/chunk-5PFOMHTB.js.map +0 -1
- package/dist/chunk-5WZXVULX.js.map +0 -1
- package/dist/chunk-6NQMXTYC.js.map +0 -1
- package/dist/chunk-6XE5TMPR.js.map +0 -1
- package/dist/chunk-A5BDDEXK.js.map +0 -1
- package/dist/chunk-ANATMTOA.js +0 -205
- package/dist/chunk-ANATMTOA.js.map +0 -1
- package/dist/chunk-BOKIKJJB.js.map +0 -1
- package/dist/chunk-CHFZDSE4.js +0 -1
- package/dist/chunk-DDHM2TLX.js.map +0 -1
- package/dist/chunk-DSBQODMZ.js.map +0 -1
- package/dist/chunk-EWPOHMN2.js +0 -255
- package/dist/chunk-EWPOHMN2.js.map +0 -1
- package/dist/chunk-FXZDAV62.js.map +0 -1
- package/dist/chunk-GDG5VVYG.js.map +0 -1
- package/dist/chunk-GWKAVKHI.js.map +0 -1
- package/dist/chunk-H2KSZMIX.js.map +0 -1
- package/dist/chunk-HOONYZY2.js.map +0 -1
- package/dist/chunk-HQBM64EE.js.map +0 -1
- package/dist/chunk-IAO54J4R.js.map +0 -1
- package/dist/chunk-IFJTPAQQ.js.map +0 -1
- package/dist/chunk-IK43HLDQ.js.map +0 -1
- package/dist/chunk-ISMV2QVG.js.map +0 -1
- package/dist/chunk-JBBSYJHP.js.map +0 -1
- package/dist/chunk-JFCV5QIK.js.map +0 -1
- package/dist/chunk-JRBNCUNT.js.map +0 -1
- package/dist/chunk-LB7FD65R.js +0 -163
- package/dist/chunk-LB7FD65R.js.map +0 -1
- package/dist/chunk-ONTBCHCP.js.map +0 -1
- package/dist/chunk-PK6JIDQ4.js.map +0 -1
- package/dist/chunk-RDXW3OBQ.js.map +0 -1
- package/dist/chunk-RFI7GGFO.js.map +0 -1
- package/dist/chunk-S3BFKGET.js.map +0 -1
- package/dist/chunk-SV6EAJEP.js.map +0 -1
- package/dist/chunk-T36RFODW.js.map +0 -1
- package/dist/chunk-T3GY65MA.js.map +0 -1
- package/dist/chunk-TAGR72IR.js.map +0 -1
- package/dist/chunk-TIGPQDYP.js +0 -14
- package/dist/chunk-TIGPQDYP.js.map +0 -1
- package/dist/chunk-U6JMEH2P.js.map +0 -1
- package/dist/chunk-UDSR4X4L.js.map +0 -1
- package/dist/chunk-UHNGNKLV.js.map +0 -1
- package/dist/chunk-VCBHAE4R.js.map +0 -1
- package/dist/chunk-VCTXU4AT.js.map +0 -1
- package/dist/chunk-VEALDPHW.js.map +0 -1
- package/dist/chunk-VKCADNMR.js.map +0 -1
- package/dist/chunk-VQNJ7UZL.js.map +0 -1
- package/dist/chunk-W2OG6JOL.js.map +0 -1
- package/dist/chunk-WG4QBZDN.js.map +0 -1
- package/dist/chunk-WHXXI3W5.js.map +0 -1
- package/dist/chunk-WKGF2TJR.js.map +0 -1
- package/dist/chunk-WNGGJWF7.js.map +0 -1
- package/dist/chunk-XTHCN77N.js.map +0 -1
- package/dist/chunk-YCH5GBN6.js +0 -99
- package/dist/chunk-YCH5GBN6.js.map +0 -1
- package/dist/chunk-YMUGBZN2.js.map +0 -1
- package/dist/collection-facade-KMBWNCYP.js +0 -44
- package/dist/cover-QJRXINN5.js +0 -52
- package/dist/delegation-SU6CV3W7.js +0 -25
- package/dist/derive-6RWU4EOA.js +0 -21
- package/dist/executor-KGNLJD6M.js +0 -9
- package/dist/executor-UX4FASYZ.js +0 -26
- package/dist/executor-XGIS6CR7.js +0 -9
- package/dist/export-accessible-LKW3QV22.js +0 -23
- package/dist/extract-partition-UP2ARO75.js +0 -38
- package/dist/find-YS6XWB46.js +0 -11
- package/dist/in/index.js +0 -1
- package/dist/issue-3ACYX7LO.js +0 -19
- package/dist/legacy/bundle.d.ts +0 -30
- package/dist/liberate-MQQXBUCY.js +0 -24
- package/dist/noydb-ANIW5FLE.js +0 -69
- package/dist/on/index.js +0 -17
- package/dist/port/as/index.d.ts +0 -26
- package/dist/port/at/index.d.ts +0 -18
- package/dist/port/in/index.d.ts +0 -21
- package/dist/port/on/index.d.ts +0 -27
- package/dist/port/ui/index.d.ts +0 -21
- package/dist/port/with/index.d.ts +0 -18
- package/dist/register-PAM3ASRZ.js +0 -23
- package/dist/registry-4S2U2TR4.js +0 -19
- package/dist/registry-NPOWJHC4.js +0 -9
- package/dist/registry-VZ3CCI2R.js +0 -18
- package/dist/request-withdrawal-DI3H5WUI.js +0 -31
- package/dist/revoke-R5CZSVUT.js +0 -24
- package/dist/seed-3ZMF5EQA.js.map +0 -1
- package/dist/signer-MBVHW4WE.js +0 -25
- package/dist/storage-3MEJUENZ.js +0 -23
- package/dist/tx/index.js.map +0 -1
- package/dist/ui/index.js +0 -1
- package/dist/with/index.js +0 -31
- package/dist/with-lookup/aggregate/index.d.ts +0 -23
- package/dist/withdraw-accessible-TZDATQVR.js +0 -28
- /package/dist/{api-3A3S4SHH.js.map → api-ZDKTWNBB.js.map} +0 -0
- /package/dist/{backup-YPUEKIJC.js.map → backup-2UX7PRM5.js.map} +0 -0
- /package/dist/{chunk-IY23KFNZ.js.map → chunk-35NMVJ7I.js.map} +0 -0
- /package/dist/{chunk-RTEK4C4I.js.map → chunk-4JQK3L4V.js.map} +0 -0
- /package/dist/{chunk-3ELCWU56.js.map → chunk-4ZKNC6A6.js.map} +0 -0
- /package/dist/{chunk-VAIS3SOM.js.map → chunk-55LX6FSX.js.map} +0 -0
- /package/dist/{chunk-6HPG2YNX.js.map → chunk-5DRROK5W.js.map} +0 -0
- /package/dist/{chunk-S6Q37VGE.js.map → chunk-5GQEU4DN.js.map} +0 -0
- /package/dist/{chunk-ZXEZCY6F.js.map → chunk-63FE525P.js.map} +0 -0
- /package/dist/{chunk-JVBO4SZL.js.map → chunk-6UBZ6I5Z.js.map} +0 -0
- /package/dist/{chunk-VRBTNCM4.js.map → chunk-ABS7FMMD.js.map} +0 -0
- /package/dist/{chunk-M75ZZHSR.js.map → chunk-BLBAQRBM.js.map} +0 -0
- /package/dist/{chunk-WOM2HTML.js.map → chunk-CI32CAFS.js.map} +0 -0
- /package/dist/{chunk-EO43ANYJ.js.map → chunk-DABACXEF.js.map} +0 -0
- /package/dist/{chunk-CJ5KKU6X.js.map → chunk-DMH3VZU5.js.map} +0 -0
- /package/dist/{chunk-WZSHL6DQ.js.map → chunk-DZ2JXHWK.js.map} +0 -0
- /package/dist/{chunk-Z4PD65VQ.js.map → chunk-EE7UHLKH.js.map} +0 -0
- /package/dist/{chunk-RNG4VRP4.js.map → chunk-EKRSCRNM.js.map} +0 -0
- /package/dist/{chunk-MT62YSPZ.js.map → chunk-FRMPM7WG.js.map} +0 -0
- /package/dist/{as/index.js.map → chunk-GJW4HX2O.js.map} +0 -0
- /package/dist/{chunk-KS6SAVCZ.js.map → chunk-GU3IP74F.js.map} +0 -0
- /package/dist/{chunk-SMIRGMS7.js.map → chunk-IXNCZTWA.js.map} +0 -0
- /package/dist/{chunk-WQIYTNJV.js.map → chunk-IXTSNGYY.js.map} +0 -0
- /package/dist/{chunk-NCCBLYEB.js.map → chunk-JJZGIE4U.js.map} +0 -0
- /package/dist/{chunk-DRWBEDYO.js.map → chunk-JYJFGD2H.js.map} +0 -0
- /package/dist/{chunk-XJMBYYQK.js.map → chunk-LNZKOUJR.js.map} +0 -0
- /package/dist/{chunk-R3BLCFD2.js.map → chunk-MBKVNOJS.js.map} +0 -0
- /package/dist/{chunk-N6WF5PKC.js.map → chunk-NFZGZ4AK.js.map} +0 -0
- /package/dist/{chunk-THVIPWRF.js.map → chunk-PEATRIYJ.js.map} +0 -0
- /package/dist/{chunk-YZQOGE2L.js.map → chunk-QDIH2744.js.map} +0 -0
- /package/dist/{chunk-6HY2X62D.js.map → chunk-QJNCB5SK.js.map} +0 -0
- /package/dist/{chunk-2PCAVW2I.js.map → chunk-SHEEBRZ4.js.map} +0 -0
- /package/dist/{chunk-RA5VTXXG.js.map → chunk-V6UQZA2H.js.map} +0 -0
- /package/dist/{chunk-QDPZWTN2.js.map → chunk-W3G5REIU.js.map} +0 -0
- /package/dist/{chunk-A4FXFAKF.js.map → chunk-W3L64Y3J.js.map} +0 -0
- /package/dist/{chunk-XDIAFPUM.js.map → chunk-WLXMTYGO.js.map} +0 -0
- /package/dist/{chunk-RJ6K6K5M.js.map → chunk-X3F5YJG2.js.map} +0 -0
- /package/dist/{chunk-YTGDPCPW.js.map → chunk-Y6B6HVKC.js.map} +0 -0
- /package/dist/{classified-marker-QWMASIT7.js.map → classified-marker-7PKJBFCG.js.map} +0 -0
- /package/dist/{at/index.js.map → collection-facade-6I5K5IOD.js.map} +0 -0
- /package/dist/{by/index.js.map → computed-AB45PS4V.js.map} +0 -0
- /package/dist/{in → cover}/index.js.map +0 -0
- /package/dist/{on → custody}/index.js.map +0 -0
- /package/dist/{dead-filter-66VGI6JV.js.map → dead-filter-FL3WIUZS.js.map} +0 -0
- /package/dist/{chunk-CHFZDSE4.js.map → derive-VGS7FKE3.js.map} +0 -0
- /package/dist/{ui → directory}/index.js.map +0 -0
- /package/dist/{collection-facade-KMBWNCYP.js.map → enclave-SPEEDYZ4.js.map} +0 -0
- /package/dist/{computed-DSMPXG2Y.js.map → executor-IEBLTBCW.js.map} +0 -0
- /package/dist/{cover-QJRXINN5.js.map → executor-OTF556PL.js.map} +0 -0
- /package/dist/{delegation-SU6CV3W7.js.map → executor-RM7XWQDU.js.map} +0 -0
- /package/dist/{derive-6RWU4EOA.js.map → export-accessible-P42BQ4PB.js.map} +0 -0
- /package/dist/{enclave-TKPN2G2U.js.map → extract-partition-TCYXRWBN.js.map} +0 -0
- /package/dist/{fanout-sidecar-B5LVUMQX.js.map → fanout-sidecar-SSMRSC2L.js.map} +0 -0
- /package/dist/{executor-KGNLJD6M.js.map → find-OZMTRIK3.js.map} +0 -0
- /package/dist/{with → introspection}/index.js.map +0 -0
- /package/dist/{executor-UX4FASYZ.js.map → issue-FCKN5O6C.js.map} +0 -0
- /package/dist/{executor-XGIS6CR7.js.map → ledger-6XBEVWYP.js.map} +0 -0
- /package/dist/{export-accessible-LKW3QV22.js.map → liberate-CYUOS4NC.js.map} +0 -0
- /package/dist/{extract-partition-UP2ARO75.js.map → link-set-NK6L2A5S.js.map} +0 -0
- /package/dist/{find-YS6XWB46.js.map → money/index.js.map} +0 -0
- /package/dist/{issue-3ACYX7LO.js.map → noydb-FZZIMLCI.js.map} +0 -0
- /package/dist/{ledger-PTK7XZYT.js.map → policy/index.js.map} +0 -0
- /package/dist/{post-register-2YHSADFI.js.map → post-register-VFIYISUK.js.map} +0 -0
- /package/dist/{liberate-MQQXBUCY.js.map → register-UKU2J6MN.js.map} +0 -0
- /package/dist/{link-set-SLJHDNRB.js.map → registry-2VCWVHZS.js.map} +0 -0
- /package/dist/{noydb-ANIW5FLE.js.map → registry-7Y5WF7GS.js.map} +0 -0
- /package/dist/{policy-YDLCOX4P.js.map → registry-BWD2ED52.js.map} +0 -0
- /package/dist/{register-PAM3ASRZ.js.map → registry-DTWRJLSF.js.map} +0 -0
- /package/dist/{registry-4S2U2TR4.js.map → request-withdrawal-JYDZ5XY2.js.map} +0 -0
- /package/dist/{reveal-HWO4YMTJ.js.map → reveal-CL2BCW6A.js.map} +0 -0
- /package/dist/{registry-NPOWJHC4.js.map → revoke-2TSAD2T4.js.map} +0 -0
- /package/dist/{registry-VW6P6A3J.js.map → schema-update/index.js.map} +0 -0
- /package/dist/{registry-VZ3CCI2R.js.map → search/index.js.map} +0 -0
- /package/dist/{request-withdrawal-DI3H5WUI.js.map → sequence/index.js.map} +0 -0
- /package/dist/{revoke-R5CZSVUT.js.map → signer-K7Z2EOMG.js.map} +0 -0
- /package/dist/{signer-MBVHW4WE.js.map → stale-A4J26OIC.js.map} +0 -0
- /package/dist/{stale-VZL4OGUB.js.map → storage-YVHZUISN.js.map} +0 -0
- /package/dist/{storage-3MEJUENZ.js.map → store/index.js.map} +0 -0
- /package/dist/{store-coordination-provider-FKX3F6TQ.js.map → store-coordination-provider-EWRZL7XF.js.map} +0 -0
- /package/dist/{verify-26Y5GNMK.js.map → verify-7XWHJWUN.js.map} +0 -0
- /package/dist/{withdraw-accessible-TZDATQVR.js.map → walk-P5D6CF4V.js.map} +0 -0
- /package/dist/with-lookup/{aggregate → reduce}/canonical-key.d.ts +0 -0
- /package/dist/{with-party → with-sync}/tab-coordination.d.ts +0 -0
- /package/dist/{with-party → with-sync}/tab-write-relay.d.ts +0 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Memoized module loader for the S4 lazy-import seam (#846c).
|
|
3
|
+
*
|
|
4
|
+
* The spine and the services reach optional machinery through a dynamic
|
|
5
|
+
* `import()` — that is what keeps a service out of the floor bundle for
|
|
6
|
+
* consumers who never opt into it, and `check-architecture`'s `port-layering`
|
|
7
|
+
* rule requires it for any spine→service edge. The pattern stays; this only
|
|
8
|
+
* removes the ceremony that grew around it.
|
|
9
|
+
*
|
|
10
|
+
* Call sites had each re-invented the same shape: a `let mod = null` cache
|
|
11
|
+
* declared *inside* the function (so it cached for one invocation and no
|
|
12
|
+
* longer), plus in several places an `as { … }` cast, because destructuring a
|
|
13
|
+
* dynamic import inline gave up the module's type.
|
|
14
|
+
*
|
|
15
|
+
* ```ts
|
|
16
|
+
* const loadExecutor = lazy(() => import('./executor.js'))
|
|
17
|
+
* // …
|
|
18
|
+
* const { DerivationExecutor } = await loadExecutor()
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* Note this is about clarity, not speed: the ES module system already caches a
|
|
22
|
+
* resolved module, so the win is one named binding per module instead of a
|
|
23
|
+
* hand-rolled cache and a cast at every call site.
|
|
24
|
+
*
|
|
25
|
+
* Concurrent first calls share a single in-flight promise rather than each
|
|
26
|
+
* starting their own `import()`.
|
|
27
|
+
*
|
|
28
|
+
* @internal
|
|
29
|
+
*/
|
|
30
|
+
export declare function lazy<T>(load: () => Promise<T>): () => Promise<T>;
|
package/dist/kernel/noydb.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
+
import type { RotateResult } from '../with-party/team/keyring.js';
|
|
1
2
|
import type { NoydbOptions, NoydbEventMap, GrantOptions, RevokeOptions, UpdateUserOptions, UserInfo, PushResult, PullResult, PushOptions, PullOptions, SyncStatus, NoydbStore, AccessibleVault, ListAccessibleVaultsOptions, QueryAcrossOptions, QueryAcrossResult, TranslatorAuditEntry, WriteConflict, UserApiFactory, ActiveTier, FactorProofBundle, GateName, VaultPolicy } from './types.js';
|
|
2
|
-
import type {
|
|
3
|
-
import { type RotatePassphraseInput, type RecoverPassphraseInput, type RecoverPassphraseResult, type RotateRecoveryOptions, type RotateRecoveryResult, type EnrollRecoveryResult, type RecoveryEnrollmentInput, type RecoveryProof } from '../with-party/team/rotate-recover.js';
|
|
4
|
-
import type { RecoverUserOptions } from '../with-party/team/peer-recover.js';
|
|
5
|
-
import { type PaperRecoveryEntry, type ShamirRecoveryEntry } from '../with-party/team/recovery.js';
|
|
3
|
+
import type { SecretPolicy } from './validation.js';
|
|
6
4
|
import { type CoordinationProvider } from '../port/by/default-provider.js';
|
|
7
5
|
import type { Cover } from '../with-party/directory/cover/types.js';
|
|
8
6
|
import type { SetCoverInput } from '../with-party/directory/cover/schema.js';
|
|
@@ -11,19 +9,17 @@ import type { VaultMeta } from '../with-shape/introspection/meta.js';
|
|
|
11
9
|
import { WriteQueueTracker, type WriteQueue } from './write-queue.js';
|
|
12
10
|
import { WriteHookRegistry, type WriteHook, type Unsubscribe } from '../port/with/write-hooks.js';
|
|
13
11
|
import { ServiceBus } from '../port/with/service-bus.js';
|
|
14
|
-
import { type TabCoordinationOptions, type TabRole, type TabPresence } from '../with-
|
|
12
|
+
import { type TabCoordinationOptions, type TabRole, type TabPresence } from '../with-sync/tab-coordination.js';
|
|
15
13
|
import type { UnlockedKeyring } from '../with-party/team/keyring.js';
|
|
16
|
-
import
|
|
17
|
-
import {
|
|
18
|
-
import type { KeyringAuthenticator } from './types.js';
|
|
19
|
-
import type { SyncEngine } from '../with-party/team/sync.js';
|
|
20
|
-
import type { SyncTransaction } from '../with-party/team/sync-transaction.js';
|
|
14
|
+
import type { SyncEngine } from '../with-sync/engine.js';
|
|
15
|
+
import type { SyncTransaction } from '../with-sync/transaction.js';
|
|
21
16
|
import { type SnapshotMeta } from '../with-fork/snapshots/strategy.js';
|
|
22
17
|
import type { AmendmentTxOptions } from '../with-commit/tx/transaction.js';
|
|
23
18
|
import { TxContext } from '../with-commit/tx/transaction.js';
|
|
24
19
|
import type { DryRunResult } from '../with-commit/tx/dry-run.js';
|
|
25
20
|
import { type ForgetStrategy } from '../with-audit/forget/strategy.js';
|
|
26
21
|
import { type CustodyStrategy } from '../with-party/custody/strategy.js';
|
|
22
|
+
import { TeamFacade } from '../with-party/team/noydb-facade.js';
|
|
27
23
|
/** NoydbOptions with the store resolved to a non-optional value (internal use only). */
|
|
28
24
|
type ResolvedNoydbOptions = NoydbOptions & {
|
|
29
25
|
readonly store: NoydbStore;
|
|
@@ -56,7 +52,7 @@ export declare class Noydb {
|
|
|
56
52
|
private readonly keyringCache;
|
|
57
53
|
private readonly syncEngines;
|
|
58
54
|
/**
|
|
59
|
-
* Per-vault active session tier — defaults to `1` after a
|
|
55
|
+
* Per-vault active session tier — defaults to `1` after a secret
|
|
60
56
|
* unlock; tier-2 / tier-3 unlocks downgrade it. Used by
|
|
61
57
|
* {@link checkGate} to evaluate `gate.minTier`.
|
|
62
58
|
*/
|
|
@@ -84,26 +80,38 @@ export declare class Noydb {
|
|
|
84
80
|
private writeRelay;
|
|
85
81
|
/** Per-vault policy enforcers. */
|
|
86
82
|
private readonly policyEnforcers;
|
|
87
|
-
private readonly txStrategy;
|
|
88
|
-
private readonly forgetStrategy;
|
|
89
83
|
/**
|
|
90
|
-
*
|
|
91
|
-
* `
|
|
92
|
-
*
|
|
84
|
+
* Every opt-in service, resolved once (#838). Shared by reference with each
|
|
85
|
+
* `Vault` this instance opens and, through them, every `Collection` — so
|
|
86
|
+
* there is exactly one resolution and no construction path can disagree
|
|
87
|
+
* about which services are enabled (the #834 bug class).
|
|
93
88
|
*/
|
|
94
|
-
readonly
|
|
89
|
+
private readonly strategies;
|
|
95
90
|
/**
|
|
96
|
-
* Opt-in
|
|
97
|
-
* `
|
|
98
|
-
*
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
91
|
+
* Opt-in sovereign-custody (FR-6) strategy — `NO_CUSTODY` (throwing) unless
|
|
92
|
+
* `withCustody()` was passed. Kept as a public accessor because `Vault`
|
|
93
|
+
* routes `vault.custody.liberate` through `this.noydb.custodyStrategy`.
|
|
94
|
+
* @internal
|
|
95
|
+
*/
|
|
96
|
+
get custodyStrategy(): CustodyStrategy;
|
|
102
97
|
private readonly snapshots;
|
|
103
98
|
private readonly policyManager;
|
|
104
99
|
/** Pre-resolved policy-gate engine function (mirrors `coordinationProvider`/`userApiFactory` above). */
|
|
105
100
|
private readonly policyCheckGate;
|
|
106
|
-
|
|
101
|
+
/**
|
|
102
|
+
* Credential and multi-user operations — enrolment, secret rotation,
|
|
103
|
+
* recovery, quick-unlock (#846).
|
|
104
|
+
*
|
|
105
|
+
* Public because 23 methods on this class did nothing but restate a
|
|
106
|
+
* TeamFacade signature and forward to it, so every signature had to be
|
|
107
|
+
* hand-kept in sync with its counterpart. `db.team.rotateSecret(…)`
|
|
108
|
+
* reads the same and has one source of truth.
|
|
109
|
+
*
|
|
110
|
+
* A getter, not a field, so it appears in the prototype-based kernel API
|
|
111
|
+
* manifest — an instance field is invisible to it (the same reason
|
|
112
|
+
* `custodyStrategy` became one in #838).
|
|
113
|
+
*/
|
|
114
|
+
get team(): TeamFacade;
|
|
107
115
|
/**
|
|
108
116
|
* Currently-running multi-record transaction, set by
|
|
109
117
|
* `runTransaction` at the start of Phase 2 (commit) and cleared in
|
|
@@ -151,7 +159,19 @@ export declare class Noydb {
|
|
|
151
159
|
create?: boolean;
|
|
152
160
|
meta?: VaultMeta;
|
|
153
161
|
}): Promise<Vault>;
|
|
154
|
-
/**
|
|
162
|
+
/**
|
|
163
|
+
* Synchronous access to an ALREADY-OPEN vault.
|
|
164
|
+
*
|
|
165
|
+
* Returns the instance `openVault()` produced, or throws — it never
|
|
166
|
+
* constructs. It used to fall back to building a Vault itself (once for
|
|
167
|
+
* plaintext, once for encrypted-with-cached-keyring), and those copies
|
|
168
|
+
* drifted from the real open path: the encrypted one silently omitted six
|
|
169
|
+
* strategies, so a vault reached this way threw `*NotEnabledError` for
|
|
170
|
+
* services the caller had configured (#834). Both fallbacks also skipped
|
|
171
|
+
* the async registry init and schema-fence snapshot that `openVault`
|
|
172
|
+
* performs, which a synchronous method cannot await. One construction
|
|
173
|
+
* path is the only way that divergence stays fixed.
|
|
174
|
+
*/
|
|
155
175
|
vault(name: string): Vault;
|
|
156
176
|
/**
|
|
157
177
|
* Grant access to a user for a vault.
|
|
@@ -245,23 +265,33 @@ export declare class Noydb {
|
|
|
245
265
|
/**
|
|
246
266
|
* Rotate the DEKs for the given collections in a vault.
|
|
247
267
|
*
|
|
248
|
-
* Generates fresh DEKs
|
|
249
|
-
*
|
|
250
|
-
*
|
|
251
|
-
*
|
|
252
|
-
* key-rotation policy.
|
|
268
|
+
* Generates fresh DEKs and re-encrypts every record in each collection.
|
|
269
|
+
* The old DEKs become unreachable — useful as a defense-in-depth measure
|
|
270
|
+
* after a suspected key leak, or as the scheduled half of a key-rotation
|
|
271
|
+
* policy.
|
|
253
272
|
*
|
|
254
|
-
*
|
|
255
|
-
*
|
|
256
|
-
*
|
|
257
|
-
*
|
|
273
|
+
* ## Other members LOSE access to the rotated collections (#854)
|
|
274
|
+
*
|
|
275
|
+
* A member's DEKs are wrapped under that member's KEK, and a KEK derives
|
|
276
|
+
* only from that member's secret. The caller cannot derive anyone else's
|
|
277
|
+
* KEK, so re-wrapping a fresh DEK for them is impossible — that is the
|
|
278
|
+
* zero-knowledge property working as designed. Rotation therefore DROPS
|
|
279
|
+
* the rotated collections from every other member's keyring.
|
|
280
|
+
*
|
|
281
|
+
* The returned {@link RotateResult.needsRegrant} names each (member,
|
|
282
|
+
* collection) pair that was dropped. Re-run `grant()` for those pairs, or
|
|
283
|
+
* they stay locked out.
|
|
284
|
+
*
|
|
285
|
+
* Unlike `revoke({ rotateKeys: true })`, this call does not REMOVE any
|
|
286
|
+
* user from the vault — they keep membership and their other collections.
|
|
287
|
+
* This is the "just rotate" path; "revoke and rotate" lives in `revoke()`.
|
|
258
288
|
*
|
|
259
289
|
* Exposed on Noydb (rather than only on the lower-level keyring
|
|
260
290
|
* module) so CLI and admin tooling can trigger rotation without
|
|
261
291
|
* reaching into internals. See `noy-db rotate` for the CLI wrapper.
|
|
262
292
|
* Opt-in (#267): throws {@link TeamNotEnabledError} without `withTeam()`.
|
|
263
293
|
*/
|
|
264
|
-
rotate(vault: string, collections: string[]): Promise<
|
|
294
|
+
rotate(vault: string, collections: string[]): Promise<RotateResult>;
|
|
265
295
|
/** List all users with access to a vault. */
|
|
266
296
|
listUsers(vault: string): Promise<UserInfo[]>;
|
|
267
297
|
/**
|
|
@@ -270,9 +300,9 @@ export declare class Noydb {
|
|
|
270
300
|
*
|
|
271
301
|
* The walk is a two-step pipeline: first ask the adapter for the
|
|
272
302
|
* universe of compartments it stores, then for each one attempt to
|
|
273
|
-
* load the calling user's keyring with the in-memory
|
|
303
|
+
* load the calling user's keyring with the in-memory secret.
|
|
274
304
|
* Compartments where the user has no keyring file (`NoAccessError`)
|
|
275
|
-
* or where the
|
|
305
|
+
* or where the secret doesn't unwrap (`InvalidKeyError`) are
|
|
276
306
|
* silently dropped from the result — the existence of those
|
|
277
307
|
* compartments is **not** confirmed in the return value.
|
|
278
308
|
*
|
|
@@ -293,15 +323,15 @@ export declare class Noydb {
|
|
|
293
323
|
* **Known edge case.** A vault whose keyring file
|
|
294
324
|
* happens to have an empty wrapped-DEKs map (because the owner
|
|
295
325
|
* granted access before any collection was created) will pass the
|
|
296
|
-
* `loadKeyring` probe with *any*
|
|
326
|
+
* `loadKeyring` probe with *any* secret — there are no DEKs to
|
|
297
327
|
* unwrap, so the integrity-checked unwrap that normally rejects
|
|
298
|
-
* wrong
|
|
328
|
+
* wrong secrets never runs. The result is that an unrelated
|
|
299
329
|
* principal who happens to know the user-id and the vault
|
|
300
330
|
* name can show up in `listAccessibleVaults()` as having
|
|
301
331
|
* access to that empty vault. They cannot read any actual
|
|
302
332
|
* data (their DEK set is empty), so this is a metadata leak
|
|
303
333
|
* (vault name + user-id), not a content leak. Hardening this
|
|
304
|
-
* via a
|
|
334
|
+
* via a secret canary in the keyring file is a deferred
|
|
305
335
|
* follow-up.
|
|
306
336
|
*
|
|
307
337
|
* **Cost.** O(compartments × keyring-load) — one `loadKeyring`
|
|
@@ -394,15 +424,15 @@ export declare class Noydb {
|
|
|
394
424
|
*/
|
|
395
425
|
_resolveBackend(vaultId: string): NoydbStore;
|
|
396
426
|
/**
|
|
397
|
-
* Change the current user's
|
|
427
|
+
* Change the current user's secret for a vault.
|
|
398
428
|
*
|
|
399
|
-
* Validates the new
|
|
400
|
-
* `{
|
|
401
|
-
* fixtures and migrations. Pass a `
|
|
429
|
+
* Validates the new secret against the strength rules. Pass
|
|
430
|
+
* `{ allowWeakSecret: true }` to skip — typically only useful for
|
|
431
|
+
* fixtures and migrations. Pass a `SecretPolicy` to override the
|
|
402
432
|
* default rules (e.g. consumer-tunable `pattern` / `customValidator`).
|
|
403
433
|
*/
|
|
404
|
-
changeSecret(vault: string,
|
|
405
|
-
|
|
434
|
+
changeSecret(vault: string, newSecret: string, options?: SecretPolicy & {
|
|
435
|
+
allowWeakSecret?: boolean;
|
|
406
436
|
}): Promise<void>;
|
|
407
437
|
/** Push local changes to remote for a vault. */
|
|
408
438
|
push(vault: string, options?: PushOptions): Promise<PushResult>;
|
|
@@ -660,7 +690,7 @@ export declare class Noydb {
|
|
|
660
690
|
* denial; resolves with `void` on success.
|
|
661
691
|
*
|
|
662
692
|
* @param vault The vault whose policy applies.
|
|
663
|
-
* @param gate Gate name — built-in (e.g. `'rotate-
|
|
693
|
+
* @param gate Gate name — built-in (e.g. `'rotate-secret'`)
|
|
664
694
|
* or app-defined (`app:*`).
|
|
665
695
|
* @param presented Caller-supplied factor proofs.
|
|
666
696
|
*/
|
|
@@ -675,12 +705,12 @@ export declare class Noydb {
|
|
|
675
705
|
* Two enforcement modes:
|
|
676
706
|
*
|
|
677
707
|
* 1. **Managed-mode mandatory strong-recovery.** When
|
|
678
|
-
* `
|
|
708
|
+
* `secretMode === 'managed'`, the vault MUST have at least
|
|
679
709
|
* one **strong** recovery profile (Shamir today). Paper alone is
|
|
680
710
|
* rejected because under managed mode the user has no memorized
|
|
681
|
-
*
|
|
711
|
+
* secret, so losing the paper sheet = losing every record.
|
|
682
712
|
* This check is unconditional — independent of `requireRecovery`
|
|
683
|
-
* and the `recover-
|
|
713
|
+
* and the `recover-secret` gate.
|
|
684
714
|
*
|
|
685
715
|
* 2. **Opt-in strict mandatory-recovery.** When
|
|
686
716
|
* `requireRecovery: true` is set on createNoydb (and the gate is
|
|
@@ -699,26 +729,6 @@ export declare class Noydb {
|
|
|
699
729
|
* @internal
|
|
700
730
|
*/
|
|
701
731
|
_setActiveTier(vault: string, tier: ActiveTier): void;
|
|
702
|
-
/** Add a tier-2 authenticator slot — see {@link TeamFacade.enrollAuthenticator}. */
|
|
703
|
-
enrollAuthenticator(vault: string, options: EnrollAuthenticatorOptions, factors?: FactorProofBundle): Promise<void>;
|
|
704
|
-
/** Remove a tier-2 authenticator slot — see {@link TeamFacade.removeAuthenticator}. */
|
|
705
|
-
removeAuthenticator(vault: string, slotId: string, factors?: FactorProofBundle): Promise<void>;
|
|
706
|
-
/** Read the slot list for a vault — see {@link TeamFacade.listAuthenticators}. */
|
|
707
|
-
listAuthenticators(vault: string): Promise<ReadonlyArray<KeyringAuthenticator>>;
|
|
708
|
-
/** Mutate an authenticator slot's `meta` — see {@link TeamFacade.updateAuthenticator}. */
|
|
709
|
-
updateAuthenticator(vault: string, slotId: string, options: UpdateAuthenticatorOptions, factors?: FactorProofBundle): Promise<void>;
|
|
710
|
-
/** Native WebAuthn enrollment — see {@link TeamFacade.enrollWebAuthn}. */
|
|
711
|
-
enrollWebAuthn(vault: string, ceremony: (keyring: UnlockedKeyring) => Promise<EnrollAuthenticatorOptions>, factors?: FactorProofBundle): Promise<{
|
|
712
|
-
credentialId: string;
|
|
713
|
-
}>;
|
|
714
|
-
/** List webauthn-method slots — see {@link TeamFacade.listWebAuthnSlots}. */
|
|
715
|
-
listWebAuthnSlots(vault: string): Promise<ReadonlyArray<{
|
|
716
|
-
id: string;
|
|
717
|
-
enrolledAt: string;
|
|
718
|
-
credentialId: string;
|
|
719
|
-
}>>;
|
|
720
|
-
/** Unlock via a tier-2 authenticator slot — see {@link TeamFacade.unlockViaAuthenticator}. */
|
|
721
|
-
unlockViaAuthenticator(vault: string, slotId: string, verify: (slot: KeyringAuthenticator) => Promise<UnlockedKeyring>): Promise<UnlockedKeyring>;
|
|
722
732
|
/**
|
|
723
733
|
* Set the owner-curated cover for a vault. Throws
|
|
724
734
|
* `ValidationError` if the developer did not opt the hub into
|
|
@@ -748,59 +758,6 @@ export declare class Noydb {
|
|
|
748
758
|
getCover(vault: string, opts?: {
|
|
749
759
|
readonly locale?: string;
|
|
750
760
|
}): Promise<Cover | undefined>;
|
|
751
|
-
/** @deprecated Use {@link Noydb.setCover} (#799 rename). */
|
|
752
|
-
setPublicEnvelope(vault: string, input: SetCoverInput): Promise<Cover>;
|
|
753
|
-
/** @deprecated Use {@link Noydb.getCover} (#799 rename). */
|
|
754
|
-
getPublicEnvelope(vault: string, opts?: {
|
|
755
|
-
readonly locale?: string;
|
|
756
|
-
}): Promise<Cover | undefined>;
|
|
757
|
-
/** English summary of the configured auth model — see {@link TeamFacade.describeAuthConfig}. */
|
|
758
|
-
describeAuthConfig(vault: string): Promise<string>;
|
|
759
|
-
/** Mermaid `flowchart TB` source for the auth graph — see {@link TeamFacade.diagramAuthConfig}. */
|
|
760
|
-
diagramAuthConfig(vault: string): Promise<string>;
|
|
761
|
-
/** Per-user enrollment summary — see {@link TeamFacade.describeUserAuth}. */
|
|
762
|
-
describeUserAuth(vault: string, userId: string, factors?: FactorProofBundle): Promise<string>;
|
|
763
|
-
/** Bulk per-user enrollment summary — see {@link TeamFacade.describeAllUsersAuth}. */
|
|
764
|
-
describeAllUsersAuth(vault: string, factors?: FactorProofBundle): Promise<Array<{
|
|
765
|
-
userId: string;
|
|
766
|
-
description: string;
|
|
767
|
-
}>>;
|
|
768
|
-
/** Rotate the user's passphrase (user remembers old) — see {@link TeamFacade.rotatePassphrase}. */
|
|
769
|
-
rotatePassphrase(vault: string, input: RotatePassphraseInput, factors?: FactorProofBundle): Promise<void>;
|
|
770
|
-
/** Reset the passphrase using a recovery proof — see {@link TeamFacade.recoverPassphrase}. */
|
|
771
|
-
recoverPassphrase(vault: string, input: RecoverPassphraseInput, factors?: FactorProofBundle): Promise<RecoverPassphraseResult>;
|
|
772
|
-
/** Deliberate paper/Shamir recovery-code regeneration — see {@link TeamFacade.rotateRecovery}. */
|
|
773
|
-
rotateRecovery(vault: string, options: RotateRecoveryOptions, factors?: FactorProofBundle): Promise<RotateRecoveryResult>;
|
|
774
|
-
/** Atomic create-and-enroll for managed-mode vaults — see {@link TeamFacade.openVaultAndEnrollRecovery}. */
|
|
775
|
-
openVaultAndEnrollRecovery(vault: string, opts: {
|
|
776
|
-
readonly recovery: ReadonlyArray<RecoveryEnrollmentInput>;
|
|
777
|
-
readonly locale?: string;
|
|
778
|
-
}): Promise<{
|
|
779
|
-
readonly vault: Vault;
|
|
780
|
-
readonly recoveryEnrollments: ReadonlyArray<EnrollRecoveryResult>;
|
|
781
|
-
}>;
|
|
782
|
-
/** Recovery flow under managed-passphrase mode — see {@link TeamFacade.recoverManagedPassphrase}. */
|
|
783
|
-
recoverManagedPassphrase(vault: string, options: {
|
|
784
|
-
readonly recoveryProof: RecoveryProof;
|
|
785
|
-
readonly passphrasePolicy?: PassphrasePolicy;
|
|
786
|
-
}): Promise<void>;
|
|
787
|
-
/** Atomic peer-recovery of an existing user's keyring — see {@link TeamFacade.recoverUser}. */
|
|
788
|
-
recoverUser(vault: string, options: RecoverUserOptions, factors?: FactorProofBundle): Promise<void>;
|
|
789
|
-
/** Persist a recovery enrollment (paper or Shamir) — see {@link TeamFacade.enrollRecovery}. */
|
|
790
|
-
enrollRecovery(vault: string, enrollment: RecoveryEnrollmentInput): Promise<EnrollRecoveryResult>;
|
|
791
|
-
/** Read the persisted recovery entries (paper + Shamir) — see {@link TeamFacade.listRecoveryEntries}. */
|
|
792
|
-
listRecoveryEntries(vault: string): Promise<{
|
|
793
|
-
paper: ReadonlyArray<PaperRecoveryEntry>;
|
|
794
|
-
shamir: ReadonlyArray<ShamirRecoveryEntry>;
|
|
795
|
-
}>;
|
|
796
|
-
/** Register a tier-3 quick-unlock state — see {@link TeamFacade.enrollUnlock}. */
|
|
797
|
-
enrollUnlock(vault: string, state: QuickUnlockState, factors?: FactorProofBundle): Promise<void>;
|
|
798
|
-
/** Resume a session via the registered tier-3 state — see {@link TeamFacade.unlockViaPin}. */
|
|
799
|
-
unlockViaPin(vault: string, resume: (state: QuickUnlockState) => Promise<UnlockedKeyring>): Promise<UnlockedKeyring | undefined>;
|
|
800
|
-
/** Drop the tier-3 state for a vault — see {@link TeamFacade.clearQuickUnlock}. */
|
|
801
|
-
clearQuickUnlock(vault: string): void;
|
|
802
|
-
/** Public defensive-copy accessor for the unlocked keyring — see {@link TeamFacade.getKeyring}. */
|
|
803
|
-
getKeyring(vault: string): Promise<UnlockedKeyring>;
|
|
804
761
|
/**
|
|
805
762
|
* Live-reference variant used by the hub's own code paths. Internal
|
|
806
763
|
* mutations on `deks` (e.g. {@link ensureCollectionDEK} adding a
|
|
@@ -811,7 +768,7 @@ export declare class Noydb {
|
|
|
811
768
|
private _getKeyringInternal;
|
|
812
769
|
/**
|
|
813
770
|
* Take an on-demand checkpoint of the given vault.
|
|
814
|
-
* Requires `
|
|
771
|
+
* Requires `snapshotsStrategy: withSnapshots({ store })` in `createNoydb`.
|
|
815
772
|
* @throws ValidationError when the vault is not open
|
|
816
773
|
*/
|
|
817
774
|
snapshot(vault: string, opts?: {
|
|
@@ -9,10 +9,10 @@ import type { Clause, Operator } from './predicate.js';
|
|
|
9
9
|
import type { CollectionIndexes } from '../../with-lookup/indexing/eager-indexes.js';
|
|
10
10
|
import type { JoinContext, JoinLeg, JoinStrategy } from './join.js';
|
|
11
11
|
import type { LiveQuery } from './live.js';
|
|
12
|
-
import type {
|
|
13
|
-
import type { ReducerBuilder } from '../../with-lookup/
|
|
14
|
-
import type { GroupedQuery, GroupedQueryN } from '../../with-lookup/
|
|
15
|
-
import { type
|
|
12
|
+
import type { ReduceSpec, ReduceResult, Reduction } from '../../with-lookup/reduce/reduction.js';
|
|
13
|
+
import type { ReducerBuilder } from '../../with-lookup/reduce/reducers.js';
|
|
14
|
+
import type { GroupedQuery, GroupedQueryN } from '../../with-lookup/reduce/groupby.js';
|
|
15
|
+
import { type ReduceStrategy } from '../../with-lookup/reduce/strategy.js';
|
|
16
16
|
import type { ViaPipeline } from '../via/pipeline.js';
|
|
17
17
|
export interface OrderBy {
|
|
18
18
|
readonly field: string;
|
|
@@ -114,9 +114,9 @@ export declare class Query<T, S extends keyof T = never, Q extends keyof T & str
|
|
|
114
114
|
private readonly source;
|
|
115
115
|
private readonly plan;
|
|
116
116
|
private readonly joinContext;
|
|
117
|
-
private readonly
|
|
117
|
+
private readonly reduceStrategy;
|
|
118
118
|
private readonly predicates;
|
|
119
|
-
constructor(source: QuerySource<T>, plan?: QueryPlan, joinContext?: JoinContext,
|
|
119
|
+
constructor(source: QuerySource<T>, plan?: QueryPlan, joinContext?: JoinContext, reduceStrategy?: ReduceStrategy, predicates?: ReadonlyMap<string, DeclaredPredicate>);
|
|
120
120
|
/**
|
|
121
121
|
* @internal — accessor for the materialized-view dependency
|
|
122
122
|
* analyzer. Not part of the public API; consumers should use the
|
|
@@ -353,9 +353,9 @@ export declare class Query<T, S extends keyof T = never, Q extends keyof T & str
|
|
|
353
353
|
* .run()
|
|
354
354
|
* ```
|
|
355
355
|
*
|
|
356
|
-
* Returns an `
|
|
356
|
+
* Returns an `Reduction<R>` wrapper with two terminals:
|
|
357
357
|
* - `.run(): R` — synchronous one-shot reduction
|
|
358
|
-
* - `.live():
|
|
358
|
+
* - `.live(): LiveReduction<R>` — reactive primitive that
|
|
359
359
|
* re-runs the reduction whenever the source notifies of a
|
|
360
360
|
* change. Always call `live.stop()` when finished.
|
|
361
361
|
*
|
|
@@ -391,8 +391,8 @@ export declare class Query<T, S extends keyof T = never, Q extends keyof T & str
|
|
|
391
391
|
* aggregates over a collection with sensitive fields.
|
|
392
392
|
*
|
|
393
393
|
*/
|
|
394
|
-
aggregate<Spec extends
|
|
395
|
-
aggregate<Spec extends
|
|
394
|
+
aggregate<Spec extends ReduceSpec>(spec: Spec): Reduction<ReduceResult<Spec>>;
|
|
395
|
+
aggregate<Spec extends ReduceSpec>(build: (b: ReducerBuilder<T, S, M>) => Spec): Reduction<ReduceResult<Spec>>;
|
|
396
396
|
/**
|
|
397
397
|
* Partition matching records into buckets keyed by a field, then
|
|
398
398
|
* terminate with `.aggregate(spec)` to compute per-bucket
|
|
@@ -20,12 +20,6 @@ export { applyJoins, DEFAULT_JOIN_MAX_ROWS, resetJoinWarnings } from './join.js'
|
|
|
20
20
|
export type { JoinLeg, JoinContext, JoinableSource, JoinStrategy } from './join.js';
|
|
21
21
|
export { buildLiveQuery } from './live.js';
|
|
22
22
|
export type { LiveQuery, LiveUpstream } from './live.js';
|
|
23
|
-
export { count, sum, avg, min, max, moneySum, moneyMin, moneyMax, reducerBuilder } from '../../with-lookup/aggregate/reducers.js';
|
|
24
|
-
export type { Reducer, ReducerOptions, ReducerBuilder } from '../../with-lookup/aggregate/reducers.js';
|
|
25
|
-
export { Aggregation, reduceRecords, buildLiveAggregation } from '../../with-lookup/aggregate/aggregation.js';
|
|
26
|
-
export type { AggregateSpec, AggregateResult, AggregationUpstream, LiveAggregation, } from '../../with-lookup/aggregate/aggregation.js';
|
|
27
|
-
export { GroupedQuery, GroupedQueryN, GroupedAggregation, groupAndReduce, resetGroupByWarnings, GROUPBY_WARN_CARDINALITY, GROUPBY_MAX_CARDINALITY, } from '../../with-lookup/aggregate/groupby.js';
|
|
28
|
-
export type { GroupedRow, GroupedRowN } from '../../with-lookup/aggregate/groupby.js';
|
|
29
23
|
export { ScanBuilder } from './scan-builder.js';
|
|
30
24
|
export type { ScanPageProvider } from './scan-builder.js';
|
|
31
25
|
export { GroupCardinalityError, IndexRequiredError, IndexWriteFailureError, JoinTooLargeError, DanglingReferenceError, CrossJoinTooLargeError, CrossJoinSourceUnknownError, FieldNotQueryableError, } from '../errors.js';
|
|
@@ -58,9 +58,9 @@
|
|
|
58
58
|
* - `scan().join(...)` — tracked under (streaming join)
|
|
59
59
|
*/
|
|
60
60
|
import type { QueryField } from '../types.js';
|
|
61
|
-
import type { ReducerBuilder } from '../../with-lookup/
|
|
61
|
+
import type { ReducerBuilder } from '../../with-lookup/reduce/reducers.js';
|
|
62
62
|
import type { Clause, Operator } from './predicate.js';
|
|
63
|
-
import type {
|
|
63
|
+
import type { ReduceSpec, ReduceResult } from '../../with-lookup/reduce/reduction.js';
|
|
64
64
|
import type { JoinContext, JoinLeg } from './join.js';
|
|
65
65
|
import type { ViaPipeline } from '../via/pipeline.js';
|
|
66
66
|
/**
|
|
@@ -321,8 +321,8 @@ export declare class ScanBuilder<T, S extends keyof T = never, M extends keyof T
|
|
|
321
321
|
* method has never run and must not start running as a side effect of
|
|
322
322
|
* this gate).
|
|
323
323
|
*/
|
|
324
|
-
aggregate<Spec extends
|
|
325
|
-
aggregate<Spec extends
|
|
324
|
+
aggregate<Spec extends ReduceSpec>(spec: Spec): Promise<ReduceResult<Spec>>;
|
|
325
|
+
aggregate<Spec extends ReduceSpec>(build: (b: ReducerBuilder<T, S, M>) => Spec): Promise<ReduceResult<Spec>>;
|
|
326
326
|
/**
|
|
327
327
|
* Evaluate the clause list against a single record. Linear in
|
|
328
328
|
* the clause count; short-circuits on first false. Clauses on a
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
*
|
|
21
21
|
* ```ts
|
|
22
22
|
* const db = await createNoydb({
|
|
23
|
-
* store:
|
|
23
|
+
* store: toFile({ dir: './data' }),
|
|
24
24
|
* syncPolicy: {
|
|
25
25
|
* push: { mode: 'debounce', debounceMs: 5_000 },
|
|
26
26
|
* pull: { mode: 'on-focus' },
|
|
@@ -53,8 +53,11 @@ export type PushMode = 'manual' | 'on-change' | 'debounce' | 'interval';
|
|
|
53
53
|
* - `'manual'` — only on explicit `sync.pull()` calls.
|
|
54
54
|
* - `'interval'` — on a fixed `intervalMs` timer.
|
|
55
55
|
* - `'on-focus'` — when the browser tab regains visibility.
|
|
56
|
+
* - `'phased'` — pull the collections named in `sequence`, in order, one at a
|
|
57
|
+
* time, then settle into steady state. For thin clients that need their
|
|
58
|
+
* navigation-critical collections before bulk history.
|
|
56
59
|
*/
|
|
57
|
-
export type PullMode = 'manual' | 'interval' | 'on-focus';
|
|
60
|
+
export type PullMode = 'manual' | 'interval' | 'on-focus' | 'phased';
|
|
58
61
|
/**
|
|
59
62
|
* Push half of a sync policy. Controls the trigger mode and timing guards
|
|
60
63
|
* for outbound sync operations.
|
|
@@ -84,8 +87,22 @@ export interface PushPolicy {
|
|
|
84
87
|
export interface PullPolicy {
|
|
85
88
|
/** Pull trigger mode. */
|
|
86
89
|
readonly mode: PullMode;
|
|
87
|
-
/**
|
|
90
|
+
/**
|
|
91
|
+
* Interval in ms between automatic pulls. Used by `'interval'` mode. Default: 60_000.
|
|
92
|
+
* Under `'phased'` it is the steady-state cadence adopted *after* the sequence
|
|
93
|
+
* completes; omit it to go idle instead.
|
|
94
|
+
*/
|
|
88
95
|
readonly intervalMs?: number;
|
|
96
|
+
/**
|
|
97
|
+
* Collection names to pull in order, one at a time. Required when
|
|
98
|
+
* `mode: 'phased'` and rejected otherwise. Entries must be non-empty and
|
|
99
|
+
* unique — without period narrowing a repeated collection can only be a
|
|
100
|
+
* mistake, so it is rejected rather than silently merged.
|
|
101
|
+
*
|
|
102
|
+
* Period-scoped phases (`collection@period`) are deferred to `partitions`;
|
|
103
|
+
* use `db.pull(vault, { periods })` explicitly meanwhile.
|
|
104
|
+
*/
|
|
105
|
+
readonly sequence?: readonly string[];
|
|
89
106
|
}
|
|
90
107
|
/**
|
|
91
108
|
* Combined push + pull sync scheduling policy for a vault.
|
|
@@ -114,6 +131,25 @@ export declare const BUNDLE_STORE_POLICY: SyncPolicy;
|
|
|
114
131
|
* - `'error'` — last sync operation failed; `lastError` holds the cause.
|
|
115
132
|
*/
|
|
116
133
|
export type SyncSchedulerState = 'idle' | 'pending' | 'pushing' | 'pulling' | 'error';
|
|
134
|
+
/**
|
|
135
|
+
* How much of a collection a caller may rely on, under a `'phased'` pull.
|
|
136
|
+
*
|
|
137
|
+
* - `'cold'` — not pulled yet, or its phase did not complete cleanly. A miss
|
|
138
|
+
* from `get()` proves nothing.
|
|
139
|
+
* - `'pulling'` — its phase is in flight. Never terminal: a phase always ends
|
|
140
|
+
* in `'live'` or back in `'cold'`, because a stuck `'pulling'` would leave a
|
|
141
|
+
* permanent skeleton in the UI.
|
|
142
|
+
* - `'live'` — its phase completed cleanly, so a miss is a real absence.
|
|
143
|
+
*/
|
|
144
|
+
export type ReadinessState = 'cold' | 'pulling' | 'live';
|
|
145
|
+
/**
|
|
146
|
+
* What a scheduler-initiated pull achieved, as reported by the callback.
|
|
147
|
+
*
|
|
148
|
+
* `'incomplete'` covers both a pull that reported errors (`PullResult.errors`
|
|
149
|
+
* accumulates without throwing) and one that was skipped — e.g. role-gated on a
|
|
150
|
+
* backup target. Either way nothing may be claimed about completeness.
|
|
151
|
+
*/
|
|
152
|
+
export type PullPhaseOutcome = 'complete' | 'incomplete';
|
|
117
153
|
/**
|
|
118
154
|
* Snapshot of the sync scheduler's state, returned by `SyncScheduler.status`.
|
|
119
155
|
* Safe to expose in a reactive UI status indicator.
|
|
@@ -124,6 +160,18 @@ export interface SyncSchedulerStatus {
|
|
|
124
160
|
readonly lastPullAt: string | null;
|
|
125
161
|
readonly lastError: Error | null;
|
|
126
162
|
readonly pendingWrites: number;
|
|
163
|
+
/**
|
|
164
|
+
* Per-collection readiness. Empty unless `pull.mode === 'phased'`.
|
|
165
|
+
*
|
|
166
|
+
* A collection the sequence never names is **absent** from the map, and
|
|
167
|
+
* `undefined` means *"no claim made"* — never a reason to gate a UI.
|
|
168
|
+
*/
|
|
169
|
+
readonly readiness: ReadonlyMap<string, ReadinessState>;
|
|
170
|
+
/** 1-based position in the sequence, or `null` outside a phased run. */
|
|
171
|
+
readonly phase: {
|
|
172
|
+
readonly index: number;
|
|
173
|
+
readonly total: number;
|
|
174
|
+
} | null;
|
|
127
175
|
}
|
|
128
176
|
/**
|
|
129
177
|
* Callbacks injected into `SyncScheduler` by the SyncEngine.
|
|
@@ -133,7 +181,13 @@ export interface SyncSchedulerStatus {
|
|
|
133
181
|
*/
|
|
134
182
|
export interface SyncSchedulerCallbacks {
|
|
135
183
|
push(): Promise<void>;
|
|
136
|
-
|
|
184
|
+
/**
|
|
185
|
+
* @param collections - Narrow the pull to these collections. Passed by a
|
|
186
|
+
* `'phased'` sequence, one collection per phase; omitted for a whole-vault pull.
|
|
187
|
+
* @returns Whether the pull may be treated as complete. Returning `void` reads
|
|
188
|
+
* as `'complete'`, so callers with nothing to report need not opt in.
|
|
189
|
+
*/
|
|
190
|
+
pull(collections?: readonly string[]): Promise<PullPhaseOutcome | void>;
|
|
137
191
|
getDirtyCount(): number;
|
|
138
192
|
}
|
|
139
193
|
/**
|
|
@@ -150,6 +204,8 @@ export declare class SyncScheduler {
|
|
|
150
204
|
private _lastPullAt;
|
|
151
205
|
private _lastError;
|
|
152
206
|
private _lastPushTime;
|
|
207
|
+
private readonly _readiness;
|
|
208
|
+
private _phase;
|
|
153
209
|
private debounceTimer;
|
|
154
210
|
private pushIntervalTimer;
|
|
155
211
|
private pullIntervalTimer;
|
|
@@ -175,6 +231,22 @@ export declare class SyncScheduler {
|
|
|
175
231
|
forcePush(): Promise<void>;
|
|
176
232
|
/** Force an immediate pull, bypassing the scheduler. */
|
|
177
233
|
forcePull(): Promise<void>;
|
|
234
|
+
/**
|
|
235
|
+
* Arm the steady-state pull timer, if the policy specifies a cadence.
|
|
236
|
+
* Shared by `'interval'` mode and by `'phased'` once its sequence drains.
|
|
237
|
+
*/
|
|
238
|
+
private startPullInterval;
|
|
239
|
+
/**
|
|
240
|
+
* Pull each collection in turn, then hand over to steady state.
|
|
241
|
+
*
|
|
242
|
+
* Strictly sequential — running phases concurrently would defeat the
|
|
243
|
+
* prioritisation that is the entire point of a sequence. Each phase is an
|
|
244
|
+
* ordinary scoped pull, so a phase that reports errors does not abort the
|
|
245
|
+
* ones behind it; `executePull` records the failure and the walk continues.
|
|
246
|
+
* `started` is re-checked between phases so `stop()` cuts a sequence short
|
|
247
|
+
* instead of letting it run on against a closed vault.
|
|
248
|
+
*/
|
|
249
|
+
private runSequence;
|
|
178
250
|
private executePush;
|
|
179
251
|
private executePull;
|
|
180
252
|
private resetDebounce;
|