@archipelagolab/lobi 1.0.0 → 1.0.5
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/LICENSE +13 -17
- package/README.md +136 -0
- package/dist/APEv2Parser-6EMKXRZS.js +15 -0
- package/dist/APEv2Parser-6EMKXRZS.js.map +7 -0
- package/dist/AiffParser-E6XWRTXM.js +194 -0
- package/dist/AiffParser-E6XWRTXM.js.map +7 -0
- package/dist/AsfParser-WSOH2JQY.js +620 -0
- package/dist/AsfParser-WSOH2JQY.js.map +7 -0
- package/dist/DsdiffParser-EUWJ4YAR.js +192 -0
- package/dist/DsdiffParser-EUWJ4YAR.js.map +7 -0
- package/dist/DsfParser-R6TPBJIY.js +114 -0
- package/dist/DsfParser-R6TPBJIY.js.map +7 -0
- package/dist/FlacParser-VDASGZ3E.js +16 -0
- package/dist/FlacParser-VDASGZ3E.js.map +7 -0
- package/dist/MP4Parser-64RGJLUM.js +1145 -0
- package/dist/MP4Parser-64RGJLUM.js.map +7 -0
- package/dist/MatroskaParser-O6RXAKYA.js +662 -0
- package/dist/MatroskaParser-O6RXAKYA.js.map +7 -0
- package/dist/MpegParser-B6NX6DS3.js +652 -0
- package/dist/MpegParser-B6NX6DS3.js.map +7 -0
- package/dist/MusepackParser-WUBT63DS.js +331 -0
- package/dist/MusepackParser-WUBT63DS.js.map +7 -0
- package/dist/OggParser-ZY6E5C2P.js +448 -0
- package/dist/OggParser-ZY6E5C2P.js.map +7 -0
- package/dist/WavPackParser-5KTCSQEU.js +209 -0
- package/dist/WavPackParser-5KTCSQEU.js.map +7 -0
- package/dist/WaveParser-RZSHVQPZ.js +300 -0
- package/dist/WaveParser-RZSHVQPZ.js.map +7 -0
- package/dist/auth-presence.js +46 -0
- package/dist/auth-presence.js.map +7 -0
- package/dist/channel-plugin-api.js +79 -0
- package/dist/channel-plugin-api.js.map +7 -0
- package/dist/chunk-22WAAZ6I.js +114 -0
- package/dist/chunk-22WAAZ6I.js.map +7 -0
- package/dist/chunk-2A6HEFSO.js +676 -0
- package/dist/chunk-2A6HEFSO.js.map +7 -0
- package/dist/chunk-2KGHUHKU.js +169 -0
- package/dist/chunk-2KGHUHKU.js.map +7 -0
- package/dist/chunk-2NEQI4K6.js +171 -0
- package/dist/chunk-2NEQI4K6.js.map +7 -0
- package/dist/chunk-2OSJ3MTW.js +175 -0
- package/dist/chunk-2OSJ3MTW.js.map +7 -0
- package/dist/chunk-2Q626TDO.js +27 -0
- package/dist/chunk-2Q626TDO.js.map +7 -0
- package/dist/chunk-2U6OZ7N2.js +155 -0
- package/dist/chunk-2U6OZ7N2.js.map +7 -0
- package/dist/chunk-2Z4IOUDZ.js +129 -0
- package/dist/chunk-2Z4IOUDZ.js.map +7 -0
- package/dist/chunk-2ZEPAW7U.js +154 -0
- package/dist/chunk-2ZEPAW7U.js.map +7 -0
- package/dist/chunk-2ZI6JK5O.js +63 -0
- package/dist/chunk-2ZI6JK5O.js.map +7 -0
- package/dist/chunk-34UY6D6X.js +36 -0
- package/dist/chunk-34UY6D6X.js.map +7 -0
- package/dist/chunk-3JD6JSJD.js +111 -0
- package/dist/chunk-3JD6JSJD.js.map +7 -0
- package/dist/chunk-3TOEIHG5.js +314 -0
- package/dist/chunk-3TOEIHG5.js.map +7 -0
- package/dist/chunk-3TRKKAVT.js +130 -0
- package/dist/chunk-3TRKKAVT.js.map +7 -0
- package/dist/chunk-3UFTTK7C.js +418 -0
- package/dist/chunk-3UFTTK7C.js.map +7 -0
- package/dist/chunk-3XO6AAIC.js +25 -0
- package/dist/chunk-3XO6AAIC.js.map +7 -0
- package/dist/chunk-427SAQME.js +321 -0
- package/dist/chunk-427SAQME.js.map +7 -0
- package/dist/chunk-4JVNTZAI.js +80 -0
- package/dist/chunk-4JVNTZAI.js.map +7 -0
- package/dist/chunk-4O3BEYYM.js +187 -0
- package/dist/chunk-4O3BEYYM.js.map +7 -0
- package/dist/chunk-4Z2N4GW6.js +247 -0
- package/dist/chunk-4Z2N4GW6.js.map +7 -0
- package/dist/chunk-56HN4SH6.js +46 -0
- package/dist/chunk-56HN4SH6.js.map +7 -0
- package/dist/chunk-5APBBTGW.js +7 -0
- package/dist/chunk-5APBBTGW.js.map +7 -0
- package/dist/chunk-5LNGMBWW.js +93 -0
- package/dist/chunk-5LNGMBWW.js.map +7 -0
- package/dist/chunk-5XFQSYZ4.js +52 -0
- package/dist/chunk-5XFQSYZ4.js.map +7 -0
- package/dist/chunk-62N5N4AC.js +241 -0
- package/dist/chunk-62N5N4AC.js.map +7 -0
- package/dist/chunk-6HX3DEXK.js +178 -0
- package/dist/chunk-6HX3DEXK.js.map +7 -0
- package/dist/chunk-6NO5VEVV.js +18 -0
- package/dist/chunk-6NO5VEVV.js.map +7 -0
- package/dist/chunk-6PZGDVLR.js +465 -0
- package/dist/chunk-6PZGDVLR.js.map +7 -0
- package/dist/chunk-6SOGH3TW.js +163 -0
- package/dist/chunk-6SOGH3TW.js.map +7 -0
- package/dist/chunk-72TGY3LX.js +104 -0
- package/dist/chunk-72TGY3LX.js.map +7 -0
- package/dist/chunk-76IE55K7.js +392 -0
- package/dist/chunk-76IE55K7.js.map +7 -0
- package/dist/chunk-7F3242AO.js +86 -0
- package/dist/chunk-7F3242AO.js.map +7 -0
- package/dist/chunk-7FLQSTPG.js +57 -0
- package/dist/chunk-7FLQSTPG.js.map +7 -0
- package/dist/chunk-7MP46JBP.js +177 -0
- package/dist/chunk-7MP46JBP.js.map +7 -0
- package/dist/chunk-7MVZYR2T.js +87 -0
- package/dist/chunk-7MVZYR2T.js.map +7 -0
- package/dist/chunk-7N7ISMPG.js +50 -0
- package/dist/chunk-7N7ISMPG.js.map +7 -0
- package/dist/chunk-7S7LQQPX.js +127 -0
- package/dist/chunk-7S7LQQPX.js.map +7 -0
- package/dist/chunk-7TTNY5FK.js +21 -0
- package/dist/chunk-7TTNY5FK.js.map +7 -0
- package/dist/chunk-7W73QCTR.js +244 -0
- package/dist/chunk-7W73QCTR.js.map +7 -0
- package/dist/chunk-7XXLU33Y.js +76 -0
- package/dist/chunk-7XXLU33Y.js.map +7 -0
- package/dist/chunk-AAO7BQEV.js +258 -0
- package/dist/chunk-AAO7BQEV.js.map +7 -0
- package/dist/chunk-AH4MLRYT.js +91 -0
- package/dist/chunk-AH4MLRYT.js.map +7 -0
- package/dist/chunk-AHKR32FH.js +7 -0
- package/dist/chunk-AHKR32FH.js.map +7 -0
- package/dist/chunk-ALKRFDAW.js +94 -0
- package/dist/chunk-ALKRFDAW.js.map +7 -0
- package/dist/chunk-AQQGAE7N.js +12 -0
- package/dist/chunk-AQQGAE7N.js.map +7 -0
- package/dist/chunk-AWW3YUGJ.js +193 -0
- package/dist/chunk-AWW3YUGJ.js.map +7 -0
- package/dist/chunk-AX7VEEWJ.js +158 -0
- package/dist/chunk-AX7VEEWJ.js.map +7 -0
- package/dist/chunk-BAX7Q6GR.js +55 -0
- package/dist/chunk-BAX7Q6GR.js.map +7 -0
- package/dist/chunk-BBM6BR3Z.js +28 -0
- package/dist/chunk-BBM6BR3Z.js.map +7 -0
- package/dist/chunk-BHXZMHSX.js +109 -0
- package/dist/chunk-BHXZMHSX.js.map +7 -0
- package/dist/chunk-BIUXDLVY.js +62 -0
- package/dist/chunk-BIUXDLVY.js.map +7 -0
- package/dist/chunk-BMFZL2P4.js +97 -0
- package/dist/chunk-BMFZL2P4.js.map +7 -0
- package/dist/chunk-BQXEXK4H.js +114 -0
- package/dist/chunk-BQXEXK4H.js.map +7 -0
- package/dist/chunk-BU2CTWBG.js +30 -0
- package/dist/chunk-BU2CTWBG.js.map +7 -0
- package/dist/chunk-BVKSCLF7.js +195 -0
- package/dist/chunk-BVKSCLF7.js.map +7 -0
- package/dist/chunk-BWA3D22L.js +88 -0
- package/dist/chunk-BWA3D22L.js.map +7 -0
- package/dist/chunk-CE24RSPL.js +506 -0
- package/dist/chunk-CE24RSPL.js.map +7 -0
- package/dist/chunk-CETZGSCP.js +71 -0
- package/dist/chunk-CETZGSCP.js.map +7 -0
- package/dist/chunk-CGBWMONK.js +412 -0
- package/dist/chunk-CGBWMONK.js.map +7 -0
- package/dist/chunk-CPNIXMGX.js +127 -0
- package/dist/chunk-CPNIXMGX.js.map +7 -0
- package/dist/chunk-CSJO73LD.js +84 -0
- package/dist/chunk-CSJO73LD.js.map +7 -0
- package/dist/chunk-CTKBDSL6.js +81 -0
- package/dist/chunk-CTKBDSL6.js.map +7 -0
- package/dist/chunk-CY6WHUCW.js +54 -0
- package/dist/chunk-CY6WHUCW.js.map +7 -0
- package/dist/chunk-D7Q6Z74D.js +123 -0
- package/dist/chunk-D7Q6Z74D.js.map +7 -0
- package/dist/chunk-DZIM4OWK.js +17 -0
- package/dist/chunk-DZIM4OWK.js.map +7 -0
- package/dist/chunk-E3GC4V5V.js +30 -0
- package/dist/chunk-E3GC4V5V.js.map +7 -0
- package/dist/chunk-E5HPDHCW.js +34 -0
- package/dist/chunk-E5HPDHCW.js.map +7 -0
- package/dist/chunk-E75BJJZ2.js +635 -0
- package/dist/chunk-E75BJJZ2.js.map +7 -0
- package/dist/chunk-EE4DHUUZ.js +472 -0
- package/dist/chunk-EE4DHUUZ.js.map +7 -0
- package/dist/chunk-EHELTAAD.js +198 -0
- package/dist/chunk-EHELTAAD.js.map +7 -0
- package/dist/chunk-EKXPSI7Z.js +135 -0
- package/dist/chunk-EKXPSI7Z.js.map +7 -0
- package/dist/chunk-ERCH75SH.js +292 -0
- package/dist/chunk-ERCH75SH.js.map +7 -0
- package/dist/chunk-EVFWZGFL.js +235 -0
- package/dist/chunk-EVFWZGFL.js.map +7 -0
- package/dist/chunk-EVPBRKMZ.js +45 -0
- package/dist/chunk-EVPBRKMZ.js.map +7 -0
- package/dist/chunk-F6AFJHWV.js +45 -0
- package/dist/chunk-F6AFJHWV.js.map +7 -0
- package/dist/chunk-FG4NVFKM.js +455 -0
- package/dist/chunk-FG4NVFKM.js.map +7 -0
- package/dist/chunk-FHNEN6IR.js +14 -0
- package/dist/chunk-FHNEN6IR.js.map +7 -0
- package/dist/chunk-FQ4R7IOX.js +32 -0
- package/dist/chunk-FQ4R7IOX.js.map +7 -0
- package/dist/chunk-FQPYAPJJ.js +124 -0
- package/dist/chunk-FQPYAPJJ.js.map +7 -0
- package/dist/chunk-FQTLJO4W.js +335 -0
- package/dist/chunk-FQTLJO4W.js.map +7 -0
- package/dist/chunk-FVLJSB2W.js +124 -0
- package/dist/chunk-FVLJSB2W.js.map +7 -0
- package/dist/chunk-FYRKBNTI.js +18 -0
- package/dist/chunk-FYRKBNTI.js.map +7 -0
- package/dist/chunk-GD6L3SLC.js +30 -0
- package/dist/chunk-GD6L3SLC.js.map +7 -0
- package/dist/chunk-GI2ZANRY.js +24 -0
- package/dist/chunk-GI2ZANRY.js.map +7 -0
- package/dist/chunk-GK3XVKXT.js +737 -0
- package/dist/chunk-GK3XVKXT.js.map +7 -0
- package/dist/chunk-GKOWCDQV.js +699 -0
- package/dist/chunk-GKOWCDQV.js.map +7 -0
- package/dist/chunk-GLLRCKKE.js +26 -0
- package/dist/chunk-GLLRCKKE.js.map +7 -0
- package/dist/chunk-GNYG6I36.js +175 -0
- package/dist/chunk-GNYG6I36.js.map +7 -0
- package/dist/chunk-GVYGUH2V.js +7 -0
- package/dist/chunk-GVYGUH2V.js.map +7 -0
- package/dist/chunk-GZAGAWSU.js +28 -0
- package/dist/chunk-GZAGAWSU.js.map +7 -0
- package/dist/chunk-H23E72SB.js +163 -0
- package/dist/chunk-H23E72SB.js.map +7 -0
- package/dist/chunk-H6YVV7GE.js +22 -0
- package/dist/chunk-H6YVV7GE.js.map +7 -0
- package/dist/chunk-HDPICD3P.js +4890 -0
- package/dist/chunk-HDPICD3P.js.map +7 -0
- package/dist/chunk-HP5HMWOM.js +123 -0
- package/dist/chunk-HP5HMWOM.js.map +7 -0
- package/dist/chunk-HQSHS6IB.js +88 -0
- package/dist/chunk-HQSHS6IB.js.map +7 -0
- package/dist/chunk-HTV3R73W.js +51 -0
- package/dist/chunk-HTV3R73W.js.map +7 -0
- package/dist/chunk-IJCMYMZB.js +239 -0
- package/dist/chunk-IJCMYMZB.js.map +7 -0
- package/dist/chunk-INNENDEE.js +472 -0
- package/dist/chunk-INNENDEE.js.map +7 -0
- package/dist/chunk-IOTLSMEQ.js +177 -0
- package/dist/chunk-IOTLSMEQ.js.map +7 -0
- package/dist/chunk-IQYYEHSM.js +300 -0
- package/dist/chunk-IQYYEHSM.js.map +7 -0
- package/dist/chunk-IRA5NJ4Q.js +21 -0
- package/dist/chunk-IRA5NJ4Q.js.map +7 -0
- package/dist/chunk-IU7EXXK7.js +1662 -0
- package/dist/chunk-IU7EXXK7.js.map +7 -0
- package/dist/chunk-IUXAKDAY.js +102 -0
- package/dist/chunk-IUXAKDAY.js.map +7 -0
- package/dist/chunk-JMYIFYY5.js +233 -0
- package/dist/chunk-JMYIFYY5.js.map +7 -0
- package/dist/chunk-JSZBX2TA.js +5853 -0
- package/dist/chunk-JSZBX2TA.js.map +7 -0
- package/dist/chunk-KHFWQ334.js +138 -0
- package/dist/chunk-KHFWQ334.js.map +7 -0
- package/dist/chunk-KJW6JLM6.js +95 -0
- package/dist/chunk-KJW6JLM6.js.map +7 -0
- package/dist/chunk-KSEANSJE.js +40 -0
- package/dist/chunk-KSEANSJE.js.map +7 -0
- package/dist/chunk-KVU54E6W.js +63 -0
- package/dist/chunk-KVU54E6W.js.map +7 -0
- package/dist/chunk-L5OUVMHK.js +174 -0
- package/dist/chunk-L5OUVMHK.js.map +7 -0
- package/dist/chunk-LIVQ7GIO.js +86 -0
- package/dist/chunk-LIVQ7GIO.js.map +7 -0
- package/dist/chunk-LO4F6E3N.js +163 -0
- package/dist/chunk-LO4F6E3N.js.map +7 -0
- package/dist/chunk-LSVKDUNM.js +151 -0
- package/dist/chunk-LSVKDUNM.js.map +7 -0
- package/dist/chunk-LVMK2GPM.js +18 -0
- package/dist/chunk-LVMK2GPM.js.map +7 -0
- package/dist/chunk-LXVPETLK.js +1405 -0
- package/dist/chunk-LXVPETLK.js.map +7 -0
- package/dist/chunk-LZNW24OB.js +78 -0
- package/dist/chunk-LZNW24OB.js.map +7 -0
- package/dist/chunk-MAF6PSCJ.js +44 -0
- package/dist/chunk-MAF6PSCJ.js.map +7 -0
- package/dist/chunk-MBIX6Z7U.js +80 -0
- package/dist/chunk-MBIX6Z7U.js.map +7 -0
- package/dist/chunk-MDLLXMC3.js +183 -0
- package/dist/chunk-MDLLXMC3.js.map +7 -0
- package/dist/chunk-MEI5HTWV.js +127 -0
- package/dist/chunk-MEI5HTWV.js.map +7 -0
- package/dist/chunk-MH74AJ3A.js +82 -0
- package/dist/chunk-MH74AJ3A.js.map +7 -0
- package/dist/chunk-MIFIM4PI.js +163 -0
- package/dist/chunk-MIFIM4PI.js.map +7 -0
- package/dist/chunk-MISZB5QJ.js +22 -0
- package/dist/chunk-MISZB5QJ.js.map +7 -0
- package/dist/chunk-MJ27XQYG.js +125 -0
- package/dist/chunk-MJ27XQYG.js.map +7 -0
- package/dist/chunk-MLQY5SKR.js +52 -0
- package/dist/chunk-MLQY5SKR.js.map +7 -0
- package/dist/chunk-MTMHGC3G.js +39 -0
- package/dist/chunk-MTMHGC3G.js.map +7 -0
- package/dist/chunk-MWBAW3YV.js +244 -0
- package/dist/chunk-MWBAW3YV.js.map +7 -0
- package/dist/chunk-MZGGB2YT.js +50 -0
- package/dist/chunk-MZGGB2YT.js.map +7 -0
- package/dist/chunk-N5SNGZJV.js +217 -0
- package/dist/chunk-N5SNGZJV.js.map +7 -0
- package/dist/chunk-NGCTBYQ3.js +181 -0
- package/dist/chunk-NGCTBYQ3.js.map +7 -0
- package/dist/chunk-NMUX7SGU.js +676 -0
- package/dist/chunk-NMUX7SGU.js.map +7 -0
- package/dist/chunk-NO7GMLNU.js +292 -0
- package/dist/chunk-NO7GMLNU.js.map +7 -0
- package/dist/chunk-NTOGVX2Y.js +92 -0
- package/dist/chunk-NTOGVX2Y.js.map +7 -0
- package/dist/chunk-O5IVKDX7.js +30 -0
- package/dist/chunk-O5IVKDX7.js.map +7 -0
- package/dist/chunk-OFWMLQMU.js +7287 -0
- package/dist/chunk-OFWMLQMU.js.map +7 -0
- package/dist/chunk-OJ3ZUKBI.js +73 -0
- package/dist/chunk-OJ3ZUKBI.js.map +7 -0
- package/dist/chunk-OJTHE4B7.js +50 -0
- package/dist/chunk-OJTHE4B7.js.map +7 -0
- package/dist/chunk-OOYPYBTA.js +446 -0
- package/dist/chunk-OOYPYBTA.js.map +7 -0
- package/dist/chunk-OQP4W4AR.js +105 -0
- package/dist/chunk-OQP4W4AR.js.map +7 -0
- package/dist/chunk-OVTT2EKA.js +516 -0
- package/dist/chunk-OVTT2EKA.js.map +7 -0
- package/dist/chunk-P5N63LBS.js +94 -0
- package/dist/chunk-P5N63LBS.js.map +7 -0
- package/dist/chunk-PARITZ7F.js +28 -0
- package/dist/chunk-PARITZ7F.js.map +7 -0
- package/dist/chunk-PBQK4KY4.js +195 -0
- package/dist/chunk-PBQK4KY4.js.map +7 -0
- package/dist/chunk-PSL2AHIA.js +27 -0
- package/dist/chunk-PSL2AHIA.js.map +7 -0
- package/dist/chunk-Q5QT7JBM.js +92 -0
- package/dist/chunk-Q5QT7JBM.js.map +7 -0
- package/dist/chunk-Q7WA5DCR.js +62 -0
- package/dist/chunk-Q7WA5DCR.js.map +7 -0
- package/dist/chunk-QATEENP2.js +7 -0
- package/dist/chunk-QATEENP2.js.map +7 -0
- package/dist/chunk-QDT24CIA.js +485 -0
- package/dist/chunk-QDT24CIA.js.map +7 -0
- package/dist/chunk-QI3NB7D5.js +455 -0
- package/dist/chunk-QI3NB7D5.js.map +7 -0
- package/dist/chunk-QIDAVXSX.js +106 -0
- package/dist/chunk-QIDAVXSX.js.map +7 -0
- package/dist/chunk-QKIGQVP2.js +104 -0
- package/dist/chunk-QKIGQVP2.js.map +7 -0
- package/dist/chunk-QNJENPK2.js +81 -0
- package/dist/chunk-QNJENPK2.js.map +7 -0
- package/dist/chunk-REVXXWAS.js +31 -0
- package/dist/chunk-REVXXWAS.js.map +7 -0
- package/dist/chunk-RFH4HRZP.js +94 -0
- package/dist/chunk-RFH4HRZP.js.map +7 -0
- package/dist/chunk-RNGAGYCL.js +49 -0
- package/dist/chunk-RNGAGYCL.js.map +7 -0
- package/dist/chunk-RPCVN3JA.js +261 -0
- package/dist/chunk-RPCVN3JA.js.map +7 -0
- package/dist/chunk-RQQE5DDT.js +193 -0
- package/dist/chunk-RQQE5DDT.js.map +7 -0
- package/dist/chunk-RVOD3ESA.js +38 -0
- package/dist/chunk-RVOD3ESA.js.map +7 -0
- package/dist/chunk-SAOUP24A.js +70 -0
- package/dist/chunk-SAOUP24A.js.map +7 -0
- package/dist/chunk-SFZL2TCV.js +55 -0
- package/dist/chunk-SFZL2TCV.js.map +7 -0
- package/dist/chunk-SJPFUXBV.js +45 -0
- package/dist/chunk-SJPFUXBV.js.map +7 -0
- package/dist/chunk-SLIUQWAR.js +58 -0
- package/dist/chunk-SLIUQWAR.js.map +7 -0
- package/dist/chunk-SSEX66OL.js +39 -0
- package/dist/chunk-SSEX66OL.js.map +7 -0
- package/dist/chunk-SX2LOHOX.js +251 -0
- package/dist/chunk-SX2LOHOX.js.map +7 -0
- package/dist/chunk-T72EMFTX.js +74 -0
- package/dist/chunk-T72EMFTX.js.map +7 -0
- package/dist/chunk-TA2QJPPG.js +169 -0
- package/dist/chunk-TA2QJPPG.js.map +7 -0
- package/dist/chunk-TFEETDNY.js +78 -0
- package/dist/chunk-TFEETDNY.js.map +7 -0
- package/dist/chunk-THM2QV25.js +108 -0
- package/dist/chunk-THM2QV25.js.map +7 -0
- package/dist/chunk-TRWT2N6Z.js +15 -0
- package/dist/chunk-TRWT2N6Z.js.map +7 -0
- package/dist/chunk-TTXEM54Y.js +76 -0
- package/dist/chunk-TTXEM54Y.js.map +7 -0
- package/dist/chunk-U4LVIY5F.js +1405 -0
- package/dist/chunk-U4LVIY5F.js.map +7 -0
- package/dist/chunk-U767LCSG.js +78 -0
- package/dist/chunk-U767LCSG.js.map +7 -0
- package/dist/chunk-U7GKLHU6.js +120 -0
- package/dist/chunk-U7GKLHU6.js.map +7 -0
- package/dist/chunk-UAB5P5QO.js +60 -0
- package/dist/chunk-UAB5P5QO.js.map +7 -0
- package/dist/chunk-UEHPJQBL.js +38 -0
- package/dist/chunk-UEHPJQBL.js.map +7 -0
- package/dist/chunk-UIBV6IGR.js +31 -0
- package/dist/chunk-UIBV6IGR.js.map +7 -0
- package/dist/chunk-UIYFRUET.js +16352 -0
- package/dist/chunk-UIYFRUET.js.map +7 -0
- package/dist/chunk-UJS3TIVS.js +52 -0
- package/dist/chunk-UJS3TIVS.js.map +7 -0
- package/dist/chunk-UU5PSBSI.js +176 -0
- package/dist/chunk-UU5PSBSI.js.map +7 -0
- package/dist/chunk-UV63XYFU.js +173 -0
- package/dist/chunk-UV63XYFU.js.map +7 -0
- package/dist/chunk-UWPHOAOC.js +29 -0
- package/dist/chunk-UWPHOAOC.js.map +7 -0
- package/dist/chunk-UXDDOSJC.js +52 -0
- package/dist/chunk-UXDDOSJC.js.map +7 -0
- package/dist/chunk-V3VAOMCO.js +465 -0
- package/dist/chunk-V3VAOMCO.js.map +7 -0
- package/dist/chunk-VA7ENH2S.js +38 -0
- package/dist/chunk-VA7ENH2S.js.map +7 -0
- package/dist/chunk-VFPDFLVE.js +516 -0
- package/dist/chunk-VFPDFLVE.js.map +7 -0
- package/dist/chunk-VHG4FNIJ.js +93 -0
- package/dist/chunk-VHG4FNIJ.js.map +7 -0
- package/dist/chunk-VKOO6MIZ.js +51 -0
- package/dist/chunk-VKOO6MIZ.js.map +7 -0
- package/dist/chunk-VKXKRZG7.js +62 -0
- package/dist/chunk-VKXKRZG7.js.map +7 -0
- package/dist/chunk-VUOLPEUZ.js +7 -0
- package/dist/chunk-VUOLPEUZ.js.map +7 -0
- package/dist/chunk-W6SOBS7M.js +138 -0
- package/dist/chunk-W6SOBS7M.js.map +7 -0
- package/dist/chunk-WDOKKRTE.js +7 -0
- package/dist/chunk-WDOKKRTE.js.map +7 -0
- package/dist/chunk-WGXXKFN5.js +7 -0
- package/dist/chunk-WGXXKFN5.js.map +7 -0
- package/dist/chunk-WHPUUP3J.js +25 -0
- package/dist/chunk-WHPUUP3J.js.map +7 -0
- package/dist/chunk-XF7LD6VV.js +122 -0
- package/dist/chunk-XF7LD6VV.js.map +7 -0
- package/dist/chunk-XFTXM3RE.js +64 -0
- package/dist/chunk-XFTXM3RE.js.map +7 -0
- package/dist/chunk-XJABPO2T.js +235 -0
- package/dist/chunk-XJABPO2T.js.map +7 -0
- package/dist/chunk-XK6VF3H7.js +3586 -0
- package/dist/chunk-XK6VF3H7.js.map +7 -0
- package/dist/chunk-XQYIIPOJ.js +266 -0
- package/dist/chunk-XQYIIPOJ.js.map +7 -0
- package/dist/chunk-XZSAN55E.js +58 -0
- package/dist/chunk-XZSAN55E.js.map +7 -0
- package/dist/chunk-Y3KJR4OG.js +64 -0
- package/dist/chunk-Y3KJR4OG.js.map +7 -0
- package/dist/chunk-Y4JKH7FF.js +45 -0
- package/dist/chunk-Y4JKH7FF.js.map +7 -0
- package/dist/chunk-Y6CJN4ID.js +31 -0
- package/dist/chunk-Y6CJN4ID.js.map +7 -0
- package/dist/chunk-YABGJU5M.js +271 -0
- package/dist/chunk-YABGJU5M.js.map +7 -0
- package/dist/chunk-YEJH7ZC2.js +34 -0
- package/dist/chunk-YEJH7ZC2.js.map +7 -0
- package/dist/chunk-YFTE4H54.js +44117 -0
- package/dist/chunk-YFTE4H54.js.map +7 -0
- package/dist/chunk-YNJYMD43.js +392 -0
- package/dist/chunk-YNJYMD43.js.map +7 -0
- package/dist/chunk-YNYEQGVN.js +251 -0
- package/dist/chunk-YNYEQGVN.js.map +7 -0
- package/dist/chunk-YUPBD27Z.js +70 -0
- package/dist/chunk-YUPBD27Z.js.map +7 -0
- package/dist/chunk-YXJ52FD5.js +271 -0
- package/dist/chunk-YXJ52FD5.js.map +7 -0
- package/dist/chunk-YZGORRQN.js +3101 -0
- package/dist/chunk-YZGORRQN.js.map +7 -0
- package/dist/chunk-Z6IVJ6ZW.js +30 -0
- package/dist/chunk-Z6IVJ6ZW.js.map +7 -0
- package/dist/chunk-ZFC44XJJ.js +86 -0
- package/dist/chunk-ZFC44XJJ.js.map +7 -0
- package/dist/chunk-ZJDJC5TP.js +82 -0
- package/dist/chunk-ZJDJC5TP.js.map +7 -0
- package/dist/chunk-ZJGZNPDK.js +171 -0
- package/dist/chunk-ZJGZNPDK.js.map +7 -0
- package/dist/chunk-ZJHBJWZX.js +699 -0
- package/dist/chunk-ZJHBJWZX.js.map +7 -0
- package/dist/chunk-ZNOTD65D.js +95 -0
- package/dist/chunk-ZNOTD65D.js.map +7 -0
- package/dist/chunk-ZQ2QIFXW.js +122 -0
- package/dist/chunk-ZQ2QIFXW.js.map +7 -0
- package/dist/chunk-ZRMXPQGY.js +241 -0
- package/dist/chunk-ZRMXPQGY.js.map +7 -0
- package/dist/chunk-ZVEE5IDC.js +3101 -0
- package/dist/chunk-ZVEE5IDC.js.map +7 -0
- package/dist/cli-metadata.js +12 -0
- package/dist/cli-metadata.js.map +7 -0
- package/dist/contract-api.js +104 -0
- package/dist/contract-api.js.map +7 -0
- package/dist/dist-F3K7S5SS.js +549 -0
- package/dist/dist-F3K7S5SS.js.map +7 -0
- package/dist/helper-api.js +51 -0
- package/dist/helper-api.js.map +7 -0
- package/dist/index.js +71 -0
- package/dist/index.js.map +7 -0
- package/dist/magic-string.es-V5NOGTUV.js +1315 -0
- package/dist/magic-string.es-V5NOGTUV.js.map +7 -0
- package/dist/openclaw.plugin.json +23 -0
- package/dist/package.json +59 -0
- package/dist/plugin-entry.handlers.runtime-POD4CSHM.js +20 -0
- package/dist/plugin-entry.handlers.runtime-POD4CSHM.js.map +7 -0
- package/dist/plugin-entry.handlers.runtime-YOSG6V6U.js +20 -0
- package/dist/plugin-entry.handlers.runtime-YOSG6V6U.js.map +7 -0
- package/dist/runtime-api.js +104 -0
- package/dist/runtime-api.js.map +7 -0
- package/dist/rust-crypto-H35BXWUU.js +5323 -0
- package/dist/rust-crypto-H35BXWUU.js.map +7 -0
- package/dist/secret-contract-api.js +18 -0
- package/dist/secret-contract-api.js.map +7 -0
- package/dist/setup-entry.js +23 -0
- package/dist/setup-entry.js.map +7 -0
- package/dist/src/account-selection.js +19 -0
- package/dist/src/account-selection.js.map +7 -0
- package/dist/src/actions.js +24 -0
- package/dist/src/actions.js.map +7 -0
- package/dist/src/approval-auth.js +27 -0
- package/dist/src/approval-auth.js.map +7 -0
- package/dist/src/approval-handler.runtime.js +378 -0
- package/dist/src/approval-handler.runtime.js.map +7 -0
- package/dist/src/approval-ids.js +9 -0
- package/dist/src/approval-ids.js.map +7 -0
- package/dist/src/approval-native.js +28 -0
- package/dist/src/approval-native.js.map +7 -0
- package/dist/src/approval-reactions.js +20 -0
- package/dist/src/approval-reactions.js.map +7 -0
- package/dist/src/auth-precedence.js +8 -0
- package/dist/src/auth-precedence.js.map +7 -0
- package/dist/src/channel-account-paths.js +11 -0
- package/dist/src/channel-account-paths.js.map +7 -0
- package/dist/src/channel.js +74 -0
- package/dist/src/channel.js.map +7 -0
- package/dist/src/channel.runtime.js +82 -0
- package/dist/src/channel.runtime.js.map +7 -0
- package/dist/src/cli-metadata.js +8 -0
- package/dist/src/cli-metadata.js.map +7 -0
- package/dist/src/cli.js +936 -0
- package/dist/src/cli.js.map +7 -0
- package/dist/src/config-adapter.js +26 -0
- package/dist/src/config-adapter.js.map +7 -0
- package/dist/src/config-schema.js +8 -0
- package/dist/src/config-schema.js.map +7 -0
- package/dist/src/directory-live.js +35 -0
- package/dist/src/directory-live.js.map +7 -0
- package/dist/src/doctor-contract.js +11 -0
- package/dist/src/doctor-contract.js.map +7 -0
- package/dist/src/doctor.js +42 -0
- package/dist/src/doctor.js.map +7 -0
- package/dist/src/env-vars.js +12 -0
- package/dist/src/env-vars.js.map +7 -0
- package/dist/src/exec-approval-resolver.js +10 -0
- package/dist/src/exec-approval-resolver.js.map +7 -0
- package/dist/src/exec-approvals.js +51 -0
- package/dist/src/exec-approvals.js.map +7 -0
- package/dist/src/group-mentions.js +28 -0
- package/dist/src/group-mentions.js.map +7 -0
- package/dist/src/legacy-crypto-inspector-availability.js +8 -0
- package/dist/src/legacy-crypto-inspector-availability.js.map +7 -0
- package/dist/src/legacy-crypto.js +26 -0
- package/dist/src/legacy-crypto.js.map +7 -0
- package/dist/src/legacy-state.js +24 -0
- package/dist/src/legacy-state.js.map +7 -0
- package/dist/src/matrix/account-config.js +16 -0
- package/dist/src/matrix/account-config.js.map +7 -0
- package/dist/src/matrix/accounts.js +31 -0
- package/dist/src/matrix/accounts.js.map +7 -0
- package/dist/src/matrix/actions/client.js +40 -0
- package/dist/src/matrix/actions/client.js.map +7 -0
- package/dist/src/matrix/actions/devices.js +42 -0
- package/dist/src/matrix/actions/devices.js.map +7 -0
- package/dist/src/matrix/actions/limits.js +8 -0
- package/dist/src/matrix/actions/limits.js.map +7 -0
- package/dist/src/matrix/actions/messages.js +49 -0
- package/dist/src/matrix/actions/messages.js.map +7 -0
- package/dist/src/matrix/actions/pins.js +46 -0
- package/dist/src/matrix/actions/pins.js.map +7 -0
- package/dist/src/matrix/actions/polls.js +37 -0
- package/dist/src/matrix/actions/polls.js.map +7 -0
- package/dist/src/matrix/actions/profile.js +38 -0
- package/dist/src/matrix/actions/profile.js.map +7 -0
- package/dist/src/matrix/actions/reactions.js +40 -0
- package/dist/src/matrix/actions/reactions.js.map +7 -0
- package/dist/src/matrix/actions/room.js +40 -0
- package/dist/src/matrix/actions/room.js.map +7 -0
- package/dist/src/matrix/actions/summary.js +19 -0
- package/dist/src/matrix/actions/summary.js.map +7 -0
- package/dist/src/matrix/actions/types.js +13 -0
- package/dist/src/matrix/actions/types.js.map +7 -0
- package/dist/src/matrix/actions/verification.js +77 -0
- package/dist/src/matrix/actions/verification.js.map +7 -0
- package/dist/src/matrix/actions.js +126 -0
- package/dist/src/matrix/actions.js.map +7 -0
- package/dist/src/matrix/active-client.js +10 -0
- package/dist/src/matrix/active-client.js.map +7 -0
- package/dist/src/matrix/async-lock.js +8 -0
- package/dist/src/matrix/async-lock.js.map +7 -0
- package/dist/src/matrix/backup-health.js +10 -0
- package/dist/src/matrix/backup-health.js.map +7 -0
- package/dist/src/matrix/client/config-runtime-api.js +24 -0
- package/dist/src/matrix/client/config-runtime-api.js.map +7 -0
- package/dist/src/matrix/client/config-secret-input.runtime.js +11 -0
- package/dist/src/matrix/client/config-secret-input.runtime.js.map +7 -0
- package/dist/src/matrix/client/config.js +42 -0
- package/dist/src/matrix/client/config.js.map +7 -0
- package/dist/src/matrix/client/create-client.js +20 -0
- package/dist/src/matrix/client/create-client.js.map +7 -0
- package/dist/src/matrix/client/env-auth.js +26 -0
- package/dist/src/matrix/client/env-auth.js.map +7 -0
- package/dist/src/matrix/client/file-sync-store.js +23 -0
- package/dist/src/matrix/client/file-sync-store.js.map +7 -0
- package/dist/src/matrix/client/logging.js +17 -0
- package/dist/src/matrix/client/logging.js.map +7 -0
- package/dist/src/matrix/client/migration-snapshot.runtime.js +13 -0
- package/dist/src/matrix/client/migration-snapshot.runtime.js.map +7 -0
- package/dist/src/matrix/client/private-network-host.js +8 -0
- package/dist/src/matrix/client/private-network-host.js.map +7 -0
- package/dist/src/matrix/client/runtime.js +8 -0
- package/dist/src/matrix/client/runtime.js.map +7 -0
- package/dist/src/matrix/client/shared.js +34 -0
- package/dist/src/matrix/client/shared.js.map +7 -0
- package/dist/src/matrix/client/storage.js +26 -0
- package/dist/src/matrix/client/storage.js.map +7 -0
- package/dist/src/matrix/client/types.js +7 -0
- package/dist/src/matrix/client/types.js.map +7 -0
- package/dist/src/matrix/client-bootstrap.js +15 -0
- package/dist/src/matrix/client-bootstrap.js.map +7 -0
- package/dist/src/matrix/client-resolver.test-helpers.js +122 -0
- package/dist/src/matrix/client-resolver.test-helpers.js.map +7 -0
- package/dist/src/matrix/client.js +63 -0
- package/dist/src/matrix/client.js.map +7 -0
- package/dist/src/matrix/config-paths.js +12 -0
- package/dist/src/matrix/config-paths.js.map +7 -0
- package/dist/src/matrix/config-update.js +17 -0
- package/dist/src/matrix/config-update.js.map +7 -0
- package/dist/src/matrix/credentials-read.js +22 -0
- package/dist/src/matrix/credentials-read.js.map +7 -0
- package/dist/src/matrix/credentials-write.runtime.js +24 -0
- package/dist/src/matrix/credentials-write.runtime.js.map +7 -0
- package/dist/src/matrix/credentials.js +90 -0
- package/dist/src/matrix/credentials.js.map +7 -0
- package/dist/src/matrix/deps.js +12 -0
- package/dist/src/matrix/deps.js.map +7 -0
- package/dist/src/matrix/device-health.js +10 -0
- package/dist/src/matrix/device-health.js.map +7 -0
- package/dist/src/matrix/direct-management.js +18 -0
- package/dist/src/matrix/direct-management.js.map +7 -0
- package/dist/src/matrix/direct-room.js +18 -0
- package/dist/src/matrix/direct-room.js.map +7 -0
- package/dist/src/matrix/draft-stream.js +33 -0
- package/dist/src/matrix/draft-stream.js.map +7 -0
- package/dist/src/matrix/encryption-guidance.js +17 -0
- package/dist/src/matrix/encryption-guidance.js.map +7 -0
- package/dist/src/matrix/errors.js +12 -0
- package/dist/src/matrix/errors.js.map +7 -0
- package/dist/src/matrix/format.js +13 -0
- package/dist/src/matrix/format.js.map +7 -0
- package/dist/src/matrix/legacy-crypto-inspector.js +73 -0
- package/dist/src/matrix/legacy-crypto-inspector.js.map +7 -0
- package/dist/src/matrix/media-errors.js +12 -0
- package/dist/src/matrix/media-errors.js.map +7 -0
- package/dist/src/matrix/media-text.js +22 -0
- package/dist/src/matrix/media-text.js.map +7 -0
- package/dist/src/matrix/monitor/access-state.js +9 -0
- package/dist/src/matrix/monitor/access-state.js.map +7 -0
- package/dist/src/matrix/monitor/ack-config.js +10 -0
- package/dist/src/matrix/monitor/ack-config.js.map +7 -0
- package/dist/src/matrix/monitor/allowlist.js +12 -0
- package/dist/src/matrix/monitor/allowlist.js.map +7 -0
- package/dist/src/matrix/monitor/auto-join.js +9 -0
- package/dist/src/matrix/monitor/auto-join.js.map +7 -0
- package/dist/src/matrix/monitor/config.js +37 -0
- package/dist/src/matrix/monitor/config.js.map +7 -0
- package/dist/src/matrix/monitor/context-summary.js +13 -0
- package/dist/src/matrix/monitor/context-summary.js.map +7 -0
- package/dist/src/matrix/monitor/direct.js +13 -0
- package/dist/src/matrix/monitor/direct.js.map +7 -0
- package/dist/src/matrix/monitor/events.js +20 -0
- package/dist/src/matrix/monitor/events.js.map +7 -0
- package/dist/src/matrix/monitor/handler.js +76 -0
- package/dist/src/matrix/monitor/handler.js.map +7 -0
- package/dist/src/matrix/monitor/handler.test-helpers.js +268 -0
- package/dist/src/matrix/monitor/handler.test-helpers.js.map +7 -0
- package/dist/src/matrix/monitor/inbound-dedupe.js +17 -0
- package/dist/src/matrix/monitor/inbound-dedupe.js.map +7 -0
- package/dist/src/matrix/monitor/index.js +502 -0
- package/dist/src/matrix/monitor/index.js.map +7 -0
- package/dist/src/matrix/monitor/legacy-crypto-restore.js +99 -0
- package/dist/src/matrix/monitor/legacy-crypto-restore.js.map +7 -0
- package/dist/src/matrix/monitor/location.js +11 -0
- package/dist/src/matrix/monitor/location.js.map +7 -0
- package/dist/src/matrix/monitor/media.js +10 -0
- package/dist/src/matrix/monitor/media.js.map +7 -0
- package/dist/src/matrix/monitor/mentions.js +9 -0
- package/dist/src/matrix/monitor/mentions.js.map +7 -0
- package/dist/src/matrix/monitor/reaction-events.js +38 -0
- package/dist/src/matrix/monitor/reaction-events.js.map +7 -0
- package/dist/src/matrix/monitor/recent-invite.js +10 -0
- package/dist/src/matrix/monitor/recent-invite.js.map +7 -0
- package/dist/src/matrix/monitor/replies.js +33 -0
- package/dist/src/matrix/monitor/replies.js.map +7 -0
- package/dist/src/matrix/monitor/reply-context.js +14 -0
- package/dist/src/matrix/monitor/reply-context.js.map +7 -0
- package/dist/src/matrix/monitor/room-history.js +10 -0
- package/dist/src/matrix/monitor/room-history.js.map +7 -0
- package/dist/src/matrix/monitor/room-info.js +9 -0
- package/dist/src/matrix/monitor/room-info.js.map +7 -0
- package/dist/src/matrix/monitor/rooms.js +9 -0
- package/dist/src/matrix/monitor/rooms.js.map +7 -0
- package/dist/src/matrix/monitor/route.js +12 -0
- package/dist/src/matrix/monitor/route.js.map +7 -0
- package/dist/src/matrix/monitor/runtime-api.js +40 -0
- package/dist/src/matrix/monitor/runtime-api.js.map +7 -0
- package/dist/src/matrix/monitor/startup-verification.js +174 -0
- package/dist/src/matrix/monitor/startup-verification.js.map +7 -0
- package/dist/src/matrix/monitor/startup.js +9 -0
- package/dist/src/matrix/monitor/startup.js.map +7 -0
- package/dist/src/matrix/monitor/status.js +10 -0
- package/dist/src/matrix/monitor/status.js.map +7 -0
- package/dist/src/matrix/monitor/sync-lifecycle.js +9 -0
- package/dist/src/matrix/monitor/sync-lifecycle.js.map +7 -0
- package/dist/src/matrix/monitor/task-runner.js +8 -0
- package/dist/src/matrix/monitor/task-runner.js.map +7 -0
- package/dist/src/matrix/monitor/thread-context.js +14 -0
- package/dist/src/matrix/monitor/thread-context.js.map +7 -0
- package/dist/src/matrix/monitor/threads.js +16 -0
- package/dist/src/matrix/monitor/threads.js.map +7 -0
- package/dist/src/matrix/monitor/types.js +11 -0
- package/dist/src/matrix/monitor/types.js.map +7 -0
- package/dist/src/matrix/monitor/verification-events.js +13 -0
- package/dist/src/matrix/monitor/verification-events.js.map +7 -0
- package/dist/src/matrix/monitor/verification-utils.js +16 -0
- package/dist/src/matrix/monitor/verification-utils.js.map +7 -0
- package/dist/src/matrix/outbound-media-runtime.js +9 -0
- package/dist/src/matrix/outbound-media-runtime.js.map +7 -0
- package/dist/src/matrix/poll-summary.js +14 -0
- package/dist/src/matrix/poll-summary.js.map +7 -0
- package/dist/src/matrix/poll-types.js +55 -0
- package/dist/src/matrix/poll-types.js.map +7 -0
- package/dist/src/matrix/probe.js +9 -0
- package/dist/src/matrix/probe.js.map +7 -0
- package/dist/src/matrix/probe.runtime.js +30 -0
- package/dist/src/matrix/probe.runtime.js.map +7 -0
- package/dist/src/matrix/profile.js +16 -0
- package/dist/src/matrix/profile.js.map +7 -0
- package/dist/src/matrix/reaction-common.js +26 -0
- package/dist/src/matrix/reaction-common.js.map +7 -0
- package/dist/src/matrix/sdk/crypto-bootstrap.js +15 -0
- package/dist/src/matrix/sdk/crypto-bootstrap.js.map +7 -0
- package/dist/src/matrix/sdk/crypto-facade.js +8 -0
- package/dist/src/matrix/sdk/crypto-facade.js.map +7 -0
- package/dist/src/matrix/sdk/crypto-node.runtime.js +15 -0
- package/dist/src/matrix/sdk/crypto-node.runtime.js.map +7 -0
- package/dist/src/matrix/sdk/crypto-runtime.js +84 -0
- package/dist/src/matrix/sdk/crypto-runtime.js.map +7 -0
- package/dist/src/matrix/sdk/decrypt-bridge.js +11 -0
- package/dist/src/matrix/sdk/decrypt-bridge.js.map +7 -0
- package/dist/src/matrix/sdk/event-helpers.js +12 -0
- package/dist/src/matrix/sdk/event-helpers.js.map +7 -0
- package/dist/src/matrix/sdk/http-client.js +13 -0
- package/dist/src/matrix/sdk/http-client.js.map +7 -0
- package/dist/src/matrix/sdk/idb-persistence-lock.js +12 -0
- package/dist/src/matrix/sdk/idb-persistence-lock.js.map +7 -0
- package/dist/src/matrix/sdk/idb-persistence.js +13 -0
- package/dist/src/matrix/sdk/idb-persistence.js.map +7 -0
- package/dist/src/matrix/sdk/idb-persistence.test-helpers.js +83 -0
- package/dist/src/matrix/sdk/idb-persistence.test-helpers.js.map +7 -0
- package/dist/src/matrix/sdk/logger.js +15 -0
- package/dist/src/matrix/sdk/logger.js.map +7 -0
- package/dist/src/matrix/sdk/read-response-with-limit.js +8 -0
- package/dist/src/matrix/sdk/read-response-with-limit.js.map +7 -0
- package/dist/src/matrix/sdk/recovery-key-store.js +14 -0
- package/dist/src/matrix/sdk/recovery-key-store.js.map +7 -0
- package/dist/src/matrix/sdk/transport.js +13 -0
- package/dist/src/matrix/sdk/transport.js.map +7 -0
- package/dist/src/matrix/sdk/types.js +7 -0
- package/dist/src/matrix/sdk/types.js.map +7 -0
- package/dist/src/matrix/sdk/verification-manager.js +11 -0
- package/dist/src/matrix/sdk/verification-manager.js.map +7 -0
- package/dist/src/matrix/sdk/verification-status.js +12 -0
- package/dist/src/matrix/sdk/verification-status.js.map +7 -0
- package/dist/src/matrix/sdk.js +1375 -0
- package/dist/src/matrix/sdk.js.map +7 -0
- package/dist/src/matrix/send/client.js +14 -0
- package/dist/src/matrix/send/client.js.map +7 -0
- package/dist/src/matrix/send/formatting.js +29 -0
- package/dist/src/matrix/send/formatting.js.map +7 -0
- package/dist/src/matrix/send/media.js +26 -0
- package/dist/src/matrix/send/media.js.map +7 -0
- package/dist/src/matrix/send/targets.js +15 -0
- package/dist/src/matrix/send/targets.js.map +7 -0
- package/dist/src/matrix/send/types.js +17 -0
- package/dist/src/matrix/send/types.js.map +7 -0
- package/dist/src/matrix/send.js +51 -0
- package/dist/src/matrix/send.js.map +7 -0
- package/dist/src/matrix/session-store-metadata.js +15 -0
- package/dist/src/matrix/session-store-metadata.js.map +7 -0
- package/dist/src/matrix/startup-abort.js +14 -0
- package/dist/src/matrix/startup-abort.js.map +7 -0
- package/dist/src/matrix/sync-state.js +12 -0
- package/dist/src/matrix/sync-state.js.map +7 -0
- package/dist/src/matrix/target-ids.js +20 -0
- package/dist/src/matrix/target-ids.js.map +7 -0
- package/dist/src/matrix/thread-bindings-shared.js +34 -0
- package/dist/src/matrix/thread-bindings-shared.js.map +7 -0
- package/dist/src/matrix/thread-bindings.js +49 -0
- package/dist/src/matrix/thread-bindings.js.map +7 -0
- package/dist/src/matrix-migration.runtime.js +45 -0
- package/dist/src/matrix-migration.runtime.js.map +7 -0
- package/dist/src/migration-config.js +29 -0
- package/dist/src/migration-config.js.map +7 -0
- package/dist/src/migration-snapshot-backup.js +12 -0
- package/dist/src/migration-snapshot-backup.js.map +7 -0
- package/dist/src/migration-snapshot.js +38 -0
- package/dist/src/migration-snapshot.js.map +7 -0
- package/dist/src/onboarding.js +43 -0
- package/dist/src/onboarding.js.map +7 -0
- package/dist/src/onboarding.test-harness.js +124 -0
- package/dist/src/onboarding.test-harness.js.map +7 -0
- package/dist/src/outbound.js +33 -0
- package/dist/src/outbound.js.map +7 -0
- package/dist/src/plugin-entry.runtime.js +15 -0
- package/dist/src/plugin-entry.runtime.js.map +7 -0
- package/dist/src/profile-update.js +41 -0
- package/dist/src/profile-update.js.map +7 -0
- package/dist/src/record-shared.js +8 -0
- package/dist/src/record-shared.js.map +7 -0
- package/dist/src/resolve-targets.js +34 -0
- package/dist/src/resolve-targets.js.map +7 -0
- package/dist/src/resolver.js +8 -0
- package/dist/src/resolver.js.map +7 -0
- package/dist/src/runtime-api.js +120 -0
- package/dist/src/runtime-api.js.map +7 -0
- package/dist/src/runtime.js +10 -0
- package/dist/src/runtime.js.map +7 -0
- package/dist/src/secret-contract.js +13 -0
- package/dist/src/secret-contract.js.map +7 -0
- package/dist/src/session-route.js +25 -0
- package/dist/src/session-route.js.map +7 -0
- package/dist/src/setup-bootstrap.js +124 -0
- package/dist/src/setup-bootstrap.js.map +7 -0
- package/dist/src/setup-config.js +28 -0
- package/dist/src/setup-config.js.map +7 -0
- package/dist/src/setup-contract.js +16 -0
- package/dist/src/setup-contract.js.map +7 -0
- package/dist/src/setup-core.js +25 -0
- package/dist/src/setup-core.js.map +7 -0
- package/dist/src/setup-surface.js +45 -0
- package/dist/src/setup-surface.js.map +7 -0
- package/dist/src/startup-maintenance.js +29 -0
- package/dist/src/startup-maintenance.js.map +7 -0
- package/dist/src/storage-paths.js +24 -0
- package/dist/src/storage-paths.js.map +7 -0
- package/dist/src/test-helpers.js +49 -0
- package/dist/src/test-helpers.js.map +7 -0
- package/dist/src/test-mocks.js +40 -0
- package/dist/src/test-mocks.js.map +7 -0
- package/dist/src/test-runtime.js +65 -0
- package/dist/src/test-runtime.js.map +7 -0
- package/dist/src/tool-actions.js +68 -0
- package/dist/src/tool-actions.js.map +7 -0
- package/dist/src/tool-actions.runtime.js +73 -0
- package/dist/src/tool-actions.runtime.js.map +7 -0
- package/dist/src/types.js +7 -0
- package/dist/src/types.js.map +7 -0
- package/dist/test-api.js +82 -0
- package/dist/test-api.js.map +7 -0
- package/dist/thread-bindings-runtime.js +15 -0
- package/dist/thread-bindings-runtime.js.map +7 -0
- package/package.json +12 -6
- package/CHANGELOG.md +0 -164
- package/ENDOFFILE +0 -0
- package/EOF +0 -0
- package/SPEC-SUPPORT.md +0 -116
- package/YAMLEND +0 -0
- package/api.ts +0 -18
- package/archipelagolab-lobi-1.0.0.tgz +0 -0
- package/auth-presence.ts +0 -56
- package/channel-plugin-api.ts +0 -3
- package/cli-metadata.ts +0 -11
- package/contract-api.ts +0 -17
- package/docs/CHECKLIST.md +0 -83
- package/docs/FORK_SDK_GUIDE.md +0 -279
- package/helper-api.ts +0 -3
- package/index.test.ts +0 -61
- package/index.ts +0 -65
- package/plugin-entry.handlers.runtime.ts +0 -1
- package/runtime-api.ts +0 -54
- package/runtime-heavy-api.ts +0 -1
- package/scripts/migrate-to-lobi.sh +0 -72
- package/secret-contract-api.ts +0 -5
- package/setup-entry.ts +0 -13
- package/src/account-selection.test.ts +0 -124
- package/src/account-selection.ts +0 -226
- package/src/actions.account-propagation.test.ts +0 -251
- package/src/actions.test.ts +0 -251
- package/src/actions.ts +0 -336
- package/src/approval-auth.test.ts +0 -23
- package/src/approval-auth.ts +0 -25
- package/src/approval-handler.runtime.test.ts +0 -46
- package/src/approval-handler.runtime.ts +0 -400
- package/src/approval-ids.ts +0 -6
- package/src/approval-native.test.ts +0 -329
- package/src/approval-native.ts +0 -336
- package/src/approval-reactions.test.ts +0 -107
- package/src/approval-reactions.ts +0 -158
- package/src/auth-precedence.ts +0 -61
- package/src/channel-account-paths.ts +0 -92
- package/src/channel.account-paths.test.ts +0 -102
- package/src/channel.directory.test.ts +0 -601
- package/src/channel.resolve.test.ts +0 -38
- package/src/channel.runtime.ts +0 -16
- package/src/channel.setup.test.ts +0 -269
- package/src/channel.ts +0 -570
- package/src/cli-metadata.ts +0 -19
- package/src/cli.test.ts +0 -1015
- package/src/cli.ts +0 -1198
- package/src/config-adapter.ts +0 -41
- package/src/config-schema.test.ts +0 -90
- package/src/config-schema.ts +0 -114
- package/src/directory-live.test.ts +0 -200
- package/src/directory-live.ts +0 -238
- package/src/doctor-contract.ts +0 -287
- package/src/doctor.test.ts +0 -440
- package/src/doctor.ts +0 -262
- package/src/env-vars.ts +0 -92
- package/src/exec-approval-resolver.test.ts +0 -68
- package/src/exec-approval-resolver.ts +0 -23
- package/src/exec-approvals.test.ts +0 -483
- package/src/exec-approvals.ts +0 -290
- package/src/group-mentions.ts +0 -41
- package/src/legacy-crypto-inspector-availability.test.ts +0 -81
- package/src/legacy-crypto-inspector-availability.ts +0 -60
- package/src/legacy-crypto.test.ts +0 -234
- package/src/legacy-crypto.ts +0 -549
- package/src/legacy-state.test.ts +0 -86
- package/src/legacy-state.ts +0 -156
- package/src/matrix/account-config.ts +0 -150
- package/src/matrix/accounts.readiness.test.ts +0 -27
- package/src/matrix/accounts.test.ts +0 -757
- package/src/matrix/accounts.ts +0 -194
- package/src/matrix/actions/client.test.ts +0 -215
- package/src/matrix/actions/client.ts +0 -31
- package/src/matrix/actions/devices.test.ts +0 -114
- package/src/matrix/actions/devices.ts +0 -34
- package/src/matrix/actions/limits.test.ts +0 -15
- package/src/matrix/actions/limits.ts +0 -6
- package/src/matrix/actions/messages.test.ts +0 -289
- package/src/matrix/actions/messages.ts +0 -123
- package/src/matrix/actions/pins.test.ts +0 -74
- package/src/matrix/actions/pins.ts +0 -64
- package/src/matrix/actions/polls.test.ts +0 -71
- package/src/matrix/actions/polls.ts +0 -109
- package/src/matrix/actions/profile.test.ts +0 -109
- package/src/matrix/actions/profile.ts +0 -37
- package/src/matrix/actions/reactions.test.ts +0 -135
- package/src/matrix/actions/reactions.ts +0 -59
- package/src/matrix/actions/room.test.ts +0 -79
- package/src/matrix/actions/room.ts +0 -71
- package/src/matrix/actions/summary.test.ts +0 -87
- package/src/matrix/actions/summary.ts +0 -88
- package/src/matrix/actions/types.ts +0 -82
- package/src/matrix/actions/verification.test.ts +0 -105
- package/src/matrix/actions/verification.ts +0 -237
- package/src/matrix/actions.ts +0 -37
- package/src/matrix/active-client.ts +0 -26
- package/src/matrix/async-lock.ts +0 -18
- package/src/matrix/backup-health.ts +0 -115
- package/src/matrix/client/config-runtime-api.ts +0 -14
- package/src/matrix/client/config-secret-input.runtime.ts +0 -1
- package/src/matrix/client/config.ts +0 -982
- package/src/matrix/client/create-client.test.ts +0 -115
- package/src/matrix/client/create-client.ts +0 -101
- package/src/matrix/client/env-auth.ts +0 -6
- package/src/matrix/client/file-sync-store.test.ts +0 -265
- package/src/matrix/client/file-sync-store.ts +0 -289
- package/src/matrix/client/logging.ts +0 -123
- package/src/matrix/client/migration-snapshot.runtime.ts +0 -1
- package/src/matrix/client/private-network-host.ts +0 -56
- package/src/matrix/client/runtime.ts +0 -4
- package/src/matrix/client/shared.test.ts +0 -344
- package/src/matrix/client/shared.ts +0 -306
- package/src/matrix/client/storage.test.ts +0 -634
- package/src/matrix/client/storage.ts +0 -544
- package/src/matrix/client/types.ts +0 -50
- package/src/matrix/client-bootstrap.test.ts +0 -84
- package/src/matrix/client-bootstrap.ts +0 -164
- package/src/matrix/client-resolver.test-helpers.ts +0 -147
- package/src/matrix/client.test.ts +0 -1521
- package/src/matrix/client.ts +0 -23
- package/src/matrix/config-paths.ts +0 -31
- package/src/matrix/config-update.test.ts +0 -237
- package/src/matrix/config-update.ts +0 -291
- package/src/matrix/credentials-read.ts +0 -206
- package/src/matrix/credentials-write.runtime.ts +0 -26
- package/src/matrix/credentials.test.ts +0 -501
- package/src/matrix/credentials.ts +0 -95
- package/src/matrix/deps.test.ts +0 -74
- package/src/matrix/deps.ts +0 -225
- package/src/matrix/device-health.test.ts +0 -45
- package/src/matrix/device-health.ts +0 -31
- package/src/matrix/direct-management.test.ts +0 -350
- package/src/matrix/direct-management.ts +0 -347
- package/src/matrix/direct-room.test.ts +0 -61
- package/src/matrix/direct-room.ts +0 -128
- package/src/matrix/draft-stream.test.ts +0 -406
- package/src/matrix/draft-stream.ts +0 -216
- package/src/matrix/encryption-guidance.ts +0 -27
- package/src/matrix/errors.ts +0 -21
- package/src/matrix/format.test.ts +0 -340
- package/src/matrix/format.ts +0 -428
- package/src/matrix/legacy-crypto-inspector.ts +0 -95
- package/src/matrix/media-errors.ts +0 -20
- package/src/matrix/media-text.ts +0 -169
- package/src/matrix/monitor/access-state.test.ts +0 -45
- package/src/matrix/monitor/access-state.ts +0 -77
- package/src/matrix/monitor/ack-config.test.ts +0 -57
- package/src/matrix/monitor/ack-config.ts +0 -26
- package/src/matrix/monitor/allowlist.test.ts +0 -45
- package/src/matrix/monitor/allowlist.ts +0 -94
- package/src/matrix/monitor/auto-join.test.ts +0 -203
- package/src/matrix/monitor/auto-join.ts +0 -86
- package/src/matrix/monitor/config.test.ts +0 -197
- package/src/matrix/monitor/config.ts +0 -303
- package/src/matrix/monitor/context-summary.ts +0 -43
- package/src/matrix/monitor/direct.test.ts +0 -529
- package/src/matrix/monitor/direct.ts +0 -270
- package/src/matrix/monitor/events.test.ts +0 -1524
- package/src/matrix/monitor/events.ts +0 -213
- package/src/matrix/monitor/handler.body-for-agent.test.ts +0 -396
- package/src/matrix/monitor/handler.group-history.test.ts +0 -648
- package/src/matrix/monitor/handler.media-failure.test.ts +0 -267
- package/src/matrix/monitor/handler.test-helpers.ts +0 -308
- package/src/matrix/monitor/handler.test.ts +0 -2952
- package/src/matrix/monitor/handler.thread-root-media.test.ts +0 -82
- package/src/matrix/monitor/handler.ts +0 -1679
- package/src/matrix/monitor/inbound-dedupe.test.ts +0 -146
- package/src/matrix/monitor/inbound-dedupe.ts +0 -267
- package/src/matrix/monitor/index.test.ts +0 -920
- package/src/matrix/monitor/index.ts +0 -434
- package/src/matrix/monitor/legacy-crypto-restore.test.ts +0 -206
- package/src/matrix/monitor/legacy-crypto-restore.ts +0 -139
- package/src/matrix/monitor/location.ts +0 -100
- package/src/matrix/monitor/media.test.ts +0 -159
- package/src/matrix/monitor/media.ts +0 -119
- package/src/matrix/monitor/mentions.test.ts +0 -289
- package/src/matrix/monitor/mentions.ts +0 -177
- package/src/matrix/monitor/reaction-events.test.ts +0 -326
- package/src/matrix/monitor/reaction-events.ts +0 -187
- package/src/matrix/monitor/recent-invite.test.ts +0 -92
- package/src/matrix/monitor/recent-invite.ts +0 -30
- package/src/matrix/monitor/replies.test.ts +0 -265
- package/src/matrix/monitor/replies.ts +0 -136
- package/src/matrix/monitor/reply-context.test.ts +0 -276
- package/src/matrix/monitor/reply-context.ts +0 -92
- package/src/matrix/monitor/room-history.test.ts +0 -258
- package/src/matrix/monitor/room-history.ts +0 -301
- package/src/matrix/monitor/room-info.test.ts +0 -201
- package/src/matrix/monitor/room-info.ts +0 -126
- package/src/matrix/monitor/rooms.test.ts +0 -121
- package/src/matrix/monitor/rooms.ts +0 -52
- package/src/matrix/monitor/route.test.ts +0 -255
- package/src/matrix/monitor/route.ts +0 -178
- package/src/matrix/monitor/runtime-api.ts +0 -31
- package/src/matrix/monitor/startup-verification.test.ts +0 -294
- package/src/matrix/monitor/startup-verification.ts +0 -237
- package/src/matrix/monitor/startup.test.ts +0 -257
- package/src/matrix/monitor/startup.ts +0 -218
- package/src/matrix/monitor/status.ts +0 -111
- package/src/matrix/monitor/sync-lifecycle.test.ts +0 -224
- package/src/matrix/monitor/sync-lifecycle.ts +0 -91
- package/src/matrix/monitor/task-runner.ts +0 -38
- package/src/matrix/monitor/thread-context.test.ts +0 -149
- package/src/matrix/monitor/thread-context.ts +0 -108
- package/src/matrix/monitor/threads.test.ts +0 -68
- package/src/matrix/monitor/threads.ts +0 -85
- package/src/matrix/monitor/types.ts +0 -30
- package/src/matrix/monitor/verification-events.ts +0 -627
- package/src/matrix/monitor/verification-utils.test.ts +0 -47
- package/src/matrix/monitor/verification-utils.ts +0 -46
- package/src/matrix/outbound-media-runtime.ts +0 -1
- package/src/matrix/poll-summary.ts +0 -110
- package/src/matrix/poll-types.test.ts +0 -205
- package/src/matrix/poll-types.ts +0 -433
- package/src/matrix/probe.runtime.ts +0 -4
- package/src/matrix/probe.test.ts +0 -154
- package/src/matrix/probe.ts +0 -96
- package/src/matrix/profile.test.ts +0 -154
- package/src/matrix/profile.ts +0 -184
- package/src/matrix/reaction-common.test.ts +0 -96
- package/src/matrix/reaction-common.ts +0 -147
- package/src/matrix/sdk/crypto-bootstrap.test.ts +0 -505
- package/src/matrix/sdk/crypto-bootstrap.ts +0 -341
- package/src/matrix/sdk/crypto-facade.test.ts +0 -197
- package/src/matrix/sdk/crypto-facade.ts +0 -207
- package/src/matrix/sdk/crypto-node.runtime.test.ts +0 -27
- package/src/matrix/sdk/crypto-node.runtime.ts +0 -9
- package/src/matrix/sdk/crypto-runtime.ts +0 -11
- package/src/matrix/sdk/decrypt-bridge.ts +0 -356
- package/src/matrix/sdk/event-helpers.test.ts +0 -60
- package/src/matrix/sdk/event-helpers.ts +0 -71
- package/src/matrix/sdk/http-client.test.ts +0 -134
- package/src/matrix/sdk/http-client.ts +0 -87
- package/src/matrix/sdk/idb-persistence-lock.ts +0 -51
- package/src/matrix/sdk/idb-persistence.lock-order.test.ts +0 -108
- package/src/matrix/sdk/idb-persistence.test-helpers.ts +0 -88
- package/src/matrix/sdk/idb-persistence.test.ts +0 -149
- package/src/matrix/sdk/idb-persistence.ts +0 -283
- package/src/matrix/sdk/logger.test.ts +0 -25
- package/src/matrix/sdk/logger.ts +0 -108
- package/src/matrix/sdk/read-response-with-limit.ts +0 -19
- package/src/matrix/sdk/recovery-key-store.test.ts +0 -385
- package/src/matrix/sdk/recovery-key-store.ts +0 -430
- package/src/matrix/sdk/transport.test.ts +0 -161
- package/src/matrix/sdk/transport.ts +0 -344
- package/src/matrix/sdk/types.ts +0 -236
- package/src/matrix/sdk/verification-manager.test.ts +0 -509
- package/src/matrix/sdk/verification-manager.ts +0 -694
- package/src/matrix/sdk/verification-status.ts +0 -23
- package/src/matrix/sdk.test.ts +0 -2568
- package/src/matrix/sdk.ts +0 -1789
- package/src/matrix/send/client.test.ts +0 -174
- package/src/matrix/send/client.ts +0 -90
- package/src/matrix/send/formatting.ts +0 -189
- package/src/matrix/send/media.ts +0 -244
- package/src/matrix/send/targets.test.ts +0 -254
- package/src/matrix/send/targets.ts +0 -104
- package/src/matrix/send/types.ts +0 -134
- package/src/matrix/send.test.ts +0 -958
- package/src/matrix/send.ts +0 -609
- package/src/matrix/session-store-metadata.ts +0 -108
- package/src/matrix/startup-abort.ts +0 -44
- package/src/matrix/sync-state.ts +0 -27
- package/src/matrix/target-ids.ts +0 -102
- package/src/matrix/thread-bindings-shared.ts +0 -201
- package/src/matrix/thread-bindings.test.ts +0 -673
- package/src/matrix/thread-bindings.ts +0 -577
- package/src/matrix-migration.runtime.ts +0 -9
- package/src/migration-config.test.ts +0 -228
- package/src/migration-config.ts +0 -243
- package/src/migration-snapshot-backup.ts +0 -117
- package/src/migration-snapshot.test.ts +0 -184
- package/src/migration-snapshot.ts +0 -55
- package/src/onboarding.resolve.test.ts +0 -55
- package/src/onboarding.test-harness.ts +0 -158
- package/src/onboarding.test.ts +0 -665
- package/src/onboarding.ts +0 -773
- package/src/outbound.test.ts +0 -173
- package/src/outbound.ts +0 -78
- package/src/plugin-entry.runtime.js +0 -159
- package/src/plugin-entry.runtime.test.ts +0 -108
- package/src/plugin-entry.runtime.ts +0 -68
- package/src/profile-update.ts +0 -68
- package/src/record-shared.ts +0 -3
- package/src/resolve-targets.test.ts +0 -178
- package/src/resolve-targets.ts +0 -175
- package/src/resolver.ts +0 -21
- package/src/runtime-api.ts +0 -144
- package/src/runtime.ts +0 -7
- package/src/secret-contract.ts +0 -174
- package/src/session-route.test.ts +0 -315
- package/src/session-route.ts +0 -113
- package/src/setup-bootstrap.ts +0 -94
- package/src/setup-config.ts +0 -222
- package/src/setup-contract.ts +0 -89
- package/src/setup-core.test.ts +0 -326
- package/src/setup-core.ts +0 -50
- package/src/setup-surface.ts +0 -4
- package/src/startup-maintenance.test.ts +0 -227
- package/src/startup-maintenance.ts +0 -114
- package/src/storage-paths.ts +0 -92
- package/src/test-helpers.ts +0 -42
- package/src/test-mocks.ts +0 -55
- package/src/test-runtime.ts +0 -72
- package/src/test-support/monitor-route-test-support.ts +0 -8
- package/src/tool-actions.runtime.ts +0 -1
- package/src/tool-actions.test.ts +0 -422
- package/src/tool-actions.ts +0 -498
- package/src/types.ts +0 -230
- package/test-api.ts +0 -2
- package/thread-bindings-runtime.ts +0 -4
- package/tsconfig.json +0 -16
|
@@ -1,430 +0,0 @@
|
|
|
1
|
-
import fs from "node:fs";
|
|
2
|
-
import path from "node:path";
|
|
3
|
-
import { decodeRecoveryKey } from "@archipelagolab/lobi-js-sdk/lib/crypto-api/recovery-key.js";
|
|
4
|
-
import { formatMatrixErrorMessage, formatMatrixErrorReason } from "../errors.js";
|
|
5
|
-
import { LogService } from "./logger.js";
|
|
6
|
-
import type {
|
|
7
|
-
MatrixCryptoBootstrapApi,
|
|
8
|
-
MatrixCryptoCallbacks,
|
|
9
|
-
MatrixGeneratedSecretStorageKey,
|
|
10
|
-
MatrixSecretStorageStatus,
|
|
11
|
-
MatrixStoredRecoveryKey,
|
|
12
|
-
} from "./types.js";
|
|
13
|
-
|
|
14
|
-
export function isRepairableSecretStorageAccessError(err: unknown): boolean {
|
|
15
|
-
const message = formatMatrixErrorReason(err);
|
|
16
|
-
if (!message) {
|
|
17
|
-
return false;
|
|
18
|
-
}
|
|
19
|
-
if (message.includes("getsecretstoragekey callback returned falsey")) {
|
|
20
|
-
return true;
|
|
21
|
-
}
|
|
22
|
-
// The homeserver still has secret storage, but the local recovery key cannot
|
|
23
|
-
// authenticate/decrypt a required secret. During explicit bootstrap we can
|
|
24
|
-
// recreate secret storage and continue with a new local baseline.
|
|
25
|
-
if (message.includes("decrypting secret") && message.includes("bad mac")) {
|
|
26
|
-
return true;
|
|
27
|
-
}
|
|
28
|
-
return false;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export class MatrixRecoveryKeyStore {
|
|
32
|
-
private readonly secretStorageKeyCache = new Map<
|
|
33
|
-
string,
|
|
34
|
-
{ key: Uint8Array; keyInfo?: MatrixStoredRecoveryKey["keyInfo"] }
|
|
35
|
-
>();
|
|
36
|
-
private stagedRecoveryKey: MatrixStoredRecoveryKey | null = null;
|
|
37
|
-
private readonly stagedCacheKeyIds = new Set<string>();
|
|
38
|
-
|
|
39
|
-
constructor(private readonly recoveryKeyPath?: string) {}
|
|
40
|
-
|
|
41
|
-
buildCryptoCallbacks(): MatrixCryptoCallbacks {
|
|
42
|
-
return {
|
|
43
|
-
getSecretStorageKey: async ({ keys }) => {
|
|
44
|
-
const requestedKeyIds = Object.keys(keys ?? {});
|
|
45
|
-
if (requestedKeyIds.length === 0) {
|
|
46
|
-
return null;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
for (const keyId of requestedKeyIds) {
|
|
50
|
-
const cached = this.secretStorageKeyCache.get(keyId);
|
|
51
|
-
if (cached) {
|
|
52
|
-
return [keyId, new Uint8Array(cached.key)];
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
const staged = this.stagedRecoveryKey;
|
|
57
|
-
if (staged?.privateKeyBase64) {
|
|
58
|
-
const privateKey = new Uint8Array(Buffer.from(staged.privateKeyBase64, "base64"));
|
|
59
|
-
if (privateKey.length > 0) {
|
|
60
|
-
const stagedKeyId =
|
|
61
|
-
staged.keyId && requestedKeyIds.includes(staged.keyId)
|
|
62
|
-
? staged.keyId
|
|
63
|
-
: requestedKeyIds[0];
|
|
64
|
-
if (stagedKeyId) {
|
|
65
|
-
this.rememberSecretStorageKey(stagedKeyId, privateKey, staged.keyInfo);
|
|
66
|
-
this.stagedCacheKeyIds.add(stagedKeyId);
|
|
67
|
-
return [stagedKeyId, privateKey];
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
const stored = this.loadStoredRecoveryKey();
|
|
73
|
-
if (!stored?.privateKeyBase64) {
|
|
74
|
-
return null;
|
|
75
|
-
}
|
|
76
|
-
const privateKey = new Uint8Array(Buffer.from(stored.privateKeyBase64, "base64"));
|
|
77
|
-
if (privateKey.length === 0) {
|
|
78
|
-
return null;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
if (stored.keyId && requestedKeyIds.includes(stored.keyId)) {
|
|
82
|
-
this.rememberSecretStorageKey(stored.keyId, privateKey, stored.keyInfo);
|
|
83
|
-
return [stored.keyId, privateKey];
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
const firstRequestedKeyId = requestedKeyIds[0];
|
|
87
|
-
if (!firstRequestedKeyId) {
|
|
88
|
-
return null;
|
|
89
|
-
}
|
|
90
|
-
this.rememberSecretStorageKey(firstRequestedKeyId, privateKey, stored.keyInfo);
|
|
91
|
-
return [firstRequestedKeyId, privateKey];
|
|
92
|
-
},
|
|
93
|
-
cacheSecretStorageKey: (keyId, keyInfo, key) => {
|
|
94
|
-
const privateKey = new Uint8Array(key);
|
|
95
|
-
const normalizedKeyInfo: MatrixStoredRecoveryKey["keyInfo"] = {
|
|
96
|
-
passphrase: keyInfo?.passphrase,
|
|
97
|
-
name: typeof keyInfo?.name === "string" ? keyInfo.name : undefined,
|
|
98
|
-
};
|
|
99
|
-
this.rememberSecretStorageKey(keyId, privateKey, normalizedKeyInfo);
|
|
100
|
-
|
|
101
|
-
const stored = this.loadStoredRecoveryKey();
|
|
102
|
-
this.saveRecoveryKeyToDisk({
|
|
103
|
-
keyId,
|
|
104
|
-
keyInfo: normalizedKeyInfo,
|
|
105
|
-
privateKey,
|
|
106
|
-
encodedPrivateKey: stored?.encodedPrivateKey,
|
|
107
|
-
});
|
|
108
|
-
},
|
|
109
|
-
};
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
getRecoveryKeySummary(): {
|
|
113
|
-
encodedPrivateKey?: string;
|
|
114
|
-
keyId?: string | null;
|
|
115
|
-
createdAt?: string;
|
|
116
|
-
} | null {
|
|
117
|
-
const stored = this.loadStoredRecoveryKey();
|
|
118
|
-
if (!stored) {
|
|
119
|
-
return null;
|
|
120
|
-
}
|
|
121
|
-
return {
|
|
122
|
-
encodedPrivateKey: stored.encodedPrivateKey,
|
|
123
|
-
keyId: stored.keyId,
|
|
124
|
-
createdAt: stored.createdAt,
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
private resolveEncodedRecoveryKeyInput(params: {
|
|
129
|
-
encodedPrivateKey: string;
|
|
130
|
-
keyId?: string | null;
|
|
131
|
-
keyInfo?: MatrixStoredRecoveryKey["keyInfo"];
|
|
132
|
-
}): {
|
|
133
|
-
encodedPrivateKey: string;
|
|
134
|
-
privateKey: Uint8Array;
|
|
135
|
-
keyId: string | null;
|
|
136
|
-
keyInfo?: MatrixStoredRecoveryKey["keyInfo"];
|
|
137
|
-
} {
|
|
138
|
-
const encodedPrivateKey = params.encodedPrivateKey.trim();
|
|
139
|
-
if (!encodedPrivateKey) {
|
|
140
|
-
throw new Error("Matrix recovery key is required");
|
|
141
|
-
}
|
|
142
|
-
let privateKey: Uint8Array;
|
|
143
|
-
try {
|
|
144
|
-
privateKey = decodeRecoveryKey(encodedPrivateKey);
|
|
145
|
-
} catch (err) {
|
|
146
|
-
throw new Error(`Invalid Matrix recovery key: ${formatMatrixErrorMessage(err)}`, {
|
|
147
|
-
cause: err,
|
|
148
|
-
});
|
|
149
|
-
}
|
|
150
|
-
const keyId =
|
|
151
|
-
typeof params.keyId === "string" && params.keyId.trim() ? params.keyId.trim() : null;
|
|
152
|
-
return {
|
|
153
|
-
encodedPrivateKey,
|
|
154
|
-
privateKey,
|
|
155
|
-
keyId,
|
|
156
|
-
keyInfo: params.keyInfo ?? this.loadStoredRecoveryKey()?.keyInfo,
|
|
157
|
-
};
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
storeEncodedRecoveryKey(params: {
|
|
161
|
-
encodedPrivateKey: string;
|
|
162
|
-
keyId?: string | null;
|
|
163
|
-
keyInfo?: MatrixStoredRecoveryKey["keyInfo"];
|
|
164
|
-
}): {
|
|
165
|
-
encodedPrivateKey?: string;
|
|
166
|
-
keyId?: string | null;
|
|
167
|
-
createdAt?: string;
|
|
168
|
-
} {
|
|
169
|
-
const prepared = this.resolveEncodedRecoveryKeyInput(params);
|
|
170
|
-
this.saveRecoveryKeyToDisk({
|
|
171
|
-
keyId: prepared.keyId,
|
|
172
|
-
keyInfo: prepared.keyInfo,
|
|
173
|
-
privateKey: prepared.privateKey,
|
|
174
|
-
encodedPrivateKey: prepared.encodedPrivateKey,
|
|
175
|
-
});
|
|
176
|
-
if (prepared.keyId) {
|
|
177
|
-
this.rememberSecretStorageKey(prepared.keyId, prepared.privateKey, prepared.keyInfo);
|
|
178
|
-
}
|
|
179
|
-
return this.getRecoveryKeySummary() ?? {};
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
stageEncodedRecoveryKey(params: {
|
|
183
|
-
encodedPrivateKey: string;
|
|
184
|
-
keyId?: string | null;
|
|
185
|
-
keyInfo?: MatrixStoredRecoveryKey["keyInfo"];
|
|
186
|
-
}): void {
|
|
187
|
-
const prepared = this.resolveEncodedRecoveryKeyInput(params);
|
|
188
|
-
this.discardStagedRecoveryKey();
|
|
189
|
-
this.stagedRecoveryKey = {
|
|
190
|
-
version: 1,
|
|
191
|
-
createdAt: new Date().toISOString(),
|
|
192
|
-
keyId: prepared.keyId,
|
|
193
|
-
encodedPrivateKey: prepared.encodedPrivateKey,
|
|
194
|
-
privateKeyBase64: Buffer.from(prepared.privateKey).toString("base64"),
|
|
195
|
-
keyInfo: prepared.keyInfo,
|
|
196
|
-
};
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
commitStagedRecoveryKey(params?: {
|
|
200
|
-
keyId?: string | null;
|
|
201
|
-
keyInfo?: MatrixStoredRecoveryKey["keyInfo"];
|
|
202
|
-
}): {
|
|
203
|
-
encodedPrivateKey?: string;
|
|
204
|
-
keyId?: string | null;
|
|
205
|
-
createdAt?: string;
|
|
206
|
-
} | null {
|
|
207
|
-
if (!this.stagedRecoveryKey) {
|
|
208
|
-
return this.getRecoveryKeySummary();
|
|
209
|
-
}
|
|
210
|
-
const staged = this.stagedRecoveryKey;
|
|
211
|
-
const privateKey = new Uint8Array(Buffer.from(staged.privateKeyBase64, "base64"));
|
|
212
|
-
const keyId =
|
|
213
|
-
typeof params?.keyId === "string" && params.keyId.trim() ? params.keyId.trim() : staged.keyId;
|
|
214
|
-
this.saveRecoveryKeyToDisk({
|
|
215
|
-
keyId,
|
|
216
|
-
keyInfo: params?.keyInfo ?? staged.keyInfo,
|
|
217
|
-
privateKey,
|
|
218
|
-
encodedPrivateKey: staged.encodedPrivateKey,
|
|
219
|
-
});
|
|
220
|
-
this.clearStagedRecoveryKeyTracking();
|
|
221
|
-
return this.getRecoveryKeySummary();
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
discardStagedRecoveryKey(): void {
|
|
225
|
-
for (const keyId of this.stagedCacheKeyIds) {
|
|
226
|
-
this.secretStorageKeyCache.delete(keyId);
|
|
227
|
-
}
|
|
228
|
-
this.clearStagedRecoveryKeyTracking();
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
async bootstrapSecretStorageWithRecoveryKey(
|
|
232
|
-
crypto: MatrixCryptoBootstrapApi,
|
|
233
|
-
options: {
|
|
234
|
-
setupNewKeyBackup?: boolean;
|
|
235
|
-
allowSecretStorageRecreateWithoutRecoveryKey?: boolean;
|
|
236
|
-
forceNewSecretStorage?: boolean;
|
|
237
|
-
} = {},
|
|
238
|
-
): Promise<void> {
|
|
239
|
-
let status: MatrixSecretStorageStatus | null = null;
|
|
240
|
-
const getSecretStorageStatus = crypto.getSecretStorageStatus; // pragma: allowlist secret
|
|
241
|
-
if (typeof getSecretStorageStatus === "function") {
|
|
242
|
-
try {
|
|
243
|
-
status = await getSecretStorageStatus.call(crypto);
|
|
244
|
-
} catch (err) {
|
|
245
|
-
LogService.warn("MatrixClientLite", "Failed to read secret storage status:", err);
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
const hasDefaultSecretStorageKey = Boolean(status?.defaultKeyId);
|
|
250
|
-
const hasKnownInvalidSecrets = Object.values(status?.secretStorageKeyValidityMap ?? {}).some(
|
|
251
|
-
(valid) => !valid,
|
|
252
|
-
);
|
|
253
|
-
let generatedRecoveryKey = false;
|
|
254
|
-
const storedRecovery = this.loadStoredRecoveryKey();
|
|
255
|
-
const stagedRecovery = this.stagedRecoveryKey;
|
|
256
|
-
const sourceRecovery = stagedRecovery ?? storedRecovery;
|
|
257
|
-
let recoveryKey: MatrixGeneratedSecretStorageKey | null = sourceRecovery
|
|
258
|
-
? {
|
|
259
|
-
keyInfo: sourceRecovery.keyInfo,
|
|
260
|
-
privateKey: new Uint8Array(Buffer.from(sourceRecovery.privateKeyBase64, "base64")),
|
|
261
|
-
encodedPrivateKey: sourceRecovery.encodedPrivateKey,
|
|
262
|
-
}
|
|
263
|
-
: null;
|
|
264
|
-
|
|
265
|
-
if (recoveryKey && status?.defaultKeyId) {
|
|
266
|
-
const defaultKeyId = status.defaultKeyId;
|
|
267
|
-
this.rememberSecretStorageKey(defaultKeyId, recoveryKey.privateKey, recoveryKey.keyInfo);
|
|
268
|
-
if (!stagedRecovery && storedRecovery && storedRecovery.keyId !== defaultKeyId) {
|
|
269
|
-
this.saveRecoveryKeyToDisk({
|
|
270
|
-
keyId: defaultKeyId,
|
|
271
|
-
keyInfo: recoveryKey.keyInfo,
|
|
272
|
-
privateKey: recoveryKey.privateKey,
|
|
273
|
-
encodedPrivateKey: recoveryKey.encodedPrivateKey,
|
|
274
|
-
});
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
const ensureRecoveryKey = async (): Promise<MatrixGeneratedSecretStorageKey> => {
|
|
279
|
-
if (recoveryKey) {
|
|
280
|
-
return recoveryKey;
|
|
281
|
-
}
|
|
282
|
-
if (typeof crypto.createRecoveryKeyFromPassphrase !== "function") {
|
|
283
|
-
throw new Error(
|
|
284
|
-
"Matrix crypto backend does not support recovery key generation (createRecoveryKeyFromPassphrase missing)",
|
|
285
|
-
);
|
|
286
|
-
}
|
|
287
|
-
recoveryKey = await crypto.createRecoveryKeyFromPassphrase();
|
|
288
|
-
this.saveRecoveryKeyToDisk(recoveryKey);
|
|
289
|
-
generatedRecoveryKey = true;
|
|
290
|
-
return recoveryKey;
|
|
291
|
-
};
|
|
292
|
-
|
|
293
|
-
const shouldRecreateSecretStorage =
|
|
294
|
-
options.forceNewSecretStorage === true ||
|
|
295
|
-
!hasDefaultSecretStorageKey ||
|
|
296
|
-
(!recoveryKey && status?.ready === false) ||
|
|
297
|
-
hasKnownInvalidSecrets;
|
|
298
|
-
|
|
299
|
-
if (hasKnownInvalidSecrets) {
|
|
300
|
-
// Existing secret storage keys can't decrypt required secrets. Generate a fresh recovery key.
|
|
301
|
-
recoveryKey = null;
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
const secretStorageOptions: {
|
|
305
|
-
createSecretStorageKey?: () => Promise<MatrixGeneratedSecretStorageKey>;
|
|
306
|
-
setupNewSecretStorage?: boolean;
|
|
307
|
-
setupNewKeyBackup?: boolean;
|
|
308
|
-
} = {
|
|
309
|
-
setupNewKeyBackup: options.setupNewKeyBackup === true,
|
|
310
|
-
};
|
|
311
|
-
|
|
312
|
-
if (shouldRecreateSecretStorage) {
|
|
313
|
-
secretStorageOptions.setupNewSecretStorage = true;
|
|
314
|
-
secretStorageOptions.createSecretStorageKey = ensureRecoveryKey;
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
try {
|
|
318
|
-
await crypto.bootstrapSecretStorage(secretStorageOptions);
|
|
319
|
-
} catch (err) {
|
|
320
|
-
const shouldRecreateWithoutRecoveryKey =
|
|
321
|
-
options.allowSecretStorageRecreateWithoutRecoveryKey === true &&
|
|
322
|
-
hasDefaultSecretStorageKey &&
|
|
323
|
-
isRepairableSecretStorageAccessError(err);
|
|
324
|
-
if (!shouldRecreateWithoutRecoveryKey) {
|
|
325
|
-
throw err;
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
recoveryKey = null;
|
|
329
|
-
LogService.warn(
|
|
330
|
-
"MatrixClientLite",
|
|
331
|
-
"Secret storage exists on the server but local recovery material cannot unlock it; recreating secret storage during explicit bootstrap.",
|
|
332
|
-
);
|
|
333
|
-
await crypto.bootstrapSecretStorage({
|
|
334
|
-
setupNewSecretStorage: true,
|
|
335
|
-
setupNewKeyBackup: options.setupNewKeyBackup === true,
|
|
336
|
-
createSecretStorageKey: ensureRecoveryKey,
|
|
337
|
-
});
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
if (generatedRecoveryKey && this.recoveryKeyPath) {
|
|
341
|
-
LogService.warn(
|
|
342
|
-
"MatrixClientLite",
|
|
343
|
-
`Generated Matrix recovery key and saved it to ${this.recoveryKeyPath}. Keep this file secure.`,
|
|
344
|
-
);
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
private clearStagedRecoveryKeyTracking(): void {
|
|
349
|
-
this.stagedRecoveryKey = null;
|
|
350
|
-
this.stagedCacheKeyIds.clear();
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
private rememberSecretStorageKey(
|
|
354
|
-
keyId: string,
|
|
355
|
-
key: Uint8Array,
|
|
356
|
-
keyInfo?: MatrixStoredRecoveryKey["keyInfo"],
|
|
357
|
-
): void {
|
|
358
|
-
if (!keyId.trim()) {
|
|
359
|
-
return;
|
|
360
|
-
}
|
|
361
|
-
this.secretStorageKeyCache.set(keyId, {
|
|
362
|
-
key: new Uint8Array(key),
|
|
363
|
-
keyInfo,
|
|
364
|
-
});
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
private loadStoredRecoveryKey(): MatrixStoredRecoveryKey | null {
|
|
368
|
-
if (!this.recoveryKeyPath) {
|
|
369
|
-
return null;
|
|
370
|
-
}
|
|
371
|
-
try {
|
|
372
|
-
if (!fs.existsSync(this.recoveryKeyPath)) {
|
|
373
|
-
return null;
|
|
374
|
-
}
|
|
375
|
-
const raw = fs.readFileSync(this.recoveryKeyPath, "utf8");
|
|
376
|
-
const parsed = JSON.parse(raw) as Partial<MatrixStoredRecoveryKey>;
|
|
377
|
-
if (
|
|
378
|
-
parsed.version !== 1 ||
|
|
379
|
-
typeof parsed.createdAt !== "string" ||
|
|
380
|
-
typeof parsed.privateKeyBase64 !== "string" || // pragma: allowlist secret
|
|
381
|
-
!parsed.privateKeyBase64.trim()
|
|
382
|
-
) {
|
|
383
|
-
return null;
|
|
384
|
-
}
|
|
385
|
-
return {
|
|
386
|
-
version: 1,
|
|
387
|
-
createdAt: parsed.createdAt,
|
|
388
|
-
keyId: typeof parsed.keyId === "string" ? parsed.keyId : null,
|
|
389
|
-
encodedPrivateKey:
|
|
390
|
-
typeof parsed.encodedPrivateKey === "string" ? parsed.encodedPrivateKey : undefined,
|
|
391
|
-
privateKeyBase64: parsed.privateKeyBase64,
|
|
392
|
-
keyInfo:
|
|
393
|
-
parsed.keyInfo && typeof parsed.keyInfo === "object"
|
|
394
|
-
? {
|
|
395
|
-
passphrase: parsed.keyInfo.passphrase,
|
|
396
|
-
name: typeof parsed.keyInfo.name === "string" ? parsed.keyInfo.name : undefined,
|
|
397
|
-
}
|
|
398
|
-
: undefined,
|
|
399
|
-
};
|
|
400
|
-
} catch {
|
|
401
|
-
return null;
|
|
402
|
-
}
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
private saveRecoveryKeyToDisk(params: MatrixGeneratedSecretStorageKey): void {
|
|
406
|
-
if (!this.recoveryKeyPath) {
|
|
407
|
-
return;
|
|
408
|
-
}
|
|
409
|
-
try {
|
|
410
|
-
const payload: MatrixStoredRecoveryKey = {
|
|
411
|
-
version: 1,
|
|
412
|
-
createdAt: new Date().toISOString(),
|
|
413
|
-
keyId: typeof params.keyId === "string" ? params.keyId : null,
|
|
414
|
-
encodedPrivateKey: params.encodedPrivateKey,
|
|
415
|
-
privateKeyBase64: Buffer.from(params.privateKey).toString("base64"),
|
|
416
|
-
keyInfo: params.keyInfo
|
|
417
|
-
? {
|
|
418
|
-
passphrase: params.keyInfo.passphrase,
|
|
419
|
-
name: params.keyInfo.name,
|
|
420
|
-
}
|
|
421
|
-
: undefined,
|
|
422
|
-
};
|
|
423
|
-
fs.mkdirSync(path.dirname(this.recoveryKeyPath), { recursive: true });
|
|
424
|
-
fs.writeFileSync(this.recoveryKeyPath, JSON.stringify(payload, null, 2), "utf8");
|
|
425
|
-
fs.chmodSync(this.recoveryKeyPath, 0o600);
|
|
426
|
-
} catch (err) {
|
|
427
|
-
LogService.warn("MatrixClientLite", "Failed to persist recovery key:", err);
|
|
428
|
-
}
|
|
429
|
-
}
|
|
430
|
-
}
|
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
|
2
|
-
import { MatrixMediaSizeLimitError } from "../media-errors.js";
|
|
3
|
-
import { performMatrixRequest } from "./transport.js";
|
|
4
|
-
|
|
5
|
-
const TEST_UNDICI_RUNTIME_DEPS_KEY = "__OPENCLAW_TEST_UNDICI_RUNTIME_DEPS__";
|
|
6
|
-
|
|
7
|
-
function clearTestUndiciRuntimeDepsOverride(): void {
|
|
8
|
-
Reflect.deleteProperty(globalThis as object, TEST_UNDICI_RUNTIME_DEPS_KEY);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
describe("performMatrixRequest", () => {
|
|
12
|
-
beforeEach(() => {
|
|
13
|
-
vi.unstubAllGlobals();
|
|
14
|
-
clearTestUndiciRuntimeDepsOverride();
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
afterEach(() => {
|
|
18
|
-
clearTestUndiciRuntimeDepsOverride();
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
it("rejects oversized raw responses before buffering the whole body", async () => {
|
|
22
|
-
vi.stubGlobal(
|
|
23
|
-
"fetch",
|
|
24
|
-
vi.fn(
|
|
25
|
-
async () =>
|
|
26
|
-
new Response("too-big", {
|
|
27
|
-
status: 200,
|
|
28
|
-
headers: {
|
|
29
|
-
"content-length": "8192",
|
|
30
|
-
},
|
|
31
|
-
}),
|
|
32
|
-
),
|
|
33
|
-
);
|
|
34
|
-
|
|
35
|
-
await expect(
|
|
36
|
-
performMatrixRequest({
|
|
37
|
-
homeserver: "http://127.0.0.1:8008",
|
|
38
|
-
accessToken: "token",
|
|
39
|
-
method: "GET",
|
|
40
|
-
endpoint: "/_lobi/media/v3/download/example/id",
|
|
41
|
-
timeoutMs: 5000,
|
|
42
|
-
raw: true,
|
|
43
|
-
maxBytes: 1024,
|
|
44
|
-
ssrfPolicy: { allowPrivateNetwork: true },
|
|
45
|
-
}),
|
|
46
|
-
).rejects.toBeInstanceOf(MatrixMediaSizeLimitError);
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
it("applies streaming byte limits when raw responses omit content-length", async () => {
|
|
50
|
-
const chunk = new Uint8Array(768);
|
|
51
|
-
const stream = new ReadableStream<Uint8Array>({
|
|
52
|
-
start(controller) {
|
|
53
|
-
controller.enqueue(chunk);
|
|
54
|
-
controller.enqueue(chunk);
|
|
55
|
-
controller.close();
|
|
56
|
-
},
|
|
57
|
-
});
|
|
58
|
-
vi.stubGlobal(
|
|
59
|
-
"fetch",
|
|
60
|
-
vi.fn(
|
|
61
|
-
async () =>
|
|
62
|
-
new Response(stream, {
|
|
63
|
-
status: 200,
|
|
64
|
-
}),
|
|
65
|
-
),
|
|
66
|
-
);
|
|
67
|
-
|
|
68
|
-
await expect(
|
|
69
|
-
performMatrixRequest({
|
|
70
|
-
homeserver: "http://127.0.0.1:8008",
|
|
71
|
-
accessToken: "token",
|
|
72
|
-
method: "GET",
|
|
73
|
-
endpoint: "/_lobi/media/v3/download/example/id",
|
|
74
|
-
timeoutMs: 5000,
|
|
75
|
-
raw: true,
|
|
76
|
-
maxBytes: 1024,
|
|
77
|
-
ssrfPolicy: { allowPrivateNetwork: true },
|
|
78
|
-
}),
|
|
79
|
-
).rejects.toBeInstanceOf(MatrixMediaSizeLimitError);
|
|
80
|
-
});
|
|
81
|
-
|
|
82
|
-
it("uses the matrix-specific idle-timeout error for stalled raw downloads", async () => {
|
|
83
|
-
vi.useFakeTimers();
|
|
84
|
-
try {
|
|
85
|
-
const stream = new ReadableStream<Uint8Array>({
|
|
86
|
-
start(controller) {
|
|
87
|
-
controller.enqueue(new Uint8Array([1, 2, 3]));
|
|
88
|
-
},
|
|
89
|
-
});
|
|
90
|
-
vi.stubGlobal(
|
|
91
|
-
"fetch",
|
|
92
|
-
vi.fn(
|
|
93
|
-
async () =>
|
|
94
|
-
new Response(stream, {
|
|
95
|
-
status: 200,
|
|
96
|
-
}),
|
|
97
|
-
),
|
|
98
|
-
);
|
|
99
|
-
|
|
100
|
-
const requestPromise = performMatrixRequest({
|
|
101
|
-
homeserver: "http://127.0.0.1:8008",
|
|
102
|
-
accessToken: "token",
|
|
103
|
-
method: "GET",
|
|
104
|
-
endpoint: "/_lobi/media/v3/download/example/id",
|
|
105
|
-
timeoutMs: 5000,
|
|
106
|
-
raw: true,
|
|
107
|
-
maxBytes: 1024,
|
|
108
|
-
readIdleTimeoutMs: 50,
|
|
109
|
-
ssrfPolicy: { allowPrivateNetwork: true },
|
|
110
|
-
});
|
|
111
|
-
|
|
112
|
-
const rejection = expect(requestPromise).rejects.toThrow(
|
|
113
|
-
"Matrix media download stalled: no data received for 50ms",
|
|
114
|
-
);
|
|
115
|
-
await vi.advanceTimersByTimeAsync(60);
|
|
116
|
-
await rejection;
|
|
117
|
-
} finally {
|
|
118
|
-
vi.useRealTimers();
|
|
119
|
-
}
|
|
120
|
-
}, 5_000);
|
|
121
|
-
|
|
122
|
-
it("uses undici runtime fetch for pinned Matrix requests so the dispatcher stays bound", async () => {
|
|
123
|
-
let ambientFetchCalls = 0;
|
|
124
|
-
vi.stubGlobal("fetch", (async () => {
|
|
125
|
-
ambientFetchCalls += 1;
|
|
126
|
-
throw new Error("expected pinned Matrix requests to avoid ambient fetch");
|
|
127
|
-
}) as typeof fetch);
|
|
128
|
-
const runtimeFetch = vi.fn(async (_input: RequestInfo | URL, init?: RequestInit) => {
|
|
129
|
-
const requestInit = init as RequestInit & { dispatcher?: unknown };
|
|
130
|
-
expect(requestInit.dispatcher).toBeDefined();
|
|
131
|
-
return new Response('{"ok":true}', {
|
|
132
|
-
status: 200,
|
|
133
|
-
headers: {
|
|
134
|
-
"content-type": "application/json",
|
|
135
|
-
},
|
|
136
|
-
});
|
|
137
|
-
});
|
|
138
|
-
(globalThis as Record<string, unknown>)[TEST_UNDICI_RUNTIME_DEPS_KEY] = {
|
|
139
|
-
Agent: function MockAgent() {},
|
|
140
|
-
EnvHttpProxyAgent: function MockEnvHttpProxyAgent() {},
|
|
141
|
-
ProxyAgent: function MockProxyAgent() {},
|
|
142
|
-
fetch: runtimeFetch,
|
|
143
|
-
};
|
|
144
|
-
|
|
145
|
-
const result = await performMatrixRequest({
|
|
146
|
-
homeserver: "http://127.0.0.1:8008",
|
|
147
|
-
accessToken: "token",
|
|
148
|
-
method: "GET",
|
|
149
|
-
endpoint: "/_lobi/client/v3/account/whoami",
|
|
150
|
-
timeoutMs: 5000,
|
|
151
|
-
ssrfPolicy: { allowPrivateNetwork: true },
|
|
152
|
-
});
|
|
153
|
-
|
|
154
|
-
expect(result.text).toBe('{"ok":true}');
|
|
155
|
-
expect(ambientFetchCalls).toBe(0);
|
|
156
|
-
expect(runtimeFetch).toHaveBeenCalledTimes(1);
|
|
157
|
-
expect(
|
|
158
|
-
(runtimeFetch.mock.calls[0]?.[1] as RequestInit & { dispatcher?: unknown })?.dispatcher,
|
|
159
|
-
).toBeDefined();
|
|
160
|
-
});
|
|
161
|
-
});
|