@archipelagolab/lobi 1.0.5 → 1.0.6
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/dist/APEv2Parser-FYYGMFPI.js +15 -0
- package/dist/APEv2Parser-FYYGMFPI.js.map +7 -0
- package/dist/AiffParser-JHSDQA7T.js +194 -0
- package/dist/AiffParser-JHSDQA7T.js.map +7 -0
- package/dist/AsfParser-TPCQDEJB.js +620 -0
- package/dist/AsfParser-TPCQDEJB.js.map +7 -0
- package/dist/DsdiffParser-CGD3C3TL.js +192 -0
- package/dist/DsdiffParser-CGD3C3TL.js.map +7 -0
- package/dist/DsfParser-3UTIJVNF.js +114 -0
- package/dist/DsfParser-3UTIJVNF.js.map +7 -0
- package/dist/FlacParser-HLLYPJ76.js +16 -0
- package/dist/FlacParser-HLLYPJ76.js.map +7 -0
- package/dist/MP4Parser-SM7HYL3Z.js +1145 -0
- package/dist/MP4Parser-SM7HYL3Z.js.map +7 -0
- package/dist/MatroskaParser-X7WRZ6D4.js +662 -0
- package/dist/MatroskaParser-X7WRZ6D4.js.map +7 -0
- package/dist/MpegParser-KXQEC6KD.js +652 -0
- package/dist/MpegParser-KXQEC6KD.js.map +7 -0
- package/dist/MusepackParser-NURI46TG.js +331 -0
- package/dist/MusepackParser-NURI46TG.js.map +7 -0
- package/dist/OggParser-5IYVBXPS.js +448 -0
- package/dist/OggParser-5IYVBXPS.js.map +7 -0
- package/dist/WavPackParser-RTEHKSJH.js +209 -0
- package/dist/WavPackParser-RTEHKSJH.js.map +7 -0
- package/dist/WaveParser-3R2NLXGP.js +300 -0
- package/dist/WaveParser-3R2NLXGP.js.map +7 -0
- package/dist/auth-presence.js +2 -2
- package/dist/channel-plugin-api.js +68 -68
- package/dist/chunk-2GFROLI2.js +261 -0
- package/dist/chunk-2GFROLI2.js.map +7 -0
- package/dist/chunk-2IQWKATM.js +127 -0
- package/dist/chunk-2IQWKATM.js.map +7 -0
- package/dist/chunk-2V6Y4CAN.js +25 -0
- package/dist/chunk-2V6Y4CAN.js.map +7 -0
- package/dist/chunk-2WHRUMOM.js +321 -0
- package/dist/chunk-2WHRUMOM.js.map +7 -0
- package/dist/chunk-3GIK7SAA.js +109 -0
- package/dist/chunk-3GIK7SAA.js.map +7 -0
- package/dist/chunk-3OXOEMBS.js +123 -0
- package/dist/chunk-3OXOEMBS.js.map +7 -0
- package/dist/chunk-3R4ATE4Q.js +176 -0
- package/dist/chunk-3R4ATE4Q.js.map +7 -0
- package/dist/chunk-4CFQNJ7F.js +7 -0
- package/dist/chunk-4CFQNJ7F.js.map +7 -0
- package/dist/chunk-4COI4L2Y.js +31 -0
- package/dist/chunk-4COI4L2Y.js.map +7 -0
- package/dist/chunk-4EKKDVG3.js +1662 -0
- package/dist/chunk-4EKKDVG3.js.map +7 -0
- package/dist/chunk-4L2QI6AY.js +71 -0
- package/dist/chunk-4L2QI6AY.js.map +7 -0
- package/dist/chunk-4OXPPDV6.js +676 -0
- package/dist/chunk-4OXPPDV6.js.map +7 -0
- package/dist/chunk-4QTZHELX.js +51 -0
- package/dist/chunk-4QTZHELX.js.map +7 -0
- package/dist/chunk-4U42OJMK.js +217 -0
- package/dist/chunk-4U42OJMK.js.map +7 -0
- package/dist/chunk-4WCKVGQ5.js +193 -0
- package/dist/chunk-4WCKVGQ5.js.map +7 -0
- package/dist/chunk-4XXERLFH.js +95 -0
- package/dist/chunk-4XXERLFH.js.map +7 -0
- package/dist/chunk-4ZY2BOQ4.js +123 -0
- package/dist/chunk-4ZY2BOQ4.js.map +7 -0
- package/dist/chunk-57ROEOHB.js +183 -0
- package/dist/chunk-57ROEOHB.js.map +7 -0
- package/dist/chunk-5BQ6LLNU.js +39 -0
- package/dist/chunk-5BQ6LLNU.js.map +7 -0
- package/dist/chunk-63QTHDJL.js +52 -0
- package/dist/chunk-63QTHDJL.js.map +7 -0
- package/dist/chunk-65UUVZ6B.js +151 -0
- package/dist/chunk-65UUVZ6B.js.map +7 -0
- package/dist/chunk-6COVTMAO.js +3586 -0
- package/dist/chunk-6COVTMAO.js.map +7 -0
- package/dist/chunk-6EYPDJUD.js +34 -0
- package/dist/chunk-6EYPDJUD.js.map +7 -0
- package/dist/chunk-6HDYPVA4.js +15 -0
- package/dist/chunk-6HDYPVA4.js.map +7 -0
- package/dist/chunk-6OP3FK5F.js +266 -0
- package/dist/chunk-6OP3FK5F.js.map +7 -0
- package/dist/chunk-6RBDFNSX.js +88 -0
- package/dist/chunk-6RBDFNSX.js.map +7 -0
- package/dist/chunk-6TWWCETB.js +70 -0
- package/dist/chunk-6TWWCETB.js.map +7 -0
- package/dist/chunk-6WFHPMUF.js +17 -0
- package/dist/chunk-6WFHPMUF.js.map +7 -0
- package/dist/chunk-77BEEAPD.js +86 -0
- package/dist/chunk-77BEEAPD.js.map +7 -0
- package/dist/chunk-77JJ6QJK.js +50 -0
- package/dist/chunk-77JJ6QJK.js.map +7 -0
- package/dist/chunk-7BIUNV33.js +62 -0
- package/dist/chunk-7BIUNV33.js.map +7 -0
- package/dist/chunk-7L37R42D.js +52 -0
- package/dist/chunk-7L37R42D.js.map +7 -0
- package/dist/chunk-7ZP3KYVO.js +104 -0
- package/dist/chunk-7ZP3KYVO.js.map +7 -0
- package/dist/chunk-ARGF232V.js +32 -0
- package/dist/chunk-ARGF232V.js.map +7 -0
- package/dist/chunk-ATCJOK3K.js +24 -0
- package/dist/chunk-ATCJOK3K.js.map +7 -0
- package/dist/chunk-AUUABFHL.js +124 -0
- package/dist/chunk-AUUABFHL.js.map +7 -0
- package/dist/chunk-B3NTODO7.js +57 -0
- package/dist/chunk-B3NTODO7.js.map +7 -0
- package/dist/chunk-BM7J2W36.js +86 -0
- package/dist/chunk-BM7J2W36.js.map +7 -0
- package/dist/chunk-CEB5S2Z5.js +127 -0
- package/dist/chunk-CEB5S2Z5.js.map +7 -0
- package/dist/chunk-CEKNTCJD.js +177 -0
- package/dist/chunk-CEKNTCJD.js.map +7 -0
- package/dist/chunk-CGFDIH77.js +94 -0
- package/dist/chunk-CGFDIH77.js.map +7 -0
- package/dist/chunk-CPLEC5LJ.js +26 -0
- package/dist/chunk-CPLEC5LJ.js.map +7 -0
- package/dist/chunk-D4GYYYMW.js +155 -0
- package/dist/chunk-D4GYYYMW.js.map +7 -0
- package/dist/chunk-D64CZG54.js +78 -0
- package/dist/chunk-D64CZG54.js.map +7 -0
- package/dist/chunk-DSGPDHF2.js +737 -0
- package/dist/chunk-DSGPDHF2.js.map +7 -0
- package/dist/chunk-EBXHW7ZO.js +108 -0
- package/dist/chunk-EBXHW7ZO.js.map +7 -0
- package/dist/chunk-EO35SCFP.js +7 -0
- package/dist/chunk-EO35SCFP.js.map +7 -0
- package/dist/chunk-ER2XTD2S.js +271 -0
- package/dist/chunk-ER2XTD2S.js.map +7 -0
- package/dist/chunk-ERXO3674.js +54 -0
- package/dist/chunk-ERXO3674.js.map +7 -0
- package/dist/chunk-F43CC2X2.js +49 -0
- package/dist/chunk-F43CC2X2.js.map +7 -0
- package/dist/chunk-F64TXVJJ.js +158 -0
- package/dist/chunk-F64TXVJJ.js.map +7 -0
- package/dist/chunk-F6APWSAA.js +51 -0
- package/dist/chunk-F6APWSAA.js.map +7 -0
- package/dist/chunk-F7LNS7G3.js +235 -0
- package/dist/chunk-F7LNS7G3.js.map +7 -0
- package/dist/chunk-FCNWR7ZX.js +16352 -0
- package/dist/chunk-FCNWR7ZX.js.map +7 -0
- package/dist/chunk-FFCG5NRU.js +87 -0
- package/dist/chunk-FFCG5NRU.js.map +7 -0
- package/dist/chunk-FJFC6CRR.js +446 -0
- package/dist/chunk-FJFC6CRR.js.map +7 -0
- package/dist/chunk-FK6RGYBB.js +46 -0
- package/dist/chunk-FK6RGYBB.js.map +7 -0
- package/dist/chunk-FMY6KXK6.js +251 -0
- package/dist/chunk-FMY6KXK6.js.map +7 -0
- package/dist/chunk-FPH56SCM.js +21 -0
- package/dist/chunk-FPH56SCM.js.map +7 -0
- package/dist/chunk-FVSH4Z6T.js +173 -0
- package/dist/chunk-FVSH4Z6T.js.map +7 -0
- package/dist/chunk-FVWBLEAD.js +44 -0
- package/dist/chunk-FVWBLEAD.js.map +7 -0
- package/dist/chunk-FYSARMGS.js +93 -0
- package/dist/chunk-FYSARMGS.js.map +7 -0
- package/dist/chunk-FZJOJ6P4.js +28 -0
- package/dist/chunk-FZJOJ6P4.js.map +7 -0
- package/dist/chunk-G46GHNDU.js +4890 -0
- package/dist/chunk-G46GHNDU.js.map +7 -0
- package/dist/chunk-G4TIS2SC.js +56 -0
- package/dist/chunk-G4TIS2SC.js.map +7 -0
- package/dist/chunk-GGWS7NQP.js +247 -0
- package/dist/chunk-GGWS7NQP.js.map +7 -0
- package/dist/chunk-GRBJYAYF.js +129 -0
- package/dist/chunk-GRBJYAYF.js.map +7 -0
- package/dist/chunk-GXDQGBA2.js +106 -0
- package/dist/chunk-GXDQGBA2.js.map +7 -0
- package/dist/chunk-H2HY73I6.js +122 -0
- package/dist/chunk-H2HY73I6.js.map +7 -0
- package/dist/chunk-H5MLA6PA.js +29 -0
- package/dist/chunk-H5MLA6PA.js.map +7 -0
- package/dist/chunk-H7KAUMBC.js +635 -0
- package/dist/chunk-H7KAUMBC.js.map +7 -0
- package/dist/chunk-HGHU3TVL.js +174 -0
- package/dist/chunk-HGHU3TVL.js.map +7 -0
- package/dist/chunk-HJ5E2JRL.js +88 -0
- package/dist/chunk-HJ5E2JRL.js.map +7 -0
- package/dist/chunk-HJW3CKZL.js +94 -0
- package/dist/chunk-HJW3CKZL.js.map +7 -0
- package/dist/chunk-HKF5EBER.js +418 -0
- package/dist/chunk-HKF5EBER.js.map +7 -0
- package/dist/chunk-HLUR35G5.js +30 -0
- package/dist/chunk-HLUR35G5.js.map +7 -0
- package/dist/chunk-HNIW2NZU.js +120 -0
- package/dist/chunk-HNIW2NZU.js.map +7 -0
- package/dist/chunk-HSXRCP25.js +171 -0
- package/dist/chunk-HSXRCP25.js.map +7 -0
- package/dist/chunk-I26OPZLO.js +28 -0
- package/dist/chunk-I26OPZLO.js.map +7 -0
- package/dist/chunk-I7JJQ4BQ.js +30 -0
- package/dist/chunk-I7JJQ4BQ.js.map +7 -0
- package/dist/chunk-IJ6Y4W7F.js +392 -0
- package/dist/chunk-IJ6Y4W7F.js.map +7 -0
- package/dist/chunk-IJH4NOQ4.js +18 -0
- package/dist/chunk-IJH4NOQ4.js.map +7 -0
- package/dist/chunk-IMHRZQRH.js +76 -0
- package/dist/chunk-IMHRZQRH.js.map +7 -0
- package/dist/chunk-JB6ZQEVR.js +465 -0
- package/dist/chunk-JB6ZQEVR.js.map +7 -0
- package/dist/chunk-JCWNMWNY.js +102 -0
- package/dist/chunk-JCWNMWNY.js.map +7 -0
- package/dist/chunk-JGIZPU2Y.js +39 -0
- package/dist/chunk-JGIZPU2Y.js.map +7 -0
- package/dist/chunk-JIU4FXA7.js +485 -0
- package/dist/chunk-JIU4FXA7.js.map +7 -0
- package/dist/chunk-JU2Y33DB.js +60 -0
- package/dist/chunk-JU2Y33DB.js.map +7 -0
- package/dist/chunk-JVLRI4RU.js +62 -0
- package/dist/chunk-JVLRI4RU.js.map +7 -0
- package/dist/chunk-JZ3AVNZC.js +44117 -0
- package/dist/chunk-JZ3AVNZC.js.map +7 -0
- package/dist/chunk-K3HEWOHN.js +30 -0
- package/dist/chunk-K3HEWOHN.js.map +7 -0
- package/dist/chunk-K5EK4WZV.js +7 -0
- package/dist/chunk-K5EK4WZV.js.map +7 -0
- package/dist/chunk-KAWXMSYC.js +58 -0
- package/dist/chunk-KAWXMSYC.js.map +7 -0
- package/dist/chunk-KEGPHS4C.js +80 -0
- package/dist/chunk-KEGPHS4C.js.map +7 -0
- package/dist/chunk-KXXVR3DC.js +244 -0
- package/dist/chunk-KXXVR3DC.js.map +7 -0
- package/dist/chunk-L5T6XUDP.js +412 -0
- package/dist/chunk-L5T6XUDP.js.map +7 -0
- package/dist/chunk-LIFXTQ4U.js +7287 -0
- package/dist/chunk-LIFXTQ4U.js.map +7 -0
- package/dist/chunk-LMD5UTKM.js +169 -0
- package/dist/chunk-LMD5UTKM.js.map +7 -0
- package/dist/chunk-LTXNC6JX.js +27 -0
- package/dist/chunk-LTXNC6JX.js.map +7 -0
- package/dist/chunk-LUGTGPT6.js +138 -0
- package/dist/chunk-LUGTGPT6.js.map +7 -0
- package/dist/chunk-LZQFDJNW.js +300 -0
- package/dist/chunk-LZQFDJNW.js.map +7 -0
- package/dist/chunk-M4VQPIF4.js +5853 -0
- package/dist/chunk-M4VQPIF4.js.map +7 -0
- package/dist/chunk-M64QE4QC.js +64 -0
- package/dist/chunk-M64QE4QC.js.map +7 -0
- package/dist/chunk-MJ2GW6SU.js +163 -0
- package/dist/chunk-MJ2GW6SU.js.map +7 -0
- package/dist/chunk-MYSK3SIM.js +55 -0
- package/dist/chunk-MYSK3SIM.js.map +7 -0
- package/dist/chunk-N46MIZXB.js +154 -0
- package/dist/chunk-N46MIZXB.js.map +7 -0
- package/dist/chunk-N53537P6.js +31 -0
- package/dist/chunk-N53537P6.js.map +7 -0
- package/dist/chunk-N5CTFOLX.js +40 -0
- package/dist/chunk-N5CTFOLX.js.map +7 -0
- package/dist/chunk-NIFG55CE.js +52 -0
- package/dist/chunk-NIFG55CE.js.map +7 -0
- package/dist/chunk-NJ63ALPX.js +7 -0
- package/dist/chunk-NJ63ALPX.js.map +7 -0
- package/dist/chunk-NZVHE4IT.js +3101 -0
- package/dist/chunk-NZVHE4IT.js.map +7 -0
- package/dist/chunk-O7ORICEC.js +82 -0
- package/dist/chunk-O7ORICEC.js.map +7 -0
- package/dist/chunk-OBMBAM3N.js +73 -0
- package/dist/chunk-OBMBAM3N.js.map +7 -0
- package/dist/chunk-OJJBD5K3.js +45 -0
- package/dist/chunk-OJJBD5K3.js.map +7 -0
- package/dist/chunk-OKDOVX4B.js +699 -0
- package/dist/chunk-OKDOVX4B.js.map +7 -0
- package/dist/chunk-OVMDMCZ5.js +241 -0
- package/dist/chunk-OVMDMCZ5.js.map +7 -0
- package/dist/chunk-OVU43GJK.js +63 -0
- package/dist/chunk-OVU43GJK.js.map +7 -0
- package/dist/chunk-P3TMARA6.js +18 -0
- package/dist/chunk-P3TMARA6.js.map +7 -0
- package/dist/chunk-PLMOTQ42.js +335 -0
- package/dist/chunk-PLMOTQ42.js.map +7 -0
- package/dist/chunk-Q6H5OV2R.js +180 -0
- package/dist/chunk-Q6H5OV2R.js.map +7 -0
- package/dist/chunk-QAR5POXD.js +472 -0
- package/dist/chunk-QAR5POXD.js.map +7 -0
- package/dist/chunk-R5S76YR5.js +12 -0
- package/dist/chunk-R5S76YR5.js.map +7 -0
- package/dist/chunk-R7ZBOXPS.js +163 -0
- package/dist/chunk-R7ZBOXPS.js.map +7 -0
- package/dist/chunk-RAL3KX76.js +239 -0
- package/dist/chunk-RAL3KX76.js.map +7 -0
- package/dist/chunk-RHITG64O.js +50 -0
- package/dist/chunk-RHITG64O.js.map +7 -0
- package/dist/chunk-RK5HZFP6.js +111 -0
- package/dist/chunk-RK5HZFP6.js.map +7 -0
- package/dist/chunk-RQ26XXFS.js +45 -0
- package/dist/chunk-RQ26XXFS.js.map +7 -0
- package/dist/chunk-RSA7PKZH.js +187 -0
- package/dist/chunk-RSA7PKZH.js.map +7 -0
- package/dist/chunk-RTSINQ4T.js +78 -0
- package/dist/chunk-RTSINQ4T.js.map +7 -0
- package/dist/chunk-SH6Y4CGQ.js +175 -0
- package/dist/chunk-SH6Y4CGQ.js.map +7 -0
- package/dist/chunk-SHBAAFFH.js +74 -0
- package/dist/chunk-SHBAAFFH.js.map +7 -0
- package/dist/chunk-SPNSM6SB.js +36 -0
- package/dist/chunk-SPNSM6SB.js.map +7 -0
- package/dist/chunk-SQUHLLK5.js +125 -0
- package/dist/chunk-SQUHLLK5.js.map +7 -0
- package/dist/chunk-SWWK35VQ.js +84 -0
- package/dist/chunk-SWWK35VQ.js.map +7 -0
- package/dist/chunk-TC5ZVFV6.js +292 -0
- package/dist/chunk-TC5ZVFV6.js.map +7 -0
- package/dist/chunk-TFD7ZIYD.js +105 -0
- package/dist/chunk-TFD7ZIYD.js.map +7 -0
- package/dist/chunk-TH6ONRWT.js +516 -0
- package/dist/chunk-TH6ONRWT.js.map +7 -0
- package/dist/chunk-TMQMQ67T.js +81 -0
- package/dist/chunk-TMQMQ67T.js.map +7 -0
- package/dist/chunk-TPYWUZOR.js +178 -0
- package/dist/chunk-TPYWUZOR.js.map +7 -0
- package/dist/chunk-U2O4LE6S.js +22 -0
- package/dist/chunk-U2O4LE6S.js.map +7 -0
- package/dist/chunk-U44IVNP2.js +91 -0
- package/dist/chunk-U44IVNP2.js.map +7 -0
- package/dist/chunk-UDDWLWKZ.js +82 -0
- package/dist/chunk-UDDWLWKZ.js.map +7 -0
- package/dist/chunk-UMMPB6FL.js +506 -0
- package/dist/chunk-UMMPB6FL.js.map +7 -0
- package/dist/chunk-UP42ACP7.js +27 -0
- package/dist/chunk-UP42ACP7.js.map +7 -0
- package/dist/chunk-UPEF7ETP.js +92 -0
- package/dist/chunk-UPEF7ETP.js.map +7 -0
- package/dist/chunk-VBDLTKI2.js +130 -0
- package/dist/chunk-VBDLTKI2.js.map +7 -0
- package/dist/chunk-VCWIKEJ7.js +7 -0
- package/dist/chunk-VCWIKEJ7.js.map +7 -0
- package/dist/chunk-VPQICZQR.js +93 -0
- package/dist/chunk-VPQICZQR.js.map +7 -0
- package/dist/chunk-VRBJNFPL.js +114 -0
- package/dist/chunk-VRBJNFPL.js.map +7 -0
- package/dist/chunk-VUU5KFH3.js +38 -0
- package/dist/chunk-VUU5KFH3.js.map +7 -0
- package/dist/chunk-VVBL5CFF.js +7 -0
- package/dist/chunk-VVBL5CFF.js.map +7 -0
- package/dist/chunk-VYZEQ6KY.js +22 -0
- package/dist/chunk-VYZEQ6KY.js.map +7 -0
- package/dist/chunk-WBPQVWSU.js +198 -0
- package/dist/chunk-WBPQVWSU.js.map +7 -0
- package/dist/chunk-WS6HWBKT.js +30 -0
- package/dist/chunk-WS6HWBKT.js.map +7 -0
- package/dist/chunk-XOZPOHLG.js +233 -0
- package/dist/chunk-XOZPOHLG.js.map +7 -0
- package/dist/chunk-XR7DPSNX.js +195 -0
- package/dist/chunk-XR7DPSNX.js.map +7 -0
- package/dist/chunk-XYH4JC3U.js +7 -0
- package/dist/chunk-XYH4JC3U.js.map +7 -0
- package/dist/chunk-YB5UCHLN.js +314 -0
- package/dist/chunk-YB5UCHLN.js.map +7 -0
- package/dist/chunk-YF5DYD3X.js +97 -0
- package/dist/chunk-YF5DYD3X.js.map +7 -0
- package/dist/chunk-YGVQZCE7.js +30 -0
- package/dist/chunk-YGVQZCE7.js.map +7 -0
- package/dist/chunk-YNHADHHS.js +138 -0
- package/dist/chunk-YNHADHHS.js.map +7 -0
- package/dist/chunk-YOAMBAM2.js +70 -0
- package/dist/chunk-YOAMBAM2.js.map +7 -0
- package/dist/chunk-YWE5AQPZ.js +258 -0
- package/dist/chunk-YWE5AQPZ.js.map +7 -0
- package/dist/chunk-YWHH3MB6.js +1405 -0
- package/dist/chunk-YWHH3MB6.js.map +7 -0
- package/dist/chunk-YZ6F5N7R.js +455 -0
- package/dist/chunk-YZ6F5N7R.js.map +7 -0
- package/dist/chunk-ZFGRQIB6.js +38 -0
- package/dist/chunk-ZFGRQIB6.js.map +7 -0
- package/dist/chunk-ZGAUVPAB.js +14 -0
- package/dist/chunk-ZGAUVPAB.js.map +7 -0
- package/dist/chunk-ZGCATLM5.js +18 -0
- package/dist/chunk-ZGCATLM5.js.map +7 -0
- package/dist/chunk-ZSOPE7DO.js +92 -0
- package/dist/chunk-ZSOPE7DO.js.map +7 -0
- package/dist/chunk-ZY247PXY.js +135 -0
- package/dist/chunk-ZY247PXY.js.map +7 -0
- package/dist/cli-metadata.js +3 -3
- package/dist/contract-api.js +64 -64
- package/dist/dist-DVBXHDB4.js +549 -0
- package/dist/dist-DVBXHDB4.js.map +7 -0
- package/dist/helper-api.js +6 -6
- package/dist/index.js +8 -9
- package/dist/index.js.map +1 -1
- package/dist/magic-string.es-ITIPPYGW.js +1315 -0
- package/dist/magic-string.es-ITIPPYGW.js.map +7 -0
- package/dist/package.json +1 -1
- package/dist/plugin-entry.handlers.runtime-JLRK5XTV.js +20 -0
- package/dist/plugin-entry.handlers.runtime-JLRK5XTV.js.map +7 -0
- package/dist/runtime-api.js +9 -9
- package/dist/rust-crypto-7KS7OJ3F.js +5323 -0
- package/dist/rust-crypto-7KS7OJ3F.js.map +7 -0
- package/dist/secret-contract-api.js +3 -3
- package/dist/setup-entry.js +2 -3
- package/dist/setup-entry.js.map +1 -1
- package/dist/src/account-selection.js +5 -5
- package/dist/src/actions.js +18 -18
- package/dist/src/approval-auth.js +19 -19
- package/dist/src/approval-handler.runtime.js +55 -55
- package/dist/src/approval-ids.js +3 -3
- package/dist/src/approval-native.js +22 -22
- package/dist/src/approval-reactions.js +2 -2
- package/dist/src/auth-precedence.js +2 -2
- package/dist/src/channel-account-paths.js +3 -3
- package/dist/src/channel.js +68 -68
- package/dist/src/channel.runtime.js +51 -51
- package/dist/src/cli-metadata.js +2 -2
- package/dist/src/cli.js +63 -63
- package/dist/src/config-adapter.js +18 -18
- package/dist/src/config-schema.js +2 -2
- package/dist/src/directory-live.js +27 -27
- package/dist/src/doctor-contract.js +3 -3
- package/dist/src/doctor.js +24 -24
- package/dist/src/env-vars.js +2 -2
- package/dist/src/exec-approval-resolver.js +2 -2
- package/dist/src/exec-approvals.js +20 -20
- package/dist/src/group-mentions.js +20 -20
- package/dist/src/legacy-crypto-inspector-availability.js +2 -2
- package/dist/src/legacy-crypto.js +18 -18
- package/dist/src/legacy-state.js +16 -16
- package/dist/src/matrix/account-config.js +2 -2
- package/dist/src/matrix/accounts.js +16 -16
- package/dist/src/matrix/actions/client.js +30 -30
- package/dist/src/matrix/actions/devices.js +32 -32
- package/dist/src/matrix/actions/limits.js +2 -2
- package/dist/src/matrix/actions/messages.js +37 -37
- package/dist/src/matrix/actions/pins.js +36 -36
- package/dist/src/matrix/actions/polls.js +31 -31
- package/dist/src/matrix/actions/profile.js +32 -32
- package/dist/src/matrix/actions/reactions.js +32 -32
- package/dist/src/matrix/actions/room.js +32 -32
- package/dist/src/matrix/actions/summary.js +9 -9
- package/dist/src/matrix/actions/types.js +3 -3
- package/dist/src/matrix/actions/verification.js +37 -37
- package/dist/src/matrix/actions.js +51 -51
- package/dist/src/matrix/active-client.js +2 -2
- package/dist/src/matrix/async-lock.js +2 -2
- package/dist/src/matrix/backup-health.js +2 -2
- package/dist/src/matrix/client/config-runtime-api.js +3 -3
- package/dist/src/matrix/client/config-secret-input.runtime.js +1 -1
- package/dist/src/matrix/client/config.js +13 -13
- package/dist/src/matrix/client/create-client.js +14 -14
- package/dist/src/matrix/client/env-auth.js +14 -14
- package/dist/src/matrix/client/file-sync-store.js +17 -17
- package/dist/src/matrix/client/logging.js +5 -5
- package/dist/src/matrix/client/migration-snapshot.runtime.js +2 -2
- package/dist/src/matrix/client/private-network-host.js +2 -2
- package/dist/src/matrix/client/runtime.js +2 -2
- package/dist/src/matrix/client/shared.js +16 -16
- package/dist/src/matrix/client/storage.js +8 -8
- package/dist/src/matrix/client/types.js +1 -1
- package/dist/src/matrix/client-bootstrap.js +5 -5
- package/dist/src/matrix/client-resolver.test-helpers.js +2 -2
- package/dist/src/matrix/client.js +19 -19
- package/dist/src/matrix/config-paths.js +2 -2
- package/dist/src/matrix/config-update.js +4 -4
- package/dist/src/matrix/credentials-read.js +8 -8
- package/dist/src/matrix/credentials-write.runtime.js +1 -1
- package/dist/src/matrix/credentials.js +10 -10
- package/dist/src/matrix/deps.js +2 -2
- package/dist/src/matrix/device-health.js +2 -2
- package/dist/src/matrix/direct-management.js +6 -6
- package/dist/src/matrix/direct-room.js +2 -2
- package/dist/src/matrix/draft-stream.js +27 -27
- package/dist/src/matrix/encryption-guidance.js +7 -7
- package/dist/src/matrix/errors.js +2 -2
- package/dist/src/matrix/format.js +3 -3
- package/dist/src/matrix/legacy-crypto-inspector.js +3 -4
- package/dist/src/matrix/legacy-crypto-inspector.js.map +1 -1
- package/dist/src/matrix/media-errors.js +2 -2
- package/dist/src/matrix/media-text.js +2 -2
- package/dist/src/matrix/monitor/access-state.js +3 -3
- package/dist/src/matrix/monitor/ack-config.js +4 -4
- package/dist/src/matrix/monitor/allowlist.js +2 -2
- package/dist/src/matrix/monitor/auto-join.js +3 -3
- package/dist/src/matrix/monitor/config.js +31 -31
- package/dist/src/matrix/monitor/context-summary.js +5 -5
- package/dist/src/matrix/monitor/direct.js +7 -7
- package/dist/src/matrix/monitor/events.js +14 -14
- package/dist/src/matrix/monitor/handler.js +70 -70
- package/dist/src/matrix/monitor/handler.test-helpers.js +71 -71
- package/dist/src/matrix/monitor/inbound-dedupe.js +11 -11
- package/dist/src/matrix/monitor/index.js +100 -100
- package/dist/src/matrix/monitor/legacy-crypto-restore.js +8 -8
- package/dist/src/matrix/monitor/location.js +5 -5
- package/dist/src/matrix/monitor/media.js +4 -4
- package/dist/src/matrix/monitor/mentions.js +3 -3
- package/dist/src/matrix/monitor/reaction-events.js +30 -30
- package/dist/src/matrix/monitor/recent-invite.js +4 -4
- package/dist/src/matrix/monitor/replies.js +27 -27
- package/dist/src/matrix/monitor/reply-context.js +6 -6
- package/dist/src/matrix/monitor/room-history.js +2 -2
- package/dist/src/matrix/monitor/room-info.js +3 -3
- package/dist/src/matrix/monitor/rooms.js +3 -3
- package/dist/src/matrix/monitor/route.js +6 -6
- package/dist/src/matrix/monitor/runtime-api.js +2 -2
- package/dist/src/matrix/monitor/startup-verification.js +9 -9
- package/dist/src/matrix/monitor/startup.js +3 -3
- package/dist/src/matrix/monitor/status.js +4 -4
- package/dist/src/matrix/monitor/sync-lifecycle.js +3 -3
- package/dist/src/matrix/monitor/task-runner.js +2 -2
- package/dist/src/matrix/monitor/thread-context.js +6 -6
- package/dist/src/matrix/monitor/threads.js +4 -4
- package/dist/src/matrix/monitor/types.js +3 -3
- package/dist/src/matrix/monitor/verification-events.js +7 -7
- package/dist/src/matrix/monitor/verification-utils.js +2 -2
- package/dist/src/matrix/outbound-media-runtime.js +3 -3
- package/dist/src/matrix/poll-summary.js +4 -4
- package/dist/src/matrix/poll-types.js +3 -3
- package/dist/src/matrix/probe.js +3 -3
- package/dist/src/matrix/probe.runtime.js +19 -19
- package/dist/src/matrix/profile.js +2 -2
- package/dist/src/matrix/reaction-common.js +2 -2
- package/dist/src/matrix/sdk/crypto-bootstrap.js +9 -9
- package/dist/src/matrix/sdk/crypto-facade.js +2 -2
- package/dist/src/matrix/sdk/crypto-node.runtime.js +2 -3
- package/dist/src/matrix/sdk/crypto-node.runtime.js.map +1 -1
- package/dist/src/matrix/sdk/crypto-runtime.js +16 -16
- package/dist/src/matrix/sdk/decrypt-bridge.js +5 -5
- package/dist/src/matrix/sdk/event-helpers.js +2 -2
- package/dist/src/matrix/sdk/http-client.js +7 -7
- package/dist/src/matrix/sdk/idb-persistence-lock.js +2 -2
- package/dist/src/matrix/sdk/idb-persistence.js +5 -5
- package/dist/src/matrix/sdk/idb-persistence.test-helpers.js +1 -1
- package/dist/src/matrix/sdk/logger.js +3 -3
- package/dist/src/matrix/sdk/read-response-with-limit.js +2 -2
- package/dist/src/matrix/sdk/recovery-key-store.js +6 -6
- package/dist/src/matrix/sdk/transport.js +5 -5
- package/dist/src/matrix/sdk/types.js +1 -1
- package/dist/src/matrix/sdk/verification-manager.js +5 -5
- package/dist/src/matrix/sdk/verification-status.js +2 -2
- package/dist/src/matrix/sdk.js +31 -31
- package/dist/src/matrix/send/client.js +4 -4
- package/dist/src/matrix/send/formatting.js +7 -7
- package/dist/src/matrix/send/media.js +12 -12
- package/dist/src/matrix/send/targets.js +7 -7
- package/dist/src/matrix/send/types.js +3 -3
- package/dist/src/matrix/send.js +26 -26
- package/dist/src/matrix/session-store-metadata.js +3 -3
- package/dist/src/matrix/startup-abort.js +2 -2
- package/dist/src/matrix/sync-state.js +2 -2
- package/dist/src/matrix/target-ids.js +2 -2
- package/dist/src/matrix/thread-bindings-shared.js +2 -2
- package/dist/src/matrix/thread-bindings.js +34 -34
- package/dist/src/matrix-migration.runtime.js +22 -22
- package/dist/src/migration-config.js +15 -15
- package/dist/src/migration-snapshot-backup.js +2 -2
- package/dist/src/migration-snapshot.js +21 -21
- package/dist/src/onboarding.js +37 -37
- package/dist/src/onboarding.test-harness.js +2 -2
- package/dist/src/outbound.js +27 -27
- package/dist/src/plugin-entry.runtime.js +3 -3
- package/dist/src/profile-update.js +35 -35
- package/dist/src/record-shared.js +2 -2
- package/dist/src/resolve-targets.js +28 -28
- package/dist/src/resolver.js +2 -2
- package/dist/src/runtime-api.js +2 -2
- package/dist/src/runtime.js +2 -2
- package/dist/src/secret-contract.js +3 -3
- package/dist/src/session-route.js +19 -19
- package/dist/src/setup-bootstrap.js +46 -46
- package/dist/src/setup-config.js +18 -18
- package/dist/src/setup-contract.js +2 -2
- package/dist/src/setup-core.js +19 -19
- package/dist/src/setup-surface.js +38 -38
- package/dist/src/startup-maintenance.js +23 -23
- package/dist/src/storage-paths.js +2 -2
- package/dist/src/test-helpers.js +1 -1
- package/dist/src/test-mocks.js +2 -2
- package/dist/src/test-runtime.js +3 -3
- package/dist/src/tool-actions.js +62 -62
- package/dist/src/tool-actions.runtime.js +62 -62
- package/dist/src/types.js +1 -1
- package/dist/test-api.js +68 -68
- package/dist/thread-bindings-runtime.js +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/channel.ts"],
|
|
4
|
+
"sourcesContent": ["import { describeAccountSnapshot } from \"openclaw/plugin-sdk/account-helpers\";\nimport {\n adaptScopedAccountAccessor,\n createScopedDmSecurityResolver,\n} from \"openclaw/plugin-sdk/channel-config-helpers\";\nimport { buildChannelConfigSchema } from \"openclaw/plugin-sdk/channel-config-primitives\";\nimport { createChatChannelPlugin, type ChannelPlugin } from \"openclaw/plugin-sdk/channel-core\";\nimport {\n createAllowlistProviderOpenWarningCollector,\n projectAccountConfigWarningCollector,\n} from \"openclaw/plugin-sdk/channel-policy\";\nimport { createScopedAccountReplyToModeResolver } from \"openclaw/plugin-sdk/conversation-runtime\";\nimport {\n createChannelDirectoryAdapter,\n createResolvedDirectoryEntriesLister,\n createRuntimeDirectoryLiveAdapter,\n} from \"openclaw/plugin-sdk/directory-runtime\";\nimport { buildTrafficStatusSummary } from \"openclaw/plugin-sdk/extension-shared\";\nimport { createLazyRuntimeNamedExport } from \"openclaw/plugin-sdk/lazy-runtime\";\nimport { createRuntimeOutboundDelegates } from \"openclaw/plugin-sdk/outbound-runtime\";\nimport {\n buildProbeChannelStatusSummary,\n collectStatusIssuesFromLastError,\n createComputedAccountStatusAdapter,\n createDefaultChannelRuntimeState,\n} from \"openclaw/plugin-sdk/status-helpers\";\nimport { chunkTextForOutbound } from \"openclaw/plugin-sdk/text-chunking\";\nimport {\n normalizeLowercaseStringOrEmpty,\n normalizeOptionalString,\n} from \"openclaw/plugin-sdk/text-runtime\";\nimport { matrixMessageActions } from \"./actions.js\";\nimport { matrixApprovalCapability } from \"./approval-native.js\";\nimport { createMatrixPairingText, createMatrixProbeAccount } from \"./channel-account-paths.js\";\nimport { DEFAULT_ACCOUNT_ID, matrixConfigAdapter } from \"./config-adapter.js\";\nimport { MatrixConfigSchema } from \"./config-schema.js\";\nimport { matrixDoctor } from \"./doctor.js\";\nimport { shouldSuppressLocalMatrixExecApprovalPrompt } from \"./exec-approvals.js\";\nimport {\n resolveMatrixGroupRequireMention,\n resolveMatrixGroupToolPolicy,\n} from \"./group-mentions.js\";\nimport {\n resolveMatrixAccount,\n resolveMatrixAccountConfig,\n type ResolvedMatrixAccount,\n} from \"./matrix/accounts.js\";\nimport { normalizeMatrixUserId } from \"./matrix/monitor/allowlist.js\";\nimport type { MatrixProbe } from \"./matrix/probe.js\";\nimport {\n normalizeMatrixMessagingTarget,\n resolveMatrixDirectUserId,\n resolveMatrixTargetIdentity,\n} from \"./matrix/target-ids.js\";\nimport {\n setMatrixThreadBindingIdleTimeoutBySessionKey,\n setMatrixThreadBindingMaxAgeBySessionKey,\n} from \"./matrix/thread-bindings-shared.js\";\nimport { matrixResolverAdapter } from \"./resolver.js\";\nimport { collectRuntimeConfigAssignments, secretTargetRegistryEntries } from \"./secret-contract.js\";\nimport { resolveMatrixOutboundSessionRoute } from \"./session-route.js\";\nimport {\n namedAccountPromotionKeys,\n resolveSingleAccountPromotionTarget,\n singleAccountKeysToMove,\n} from \"./setup-contract.js\";\nimport { matrixSetupAdapter } from \"./setup-core.js\";\nimport { matrixSetupWizard } from \"./setup-surface.js\";\nimport { runMatrixStartupMaintenance } from \"./startup-maintenance.js\";\nimport type { CoreConfig } from \"./types.js\";\n// Mutex for serializing account startup (workaround for concurrent dynamic import race condition)\nlet matrixStartupLock: Promise<void> = Promise.resolve();\n\nconst loadMatrixChannelRuntime = createLazyRuntimeNamedExport(\n () => import(\"./channel.runtime.js\"),\n \"matrixChannelRuntime\",\n);\n\nconst meta = {\n id: \"lobi\",\n label: \"Lobi\",\n selectionLabel: \"Lobi (plugin)\",\n docsPath: \"/channels/lobi\",\n docsLabel: \"lobi\",\n blurb: \"Lobi - Lobisland official A2A messaging platform for AI agents.\",\n order: 70,\n quickstartAllowFrom: true,\n};\n\nconst listMatrixDirectoryPeersFromConfig =\n createResolvedDirectoryEntriesLister<ResolvedMatrixAccount>({\n kind: \"user\",\n resolveAccount: adaptScopedAccountAccessor(resolveMatrixAccount),\n resolveSources: (account) => [\n account.config.dm?.allowFrom ?? [],\n account.config.groupAllowFrom ?? [],\n ...Object.values(account.config.groups ?? account.config.rooms ?? {}).map(\n (room) => room.users ?? [],\n ),\n ],\n normalizeId: (entry) => {\n const raw = entry.replace(/^matrix:/i, \"\").trim();\n if (!raw || raw === \"*\") {\n return null;\n }\n const lowered = normalizeLowercaseStringOrEmpty(raw);\n const cleaned = lowered.startsWith(\"user:\") ? raw.slice(\"user:\".length).trim() : raw;\n return cleaned.startsWith(\"@\") ? `user:${cleaned}` : cleaned;\n },\n });\n\nconst listMatrixDirectoryGroupsFromConfig =\n createResolvedDirectoryEntriesLister<ResolvedMatrixAccount>({\n kind: \"group\",\n resolveAccount: adaptScopedAccountAccessor(resolveMatrixAccount),\n resolveSources: (account) => [Object.keys(account.config.groups ?? account.config.rooms ?? {})],\n normalizeId: (entry) => {\n const raw = entry.replace(/^matrix:/i, \"\").trim();\n if (!raw || raw === \"*\") {\n return null;\n }\n const lowered = normalizeLowercaseStringOrEmpty(raw);\n if (lowered.startsWith(\"room:\") || lowered.startsWith(\"channel:\")) {\n return raw;\n }\n return raw.startsWith(\"!\") ? `room:${raw}` : raw;\n },\n });\n\nfunction projectMatrixConversationBinding(binding: {\n boundAt: number;\n metadata?: {\n lastActivityAt?: number;\n idleTimeoutMs?: number;\n maxAgeMs?: number;\n };\n}) {\n return {\n boundAt: binding.boundAt,\n lastActivityAt:\n typeof binding.metadata?.lastActivityAt === \"number\"\n ? binding.metadata.lastActivityAt\n : binding.boundAt,\n idleTimeoutMs:\n typeof binding.metadata?.idleTimeoutMs === \"number\"\n ? binding.metadata.idleTimeoutMs\n : undefined,\n maxAgeMs:\n typeof binding.metadata?.maxAgeMs === \"number\" ? binding.metadata.maxAgeMs : undefined,\n };\n}\n\nconst resolveMatrixDmPolicy = createScopedDmSecurityResolver<ResolvedMatrixAccount>({\n channelKey: \"lobi\",\n resolvePolicy: (account) => account.config.dm?.policy,\n resolveAllowFrom: (account) => account.config.dm?.allowFrom,\n allowFromPathSuffix: \"dm.\",\n normalizeEntry: (raw) => normalizeMatrixUserId(raw),\n});\n\nconst collectMatrixSecurityWarnings =\n createAllowlistProviderOpenWarningCollector<ResolvedMatrixAccount>({\n providerConfigPresent: (cfg) => (cfg as CoreConfig).channels?.lobi !== undefined,\n resolveGroupPolicy: (account) => account.config.groupPolicy,\n buildOpenWarning: {\n surface: \"Matrix rooms\",\n openBehavior: \"allows any room to trigger (mention-gated)\",\n remediation:\n 'Set channels.lobi.groupPolicy=\"allowlist\" + channels.lobi.groups (and optionally channels.lobi.groupAllowFrom) to restrict rooms',\n },\n });\n\nfunction resolveMatrixAccountConfigPath(accountId: string, field: string): string {\n return accountId === DEFAULT_ACCOUNT_ID\n ? `channels.lobi.${field}`\n : `channels.lobi.accounts.${accountId}.${field}`;\n}\n\nfunction collectMatrixSecurityWarningsForAccount(params: {\n account: ResolvedMatrixAccount;\n cfg: CoreConfig;\n}): string[] {\n const warnings = collectMatrixSecurityWarnings(params);\n if (params.account.accountId !== DEFAULT_ACCOUNT_ID) {\n const groupPolicyPath = resolveMatrixAccountConfigPath(params.account.accountId, \"groupPolicy\");\n const groupsPath = resolveMatrixAccountConfigPath(params.account.accountId, \"groups\");\n const groupAllowFromPath = resolveMatrixAccountConfigPath(\n params.account.accountId,\n \"groupAllowFrom\",\n );\n return warnings.map((warning) =>\n warning\n .replace(\"channels.lobi.groupPolicy\", groupPolicyPath)\n .replace(\"channels.lobi.groups\", groupsPath)\n .replace(\"channels.lobi.groupAllowFrom\", groupAllowFromPath),\n );\n }\n if (params.account.config.autoJoin !== \"always\") {\n return warnings;\n }\n const autoJoinPath = resolveMatrixAccountConfigPath(params.account.accountId, \"autoJoin\");\n const autoJoinAllowlistPath = resolveMatrixAccountConfigPath(\n params.account.accountId,\n \"autoJoinAllowlist\",\n );\n return [\n ...warnings,\n `- Matrix invites: autoJoin=\"always\" joins any invited room before message policy applies. Set ${autoJoinPath}=\"allowlist\" + ${autoJoinAllowlistPath} (or ${autoJoinPath}=\"off\") to restrict joins.`,\n ];\n}\n\nfunction normalizeMatrixAcpConversationId(conversationId: string) {\n const target = resolveMatrixTargetIdentity(conversationId);\n if (!target || target.kind !== \"room\") {\n return null;\n }\n return { conversationId: target.id };\n}\n\nfunction matchMatrixAcpConversation(params: {\n bindingConversationId: string;\n conversationId: string;\n parentConversationId?: string;\n}) {\n const binding = normalizeMatrixAcpConversationId(params.bindingConversationId);\n if (!binding) {\n return null;\n }\n if (binding.conversationId === params.conversationId) {\n return { conversationId: params.conversationId, matchPriority: 2 };\n }\n if (\n params.parentConversationId &&\n params.parentConversationId !== params.conversationId &&\n binding.conversationId === params.parentConversationId\n ) {\n return {\n conversationId: params.parentConversationId,\n matchPriority: 1,\n };\n }\n return null;\n}\n\nfunction resolveMatrixCommandConversation(params: {\n threadId?: string;\n originatingTo?: string;\n commandTo?: string;\n fallbackTo?: string;\n}) {\n const parentConversationId = [params.originatingTo, params.commandTo, params.fallbackTo]\n .map((candidate) => {\n const trimmed = candidate?.trim();\n if (!trimmed) {\n return undefined;\n }\n const target = resolveMatrixTargetIdentity(trimmed);\n return target?.kind === \"room\" ? target.id : undefined;\n })\n .find((candidate): candidate is string => Boolean(candidate));\n if (params.threadId) {\n return {\n conversationId: params.threadId,\n ...(parentConversationId ? { parentConversationId } : {}),\n };\n }\n return parentConversationId ? { conversationId: parentConversationId } : null;\n}\n\nfunction resolveMatrixInboundConversation(params: {\n to?: string;\n conversationId?: string;\n threadId?: string | number;\n}) {\n const rawTarget = params.to?.trim() || params.conversationId?.trim() || \"\";\n const target = rawTarget ? resolveMatrixTargetIdentity(rawTarget) : null;\n const parentConversationId = target?.kind === \"room\" ? target.id : undefined;\n const threadId =\n params.threadId != null ? normalizeOptionalString(String(params.threadId)) : undefined;\n if (threadId) {\n return {\n conversationId: threadId,\n ...(parentConversationId ? { parentConversationId } : {}),\n };\n }\n return parentConversationId ? { conversationId: parentConversationId } : null;\n}\n\nfunction resolveMatrixDeliveryTarget(params: {\n conversationId: string;\n parentConversationId?: string;\n}) {\n const parentConversationId = params.parentConversationId?.trim();\n if (parentConversationId && parentConversationId !== params.conversationId.trim()) {\n const parentTarget = resolveMatrixTargetIdentity(parentConversationId);\n if (parentTarget?.kind === \"room\") {\n return {\n to: `room:${parentTarget.id}`,\n threadId: params.conversationId.trim(),\n };\n }\n }\n const conversationTarget = resolveMatrixTargetIdentity(params.conversationId);\n if (conversationTarget?.kind === \"room\") {\n return { to: `room:${conversationTarget.id}` };\n }\n return null;\n}\n\nexport const matrixPlugin: ChannelPlugin<ResolvedMatrixAccount, MatrixProbe> =\n createChatChannelPlugin<ResolvedMatrixAccount, MatrixProbe>({\n base: {\n id: \"lobi\",\n meta,\n setupWizard: matrixSetupWizard,\n capabilities: {\n chatTypes: [\"direct\", \"group\", \"thread\"],\n polls: true,\n reactions: true,\n threads: true,\n media: true,\n },\n reload: { configPrefixes: [\"channels.lobi\"] },\n configSchema: buildChannelConfigSchema(MatrixConfigSchema),\n config: {\n ...matrixConfigAdapter,\n isConfigured: (account) => account.configured,\n describeAccount: (account) =>\n describeAccountSnapshot({\n account,\n configured: account.configured,\n extra: {\n baseUrl: account.homeserver,\n },\n }),\n },\n approvalCapability: matrixApprovalCapability,\n groups: {\n resolveRequireMention: resolveMatrixGroupRequireMention,\n resolveToolPolicy: resolveMatrixGroupToolPolicy,\n },\n conversationBindings: {\n supportsCurrentConversationBinding: true,\n defaultTopLevelPlacement: \"child\",\n setIdleTimeoutBySessionKey: ({ targetSessionKey, accountId, idleTimeoutMs }) =>\n setMatrixThreadBindingIdleTimeoutBySessionKey({\n targetSessionKey,\n accountId: accountId ?? \"\",\n idleTimeoutMs,\n }).map(projectMatrixConversationBinding),\n setMaxAgeBySessionKey: ({ targetSessionKey, accountId, maxAgeMs }) =>\n setMatrixThreadBindingMaxAgeBySessionKey({\n targetSessionKey,\n accountId: accountId ?? \"\",\n maxAgeMs,\n }).map(projectMatrixConversationBinding),\n },\n messaging: {\n normalizeTarget: normalizeMatrixMessagingTarget,\n resolveInboundConversation: ({ to, conversationId, threadId }) =>\n resolveMatrixInboundConversation({ to, conversationId, threadId }),\n resolveDeliveryTarget: ({ conversationId, parentConversationId }) =>\n resolveMatrixDeliveryTarget({ conversationId, parentConversationId }),\n resolveOutboundSessionRoute: (params) => resolveMatrixOutboundSessionRoute(params),\n targetResolver: {\n looksLikeId: (raw) => {\n const trimmed = raw.trim();\n if (!trimmed) {\n return false;\n }\n if (/^(matrix:)?[!#@]/i.test(trimmed)) {\n return true;\n }\n return trimmed.includes(\":\");\n },\n hint: \"<room|alias|user>\",\n },\n },\n directory: createChannelDirectoryAdapter({\n listPeers: async (params) => {\n const entries = await listMatrixDirectoryPeersFromConfig(params);\n return entries.map((entry) => {\n const raw = entry.id.startsWith(\"user:\") ? entry.id.slice(\"user:\".length) : entry.id;\n const incomplete = !raw.startsWith(\"@\") || !raw.includes(\":\");\n return incomplete ? { ...entry, name: \"incomplete id; expected @user:server\" } : entry;\n });\n },\n listGroups: async (params) => await listMatrixDirectoryGroupsFromConfig(params),\n ...createRuntimeDirectoryLiveAdapter({\n getRuntime: loadMatrixChannelRuntime,\n listPeersLive: (runtime) => runtime.listMatrixDirectoryPeersLive,\n listGroupsLive: (runtime) => runtime.listMatrixDirectoryGroupsLive,\n }),\n }),\n resolver: matrixResolverAdapter,\n actions: matrixMessageActions,\n secrets: {\n secretTargetRegistryEntries,\n collectRuntimeConfigAssignments,\n },\n setup: {\n ...matrixSetupAdapter,\n singleAccountKeysToMove,\n namedAccountPromotionKeys,\n resolveSingleAccountPromotionTarget,\n },\n bindings: {\n compileConfiguredBinding: ({ conversationId }) =>\n normalizeMatrixAcpConversationId(conversationId),\n matchInboundConversation: ({ compiledBinding, conversationId, parentConversationId }) =>\n matchMatrixAcpConversation({\n bindingConversationId: compiledBinding.conversationId,\n conversationId,\n parentConversationId,\n }),\n resolveCommandConversation: ({ threadId, originatingTo, commandTo, fallbackTo }) =>\n resolveMatrixCommandConversation({\n threadId,\n originatingTo,\n commandTo,\n fallbackTo,\n }),\n },\n status: createComputedAccountStatusAdapter<ResolvedMatrixAccount, MatrixProbe>({\n defaultRuntime: createDefaultChannelRuntimeState(DEFAULT_ACCOUNT_ID),\n collectStatusIssues: (accounts) => collectStatusIssuesFromLastError(\"matrix\", accounts),\n buildChannelSummary: ({ snapshot }) =>\n buildProbeChannelStatusSummary(snapshot, { baseUrl: snapshot.baseUrl ?? null }),\n probeAccount: async ({ account, timeoutMs, cfg }) =>\n await createMatrixProbeAccount({\n resolveMatrixAuth: async ({ cfg, accountId }) =>\n (await loadMatrixChannelRuntime()).resolveMatrixAuth({\n cfg,\n accountId,\n }),\n probeMatrix: async (params) =>\n await (await loadMatrixChannelRuntime()).probeMatrix(params),\n })({\n account,\n timeoutMs,\n cfg,\n }),\n resolveAccountSnapshot: ({ account, runtime }) => ({\n accountId: account.accountId,\n name: account.name,\n enabled: account.enabled,\n configured: account.configured,\n extra: {\n baseUrl: account.homeserver,\n lastProbeAt: runtime?.lastProbeAt ?? null,\n ...buildTrafficStatusSummary(runtime),\n },\n }),\n }),\n gateway: {\n startAccount: async (ctx) => {\n const account = ctx.account;\n ctx.setStatus({\n accountId: account.accountId,\n baseUrl: account.homeserver,\n });\n ctx.log?.info(\n `[${account.accountId}] starting provider (${account.homeserver ?? \"matrix\"})`,\n );\n\n // Serialize startup: wait for any previous startup to complete import phase.\n // This works around a race condition with concurrent dynamic imports.\n //\n // INVARIANT: The import() below cannot hang because:\n // 1. It only loads local ESM modules with no circular awaits\n // 2. Module initialization is synchronous (no top-level await in ./matrix/monitor/index.js)\n // 3. The lock only serializes the import phase, not the provider startup\n const previousLock = matrixStartupLock;\n let releaseLock: () => void = () => {};\n matrixStartupLock = new Promise<void>((resolve) => {\n releaseLock = resolve;\n });\n await previousLock;\n\n // Lazy import: the monitor pulls the reply pipeline; avoid ESM init cycles.\n // Wrap in try/finally to ensure lock is released even if import fails.\n let monitorMatrixProvider: typeof import(\"./matrix/monitor/index.js\").monitorMatrixProvider;\n try {\n const module = await import(\"./matrix/monitor/index.js\");\n monitorMatrixProvider = module.monitorMatrixProvider;\n } finally {\n // Release lock after import completes or fails\n releaseLock();\n }\n\n return monitorMatrixProvider({\n runtime: ctx.runtime,\n channelRuntime: ctx.channelRuntime,\n abortSignal: ctx.abortSignal,\n mediaMaxMb: account.config.mediaMaxMb,\n initialSyncLimit: account.config.initialSyncLimit,\n replyToMode: account.config.replyToMode,\n accountId: account.accountId,\n setStatus: ctx.setStatus,\n });\n },\n },\n doctor: matrixDoctor,\n lifecycle: {\n runStartupMaintenance: runMatrixStartupMaintenance,\n },\n },\n security: {\n resolveDmPolicy: resolveMatrixDmPolicy,\n collectWarnings: projectAccountConfigWarningCollector(\n (cfg) => cfg as CoreConfig,\n collectMatrixSecurityWarningsForAccount,\n ),\n },\n pairing: {\n text: createMatrixPairingText(\n async (to, message, options) =>\n await (await loadMatrixChannelRuntime()).sendMessageMatrix(to, message, options),\n ),\n },\n threading: {\n resolveReplyToMode: createScopedAccountReplyToModeResolver<\n ReturnType<typeof resolveMatrixAccountConfig>\n >({\n resolveAccount: adaptScopedAccountAccessor(resolveMatrixAccountConfig),\n resolveReplyToMode: (account) => account.replyToMode,\n }),\n buildToolContext: ({ context, hasRepliedRef }) => {\n const currentTarget = context.To;\n return {\n currentChannelId: normalizeOptionalString(currentTarget),\n currentThreadTs:\n context.MessageThreadId != null ? String(context.MessageThreadId) : undefined,\n currentDirectUserId: resolveMatrixDirectUserId({\n from: context.From,\n to: context.To,\n chatType: context.ChatType,\n }),\n hasRepliedRef,\n };\n },\n },\n outbound: {\n deliveryMode: \"direct\",\n chunker: chunkTextForOutbound,\n chunkerMode: \"markdown\",\n textChunkLimit: 4000,\n shouldSuppressLocalPayloadPrompt: ({ cfg, accountId, payload }) =>\n shouldSuppressLocalMatrixExecApprovalPrompt({\n cfg,\n accountId,\n payload,\n }),\n ...createRuntimeOutboundDelegates({\n getRuntime: loadMatrixChannelRuntime,\n sendText: {\n resolve: (runtime) => runtime.matrixOutbound.sendText,\n unavailableMessage: \"Matrix outbound text delivery is unavailable\",\n },\n sendMedia: {\n resolve: (runtime) => runtime.matrixOutbound.sendMedia,\n unavailableMessage: \"Matrix outbound media delivery is unavailable\",\n },\n sendPoll: {\n resolve: (runtime) => runtime.matrixOutbound.sendPoll,\n unavailableMessage: \"Matrix outbound poll delivery is unavailable\",\n },\n }),\n },\n });\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA,SAAS,+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Q,eAAe;AAAA,QAC7C,oBAAoB;AAAA,MACtB;AAAA,IACF,CAAC;AAAA,EACH;AACF,CAAC;",
|
|
6
|
+
"names": ["cfg"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import {
|
|
2
|
+
isBunRuntime
|
|
3
|
+
} from "./chunk-6HDYPVA4.js";
|
|
4
|
+
import {
|
|
5
|
+
init_shims
|
|
6
|
+
} from "./chunk-G4TIS2SC.js";
|
|
7
|
+
|
|
8
|
+
// src/matrix/probe.ts
|
|
9
|
+
init_shims();
|
|
10
|
+
import { formatErrorMessage } from "openclaw/plugin-sdk/infra-runtime";
|
|
11
|
+
import { normalizeOptionalString } from "openclaw/plugin-sdk/text-runtime";
|
|
12
|
+
var matrixProbeRuntimeDepsPromise;
|
|
13
|
+
async function loadMatrixProbeRuntimeDeps() {
|
|
14
|
+
matrixProbeRuntimeDepsPromise ??= import("./src/matrix/probe.runtime.js").then((runtimeModule) => ({
|
|
15
|
+
createMatrixClient: runtimeModule.createMatrixClient
|
|
16
|
+
}));
|
|
17
|
+
return await matrixProbeRuntimeDepsPromise;
|
|
18
|
+
}
|
|
19
|
+
async function probeMatrix(params) {
|
|
20
|
+
const started = Date.now();
|
|
21
|
+
const result = {
|
|
22
|
+
ok: false,
|
|
23
|
+
status: null,
|
|
24
|
+
error: null,
|
|
25
|
+
elapsedMs: 0
|
|
26
|
+
};
|
|
27
|
+
if (isBunRuntime()) {
|
|
28
|
+
return {
|
|
29
|
+
...result,
|
|
30
|
+
error: "Matrix probe requires Node (bun runtime not supported)",
|
|
31
|
+
elapsedMs: Date.now() - started
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
if (!params.homeserver?.trim()) {
|
|
35
|
+
return {
|
|
36
|
+
...result,
|
|
37
|
+
error: "missing homeserver",
|
|
38
|
+
elapsedMs: Date.now() - started
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
if (!params.accessToken?.trim()) {
|
|
42
|
+
return {
|
|
43
|
+
...result,
|
|
44
|
+
error: "missing access token",
|
|
45
|
+
elapsedMs: Date.now() - started
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
try {
|
|
49
|
+
const { createMatrixClient } = await loadMatrixProbeRuntimeDeps();
|
|
50
|
+
const inputUserId = normalizeOptionalString(params.userId);
|
|
51
|
+
const client = await createMatrixClient({
|
|
52
|
+
homeserver: params.homeserver,
|
|
53
|
+
userId: inputUserId,
|
|
54
|
+
accessToken: params.accessToken,
|
|
55
|
+
deviceId: params.deviceId,
|
|
56
|
+
persistStorage: false,
|
|
57
|
+
localTimeoutMs: params.timeoutMs,
|
|
58
|
+
accountId: params.accountId,
|
|
59
|
+
allowPrivateNetwork: params.allowPrivateNetwork,
|
|
60
|
+
ssrfPolicy: params.ssrfPolicy,
|
|
61
|
+
dispatcherPolicy: params.dispatcherPolicy
|
|
62
|
+
});
|
|
63
|
+
const userId = await client.getUserId();
|
|
64
|
+
result.ok = true;
|
|
65
|
+
result.userId = userId ?? null;
|
|
66
|
+
result.elapsedMs = Date.now() - started;
|
|
67
|
+
return result;
|
|
68
|
+
} catch (err) {
|
|
69
|
+
return {
|
|
70
|
+
...result,
|
|
71
|
+
status: typeof err === "object" && err && "statusCode" in err ? Number(err.statusCode) : result.status,
|
|
72
|
+
error: formatErrorMessage(err),
|
|
73
|
+
elapsedMs: Date.now() - started
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export {
|
|
79
|
+
probeMatrix
|
|
80
|
+
};
|
|
81
|
+
//# sourceMappingURL=chunk-TMQMQ67T.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/matrix/probe.ts"],
|
|
4
|
+
"sourcesContent": ["import { formatErrorMessage, type PinnedDispatcherPolicy } from \"openclaw/plugin-sdk/infra-runtime\";\nimport { normalizeOptionalString } from \"openclaw/plugin-sdk/text-runtime\";\nimport type { SsrFPolicy } from \"../runtime-api.js\";\nimport type { BaseProbeResult } from \"../runtime-api.js\";\nimport { isBunRuntime } from \"./client/runtime.js\";\n\ntype MatrixProbeRuntimeDeps = Pick<typeof import(\"./probe.runtime.js\"), \"createMatrixClient\">;\n\nlet matrixProbeRuntimeDepsPromise: Promise<MatrixProbeRuntimeDeps> | undefined;\n\nasync function loadMatrixProbeRuntimeDeps(): Promise<MatrixProbeRuntimeDeps> {\n matrixProbeRuntimeDepsPromise ??= import(\"./probe.runtime.js\").then((runtimeModule) => ({\n createMatrixClient: runtimeModule.createMatrixClient,\n }));\n return await matrixProbeRuntimeDepsPromise;\n}\n\nexport type MatrixProbe = BaseProbeResult & {\n status?: number | null;\n elapsedMs: number;\n userId?: string | null;\n};\n\nexport async function probeMatrix(params: {\n homeserver: string;\n accessToken: string;\n userId?: string;\n deviceId?: string;\n timeoutMs?: number;\n accountId?: string | null;\n allowPrivateNetwork?: boolean;\n ssrfPolicy?: SsrFPolicy;\n dispatcherPolicy?: PinnedDispatcherPolicy;\n}): Promise<MatrixProbe> {\n const started = Date.now();\n const result: MatrixProbe = {\n ok: false,\n status: null,\n error: null,\n elapsedMs: 0,\n };\n if (isBunRuntime()) {\n return {\n ...result,\n error: \"Matrix probe requires Node (bun runtime not supported)\",\n elapsedMs: Date.now() - started,\n };\n }\n if (!params.homeserver?.trim()) {\n return {\n ...result,\n error: \"missing homeserver\",\n elapsedMs: Date.now() - started,\n };\n }\n if (!params.accessToken?.trim()) {\n return {\n ...result,\n error: \"missing access token\",\n elapsedMs: Date.now() - started,\n };\n }\n try {\n const { createMatrixClient } = await loadMatrixProbeRuntimeDeps();\n const inputUserId = normalizeOptionalString(params.userId);\n const client = await createMatrixClient({\n homeserver: params.homeserver,\n userId: inputUserId,\n accessToken: params.accessToken,\n deviceId: params.deviceId,\n persistStorage: false,\n localTimeoutMs: params.timeoutMs,\n accountId: params.accountId,\n allowPrivateNetwork: params.allowPrivateNetwork,\n ssrfPolicy: params.ssrfPolicy,\n dispatcherPolicy: params.dispatcherPolicy,\n });\n // The client wrapper resolves user ID via whoami when needed.\n const userId = await client.getUserId();\n result.ok = true;\n result.userId = userId ?? null;\n\n result.elapsedMs = Date.now() - started;\n return result;\n } catch (err) {\n return {\n ...result,\n status:\n typeof err === \"object\" && err && \"statusCode\" in err\n ? Number((err as { statusCode?: number }).statusCode)\n : result.status,\n error: formatErrorMessage(err),\n elapsedMs: Date.now() - started,\n };\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;AAAA;AAAA,SAAS,0BAAuD;AAChE,SAAS,+BAA+B;AAOxC,IAAI;AAEJ,eAAe,6BAA8D;AAC3E,oCAAkC,OAAO,+BAAoB,EAAE,KAAK,CAAC,mBAAmB;AAAA,IACtF,oBAAoB,cAAc;AAAA,EACpC,EAAE;AACF,SAAO,MAAM;AACf;AAQA,eAAsB,YAAY,QAUT;AACvB,QAAM,UAAU,KAAK,IAAI;AACzB,QAAM,SAAsB;AAAA,IAC1B,IAAI;AAAA,IACJ,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,WAAW;AAAA,EACb;AACA,MAAI,aAAa,GAAG;AAClB,WAAO;AAAA,MACL,GAAG;AAAA,MACH,OAAO;AAAA,MACP,WAAW,KAAK,IAAI,IAAI;AAAA,IAC1B;AAAA,EACF;AACA,MAAI,CAAC,OAAO,YAAY,KAAK,GAAG;AAC9B,WAAO;AAAA,MACL,GAAG;AAAA,MACH,OAAO;AAAA,MACP,WAAW,KAAK,IAAI,IAAI;AAAA,IAC1B;AAAA,EACF;AACA,MAAI,CAAC,OAAO,aAAa,KAAK,GAAG;AAC/B,WAAO;AAAA,MACL,GAAG;AAAA,MACH,OAAO;AAAA,MACP,WAAW,KAAK,IAAI,IAAI;AAAA,IAC1B;AAAA,EACF;AACA,MAAI;AACF,UAAM,EAAE,mBAAmB,IAAI,MAAM,2BAA2B;AAChE,UAAM,cAAc,wBAAwB,OAAO,MAAM;AACzD,UAAM,SAAS,MAAM,mBAAmB;AAAA,MACtC,YAAY,OAAO;AAAA,MACnB,QAAQ;AAAA,MACR,aAAa,OAAO;AAAA,MACpB,UAAU,OAAO;AAAA,MACjB,gBAAgB;AAAA,MAChB,gBAAgB,OAAO;AAAA,MACvB,WAAW,OAAO;AAAA,MAClB,qBAAqB,OAAO;AAAA,MAC5B,YAAY,OAAO;AAAA,MACnB,kBAAkB,OAAO;AAAA,IAC3B,CAAC;AAED,UAAM,SAAS,MAAM,OAAO,UAAU;AACtC,WAAO,KAAK;AACZ,WAAO,SAAS,UAAU;AAE1B,WAAO,YAAY,KAAK,IAAI,IAAI;AAChC,WAAO;AAAA,EACT,SAAS,KAAK;AACZ,WAAO;AAAA,MACL,GAAG;AAAA,MACH,QACE,OAAO,QAAQ,YAAY,OAAO,gBAAgB,MAC9C,OAAQ,IAAgC,UAAU,IAClD,OAAO;AAAA,MACb,OAAO,mBAAmB,GAAG;AAAA,MAC7B,WAAW,KAAK,IAAI,IAAI;AAAA,IAC1B;AAAA,EACF;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import {
|
|
2
|
+
init_shims
|
|
3
|
+
} from "./chunk-G4TIS2SC.js";
|
|
4
|
+
|
|
5
|
+
// src/matrix/monitor/room-history.ts
|
|
6
|
+
init_shims();
|
|
7
|
+
var DEFAULT_MAX_QUEUE_SIZE = 200;
|
|
8
|
+
var DEFAULT_MAX_ROOM_QUEUES = 1e3;
|
|
9
|
+
var MAX_WATERMARK_ENTRIES = 5e3;
|
|
10
|
+
var MAX_PREPARED_TRIGGER_ENTRIES = 500;
|
|
11
|
+
function createRoomHistoryTrackerInternal(maxQueueSize = DEFAULT_MAX_QUEUE_SIZE, maxRoomQueues = DEFAULT_MAX_ROOM_QUEUES, maxWatermarkEntries = MAX_WATERMARK_ENTRIES, maxPreparedTriggerEntries = MAX_PREPARED_TRIGGER_ENTRIES) {
|
|
12
|
+
const roomQueues = /* @__PURE__ */ new Map();
|
|
13
|
+
const agentWatermarks = /* @__PURE__ */ new Map();
|
|
14
|
+
let nextQueueGeneration = 1;
|
|
15
|
+
function clearRoomWatermarks(roomId) {
|
|
16
|
+
const roomSuffix = `:${roomId}`;
|
|
17
|
+
for (const key of agentWatermarks.keys()) {
|
|
18
|
+
if (key.endsWith(roomSuffix)) {
|
|
19
|
+
agentWatermarks.delete(key);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
function getOrCreateQueue(roomId) {
|
|
24
|
+
let queue = roomQueues.get(roomId);
|
|
25
|
+
if (!queue) {
|
|
26
|
+
queue = {
|
|
27
|
+
entries: [],
|
|
28
|
+
baseIndex: 0,
|
|
29
|
+
generation: nextQueueGeneration++,
|
|
30
|
+
preparedTriggers: /* @__PURE__ */ new Map()
|
|
31
|
+
};
|
|
32
|
+
roomQueues.set(roomId, queue);
|
|
33
|
+
if (roomQueues.size > maxRoomQueues) {
|
|
34
|
+
const oldest = roomQueues.keys().next().value;
|
|
35
|
+
if (oldest !== void 0) {
|
|
36
|
+
roomQueues.delete(oldest);
|
|
37
|
+
clearRoomWatermarks(oldest);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return queue;
|
|
42
|
+
}
|
|
43
|
+
function appendToQueue(queue, entry) {
|
|
44
|
+
queue.entries.push(entry);
|
|
45
|
+
if (queue.entries.length > maxQueueSize) {
|
|
46
|
+
const overflow = queue.entries.length - maxQueueSize;
|
|
47
|
+
queue.entries.splice(0, overflow);
|
|
48
|
+
queue.baseIndex += overflow;
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
snapshotIdx: queue.baseIndex + queue.entries.length,
|
|
52
|
+
queueGeneration: queue.generation
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
function wmKey(agentId, roomId) {
|
|
56
|
+
return `${agentId}:${roomId}`;
|
|
57
|
+
}
|
|
58
|
+
function preparedTriggerKey(agentId, messageId) {
|
|
59
|
+
if (!messageId?.trim()) {
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
return `${agentId}:${messageId.trim()}`;
|
|
63
|
+
}
|
|
64
|
+
function rememberWatermark(key, snapshotIdx) {
|
|
65
|
+
const nextSnapshotIdx = Math.max(agentWatermarks.get(key) ?? 0, snapshotIdx);
|
|
66
|
+
if (agentWatermarks.has(key)) {
|
|
67
|
+
agentWatermarks.delete(key);
|
|
68
|
+
}
|
|
69
|
+
agentWatermarks.set(key, nextSnapshotIdx);
|
|
70
|
+
if (agentWatermarks.size > maxWatermarkEntries) {
|
|
71
|
+
const oldest = agentWatermarks.keys().next().value;
|
|
72
|
+
if (oldest !== void 0) {
|
|
73
|
+
agentWatermarks.delete(oldest);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
function rememberPreparedTrigger(queue, retryKey, prepared) {
|
|
78
|
+
if (queue.preparedTriggers.has(retryKey)) {
|
|
79
|
+
queue.preparedTriggers.delete(retryKey);
|
|
80
|
+
}
|
|
81
|
+
queue.preparedTriggers.set(retryKey, prepared);
|
|
82
|
+
if (queue.preparedTriggers.size > maxPreparedTriggerEntries) {
|
|
83
|
+
const oldest = queue.preparedTriggers.keys().next().value;
|
|
84
|
+
if (oldest !== void 0) {
|
|
85
|
+
queue.preparedTriggers.delete(oldest);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
return prepared;
|
|
89
|
+
}
|
|
90
|
+
function computePendingHistory(queue, agentId, roomId, limit) {
|
|
91
|
+
if (limit <= 0 || queue.entries.length === 0) {
|
|
92
|
+
return [];
|
|
93
|
+
}
|
|
94
|
+
const wm = agentWatermarks.get(wmKey(agentId, roomId)) ?? 0;
|
|
95
|
+
const startAbs = Math.max(wm, queue.baseIndex);
|
|
96
|
+
const startRel = startAbs - queue.baseIndex;
|
|
97
|
+
const available = queue.entries.slice(startRel);
|
|
98
|
+
return available.length > limit ? available.slice(-limit) : available;
|
|
99
|
+
}
|
|
100
|
+
return {
|
|
101
|
+
recordPending(roomId, entry) {
|
|
102
|
+
const queue = getOrCreateQueue(roomId);
|
|
103
|
+
appendToQueue(queue, entry);
|
|
104
|
+
},
|
|
105
|
+
getPendingHistory(agentId, roomId, limit) {
|
|
106
|
+
const queue = roomQueues.get(roomId);
|
|
107
|
+
if (!queue) {
|
|
108
|
+
return [];
|
|
109
|
+
}
|
|
110
|
+
return computePendingHistory(queue, agentId, roomId, limit);
|
|
111
|
+
},
|
|
112
|
+
recordTrigger(roomId, entry) {
|
|
113
|
+
const queue = getOrCreateQueue(roomId);
|
|
114
|
+
return appendToQueue(queue, entry);
|
|
115
|
+
},
|
|
116
|
+
prepareTrigger(agentId, roomId, limit, entry) {
|
|
117
|
+
const queue = getOrCreateQueue(roomId);
|
|
118
|
+
const retryKey = preparedTriggerKey(agentId, entry.messageId);
|
|
119
|
+
if (retryKey) {
|
|
120
|
+
const prepared2 = queue.preparedTriggers.get(retryKey);
|
|
121
|
+
if (prepared2) {
|
|
122
|
+
return rememberPreparedTrigger(queue, retryKey, prepared2);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
const prepared = {
|
|
126
|
+
history: computePendingHistory(queue, agentId, roomId, limit),
|
|
127
|
+
...appendToQueue(queue, entry)
|
|
128
|
+
};
|
|
129
|
+
if (retryKey) {
|
|
130
|
+
return rememberPreparedTrigger(queue, retryKey, prepared);
|
|
131
|
+
}
|
|
132
|
+
return prepared;
|
|
133
|
+
},
|
|
134
|
+
consumeHistory(agentId, roomId, snapshot, messageId) {
|
|
135
|
+
const key = wmKey(agentId, roomId);
|
|
136
|
+
const queue = roomQueues.get(roomId);
|
|
137
|
+
if (!queue) {
|
|
138
|
+
agentWatermarks.delete(key);
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
if (queue.generation !== snapshot.queueGeneration) {
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
rememberWatermark(key, snapshot.snapshotIdx);
|
|
145
|
+
const retryKey = preparedTriggerKey(agentId, messageId);
|
|
146
|
+
if (queue && retryKey) {
|
|
147
|
+
queue.preparedTriggers.delete(retryKey);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
function createRoomHistoryTracker(maxQueueSize = DEFAULT_MAX_QUEUE_SIZE, maxRoomQueues = DEFAULT_MAX_ROOM_QUEUES, maxWatermarkEntries = MAX_WATERMARK_ENTRIES, maxPreparedTriggerEntries = MAX_PREPARED_TRIGGER_ENTRIES) {
|
|
153
|
+
const tracker = createRoomHistoryTrackerInternal(
|
|
154
|
+
maxQueueSize,
|
|
155
|
+
maxRoomQueues,
|
|
156
|
+
maxWatermarkEntries,
|
|
157
|
+
maxPreparedTriggerEntries
|
|
158
|
+
);
|
|
159
|
+
return {
|
|
160
|
+
recordPending: tracker.recordPending,
|
|
161
|
+
prepareTrigger: tracker.prepareTrigger,
|
|
162
|
+
consumeHistory: tracker.consumeHistory
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
function createRoomHistoryTrackerForTests(maxQueueSize = DEFAULT_MAX_QUEUE_SIZE, maxRoomQueues = DEFAULT_MAX_ROOM_QUEUES, maxWatermarkEntries = MAX_WATERMARK_ENTRIES, maxPreparedTriggerEntries = MAX_PREPARED_TRIGGER_ENTRIES) {
|
|
166
|
+
return createRoomHistoryTrackerInternal(
|
|
167
|
+
maxQueueSize,
|
|
168
|
+
maxRoomQueues,
|
|
169
|
+
maxWatermarkEntries,
|
|
170
|
+
maxPreparedTriggerEntries
|
|
171
|
+
);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
export {
|
|
175
|
+
createRoomHistoryTracker,
|
|
176
|
+
createRoomHistoryTrackerForTests
|
|
177
|
+
};
|
|
178
|
+
//# sourceMappingURL=chunk-TPYWUZOR.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/matrix/monitor/room-history.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * Per-room group chat history tracking for Matrix.\n *\n * Maintains a shared per-room message queue and per-(agentId, roomId) watermarks so\n * each agent independently tracks which messages it has already consumed. This design\n * lets multiple agents in the same room see independent history windows:\n *\n * - dev replies to @dev msgB (watermark advances to B) \u2192 room queue still has [A, B]\n * - spark replies to @spark msgC \u2192 spark watermark starts at 0 and sees [A, B, C]\n *\n * Race-condition safety: the watermark only advances to the snapshot index taken at\n * dispatch time, NOT to the queue's end at reply time. Messages that land in the queue\n * while the agent is processing stay visible to the next trigger for that agent.\n */\n\nimport type { HistoryEntry } from \"openclaw/plugin-sdk/reply-history\";\n\n/** Maximum entries retained per room (hard cap to bound memory). */\nconst DEFAULT_MAX_QUEUE_SIZE = 200;\n/** Maximum number of rooms to retain queues for (FIFO eviction beyond this). */\nconst DEFAULT_MAX_ROOM_QUEUES = 1000;\n/** Maximum number of (agentId, roomId) watermark entries to retain. */\nconst MAX_WATERMARK_ENTRIES = 5000;\n/** Maximum prepared trigger snapshots retained per room for retry reuse. */\nconst MAX_PREPARED_TRIGGER_ENTRIES = 500;\n\nexport type { HistoryEntry };\n\nexport type HistorySnapshotToken = {\n snapshotIdx: number;\n queueGeneration: number;\n};\n\nexport type PreparedTriggerResult = {\n history: HistoryEntry[];\n} & HistorySnapshotToken;\n\nexport type RoomHistoryTracker = {\n /**\n * Record a non-trigger message for future context.\n * Call this when a room message arrives but does not mention the bot.\n */\n recordPending: (roomId: string, entry: HistoryEntry) => void;\n\n /**\n * Capture pending history and append the trigger as one idempotent operation.\n * Retries of the same Matrix event reuse the original prepared history window.\n */\n prepareTrigger: (\n agentId: string,\n roomId: string,\n limit: number,\n entry: HistoryEntry,\n ) => PreparedTriggerResult;\n\n /**\n * Advance the agent's watermark to the snapshot index returned by prepareTrigger\n * (or the lower-level recordTrigger helper used in tests).\n * Only messages appended after that snapshot remain visible on the next trigger.\n */\n consumeHistory: (\n agentId: string,\n roomId: string,\n snapshot: HistorySnapshotToken,\n messageId?: string,\n ) => void;\n};\n\nexport type RoomHistoryTrackerTestApi = RoomHistoryTracker & {\n /**\n * Test-only helper for inspecting pending room history directly.\n */\n getPendingHistory: (agentId: string, roomId: string, limit: number) => HistoryEntry[];\n\n /**\n * Test-only helper for manually appending a trigger entry and snapshot index.\n */\n recordTrigger: (roomId: string, entry: HistoryEntry) => HistorySnapshotToken;\n};\n\ntype RoomQueue = {\n entries: HistoryEntry[];\n /** Absolute index of entries[0] \u2014 increases as old entries are trimmed. */\n baseIndex: number;\n generation: number;\n preparedTriggers: Map<string, PreparedTriggerResult>;\n};\n\nfunction createRoomHistoryTrackerInternal(\n maxQueueSize = DEFAULT_MAX_QUEUE_SIZE,\n maxRoomQueues = DEFAULT_MAX_ROOM_QUEUES,\n maxWatermarkEntries = MAX_WATERMARK_ENTRIES,\n maxPreparedTriggerEntries = MAX_PREPARED_TRIGGER_ENTRIES,\n): RoomHistoryTrackerTestApi {\n const roomQueues = new Map<string, RoomQueue>();\n /** Maps `${agentId}:${roomId}` \u2192 absolute consumed-up-to index */\n const agentWatermarks = new Map<string, number>();\n let nextQueueGeneration = 1;\n\n function clearRoomWatermarks(roomId: string): void {\n const roomSuffix = `:${roomId}`;\n for (const key of agentWatermarks.keys()) {\n if (key.endsWith(roomSuffix)) {\n agentWatermarks.delete(key);\n }\n }\n }\n\n function getOrCreateQueue(roomId: string): RoomQueue {\n let queue = roomQueues.get(roomId);\n if (!queue) {\n queue = {\n entries: [],\n baseIndex: 0,\n generation: nextQueueGeneration++,\n preparedTriggers: new Map(),\n };\n roomQueues.set(roomId, queue);\n // FIFO eviction to prevent unbounded growth across many rooms\n if (roomQueues.size > maxRoomQueues) {\n const oldest = roomQueues.keys().next().value;\n if (oldest !== undefined) {\n roomQueues.delete(oldest);\n clearRoomWatermarks(oldest);\n }\n }\n }\n return queue;\n }\n\n function appendToQueue(queue: RoomQueue, entry: HistoryEntry): HistorySnapshotToken {\n queue.entries.push(entry);\n if (queue.entries.length > maxQueueSize) {\n const overflow = queue.entries.length - maxQueueSize;\n queue.entries.splice(0, overflow);\n queue.baseIndex += overflow;\n }\n return {\n snapshotIdx: queue.baseIndex + queue.entries.length,\n queueGeneration: queue.generation,\n };\n }\n\n function wmKey(agentId: string, roomId: string): string {\n return `${agentId}:${roomId}`;\n }\n\n function preparedTriggerKey(agentId: string, messageId?: string): string | null {\n if (!messageId?.trim()) {\n return null;\n }\n return `${agentId}:${messageId.trim()}`;\n }\n\n function rememberWatermark(key: string, snapshotIdx: number): void {\n const nextSnapshotIdx = Math.max(agentWatermarks.get(key) ?? 0, snapshotIdx);\n if (agentWatermarks.has(key)) {\n // Refresh insertion order so capped-map eviction removes the stalest pair, not an active one.\n agentWatermarks.delete(key);\n }\n agentWatermarks.set(key, nextSnapshotIdx);\n if (agentWatermarks.size > maxWatermarkEntries) {\n const oldest = agentWatermarks.keys().next().value;\n if (oldest !== undefined) {\n agentWatermarks.delete(oldest);\n }\n }\n }\n\n function rememberPreparedTrigger(\n queue: RoomQueue,\n retryKey: string,\n prepared: PreparedTriggerResult,\n ): PreparedTriggerResult {\n if (queue.preparedTriggers.has(retryKey)) {\n // Refresh insertion order so capped eviction keeps actively retried events hot.\n queue.preparedTriggers.delete(retryKey);\n }\n queue.preparedTriggers.set(retryKey, prepared);\n if (queue.preparedTriggers.size > maxPreparedTriggerEntries) {\n const oldest = queue.preparedTriggers.keys().next().value;\n if (oldest !== undefined) {\n queue.preparedTriggers.delete(oldest);\n }\n }\n return prepared;\n }\n\n function computePendingHistory(\n queue: RoomQueue,\n agentId: string,\n roomId: string,\n limit: number,\n ): HistoryEntry[] {\n if (limit <= 0 || queue.entries.length === 0) {\n return [];\n }\n const wm = agentWatermarks.get(wmKey(agentId, roomId)) ?? 0;\n // startAbs: the first absolute index the agent hasn't seen yet\n const startAbs = Math.max(wm, queue.baseIndex);\n const startRel = startAbs - queue.baseIndex;\n const available = queue.entries.slice(startRel);\n return available.length > limit ? available.slice(-limit) : available;\n }\n\n return {\n recordPending(roomId, entry) {\n const queue = getOrCreateQueue(roomId);\n appendToQueue(queue, entry);\n },\n\n getPendingHistory(agentId, roomId, limit) {\n const queue = roomQueues.get(roomId);\n if (!queue) {\n return [];\n }\n return computePendingHistory(queue, agentId, roomId, limit);\n },\n\n recordTrigger(roomId, entry) {\n const queue = getOrCreateQueue(roomId);\n return appendToQueue(queue, entry);\n },\n\n prepareTrigger(agentId, roomId, limit, entry) {\n const queue = getOrCreateQueue(roomId);\n const retryKey = preparedTriggerKey(agentId, entry.messageId);\n if (retryKey) {\n const prepared = queue.preparedTriggers.get(retryKey);\n if (prepared) {\n return rememberPreparedTrigger(queue, retryKey, prepared);\n }\n }\n const prepared = {\n history: computePendingHistory(queue, agentId, roomId, limit),\n ...appendToQueue(queue, entry),\n };\n if (retryKey) {\n return rememberPreparedTrigger(queue, retryKey, prepared);\n }\n return prepared;\n },\n\n consumeHistory(agentId, roomId, snapshot, messageId) {\n const key = wmKey(agentId, roomId);\n const queue = roomQueues.get(roomId);\n if (!queue) {\n // The room was evicted while this trigger was in flight. Keep eviction authoritative\n // so a late completion cannot recreate a stale watermark against a fresh queue.\n agentWatermarks.delete(key);\n return;\n }\n if (queue.generation !== snapshot.queueGeneration) {\n // The room was evicted and recreated before this trigger completed. Reject the stale\n // snapshot so it cannot advance or erase state for the new queue generation.\n return;\n }\n // Monotone write: never regress an already-advanced watermark.\n // Guards against out-of-order completion when two triggers for the same\n // (agentId, roomId) are in-flight concurrently.\n rememberWatermark(key, snapshot.snapshotIdx);\n const retryKey = preparedTriggerKey(agentId, messageId);\n if (queue && retryKey) {\n queue.preparedTriggers.delete(retryKey);\n }\n },\n };\n}\n\nexport function createRoomHistoryTracker(\n maxQueueSize = DEFAULT_MAX_QUEUE_SIZE,\n maxRoomQueues = DEFAULT_MAX_ROOM_QUEUES,\n maxWatermarkEntries = MAX_WATERMARK_ENTRIES,\n maxPreparedTriggerEntries = MAX_PREPARED_TRIGGER_ENTRIES,\n): RoomHistoryTracker {\n const tracker = createRoomHistoryTrackerInternal(\n maxQueueSize,\n maxRoomQueues,\n maxWatermarkEntries,\n maxPreparedTriggerEntries,\n );\n return {\n recordPending: tracker.recordPending,\n prepareTrigger: tracker.prepareTrigger,\n consumeHistory: tracker.consumeHistory,\n };\n}\n\nexport function createRoomHistoryTrackerForTests(\n maxQueueSize = DEFAULT_MAX_QUEUE_SIZE,\n maxRoomQueues = DEFAULT_MAX_ROOM_QUEUES,\n maxWatermarkEntries = MAX_WATERMARK_ENTRIES,\n maxPreparedTriggerEntries = MAX_PREPARED_TRIGGER_ENTRIES,\n): RoomHistoryTrackerTestApi {\n return createRoomHistoryTrackerInternal(\n maxQueueSize,\n maxRoomQueues,\n maxWatermarkEntries,\n maxPreparedTriggerEntries,\n );\n}\n"],
|
|
5
|
+
"mappings": ";;;;;AAAA;AAkBA,IAAM,yBAAyB;AAE/B,IAAM,0BAA0B;AAEhC,IAAM,wBAAwB;AAE9B,IAAM,+BAA+B;AAgErC,SAAS,iCACP,eAAe,wBACf,gBAAgB,yBAChB,sBAAsB,uBACtB,4BAA4B,8BACD;AAC3B,QAAM,aAAa,oBAAI,IAAuB;AAE9C,QAAM,kBAAkB,oBAAI,IAAoB;AAChD,MAAI,sBAAsB;AAE1B,WAAS,oBAAoB,QAAsB;AACjD,UAAM,aAAa,IAAI,MAAM;AAC7B,eAAW,OAAO,gBAAgB,KAAK,GAAG;AACxC,UAAI,IAAI,SAAS,UAAU,GAAG;AAC5B,wBAAgB,OAAO,GAAG;AAAA,MAC5B;AAAA,IACF;AAAA,EACF;AAEA,WAAS,iBAAiB,QAA2B;AACnD,QAAI,QAAQ,WAAW,IAAI,MAAM;AACjC,QAAI,CAAC,OAAO;AACV,cAAQ;AAAA,QACN,SAAS,CAAC;AAAA,QACV,WAAW;AAAA,QACX,YAAY;AAAA,QACZ,kBAAkB,oBAAI,IAAI;AAAA,MAC5B;AACA,iBAAW,IAAI,QAAQ,KAAK;AAE5B,UAAI,WAAW,OAAO,eAAe;AACnC,cAA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4
|
+
|
|
5
|
+
// src/matrix/sync-state.ts
|
|
6
|
+
init_shims();
|
|
7
|
+
function isMatrixReadySyncState(state) {
|
|
8
|
+
return state === "PREPARED" || state === "SYNCING" || state === "CATCHUP";
|
|
9
|
+
}
|
|
10
|
+
function isMatrixDisconnectedSyncState(state) {
|
|
11
|
+
return state === "RECONNECTING" || state === "ERROR" || state === "STOPPED";
|
|
12
|
+
}
|
|
13
|
+
function isMatrixTerminalSyncState(state) {
|
|
14
|
+
return state === "STOPPED";
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export {
|
|
18
|
+
isMatrixReadySyncState,
|
|
19
|
+
isMatrixDisconnectedSyncState,
|
|
20
|
+
isMatrixTerminalSyncState
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=chunk-U2O4LE6S.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/matrix/sync-state.ts"],
|
|
4
|
+
"sourcesContent": ["export type MatrixSyncState =\n | \"PREPARED\"\n | \"SYNCING\"\n | \"CATCHUP\"\n | \"RECONNECTING\"\n | \"ERROR\"\n | \"STOPPED\"\n | (string & {});\n\nexport function isMatrixReadySyncState(\n state: MatrixSyncState | null | undefined,\n): state is \"PREPARED\" | \"SYNCING\" | \"CATCHUP\" {\n return state === \"PREPARED\" || state === \"SYNCING\" || state === \"CATCHUP\";\n}\n\nexport function isMatrixDisconnectedSyncState(\n state: MatrixSyncState | null | undefined,\n): state is \"RECONNECTING\" | \"ERROR\" | \"STOPPED\" {\n return state === \"RECONNECTING\" || state === \"ERROR\" || state === \"STOPPED\";\n}\n\nexport function isMatrixTerminalSyncState(\n state: MatrixSyncState | null | undefined,\n): state is \"STOPPED\" {\n // matrix-js-sdk can recover from ERROR to PREPARED during initial sync.\n return state === \"STOPPED\";\n}\n"],
|
|
5
|
+
"mappings": ";;;;;AAAA;AASO,SAAS,uBACd,OAC6C;AAC7C,SAAO,UAAU,cAAc,UAAU,aAAa,UAAU;AAClE;AAEO,SAAS,8BACd,OAC+C;AAC/C,SAAO,UAAU,kBAAkB,UAAU,WAAW,UAAU;AACpE;AAEO,SAAS,0BACd,OACoB;AAEpB,SAAO,UAAU;AACnB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import {
|
|
2
|
+
init_shims
|
|
3
|
+
} from "./chunk-G4TIS2SC.js";
|
|
4
|
+
|
|
5
|
+
// src/matrix/monitor/allowlist.ts
|
|
6
|
+
init_shims();
|
|
7
|
+
import {
|
|
8
|
+
resolveAllowlistMatchByCandidates
|
|
9
|
+
} from "openclaw/plugin-sdk/allow-from";
|
|
10
|
+
import { normalizeStringEntries } from "openclaw/plugin-sdk/string-normalization-runtime";
|
|
11
|
+
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/text-runtime";
|
|
12
|
+
function normalizeAllowList(list) {
|
|
13
|
+
return normalizeStringEntries(list);
|
|
14
|
+
}
|
|
15
|
+
function normalizeMatrixUser(raw) {
|
|
16
|
+
const value = (raw ?? "").trim();
|
|
17
|
+
if (!value) {
|
|
18
|
+
return "";
|
|
19
|
+
}
|
|
20
|
+
if (!value.startsWith("@") || !value.includes(":")) {
|
|
21
|
+
return normalizeLowercaseStringOrEmpty(value);
|
|
22
|
+
}
|
|
23
|
+
const withoutAt = value.slice(1);
|
|
24
|
+
const splitIndex = withoutAt.indexOf(":");
|
|
25
|
+
if (splitIndex === -1) {
|
|
26
|
+
return normalizeLowercaseStringOrEmpty(value);
|
|
27
|
+
}
|
|
28
|
+
const localpart = normalizeLowercaseStringOrEmpty(withoutAt.slice(0, splitIndex));
|
|
29
|
+
const server = normalizeLowercaseStringOrEmpty(withoutAt.slice(splitIndex + 1));
|
|
30
|
+
if (!server) {
|
|
31
|
+
return normalizeLowercaseStringOrEmpty(value);
|
|
32
|
+
}
|
|
33
|
+
return `@${localpart}:${server}`;
|
|
34
|
+
}
|
|
35
|
+
function normalizeMatrixUserId(raw) {
|
|
36
|
+
const trimmed = (raw ?? "").trim();
|
|
37
|
+
if (!trimmed) {
|
|
38
|
+
return "";
|
|
39
|
+
}
|
|
40
|
+
const lowered = normalizeLowercaseStringOrEmpty(trimmed);
|
|
41
|
+
if (lowered.startsWith("matrix:")) {
|
|
42
|
+
return normalizeMatrixUser(trimmed.slice("matrix:".length));
|
|
43
|
+
}
|
|
44
|
+
if (lowered.startsWith("user:")) {
|
|
45
|
+
return normalizeMatrixUser(trimmed.slice("user:".length));
|
|
46
|
+
}
|
|
47
|
+
return normalizeMatrixUser(trimmed);
|
|
48
|
+
}
|
|
49
|
+
function normalizeMatrixAllowListEntry(raw) {
|
|
50
|
+
const trimmed = raw.trim();
|
|
51
|
+
if (!trimmed) {
|
|
52
|
+
return "";
|
|
53
|
+
}
|
|
54
|
+
if (trimmed === "*") {
|
|
55
|
+
return trimmed;
|
|
56
|
+
}
|
|
57
|
+
const lowered = normalizeLowercaseStringOrEmpty(trimmed);
|
|
58
|
+
if (lowered.startsWith("matrix:")) {
|
|
59
|
+
return `matrix:${normalizeMatrixUser(trimmed.slice("matrix:".length))}`;
|
|
60
|
+
}
|
|
61
|
+
if (lowered.startsWith("user:")) {
|
|
62
|
+
return `user:${normalizeMatrixUser(trimmed.slice("user:".length))}`;
|
|
63
|
+
}
|
|
64
|
+
return normalizeMatrixUser(trimmed);
|
|
65
|
+
}
|
|
66
|
+
function normalizeMatrixAllowList(list) {
|
|
67
|
+
return normalizeAllowList(list).map((entry) => normalizeMatrixAllowListEntry(entry));
|
|
68
|
+
}
|
|
69
|
+
function resolveMatrixAllowListMatch(params) {
|
|
70
|
+
const allowList = params.allowList;
|
|
71
|
+
if (allowList.length === 0) {
|
|
72
|
+
return { allowed: false };
|
|
73
|
+
}
|
|
74
|
+
if (allowList.includes("*")) {
|
|
75
|
+
return { allowed: true, matchKey: "*", matchSource: "wildcard" };
|
|
76
|
+
}
|
|
77
|
+
const userId = normalizeMatrixUser(params.userId);
|
|
78
|
+
const candidates = [
|
|
79
|
+
{ value: userId, source: "id" },
|
|
80
|
+
{ value: userId ? `matrix:${userId}` : "", source: "prefixed-id" },
|
|
81
|
+
{ value: userId ? `user:${userId}` : "", source: "prefixed-user" }
|
|
82
|
+
];
|
|
83
|
+
return resolveAllowlistMatchByCandidates({ allowList, candidates });
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export {
|
|
87
|
+
normalizeMatrixUserId,
|
|
88
|
+
normalizeMatrixAllowList,
|
|
89
|
+
resolveMatrixAllowListMatch
|
|
90
|
+
};
|
|
91
|
+
//# sourceMappingURL=chunk-U44IVNP2.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/matrix/monitor/allowlist.ts"],
|
|
4
|
+
"sourcesContent": ["import {\n resolveAllowlistMatchByCandidates,\n type AllowlistMatch,\n} from \"openclaw/plugin-sdk/allow-from\";\nimport { normalizeStringEntries } from \"openclaw/plugin-sdk/string-normalization-runtime\";\nimport { normalizeLowercaseStringOrEmpty } from \"openclaw/plugin-sdk/text-runtime\";\n\nfunction normalizeAllowList(list?: Array<string | number>) {\n return normalizeStringEntries(list);\n}\n\nfunction normalizeMatrixUser(raw?: string | null): string {\n const value = (raw ?? \"\").trim();\n if (!value) {\n return \"\";\n }\n if (!value.startsWith(\"@\") || !value.includes(\":\")) {\n return normalizeLowercaseStringOrEmpty(value);\n }\n const withoutAt = value.slice(1);\n const splitIndex = withoutAt.indexOf(\":\");\n if (splitIndex === -1) {\n return normalizeLowercaseStringOrEmpty(value);\n }\n const localpart = normalizeLowercaseStringOrEmpty(withoutAt.slice(0, splitIndex));\n const server = normalizeLowercaseStringOrEmpty(withoutAt.slice(splitIndex + 1));\n if (!server) {\n return normalizeLowercaseStringOrEmpty(value);\n }\n return `@${localpart}:${server}`;\n}\n\nexport function normalizeMatrixUserId(raw?: string | null): string {\n const trimmed = (raw ?? \"\").trim();\n if (!trimmed) {\n return \"\";\n }\n const lowered = normalizeLowercaseStringOrEmpty(trimmed);\n if (lowered.startsWith(\"matrix:\")) {\n return normalizeMatrixUser(trimmed.slice(\"matrix:\".length));\n }\n if (lowered.startsWith(\"user:\")) {\n return normalizeMatrixUser(trimmed.slice(\"user:\".length));\n }\n return normalizeMatrixUser(trimmed);\n}\n\nfunction normalizeMatrixAllowListEntry(raw: string): string {\n const trimmed = raw.trim();\n if (!trimmed) {\n return \"\";\n }\n if (trimmed === \"*\") {\n return trimmed;\n }\n const lowered = normalizeLowercaseStringOrEmpty(trimmed);\n if (lowered.startsWith(\"matrix:\")) {\n return `matrix:${normalizeMatrixUser(trimmed.slice(\"matrix:\".length))}`;\n }\n if (lowered.startsWith(\"user:\")) {\n return `user:${normalizeMatrixUser(trimmed.slice(\"user:\".length))}`;\n }\n return normalizeMatrixUser(trimmed);\n}\n\nexport function normalizeMatrixAllowList(list?: Array<string | number>) {\n return normalizeAllowList(list).map((entry) => normalizeMatrixAllowListEntry(entry));\n}\n\nexport type MatrixAllowListMatch = AllowlistMatch<\n \"wildcard\" | \"id\" | \"prefixed-id\" | \"prefixed-user\"\n>;\n\ntype MatrixAllowListMatchSource = NonNullable<MatrixAllowListMatch[\"matchSource\"]>;\n\nexport function resolveMatrixAllowListMatch(params: {\n allowList: string[];\n userId?: string;\n}): MatrixAllowListMatch {\n const allowList = params.allowList;\n if (allowList.length === 0) {\n return { allowed: false };\n }\n if (allowList.includes(\"*\")) {\n return { allowed: true, matchKey: \"*\", matchSource: \"wildcard\" };\n }\n const userId = normalizeMatrixUser(params.userId);\n const candidates: Array<{ value?: string; source: MatrixAllowListMatchSource }> = [\n { value: userId, source: \"id\" },\n { value: userId ? `matrix:${userId}` : \"\", source: \"prefixed-id\" },\n { value: userId ? `user:${userId}` : \"\", source: \"prefixed-user\" },\n ];\n return resolveAllowlistMatchByCandidates<MatrixAllowListMatchSource>({ allowList, candidates });\n}\n"],
|
|
5
|
+
"mappings": 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WAAO;AAAA,EACT;AACA,QAAM,UAAU,gCAAgC,OAAO;AACvD,MAAI,QAAQ,WAAW,SAAS,GAAG;AACjC,WAAO,UAAU,oBAAoB,QAAQ,MAAM,UAAU,MAAM,CAAC,CAAC;AAAA,EACvE;AACA,MAAI,QAAQ,WAAW,OAAO,GAAG;AAC/B,WAAO,QAAQ,oBAAoB,QAAQ,MAAM,QAAQ,MAAM,CAAC,CAAC;AAAA,EACnE;AACA,SAAO,oBAAoB,OAAO;AACpC;AAEO,SAAS,yBAAyB,MAA+B;AACtE,SAAO,mBAAmB,IAAI,EAAE,IAAI,CAAC,UAAU,8BAA8B,KAAK,CAAC;AACrF;AAQO,SAAS,4BAA4B,QAGnB;AACvB,QAAM,YAAY,OAAO;AACzB,MAAI,UAAU,WAAW,GAAG;AAC1B,WAAO,EAAE,SAAS,MAAM;AAAA,EAC1B;AACA,MAAI,UAAU,SAAS,GAAG,GAAG;AAC3B,WAAO,EAAE,SAAS,MAAM,UAAU,KAAK,aAAa,WAAW;AAAA,EACjE;AACA,QAAM,SAAS,oBAAoB,OAAO,MAAM;AAChD,QAAM,aAA4E;AAAA,IAChF,EAAE,OAAO,QAAQ,QAAQ,KAAK;AAAA,IAC9B,EAAE,OAAO,SAAS,UAAU,MAAM,KAAK,IAAI,QAAQ,cAAc;AAAA,IACjE,EAAE,OAAO,SAAS,QAAQ,MAAM,KAAK,IAAI,QAAQ,gBAAgB;AAAA,EACnE;AACA,SAAO,kCAA8D,EAAE,WAAW,WAAW,CAAC;AAChG;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import {
|
|
2
|
+
init_shims
|
|
3
|
+
} from "./chunk-G4TIS2SC.js";
|
|
4
|
+
|
|
5
|
+
// src/storage-paths.ts
|
|
6
|
+
init_shims();
|
|
7
|
+
import crypto from "node:crypto";
|
|
8
|
+
import path from "node:path";
|
|
9
|
+
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
10
|
+
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/text-runtime";
|
|
11
|
+
function sanitizeMatrixPathSegment(value) {
|
|
12
|
+
const cleaned = normalizeLowercaseStringOrEmpty(value).replace(/[^a-z0-9._-]+/g, "_").replace(/^_+|_+$/g, "");
|
|
13
|
+
return cleaned || "unknown";
|
|
14
|
+
}
|
|
15
|
+
function resolveMatrixHomeserverKey(homeserver) {
|
|
16
|
+
try {
|
|
17
|
+
const url = new URL(homeserver);
|
|
18
|
+
if (url.host) {
|
|
19
|
+
return sanitizeMatrixPathSegment(url.host);
|
|
20
|
+
}
|
|
21
|
+
} catch {
|
|
22
|
+
}
|
|
23
|
+
return sanitizeMatrixPathSegment(homeserver);
|
|
24
|
+
}
|
|
25
|
+
function hashMatrixAccessToken(accessToken) {
|
|
26
|
+
return crypto.createHash("sha256").update(accessToken).digest("hex").slice(0, 16);
|
|
27
|
+
}
|
|
28
|
+
function resolveMatrixCredentialsFilename(accountId) {
|
|
29
|
+
const normalized = normalizeAccountId(accountId);
|
|
30
|
+
return normalized === DEFAULT_ACCOUNT_ID ? "credentials.json" : `credentials-${normalized}.json`;
|
|
31
|
+
}
|
|
32
|
+
function resolveMatrixCredentialsDir(stateDir) {
|
|
33
|
+
return path.join(stateDir, "credentials", "lobi");
|
|
34
|
+
}
|
|
35
|
+
function resolveMatrixCredentialsPath(params) {
|
|
36
|
+
return path.join(
|
|
37
|
+
resolveMatrixCredentialsDir(params.stateDir),
|
|
38
|
+
resolveMatrixCredentialsFilename(params.accountId)
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
function resolveMatrixLegacyFlatStoreRoot(stateDir) {
|
|
42
|
+
return path.join(stateDir, "lobi");
|
|
43
|
+
}
|
|
44
|
+
function resolveMatrixLegacyFlatStoragePaths(stateDir) {
|
|
45
|
+
const rootDir = resolveMatrixLegacyFlatStoreRoot(stateDir);
|
|
46
|
+
return {
|
|
47
|
+
rootDir,
|
|
48
|
+
storagePath: path.join(rootDir, "bot-storage.json"),
|
|
49
|
+
cryptoPath: path.join(rootDir, "crypto")
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
function resolveMatrixAccountStorageRoot(params) {
|
|
53
|
+
const accountKey = sanitizeMatrixPathSegment(params.accountId ?? DEFAULT_ACCOUNT_ID);
|
|
54
|
+
const userKey = sanitizeMatrixPathSegment(params.userId);
|
|
55
|
+
const serverKey = resolveMatrixHomeserverKey(params.homeserver);
|
|
56
|
+
const tokenHash = hashMatrixAccessToken(params.accessToken);
|
|
57
|
+
return {
|
|
58
|
+
rootDir: path.join(
|
|
59
|
+
params.stateDir,
|
|
60
|
+
"lobi",
|
|
61
|
+
"accounts",
|
|
62
|
+
accountKey,
|
|
63
|
+
`${serverKey}__${userKey}`,
|
|
64
|
+
tokenHash
|
|
65
|
+
),
|
|
66
|
+
accountKey,
|
|
67
|
+
tokenHash
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export {
|
|
72
|
+
sanitizeMatrixPathSegment,
|
|
73
|
+
resolveMatrixHomeserverKey,
|
|
74
|
+
hashMatrixAccessToken,
|
|
75
|
+
resolveMatrixCredentialsFilename,
|
|
76
|
+
resolveMatrixCredentialsDir,
|
|
77
|
+
resolveMatrixCredentialsPath,
|
|
78
|
+
resolveMatrixLegacyFlatStoreRoot,
|
|
79
|
+
resolveMatrixLegacyFlatStoragePaths,
|
|
80
|
+
resolveMatrixAccountStorageRoot
|
|
81
|
+
};
|
|
82
|
+
//# sourceMappingURL=chunk-UDDWLWKZ.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/storage-paths.ts"],
|
|
4
|
+
"sourcesContent": ["import crypto from \"node:crypto\";\nimport path from \"node:path\";\nimport { DEFAULT_ACCOUNT_ID, normalizeAccountId } from \"openclaw/plugin-sdk/account-id\";\nimport { normalizeLowercaseStringOrEmpty } from \"openclaw/plugin-sdk/text-runtime\";\n\nexport function sanitizeMatrixPathSegment(value: string): string {\n const cleaned = normalizeLowercaseStringOrEmpty(value)\n .replace(/[^a-z0-9._-]+/g, \"_\")\n .replace(/^_+|_+$/g, \"\");\n return cleaned || \"unknown\";\n}\n\nexport function resolveMatrixHomeserverKey(homeserver: string): string {\n try {\n const url = new URL(homeserver);\n if (url.host) {\n return sanitizeMatrixPathSegment(url.host);\n }\n } catch {\n // fall through\n }\n return sanitizeMatrixPathSegment(homeserver);\n}\n\nexport function hashMatrixAccessToken(accessToken: string): string {\n return crypto.createHash(\"sha256\").update(accessToken).digest(\"hex\").slice(0, 16);\n}\n\nexport function resolveMatrixCredentialsFilename(accountId?: string | null): string {\n const normalized = normalizeAccountId(accountId);\n return normalized === DEFAULT_ACCOUNT_ID ? \"credentials.json\" : `credentials-${normalized}.json`;\n}\n\nexport function resolveMatrixCredentialsDir(stateDir: string): string {\n return path.join(stateDir, \"credentials\", \"lobi\");\n}\n\nexport function resolveMatrixCredentialsPath(params: {\n stateDir: string;\n accountId?: string | null;\n}): string {\n return path.join(\n resolveMatrixCredentialsDir(params.stateDir),\n resolveMatrixCredentialsFilename(params.accountId),\n );\n}\n\nexport function resolveMatrixLegacyFlatStoreRoot(stateDir: string): string {\n return path.join(stateDir, \"lobi\");\n}\n\nexport function resolveMatrixLegacyFlatStoragePaths(stateDir: string): {\n rootDir: string;\n storagePath: string;\n cryptoPath: string;\n} {\n const rootDir = resolveMatrixLegacyFlatStoreRoot(stateDir);\n return {\n rootDir,\n storagePath: path.join(rootDir, \"bot-storage.json\"),\n cryptoPath: path.join(rootDir, \"crypto\"),\n };\n}\n\nexport function resolveMatrixAccountStorageRoot(params: {\n stateDir: string;\n homeserver: string;\n userId: string;\n accessToken: string;\n accountId?: string | null;\n}): {\n rootDir: string;\n accountKey: string;\n tokenHash: string;\n} {\n const accountKey = sanitizeMatrixPathSegment(params.accountId ?? DEFAULT_ACCOUNT_ID);\n const userKey = sanitizeMatrixPathSegment(params.userId);\n const serverKey = resolveMatrixHomeserverKey(params.homeserver);\n const tokenHash = hashMatrixAccessToken(params.accessToken);\n return {\n rootDir: path.join(\n params.stateDir,\n \"lobi\",\n \"accounts\",\n accountKey,\n `${serverKey}__${userKey}`,\n tokenHash,\n ),\n accountKey,\n tokenHash,\n };\n}\n"],
|
|
5
|
+
"mappings": ";;;;;AAAA;AAAA,OAAO,YAAY;AACnB,OAAO,UAAU;AACjB,SAAS,oBAAoB,0BAA0B;AACvD,SAAS,uCAAuC;AAEzC,SAAS,0BAA0B,OAAuB;AAC/D,QAAM,UAAU,gCAAgC,KAAK,EAClD,QAAQ,kBAAkB,GAAG,EAC7B,QAAQ,YAAY,EAAE;AACzB,SAAO,WAAW;AACpB;AAEO,SAAS,2BAA2B,YAA4B;AACrE,MAAI;AACF,UAAM,MAAM,IAAI,IAAI,UAAU;AAC9B,QAAI,IAAI,MAAM;AACZ,aAAO,0BAA0B,IAAI,IAAI;AAAA,IAC3C;AAAA,EACF,QAAQ;AAAA,EAER;AACA,SAAO,0BAA0B,UAAU;AAC7C;AAEO,SAAS,sBAAsB,aAA6B;AACjE,SAAO,OAAO,WAAW,QAAQ,EAAE,OAAO,WAAW,EAAE,OAAO,KAAK,EAAE,MAAM,GAAG,EAAE;AAClF;AAEO,SAAS,iCAAiC,WAAmC;AAClF,QAAM,aAAa,mBAAmB,SAAS;AAC/C,SAAO,eAAe,qBAAqB,qBAAqB,eAAe,UAAU;AAC3F;AAEO,SAAS,4BAA4B,UAA0B;AACpE,SAAO,KAAK,KAAK,UAAU,eAAe,MAAM;AAClD;AAEO,SAAS,6BAA6B,QAGlC;AACT,SAAO,KAAK;AAAA,IACV,4BAA4B,OAAO,QAAQ;AAAA,IAC3C,iCAAiC,OAAO,SAAS;AAAA,EACnD;AACF;AAEO,SAAS,iCAAiC,UAA0B;AACzE,SAAO,KAAK,KAAK,UAAU,MAAM;AACnC;AAEO,SAAS,oCAAoC,UAIlD;AACA,QA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