@openclaw/matrix 2026.10.2 → 2026.10.5-beta.2
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/.setup/{account-selection-BDeeqwwR.mjs → account-selection-Bs_jCAaG.mjs} +3 -5
- package/dist/.setup/{approval-handler.runtime-QkHLH2az.mjs → approval-handler.runtime-rxLn8CbP.mjs} +60 -83
- package/dist/.setup/{channel-CeRXEAEP.mjs → channel-BcwGspPw.mjs} +92 -120
- package/dist/.setup/{channel.runtime-DBQA2y1F.mjs → channel.runtime-CUc6rbu1.mjs} +23 -18
- package/dist/.setup/{channel.setup-DC2t7_PK.mjs → channel.setup-CwuYD_CT.mjs} +2 -3
- package/dist/.setup/{cli-Be8tdNw8.mjs → cli-mbL9jCro.mjs} +80 -120
- package/dist/.setup/{cli-metadata-CtcjBFhc.mjs → cli-metadata-6MOGuyHq.mjs} +1 -1
- package/dist/.setup/{client-DY3HExqI.mjs → client-BlTvpEWC.mjs} +2 -2
- package/dist/.setup/{client-bootstrap-CZvJjr29.mjs → client-bootstrap-D05xy1HB.mjs} +2 -3
- package/dist/.setup/{client-support-D7BlioUb.mjs → client-support-D-xHScuo.mjs} +1 -1
- package/dist/.setup/{client-kmih04ng.mjs → client-vPPbaxNp.mjs} +14 -24
- package/dist/.setup/{create-client-CbJVyFDy.mjs → create-client-CroC4BVc.mjs} +4 -4
- package/dist/.setup/{credentials-C2dvc_kB.mjs → credentials-Bf9PQ7xs.mjs} +4 -18
- package/dist/.setup/{crypto-runtime-B2AjWo-i.mjs → crypto-runtime-CpJ0b7vY.mjs} +80 -123
- package/dist/.setup/{deps-CFNl7tQo.mjs → deps-L_1bUAGL.mjs} +20 -37
- package/dist/.setup/{direct-management-DJtQhLKH.mjs → direct-management-B3wYhx_M.mjs} +25 -51
- package/dist/.setup/{directory-live-DW5UykLL.mjs → directory-live-B1WbfSHo.mjs} +3 -3
- package/dist/.setup/{draft-stream-B87DfA6a.mjs → draft-stream-Bdrh7dRt.mjs} +2 -3
- package/dist/.setup/{encryption-guidance-BEjKbiMR.mjs → encryption-guidance-D5_IsDIy.mjs} +1 -1
- package/dist/.setup/{env-vars-dGqak9dN.mjs → env-vars-aEBngJPa.mjs} +2 -17
- package/dist/.setup/{event-helpers-CspuhE9k.mjs → event-helpers-CxNgMQqH.mjs} +5 -7
- package/dist/.setup/{exec-approvals-BLDAMyHs.mjs → exec-approvals-BgNWWJg1.mjs} +6 -12
- package/dist/.setup/{file-sync-store-Clc9iEdn.mjs → file-sync-store-BdKx_gMi.mjs} +2 -5
- package/dist/.setup/{http-client-DfJY5Ck0.mjs → http-client-ByR4STVQ.mjs} +55 -59
- package/dist/.setup/{messages-uCbwLRKS.mjs → messages-B1CZqU8u.mjs} +4 -16
- package/dist/.setup/{monitor-skIntQVG.mjs → monitor-Dk_fQL1k.mjs} +176 -232
- package/dist/.setup/{onboarding-Cm_tOJxs.mjs → onboarding-CrSexor_.mjs} +33 -50
- package/dist/.setup/{outbound-CqQou3ny.mjs → outbound-LR3SqPIq.mjs} +2 -2
- package/dist/.setup/{profile-update-C1n8SRqH.mjs → profile-update-C7bjaGR6.mjs} +2 -3
- package/dist/.setup/{reaction-events-Cqq46xsG.mjs → reaction-events-CTSvOlXO.mjs} +4 -4
- package/dist/.setup/{resolve-targets-DFeU1Ww6.mjs → resolve-targets-BVVbbvP6.mjs} +15 -21
- package/dist/.setup/{retired-state-BXUQ2I-C.mjs → retired-state-DW5pLH05.mjs} +22 -3
- package/dist/.setup/{room-info-BPMbwe8I.mjs → room-info-9Uqlpt1V.mjs} +4 -4
- package/dist/.setup/{sdk-CgQGkCsS.mjs → sdk-Cfc6m7fY.mjs} +115 -195
- package/dist/.setup/{secret-contract-JlB6VmI3.mjs → secret-contract-DSBRvhdZ.mjs} +1 -1
- package/dist/.setup/{secret-contract-api-B-iJoQEv.mjs → secret-contract-api-DzEJ-X7n.mjs} +1 -1
- package/dist/.setup/{send-B1Y2L4wj.mjs → send-LCOuTVc1.mjs} +10 -30
- package/dist/.setup/{setup-bootstrap-UNIGyKnk.mjs → setup-bootstrap-CV-hHBXu.mjs} +2 -2
- package/dist/.setup/setup-core-CKnNTfgD.mjs +673 -0
- package/dist/.setup/{setup-plugin-api-BRs9bcp4.mjs → setup-plugin-api-BDAYk1a5.mjs} +1 -1
- package/dist/.setup/{startup-verification-D00eUt74.mjs → startup-verification-CgfUb4yJ.mjs} +3 -3
- package/dist/.setup/{storage-D7agewjH.mjs → storage-DkC6bHgA.mjs} +24 -49
- package/dist/.setup/{subagent-hooks-D5kd_kzN.mjs → subagent-hooks-D8jyeQsO.mjs} +1 -1
- package/dist/.setup/{sync-cache-state-C2z64uyk.mjs → sync-cache-state-D4G-fi3t.mjs} +20 -33
- package/dist/.setup/{target-ids-Nwx7cMVE.mjs → target-ids-HhcaKX1n.mjs} +15 -1
- package/dist/.setup/{thread-binding-api-DRMC62cs.mjs → thread-binding-api-BvuaKpd0.mjs} +1 -1
- package/dist/.setup/{thread-bindings-DveHVZqN.mjs → thread-bindings-CT4P-OSZ.mjs} +38 -58
- package/dist/.setup/{thread-bindings-shared-hxKkYC1W.mjs → thread-bindings-shared-CbsFNbAY.mjs} +19 -37
- package/dist/.setup/{tool-actions-BqlK2ilM.mjs → tool-actions-DAp6_XSJ.mjs} +17 -18
- package/dist/.setup/{verification-kMlFYUn0.mjs → verification-B3VswneT.mjs} +15 -21
- package/dist/api.js +7 -7
- package/dist/channel-plugin-api.js +1 -1
- package/dist/cli-metadata.js +1 -1
- package/dist/contract-api.js +2 -2
- package/dist/doctor-contract-api.js +13 -22
- package/dist/helper-api.js +2 -2
- package/dist/index.js +1 -1
- package/dist/plugin-entry.handlers.runtime.js +2 -2
- package/dist/runtime-api.js +4 -4
- package/dist/secret-contract-api.js +1 -1
- package/dist/session-binding-contract-api.js +1 -1
- package/dist/setup-entry.js +2 -2
- package/dist/setup-plugin-api.js +1 -1
- package/dist/subagent-hooks-api.js +1 -1
- package/dist/thread-binding-api.js +1 -1
- package/dist/thread-bindings-runtime.js +1 -1
- package/node_modules/@matrix-org/matrix-sdk-crypto-wasm/package.json +1 -1
- package/node_modules/@matrix-org/matrix-sdk-crypto-wasm/pkg/matrix_sdk_crypto_wasm.d.ts +129 -129
- package/node_modules/@matrix-org/matrix-sdk-crypto-wasm/pkg/matrix_sdk_crypto_wasm_bg.cjs +688 -688
- package/node_modules/@matrix-org/matrix-sdk-crypto-wasm/pkg/matrix_sdk_crypto_wasm_bg.js +512 -512
- package/node_modules/@matrix-org/matrix-sdk-crypto-wasm/pkg/matrix_sdk_crypto_wasm_bg.wasm +0 -0
- package/node_modules/@matrix-org/matrix-sdk-crypto-wasm/pkg/matrix_sdk_crypto_wasm_bg.wasm.d.ts +84 -84
- package/node_modules/@openclaw/fs-safe/CHANGELOG.md +35 -0
- package/node_modules/@openclaw/fs-safe/README.md +1 -1
- package/node_modules/@openclaw/fs-safe/dist/advanced.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/advanced.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-durability.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-merge.js +4 -4
- package/node_modules/@openclaw/fs-safe/dist/archive-parser.wasm +0 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-read.js +5 -4
- package/node_modules/@openclaw/fs-safe/dist/archive-staging.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-staging.js +22 -38
- package/node_modules/@openclaw/fs-safe/dist/copy-path-admission.d.ts +17 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-path-admission.js +117 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-root-file-sync.d.ts +8 -5
- package/node_modules/@openclaw/fs-safe/dist/copy-root-file-sync.js +27 -50
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-acquire.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-acquire.js +57 -11
- package/node_modules/@openclaw/fs-safe/dist/guarded-mutation.js +5 -5
- package/node_modules/@openclaw/fs-safe/dist/guest-native-python.js +52 -5
- package/node_modules/@openclaw/fs-safe/dist/guest.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/native-binding.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/native-operations.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/native-operations.js +22 -26
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write-windows.js +5 -1
- package/node_modules/@openclaw/fs-safe/dist/native-staged-file.js +4 -1
- package/node_modules/@openclaw/fs-safe/dist/permission-exec.js +2 -1
- package/node_modules/@openclaw/fs-safe/dist/pinned-write-types.d.ts +6 -1
- package/node_modules/@openclaw/fs-safe/dist/private-temp-workspace.js +2 -2
- package/node_modules/@openclaw/fs-safe/dist/publish-file.js +34 -7
- package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-fallback.js +1 -4
- package/node_modules/@openclaw/fs-safe/dist/replace-file-descriptor.js +6 -0
- package/node_modules/@openclaw/fs-safe/dist/root-create-input.d.ts +15 -1
- package/node_modules/@openclaw/fs-safe/dist/root-create-input.js +4 -0
- package/node_modules/@openclaw/fs-safe/dist/root-directory-entry.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/root-directory-list.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-directory-list.js +6 -12
- package/node_modules/@openclaw/fs-safe/dist/root-impl.js +15 -15
- package/node_modules/@openclaw/fs-safe/dist/root-paths.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/root-walk.js +4 -4
- package/node_modules/@openclaw/fs-safe/dist/root-write-verification.d.ts +10 -1
- package/node_modules/@openclaw/fs-safe/dist/root-write-verification.js +20 -0
- package/node_modules/@openclaw/fs-safe/dist/secure-temp-dir.js +19 -7
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-acquire.js +25 -3
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-admission.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-retained.d.ts +14 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-retained.js +187 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock.js +15 -1
- package/node_modules/@openclaw/fs-safe/dist/temp-directory-diagnostics.d.ts +10 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-directory-diagnostics.js +29 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-target.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-admission.js +6 -6
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-child-admission.d.ts +4 -4
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-child-admission.js +17 -16
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-descriptor.js +20 -28
- package/node_modules/@openclaw/fs-safe/dist/walk.js +2 -13
- package/node_modules/@openclaw/fs-safe/dist/watch-native.d.ts +2 -2
- package/node_modules/@openclaw/fs-safe/dist/watch-native.js +3 -1
- package/node_modules/@openclaw/fs-safe/dist/watch-rescan.js +3 -9
- package/node_modules/@openclaw/fs-safe/dist/watch.js +2 -3
- package/node_modules/@openclaw/fs-safe/docs/advanced.md +1 -1
- package/node_modules/@openclaw/fs-safe/docs/archive.md +3 -0
- package/node_modules/@openclaw/fs-safe/docs/atomic.md +11 -3
- package/node_modules/@openclaw/fs-safe/docs/contributing.md +1 -1
- package/node_modules/@openclaw/fs-safe/docs/copy.md +48 -0
- package/node_modules/@openclaw/fs-safe/docs/guest.md +21 -4
- package/node_modules/@openclaw/fs-safe/docs/path-scope.md +4 -0
- package/node_modules/@openclaw/fs-safe/docs/sidecar-lock.md +46 -8
- package/node_modules/@openclaw/fs-safe/docs/temp.md +12 -0
- package/node_modules/@openclaw/fs-safe/docs/watch.md +3 -2
- package/node_modules/@openclaw/fs-safe/package.json +15 -15
- package/node_modules/@openclaw/fs-safe-darwin-arm64/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-darwin-arm64/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-darwin-x64/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-darwin-x64/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-linux-arm64-gnu/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-linux-arm64-gnu/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-linux-arm64-musl/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-linux-arm64-musl/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-linux-x64-gnu/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-linux-x64-gnu/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-linux-x64-musl/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-linux-x64-musl/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-win32-x64-msvc/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-win32-x64-msvc/package.json +1 -1
- package/node_modules/matrix-widget-api/lib/interfaces/RtcLivekitActions.d.ts +6 -12
- package/node_modules/matrix-widget-api/lib/interfaces/RtcLivekitActions.js.map +1 -1
- package/node_modules/matrix-widget-api/package.json +1 -1
- package/node_modules/matrix-widget-api/src/interfaces/RtcLivekitActions.ts +6 -13
- package/node_modules/music-metadata/README.md +35 -32
- package/node_modules/music-metadata/lib/ParserFactory.d.ts +1 -1
- package/node_modules/music-metadata/lib/ParserFactory.js +17 -13
- package/node_modules/music-metadata/lib/aiff/AiffParser.js +19 -12
- package/node_modules/music-metadata/lib/aiff/AiffToken.d.ts +1 -1
- package/node_modules/music-metadata/lib/aiff/AiffToken.js +2 -1
- package/node_modules/music-metadata/lib/apev2/APEv2Parser.d.ts +4 -3
- package/node_modules/music-metadata/lib/apev2/APEv2Parser.js +59 -16
- package/node_modules/music-metadata/lib/apev2/APEv2TagMapper.js +1 -0
- package/node_modules/music-metadata/lib/apev2/APEv2Token.d.ts +1 -1
- package/node_modules/music-metadata/lib/apev2/APEv2Token.js +1 -1
- package/node_modules/music-metadata/lib/asf/AsfGuid.js +56 -50
- package/node_modules/music-metadata/lib/asf/AsfObject.d.ts +1 -1
- package/node_modules/music-metadata/lib/asf/AsfObject.js +3 -2
- package/node_modules/music-metadata/lib/asf/AsfParser.js +15 -7
- package/node_modules/music-metadata/lib/asf/AsfTagMapper.d.ts +3 -2
- package/node_modules/music-metadata/lib/asf/AsfTagMapper.js +21 -4
- package/node_modules/music-metadata/lib/common/CaseInsensitiveTagMap.d.ts +1 -1
- package/node_modules/music-metadata/lib/common/CombinedTagMapper.d.ts +2 -2
- package/node_modules/music-metadata/lib/common/CombinedTagMapper.js +6 -6
- package/node_modules/music-metadata/lib/common/FourCC.js +3 -2
- package/node_modules/music-metadata/lib/common/GenericTagMapper.d.ts +1 -1
- package/node_modules/music-metadata/lib/common/GenericTagTypes.js +1 -1
- package/node_modules/music-metadata/lib/common/MetadataCollector.d.ts +3 -1
- package/node_modules/music-metadata/lib/common/MetadataCollector.js +28 -9
- package/node_modules/music-metadata/lib/common/Util.js +25 -17
- package/node_modules/music-metadata/lib/core.d.ts +4 -4
- package/node_modules/music-metadata/lib/core.js +18 -11
- package/node_modules/music-metadata/lib/dsdiff/DsdiffParser.js +29 -16
- package/node_modules/music-metadata/lib/dsf/DsfChunk.d.ts +1 -1
- package/node_modules/music-metadata/lib/dsf/DsfParser.js +3 -5
- package/node_modules/music-metadata/lib/ebml/EbmlIterator.d.ts +1 -1
- package/node_modules/music-metadata/lib/ebml/EbmlIterator.js +35 -6
- package/node_modules/music-metadata/lib/ebml/types.d.ts +1 -1
- package/node_modules/music-metadata/lib/ebml/types.js +1 -1
- package/node_modules/music-metadata/lib/flac/FlacParser.d.ts +1 -1
- package/node_modules/music-metadata/lib/flac/FlacParser.js +6 -5
- package/node_modules/music-metadata/lib/flac/FlacToken.d.ts +1 -1
- package/node_modules/music-metadata/lib/flac/FlacToken.js +1 -1
- package/node_modules/music-metadata/lib/id3v1/ID3v1Parser.d.ts +1 -1
- package/node_modules/music-metadata/lib/id3v1/ID3v1Parser.js +212 -42
- package/node_modules/music-metadata/lib/id3v2/AbstractID3Parser.js +5 -5
- package/node_modules/music-metadata/lib/id3v2/FrameHeader.d.ts +1 -1
- package/node_modules/music-metadata/lib/id3v2/FrameHeader.js +8 -5
- package/node_modules/music-metadata/lib/id3v2/FrameParser.d.ts +2 -1
- package/node_modules/music-metadata/lib/id3v2/FrameParser.js +54 -23
- package/node_modules/music-metadata/lib/id3v2/ID3v22TagMapper.d.ts +1 -1
- package/node_modules/music-metadata/lib/id3v2/ID3v22TagMapper.js +1 -1
- package/node_modules/music-metadata/lib/id3v2/ID3v24TagMapper.js +3 -3
- package/node_modules/music-metadata/lib/id3v2/ID3v2ChapterToken.js +2 -2
- package/node_modules/music-metadata/lib/id3v2/ID3v2Parser.d.ts +1 -1
- package/node_modules/music-metadata/lib/id3v2/ID3v2Parser.js +32 -16
- package/node_modules/music-metadata/lib/id3v2/ID3v2Token.d.ts +2 -2
- package/node_modules/music-metadata/lib/id3v2/ID3v2Token.js +2 -3
- package/node_modules/music-metadata/lib/index.js +6 -3
- package/node_modules/music-metadata/lib/lrc/LyricsParser.js +3 -5
- package/node_modules/music-metadata/lib/matroska/MatroskaDtd.js +7 -3
- package/node_modules/music-metadata/lib/matroska/MatroskaParser.js +22 -11
- package/node_modules/music-metadata/lib/matroska/types.d.ts +2 -2
- package/node_modules/music-metadata/lib/mp4/Atom.d.ts +4 -3
- package/node_modules/music-metadata/lib/mp4/Atom.js +44 -11
- package/node_modules/music-metadata/lib/mp4/AtomToken.d.ts +1 -1
- package/node_modules/music-metadata/lib/mp4/AtomToken.js +30 -8
- package/node_modules/music-metadata/lib/mp4/MP4Parser.d.ts +2 -0
- package/node_modules/music-metadata/lib/mp4/MP4Parser.js +79 -54
- package/node_modules/music-metadata/lib/mp4/MP4TagMapper.d.ts +2 -2
- package/node_modules/music-metadata/lib/mpeg/MpegLoader.js +1 -1
- package/node_modules/music-metadata/lib/mpeg/MpegParser.js +41 -19
- package/node_modules/music-metadata/lib/mpeg/ReplayGainDataFormat.d.ts +2 -2
- package/node_modules/music-metadata/lib/mpeg/ReplayGainDataFormat.js +1 -1
- package/node_modules/music-metadata/lib/mpeg/XingTag.d.ts +1 -1
- package/node_modules/music-metadata/lib/musepack/MusepackParser.js +2 -2
- package/node_modules/music-metadata/lib/musepack/sv7/BitReader.js +1 -1
- package/node_modules/music-metadata/lib/musepack/sv7/MpcSv7Parser.js +4 -3
- package/node_modules/music-metadata/lib/musepack/sv7/StreamVersion7.js +3 -3
- package/node_modules/music-metadata/lib/musepack/sv8/MpcSv8Parser.js +7 -5
- package/node_modules/music-metadata/lib/musepack/sv8/StreamVersion8.js +2 -2
- package/node_modules/music-metadata/lib/ogg/OggParser.js +23 -13
- package/node_modules/music-metadata/lib/ogg/OggToken.d.ts +2 -0
- package/node_modules/music-metadata/lib/ogg/OggToken.js +1 -1
- package/node_modules/music-metadata/lib/ogg/flac/FlacStream.d.ts +2 -2
- package/node_modules/music-metadata/lib/ogg/flac/FlacStream.js +2 -2
- package/node_modules/music-metadata/lib/ogg/opus/OpusStream.d.ts +2 -2
- package/node_modules/music-metadata/lib/ogg/opus/OpusStream.js +8 -4
- package/node_modules/music-metadata/lib/ogg/speex/SpeexStream.d.ts +2 -2
- package/node_modules/music-metadata/lib/ogg/speex/SpeexStream.js +2 -1
- package/node_modules/music-metadata/lib/ogg/theora/TheoraStream.d.ts +2 -2
- package/node_modules/music-metadata/lib/ogg/vorbis/Vorbis.d.ts +1 -1
- package/node_modules/music-metadata/lib/ogg/vorbis/VorbisDecoder.js +1 -1
- package/node_modules/music-metadata/lib/ogg/vorbis/VorbisStream.d.ts +4 -3
- package/node_modules/music-metadata/lib/ogg/vorbis/VorbisStream.js +16 -9
- package/node_modules/music-metadata/lib/ogg/vorbis/VorbisTagMapper.js +4 -0
- package/node_modules/music-metadata/lib/riff/RiffChunk.d.ts +3 -1
- package/node_modules/music-metadata/lib/riff/RiffChunk.js +3 -2
- package/node_modules/music-metadata/lib/riff/RiffInfoTagMap.d.ts +1 -1
- package/node_modules/music-metadata/lib/type.d.ts +3 -3
- package/node_modules/music-metadata/lib/type.js +1 -1
- package/node_modules/music-metadata/lib/wav/WaveChunk.d.ts +1 -1
- package/node_modules/music-metadata/lib/wav/WaveChunk.js +3 -2
- package/node_modules/music-metadata/lib/wav/WaveParser.d.ts +6 -2
- package/node_modules/music-metadata/lib/wav/WaveParser.js +75 -22
- package/node_modules/music-metadata/lib/wavpack/WavPackParser.js +22 -13
- package/node_modules/music-metadata/lib/wavpack/WavPackToken.js +3 -2
- package/node_modules/music-metadata/package.json +3 -2
- package/node_modules/uint8array-extras/index.d.ts +7 -7
- package/node_modules/uint8array-extras/index.js +27 -13
- package/node_modules/uint8array-extras/package.json +6 -6
- package/node_modules/uint8array-extras/readme.md +7 -7
- package/package.json +7 -7
- package/dist/.setup/accounts-C_r0UlEm.mjs +0 -138
- package/dist/.setup/config-update-CZndPxNd.mjs +0 -102
- package/dist/.setup/profile-DS0xdJAi.mjs +0 -80
- package/dist/.setup/setup-core-6DppLENo.mjs +0 -377
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-arbitration.d.ts +0 -17
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-arbitration.js +0 -66
- package/node_modules/@openclaw/fs-safe/dist/publish-file-native.d.ts +0 -4
- package/node_modules/@openclaw/fs-safe/dist/publish-file-native.js +0 -35
- package/node_modules/@openclaw/fs-safe/dist/root-move-preflight.d.ts +0 -7
- package/node_modules/@openclaw/fs-safe/dist/root-move-preflight.js +0 -16
- package/dist/.setup/{errors-DKVS3_DO.mjs → errors-Bw4EHwKX.mjs} +1 -1
|
@@ -1,31 +1,33 @@
|
|
|
1
1
|
import { i as __exportAll } from "./doctor-contract-CsTNmbMa.mjs";
|
|
2
2
|
import { t as getMatrixRuntime } from "./runtime-1kn1P6io.mjs";
|
|
3
|
-
import { r as assertMatrixSupportedStateFile } from "./retired-state-
|
|
4
|
-
import { d as writeMatrixRecoveryKeyStateForPathAsync, l as readMatrixRecoveryKeyStateForPathAsync } from "./storage-
|
|
3
|
+
import { r as assertMatrixSupportedStateFile } from "./retired-state-DW5pLH05.mjs";
|
|
4
|
+
import { d as writeMatrixRecoveryKeyStateForPathAsync, l as readMatrixRecoveryKeyStateForPathAsync } from "./storage-DkC6bHgA.mjs";
|
|
5
5
|
import { n as withMatrixSendCurrentness, r as withoutMatrixSendCurrentness, t as captureMatrixSendCurrentness } from "./send-currentness-C2rMVVIQ.mjs";
|
|
6
|
-
import { i as parseMxc, r as matrixEventToRaw } from "./event-helpers-
|
|
7
|
-
import { n as isMatrixNotFoundError, t as formatMatrixErrorReason } from "./errors-
|
|
8
|
-
import { i as createMatrixStartupAbortError, o as throwIfMatrixStartupAborted, r as awaitMatrixStartupWithAbort } from "./client-
|
|
9
|
-
import { n as createMatrixGuardedFetch, t as MatrixAuthedHttpClient } from "./http-client-
|
|
6
|
+
import { i as parseMxc, r as matrixEventToRaw } from "./event-helpers-CxNgMQqH.mjs";
|
|
7
|
+
import { n as isMatrixNotFoundError, t as formatMatrixErrorReason } from "./errors-Bw4EHwKX.mjs";
|
|
8
|
+
import { i as createMatrixStartupAbortError, o as throwIfMatrixStartupAborted, r as awaitMatrixStartupWithAbort } from "./client-vPPbaxNp.mjs";
|
|
9
|
+
import { n as createMatrixGuardedFetch, t as MatrixAuthedHttpClient } from "./http-client-ByR4STVQ.mjs";
|
|
10
10
|
import { n as resolveMatrixRoomKeyBackupReadinessError } from "./backup-health-Dm_YMVFT.mjs";
|
|
11
11
|
import { r as noop, t as LogService } from "./logger-CXQnpXCt.mjs";
|
|
12
12
|
import { t as createMatrixJsSdkClientLogger } from "./logging-BKV8TYQq.mjs";
|
|
13
|
-
import { a as isMatrixAccessTokenInvalidatedError, c as resolveMatrixLocalTimeoutMs, f as isMatrixReadySyncState, i as createMatrixExplicitBootstrapOptions, l as unresolvedMatrixDeviceVerificationStatus, n as MATRIX_INITIAL_CRYPTO_BOOTSTRAP_OPTIONS, o as resolveMatrixDiagnostic, p as isMatrixTerminalSyncState, r as MATRIX_STATUS_DIAGNOSTIC_TIMEOUT_MS, s as resolveMatrixDiagnosticResult, t as MATRIX_AUTOMATIC_REPAIR_BOOTSTRAP_OPTIONS, u as unresolvedMatrixRoomKeyBackupStatus } from "./client-support-
|
|
13
|
+
import { a as isMatrixAccessTokenInvalidatedError, c as resolveMatrixLocalTimeoutMs, f as isMatrixReadySyncState, i as createMatrixExplicitBootstrapOptions, l as unresolvedMatrixDeviceVerificationStatus, n as MATRIX_INITIAL_CRYPTO_BOOTSTRAP_OPTIONS, o as resolveMatrixDiagnostic, p as isMatrixTerminalSyncState, r as MATRIX_STATUS_DIAGNOSTIC_TIMEOUT_MS, s as resolveMatrixDiagnosticResult, t as MATRIX_AUTOMATIC_REPAIR_BOOTSTRAP_OPTIONS, u as unresolvedMatrixRoomKeyBackupStatus } from "./client-support-D-xHScuo.mjs";
|
|
14
14
|
import { createRequire } from "node:module";
|
|
15
15
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
16
|
+
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
16
17
|
import { normalizeNullableString, normalizeStringEntries, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
17
18
|
import { createHash } from "node:crypto";
|
|
18
19
|
import path from "node:path";
|
|
19
|
-
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
20
20
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
21
21
|
import { KeyedAsyncQueue } from "openclaw/plugin-sdk/keyed-async-queue";
|
|
22
|
+
import { raceWithTimeout } from "openclaw/plugin-sdk/time-runtime";
|
|
22
23
|
import { createDeferred } from "openclaw/plugin-sdk/extension-shared";
|
|
23
|
-
import { captureChannelReadAuthority } from "openclaw/plugin-sdk/fetch-runtime";
|
|
24
|
+
import { captureChannelReadAuthority, withEffectAuthority } from "openclaw/plugin-sdk/fetch-runtime";
|
|
24
25
|
import { ClientEvent, EventType, Filter, MatrixError, MatrixEventEvent, MsgType, Preset, createClient } from "matrix-js-sdk/lib/matrix.js";
|
|
25
26
|
import { EventEmitter } from "node:events";
|
|
26
27
|
import { RoomEvent } from "matrix-js-sdk/lib/models/room.js";
|
|
27
28
|
import { VerificationMethod } from "matrix-js-sdk/lib/types.js";
|
|
28
29
|
import { SyncApi, SyncState } from "matrix-js-sdk/lib/sync.js";
|
|
30
|
+
import { createDeferred as createDeferred$1 } from "openclaw/plugin-sdk/concurrency-runtime";
|
|
29
31
|
import { decodeRecoveryKey } from "matrix-js-sdk/lib/crypto-api/recovery-key.js";
|
|
30
32
|
import { MatrixScheduler } from "matrix-js-sdk/lib/scheduler.js";
|
|
31
33
|
import { EventStatus } from "matrix-js-sdk/lib/models/event-status.js";
|
|
@@ -205,79 +207,52 @@ async function waitForMatrixInitialSyncReady(params) {
|
|
|
205
207
|
if (isMatrixReadySyncState(params.state)) return;
|
|
206
208
|
if (isMatrixAccessTokenInvalidatedError(params.error)) throw params.error instanceof Error ? params.error : new Error("Matrix access token invalidated", { cause: params.error });
|
|
207
209
|
if (isMatrixTerminalSyncState(params.state)) throw new Error(`Matrix sync entered ${params.state} during startup`);
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
if (timeoutId) {
|
|
217
|
-
clearTimeout(timeoutId);
|
|
218
|
-
timeoutId = void 0;
|
|
219
|
-
}
|
|
220
|
-
};
|
|
221
|
-
const settle = (error) => {
|
|
222
|
-
if (settled) return;
|
|
223
|
-
settled = true;
|
|
224
|
-
cleanup();
|
|
225
|
-
if (error) reject(error);
|
|
226
|
-
else resolve();
|
|
227
|
-
};
|
|
228
|
-
const onSyncState = (state, _prevState, error) => {
|
|
229
|
-
if (isMatrixReadySyncState(state)) {
|
|
230
|
-
settle();
|
|
231
|
-
return;
|
|
232
|
-
}
|
|
233
|
-
if (isMatrixAccessTokenInvalidatedError(error)) {
|
|
234
|
-
settle(error instanceof Error ? error : /* @__PURE__ */ new Error("Matrix access token invalidated"));
|
|
235
|
-
return;
|
|
236
|
-
}
|
|
237
|
-
if (isMatrixTerminalSyncState(state)) settle(new Error(error instanceof Error && error.message ? error.message : `Matrix sync entered ${state} during startup`));
|
|
238
|
-
};
|
|
239
|
-
const onUnexpectedError = settle;
|
|
240
|
-
const onAbort = () => {
|
|
241
|
-
settle(createMatrixStartupAbortError());
|
|
242
|
-
};
|
|
243
|
-
params.emitter.on("sync.state", onSyncState);
|
|
244
|
-
params.emitter.on("sync.unexpected_error", onUnexpectedError);
|
|
245
|
-
if (abortSignal?.aborted) {
|
|
246
|
-
onAbort();
|
|
210
|
+
const ready = createDeferred$1();
|
|
211
|
+
const settle = (error) => {
|
|
212
|
+
if (error) ready.reject(error);
|
|
213
|
+
else ready.resolve();
|
|
214
|
+
};
|
|
215
|
+
const onSyncState = (state, _prevState, error) => {
|
|
216
|
+
if (isMatrixReadySyncState(state)) {
|
|
217
|
+
settle();
|
|
247
218
|
return;
|
|
248
219
|
}
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
}
|
|
220
|
+
if (isMatrixAccessTokenInvalidatedError(error)) {
|
|
221
|
+
settle(error instanceof Error ? error : /* @__PURE__ */ new Error("Matrix access token invalidated"));
|
|
222
|
+
return;
|
|
223
|
+
}
|
|
224
|
+
if (isMatrixTerminalSyncState(state)) settle(new Error(error instanceof Error && error.message ? error.message : `Matrix sync entered ${state} during startup`));
|
|
225
|
+
};
|
|
226
|
+
params.emitter.on("sync.state", onSyncState);
|
|
227
|
+
params.emitter.on("sync.unexpected_error", settle);
|
|
228
|
+
try {
|
|
229
|
+
if (params.abortSignal?.aborted) throw createMatrixStartupAbortError();
|
|
230
|
+
await raceWithTimeout(ready.promise, timeoutMs, () => {
|
|
231
|
+
throw new Error(`Matrix client did not reach a ready sync state within ${timeoutMs}ms`);
|
|
232
|
+
}, {
|
|
233
|
+
ref: false,
|
|
234
|
+
signal: params.abortSignal,
|
|
235
|
+
onAbort: () => {
|
|
236
|
+
throw createMatrixStartupAbortError();
|
|
237
|
+
}
|
|
238
|
+
});
|
|
239
|
+
} finally {
|
|
240
|
+
params.emitter.off("sync.state", onSyncState);
|
|
241
|
+
params.emitter.off("sync.unexpected_error", settle);
|
|
242
|
+
}
|
|
255
243
|
}
|
|
256
244
|
//#endregion
|
|
257
245
|
//#region extensions/matrix/src/matrix/sdk/idb-persistence-lock.ts
|
|
258
246
|
const MATRIX_IDB_PERSIST_INTERVAL_MS = 6e4;
|
|
259
|
-
const IDB_SNAPSHOT_LOCK_STALE_MS = 3e5;
|
|
260
|
-
const IDB_SNAPSHOT_LOCK_RETRY_BASE = {
|
|
261
|
-
factor: 2,
|
|
262
|
-
minTimeout: 50,
|
|
263
|
-
maxTimeout: 5e3,
|
|
264
|
-
randomize: true
|
|
265
|
-
};
|
|
266
|
-
function resolveRetriesForMinimumWindowMs(retries, minimumWindowMs) {
|
|
267
|
-
const resolved = {
|
|
268
|
-
...retries,
|
|
269
|
-
retries: 0
|
|
270
|
-
};
|
|
271
|
-
let total = 0;
|
|
272
|
-
while (total < minimumWindowMs) {
|
|
273
|
-
total += Math.min(retries.maxTimeout, Math.max(retries.minTimeout, retries.minTimeout * retries.factor ** resolved.retries));
|
|
274
|
-
resolved.retries += 1;
|
|
275
|
-
}
|
|
276
|
-
return resolved;
|
|
277
|
-
}
|
|
278
247
|
const MATRIX_IDB_SNAPSHOT_LOCK_OPTIONS = {
|
|
279
|
-
retries:
|
|
280
|
-
|
|
248
|
+
retries: {
|
|
249
|
+
retries: 18,
|
|
250
|
+
factor: 2,
|
|
251
|
+
minTimeout: 50,
|
|
252
|
+
maxTimeout: 5e3,
|
|
253
|
+
randomize: true
|
|
254
|
+
},
|
|
255
|
+
stale: 3e5
|
|
281
256
|
};
|
|
282
257
|
//#endregion
|
|
283
258
|
//#region extensions/matrix/src/matrix/sdk/live-room-readiness.ts
|
|
@@ -459,35 +434,33 @@ var MatrixRecoveryKeyStore = class {
|
|
|
459
434
|
this.closed = true;
|
|
460
435
|
await this.drainPendingPersistence();
|
|
461
436
|
}
|
|
462
|
-
|
|
463
|
-
|
|
437
|
+
readSecretStorageKey(requestedKeys, allowCached) {
|
|
438
|
+
return this.afterPersistence(async () => {
|
|
464
439
|
if (this.closed) return null;
|
|
465
|
-
const requestedKeyIds =
|
|
440
|
+
const requestedKeyIds = requestedKeys();
|
|
466
441
|
if (requestedKeyIds.length === 0) return null;
|
|
467
442
|
const staged = this.resolveStagedSecretStorageKey(requestedKeyIds);
|
|
468
443
|
if (staged) return staged;
|
|
469
|
-
for (const keyId of requestedKeyIds) {
|
|
444
|
+
if (allowCached) for (const keyId of requestedKeyIds) {
|
|
470
445
|
const cached = this.secretStorageKeyCache.get(keyId);
|
|
471
446
|
if (cached) return [keyId, new Uint8Array(cached)];
|
|
472
447
|
}
|
|
473
448
|
const pending = this.pendingPersistence;
|
|
474
449
|
const stored = await this.loadStoredRecoveryKey();
|
|
475
450
|
if (this.closed) return null;
|
|
476
|
-
if (pending !== this.pendingPersistence) return
|
|
451
|
+
if (pending !== this.pendingPersistence) return this.readSecretStorageKey(requestedKeys, allowCached);
|
|
477
452
|
if (!stored?.privateKeyBase64) return null;
|
|
478
453
|
const privateKey = new Uint8Array(Buffer.from(stored.privateKeyBase64, "base64"));
|
|
479
454
|
if (privateKey.length === 0) return null;
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
const firstRequestedKeyId = requestedKeyIds[0];
|
|
485
|
-
if (!firstRequestedKeyId) return null;
|
|
486
|
-
this.rememberSecretStorageKey(firstRequestedKeyId, privateKey);
|
|
487
|
-
return [firstRequestedKeyId, privateKey];
|
|
455
|
+
const keyId = stored.keyId && requestedKeyIds.includes(stored.keyId) ? stored.keyId : requestedKeyIds[0];
|
|
456
|
+
if (!keyId) return null;
|
|
457
|
+
this.rememberSecretStorageKey(keyId, privateKey);
|
|
458
|
+
return [keyId, privateKey];
|
|
488
459
|
});
|
|
460
|
+
}
|
|
461
|
+
buildCryptoCallbacks() {
|
|
489
462
|
return {
|
|
490
|
-
getSecretStorageKey,
|
|
463
|
+
getSecretStorageKey: ({ keys }, _name) => this.readSecretStorageKey(() => Object.keys(keys ?? {}), true),
|
|
491
464
|
cacheSecretStorageKey: (keyId, keyInfo, key) => {
|
|
492
465
|
if (this.closed) return;
|
|
493
466
|
const privateKey = new Uint8Array(key);
|
|
@@ -514,24 +487,12 @@ var MatrixRecoveryKeyStore = class {
|
|
|
514
487
|
};
|
|
515
488
|
}
|
|
516
489
|
getSecretStorageKeyCandidate(keyId) {
|
|
517
|
-
return this.
|
|
518
|
-
if (this.closed) return null;
|
|
490
|
+
return this.readSecretStorageKey(() => {
|
|
519
491
|
const normalizedKeyId = keyId.trim();
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
if (staged) return staged[1];
|
|
523
|
-
const pending = this.pendingPersistence;
|
|
524
|
-
const stored = await this.loadStoredRecoveryKey();
|
|
525
|
-
if (this.closed) return null;
|
|
526
|
-
if (pending !== this.pendingPersistence) return this.getSecretStorageKeyCandidate(keyId);
|
|
527
|
-
if (!stored?.privateKeyBase64) return null;
|
|
528
|
-
const privateKey = new Uint8Array(Buffer.from(stored.privateKeyBase64, "base64"));
|
|
529
|
-
if (privateKey.length === 0) return null;
|
|
530
|
-
this.rememberSecretStorageKey(normalizedKeyId, privateKey);
|
|
531
|
-
return privateKey;
|
|
532
|
-
});
|
|
492
|
+
return normalizedKeyId ? [normalizedKeyId] : [];
|
|
493
|
+
}, false).then((resolved) => resolved?.[1] ?? null);
|
|
533
494
|
}
|
|
534
|
-
|
|
495
|
+
stageEncodedRecoveryKey(params) {
|
|
535
496
|
const encodedPrivateKey = params.encodedPrivateKey.trim();
|
|
536
497
|
if (!encodedPrivateKey) throw new Error("Matrix recovery key is required");
|
|
537
498
|
let privateKey;
|
|
@@ -541,24 +502,16 @@ var MatrixRecoveryKeyStore = class {
|
|
|
541
502
|
throw new Error(`Invalid Matrix recovery key: ${formatErrorMessage(err)}`, { cause: err });
|
|
542
503
|
}
|
|
543
504
|
const keyId = typeof params.keyId === "string" && params.keyId.trim() ? params.keyId.trim() : null;
|
|
544
|
-
|
|
545
|
-
encodedPrivateKey,
|
|
546
|
-
privateKey,
|
|
547
|
-
keyId,
|
|
548
|
-
keyInfo: params.keyInfo
|
|
549
|
-
};
|
|
550
|
-
}
|
|
551
|
-
stageEncodedRecoveryKey(params) {
|
|
552
|
-
const prepared = this.resolveEncodedRecoveryKeyInput(params);
|
|
505
|
+
const preparedKeyInfo = params.keyInfo;
|
|
553
506
|
return this.enqueuePersistence(async () => {
|
|
554
|
-
const keyInfo =
|
|
507
|
+
const keyInfo = preparedKeyInfo ?? (await this.loadStoredRecoveryKey())?.keyInfo;
|
|
555
508
|
this.clearStagedCache();
|
|
556
509
|
this.stagedRecoveryKey = {
|
|
557
510
|
version: 1,
|
|
558
511
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
559
|
-
keyId
|
|
560
|
-
encodedPrivateKey
|
|
561
|
-
privateKeyBase64: Buffer.from(
|
|
512
|
+
keyId,
|
|
513
|
+
encodedPrivateKey,
|
|
514
|
+
privateKeyBase64: Buffer.from(privateKey).toString("base64"),
|
|
562
515
|
keyInfo
|
|
563
516
|
};
|
|
564
517
|
});
|
|
@@ -592,9 +545,8 @@ var MatrixRecoveryKeyStore = class {
|
|
|
592
545
|
async bootstrapSecretStorageWithRecoveryKey(crypto, options = {}) {
|
|
593
546
|
await this.drainPendingPersistence();
|
|
594
547
|
let status = null;
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
status = await getSecretStorageStatus.call(crypto);
|
|
548
|
+
try {
|
|
549
|
+
status = await crypto.getSecretStorageStatus();
|
|
598
550
|
} catch (err) {
|
|
599
551
|
LogService.warn("MatrixClientLite", "Failed to read secret storage status:", err);
|
|
600
552
|
}
|
|
@@ -626,7 +578,6 @@ var MatrixRecoveryKeyStore = class {
|
|
|
626
578
|
if (stagedRecovery) this.stagedRecoveryKeyUsed = true;
|
|
627
579
|
return recoveryKey;
|
|
628
580
|
}
|
|
629
|
-
if (typeof crypto.createRecoveryKeyFromPassphrase !== "function") throw new Error("Matrix crypto backend does not support recovery key generation (createRecoveryKeyFromPassphrase missing)");
|
|
630
581
|
recoveryKey = await crypto.createRecoveryKeyFromPassphrase();
|
|
631
582
|
await this.saveRecoveryKeyToDisk(recoveryKey);
|
|
632
583
|
generatedRecoveryKey = true;
|
|
@@ -763,7 +714,7 @@ var MatrixSendScheduler = class extends MatrixScheduler {
|
|
|
763
714
|
//#region extensions/matrix/src/matrix/sdk/client-base.ts
|
|
764
715
|
const MATRIX_ENCRYPTED_STARTUP_TIMEOUT_MS = 6e4;
|
|
765
716
|
let loadedMatrixCryptoRuntime = null;
|
|
766
|
-
const loadMatrixCryptoRuntime = createLazyRuntimeModule(() => import("./crypto-runtime-
|
|
717
|
+
const loadMatrixCryptoRuntime = createLazyRuntimeModule(() => import("./crypto-runtime-CpJ0b7vY.mjs").then((runtime) => {
|
|
767
718
|
loadedMatrixCryptoRuntime = runtime;
|
|
768
719
|
return runtime;
|
|
769
720
|
}));
|
|
@@ -773,7 +724,7 @@ var MatrixClientBase = class {
|
|
|
773
724
|
return withoutMatrixSendCurrentness(() => this.cryptoRequestOwner.run({
|
|
774
725
|
callerAuthority: captureChannelReadAuthority(),
|
|
775
726
|
requestSignal
|
|
776
|
-
}, run));
|
|
727
|
+
}, () => withEffectAuthority(void 0, run)));
|
|
777
728
|
}
|
|
778
729
|
constructor(homeserver, accessToken, opts = {}) {
|
|
779
730
|
this.emitter = new EventEmitter();
|
|
@@ -905,26 +856,13 @@ var MatrixClientBase = class {
|
|
|
905
856
|
this.verificationManager ??= new runtime.MatrixVerificationManager({
|
|
906
857
|
onSummaryChanged: (summary) => this.emitter.emit("verification.summary", summary),
|
|
907
858
|
trustOwnDeviceAfterSas: async (deviceId) => {
|
|
908
|
-
|
|
909
|
-
if (typeof crypto?.crossSignDevice !== "function") return;
|
|
910
|
-
await crypto.crossSignDevice(deviceId);
|
|
859
|
+
await this.client.getCrypto()?.crossSignDevice(deviceId);
|
|
911
860
|
}
|
|
912
861
|
});
|
|
913
862
|
this.cryptoBootstrapper ??= new runtime.MatrixCryptoBootstrapper({
|
|
914
863
|
getUserId: () => this.getUserId(),
|
|
915
864
|
getPassword: () => this.password,
|
|
916
|
-
canUnlockSecretStorage: async () =>
|
|
917
|
-
const secretStorage = this.client.secretStorage;
|
|
918
|
-
if (!secretStorage || typeof secretStorage.getDefaultKeyId !== "function" || typeof secretStorage.getKey !== "function" || typeof secretStorage.checkKey !== "function") return false;
|
|
919
|
-
const defaultKeyId = await secretStorage.getDefaultKeyId();
|
|
920
|
-
if (!defaultKeyId) return false;
|
|
921
|
-
const keyTuple = await secretStorage.getKey(defaultKeyId);
|
|
922
|
-
const key = await this.recoveryKeyStore.getSecretStorageKeyCandidate(defaultKeyId);
|
|
923
|
-
if (!keyTuple || !key) return false;
|
|
924
|
-
const keyInfo = keyTuple[1];
|
|
925
|
-
if (!keyInfo.iv?.trim() || !keyInfo.mac?.trim()) return false;
|
|
926
|
-
return await secretStorage.checkKey(key, keyInfo);
|
|
927
|
-
},
|
|
865
|
+
canUnlockSecretStorage: async () => await this.checkSecretStorageKey() === true,
|
|
928
866
|
getDeviceId: () => this.client.getDeviceId(),
|
|
929
867
|
verificationManager: this.verificationManager,
|
|
930
868
|
recoveryKeyStore: this.recoveryKeyStore,
|
|
@@ -938,6 +876,19 @@ var MatrixClientBase = class {
|
|
|
938
876
|
downloadContent: (mxcUrl, opts) => this.downloadContent(mxcUrl, opts)
|
|
939
877
|
});
|
|
940
878
|
}
|
|
879
|
+
async checkSecretStorageKey(expectedKeyId) {
|
|
880
|
+
const secretStorage = this.client.secretStorage;
|
|
881
|
+
const defaultKeyId = await secretStorage.getDefaultKeyId();
|
|
882
|
+
if (expectedKeyId !== void 0 && defaultKeyId !== expectedKeyId) return false;
|
|
883
|
+
if (!defaultKeyId) return;
|
|
884
|
+
const keyTuple = await secretStorage.getKey(defaultKeyId);
|
|
885
|
+
const key = await this.recoveryKeyStore.getSecretStorageKeyCandidate(defaultKeyId);
|
|
886
|
+
if (!keyTuple || !key) return;
|
|
887
|
+
const keyInfo = keyTuple[1];
|
|
888
|
+
if (!keyInfo.iv?.trim() || !keyInfo.mac?.trim()) return;
|
|
889
|
+
const valid = await secretStorage.checkKey(key, keyInfo);
|
|
890
|
+
return await secretStorage.getDefaultKeyId() === defaultKeyId && valid;
|
|
891
|
+
}
|
|
941
892
|
async start(opts = {}) {
|
|
942
893
|
await this.startSyncSession({
|
|
943
894
|
bootstrapCrypto: true,
|
|
@@ -1452,7 +1403,7 @@ function isMatrixDeviceOwnerVerified(status) {
|
|
|
1452
1403
|
return status?.crossSigningVerified === true;
|
|
1453
1404
|
}
|
|
1454
1405
|
function isMatrixDeviceVerifiedInCurrentClient(status) {
|
|
1455
|
-
return status?.isVerified
|
|
1406
|
+
return status?.isVerified() === true || status?.localVerified === true || isMatrixDeviceOwnerVerified(status);
|
|
1456
1407
|
}
|
|
1457
1408
|
async function trustMatrixOwnIdentity(crypto) {
|
|
1458
1409
|
const ownIdentity = typeof crypto.getOwnIdentity === "function" ? await crypto.getOwnIdentity().catch(() => void 0) : void 0;
|
|
@@ -1486,16 +1437,14 @@ var MatrixClientVerification = class extends MatrixClientCore {
|
|
|
1486
1437
|
let keyLoadError = null;
|
|
1487
1438
|
if (serverVersion && (shouldLoadBackupKey || shouldActivateBackup)) {
|
|
1488
1439
|
if (shouldLoadBackupKey) {
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
}
|
|
1496
|
-
} else keyLoadError = "Matrix crypto backend does not support loading backup keys from secret storage";
|
|
1440
|
+
keyLoadAttempted = true;
|
|
1441
|
+
try {
|
|
1442
|
+
await crypto.loadSessionBackupPrivateKeyFromSecretStorage();
|
|
1443
|
+
} catch (err) {
|
|
1444
|
+
keyLoadError = formatErrorMessage(err);
|
|
1445
|
+
}
|
|
1497
1446
|
}
|
|
1498
|
-
if (!keyLoadError) await
|
|
1447
|
+
if (!keyLoadError) await crypto.checkKeyBackupAndEnable();
|
|
1499
1448
|
({activeVersion, decryptionKeyCached} = await this.resolveRoomKeyBackupLocalState(crypto));
|
|
1500
1449
|
({serverVersion, trusted, matchesDecryptionKey} = await this.resolveRoomKeyBackupTrustState(crypto, serverVersion));
|
|
1501
1450
|
}
|
|
@@ -1521,7 +1470,7 @@ var MatrixClientVerification = class extends MatrixClientCore {
|
|
|
1521
1470
|
};
|
|
1522
1471
|
const crypto = this.client.getCrypto();
|
|
1523
1472
|
let deviceStatus = null;
|
|
1524
|
-
if (crypto && normalizedUserId && normalizedDeviceId
|
|
1473
|
+
if (crypto && normalizedUserId && normalizedDeviceId) deviceStatus = await crypto.getDeviceVerificationStatus(normalizedUserId, normalizedDeviceId).catch(() => null);
|
|
1525
1474
|
const { isMatrixDeviceVerifiedInCurrentClient } = await loadMatrixCryptoRuntime();
|
|
1526
1475
|
return {
|
|
1527
1476
|
encryptionEnabled: true,
|
|
@@ -1567,19 +1516,12 @@ var MatrixClientVerification = class extends MatrixClientCore {
|
|
|
1567
1516
|
const crypto = this.client.getCrypto();
|
|
1568
1517
|
if (crypto) await trustMatrixOwnIdentity(crypto);
|
|
1569
1518
|
}
|
|
1570
|
-
async resolveActiveRoomKeyBackupVersion(crypto) {
|
|
1571
|
-
if (typeof crypto.getActiveSessionBackupVersion !== "function") return null;
|
|
1572
|
-
const version = await crypto.getActiveSessionBackupVersion().catch(() => null);
|
|
1573
|
-
return normalizeNullableString(version);
|
|
1574
|
-
}
|
|
1575
1519
|
async resolveCachedRoomKeyBackupDecryptionKey(crypto) {
|
|
1576
|
-
const
|
|
1577
|
-
if (typeof read !== "function") return null;
|
|
1578
|
-
const key = await read.call(crypto).catch(() => null);
|
|
1520
|
+
const key = await crypto.getSessionBackupPrivateKey().catch(() => null);
|
|
1579
1521
|
return key ? key.length > 0 : false;
|
|
1580
1522
|
}
|
|
1581
1523
|
async resolveRoomKeyBackupLocalState(crypto) {
|
|
1582
|
-
const [activeVersion, decryptionKeyCached] = await Promise.all([
|
|
1524
|
+
const [activeVersion, decryptionKeyCached] = await Promise.all([crypto.getActiveSessionBackupVersion().then(normalizeNullableString, () => null), this.resolveCachedRoomKeyBackupDecryptionKey(crypto)]);
|
|
1583
1525
|
return {
|
|
1584
1526
|
activeVersion,
|
|
1585
1527
|
decryptionKeyCached
|
|
@@ -1587,38 +1529,25 @@ var MatrixClientVerification = class extends MatrixClientCore {
|
|
|
1587
1529
|
}
|
|
1588
1530
|
async shouldForceSecretStorageRecreationForBackupReset(crypto) {
|
|
1589
1531
|
if (await this.resolveCachedRoomKeyBackupDecryptionKey(crypto) !== false) return false;
|
|
1590
|
-
const loadSessionBackupPrivateKeyFromSecretStorage = crypto.loadSessionBackupPrivateKeyFromSecretStorage;
|
|
1591
|
-
if (typeof loadSessionBackupPrivateKeyFromSecretStorage !== "function") return false;
|
|
1592
1532
|
try {
|
|
1593
|
-
await loadSessionBackupPrivateKeyFromSecretStorage
|
|
1533
|
+
await crypto.loadSessionBackupPrivateKeyFromSecretStorage();
|
|
1594
1534
|
return false;
|
|
1595
1535
|
} catch (err) {
|
|
1596
1536
|
return isRepairableSecretStorageAccessError(err);
|
|
1597
1537
|
}
|
|
1598
1538
|
}
|
|
1599
1539
|
async resolveRoomKeyBackupTrustState(crypto, fallbackVersion) {
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
if (typeof crypto.getKeyBackupInfo === "function") {
|
|
1604
|
-
const info = await crypto.getKeyBackupInfo().catch(() => null);
|
|
1605
|
-
serverVersion = normalizeNullableString(info?.version) ?? serverVersion;
|
|
1606
|
-
if (info && typeof crypto.isKeyBackupTrusted === "function") {
|
|
1607
|
-
const trustInfo = await crypto.isKeyBackupTrusted(info).catch(() => null);
|
|
1608
|
-
trusted = typeof trustInfo?.trusted === "boolean" ? trustInfo.trusted : null;
|
|
1609
|
-
matchesDecryptionKey = typeof trustInfo?.matchesDecryptionKey === "boolean" ? trustInfo.matchesDecryptionKey : null;
|
|
1610
|
-
}
|
|
1611
|
-
}
|
|
1540
|
+
const info = await crypto.getKeyBackupInfo().catch(() => null);
|
|
1541
|
+
const serverVersion = normalizeNullableString(info?.version) ?? fallbackVersion;
|
|
1542
|
+
const trustInfo = info ? await crypto.isKeyBackupTrusted(info).catch(() => null) : null;
|
|
1612
1543
|
return {
|
|
1613
1544
|
serverVersion,
|
|
1614
|
-
trusted,
|
|
1615
|
-
matchesDecryptionKey
|
|
1545
|
+
trusted: trustInfo?.trusted ?? null,
|
|
1546
|
+
matchesDecryptionKey: trustInfo?.matchesDecryptionKey ?? null
|
|
1616
1547
|
};
|
|
1617
1548
|
}
|
|
1618
1549
|
async resolveDefaultSecretStorageKeyId(crypto) {
|
|
1619
|
-
|
|
1620
|
-
if (typeof getSecretStorageStatus !== "function") return;
|
|
1621
|
-
return (await getSecretStorageStatus.call(crypto).catch(() => null))?.defaultKeyId;
|
|
1550
|
+
return (await crypto?.getSecretStorageStatus().catch(() => null))?.defaultKeyId;
|
|
1622
1551
|
}
|
|
1623
1552
|
async resolveRoomKeyBackupVersion() {
|
|
1624
1553
|
try {
|
|
@@ -1628,10 +1557,6 @@ var MatrixClientVerification = class extends MatrixClientCore {
|
|
|
1628
1557
|
return null;
|
|
1629
1558
|
}
|
|
1630
1559
|
}
|
|
1631
|
-
async enableTrustedRoomKeyBackupIfPossible(crypto) {
|
|
1632
|
-
if (typeof crypto.checkKeyBackupAndEnable !== "function") return;
|
|
1633
|
-
await crypto.checkKeyBackupAndEnable();
|
|
1634
|
-
}
|
|
1635
1560
|
async ensureRoomKeyBackupEnabled(crypto) {
|
|
1636
1561
|
if (await this.resolveRoomKeyBackupVersion()) return;
|
|
1637
1562
|
LogService.info("MatrixClientLite", "No room key backup version found on server, creating one via secret storage bootstrap");
|
|
@@ -1699,14 +1624,13 @@ var MatrixClient = class extends MatrixClientVerification {
|
|
|
1699
1624
|
const cryptoBootstrapper = this.cryptoBootstrapper;
|
|
1700
1625
|
if (!cryptoBootstrapper) return await fail("Matrix crypto bootstrapper is not available");
|
|
1701
1626
|
await cryptoBootstrapper.bootstrap(crypto, { allowAutomaticCrossSigningReset: false });
|
|
1702
|
-
await
|
|
1627
|
+
await crypto.checkKeyBackupAndEnable();
|
|
1703
1628
|
const status = await this.getOwnDeviceVerificationStatus();
|
|
1704
1629
|
const backupUsable = resolveMatrixRoomKeyBackupReadinessError(status.backup, { requireServerBackup: true }) === null;
|
|
1705
1630
|
const stagedRecoveryKeyUsed = this.recoveryKeyStore.hasStagedRecoveryKeyBeenUsed();
|
|
1706
|
-
const
|
|
1707
|
-
const stagedRecoveryKeyConfirmedBySecretStorage =
|
|
1708
|
-
|
|
1709
|
-
return await settleRecoveryKey(status, stagedRecoveryKeyUsed && (stagedRecoveryKeyConfirmedBySecretStorage || stagedRecoveryKeyUsed && !stagedRecoveryKeyRejectedBySecretStorage && !stagedRecoveryKeyConfirmedBySecretStorage && !backupUsableBeforeStagedRecovery && backupUsable) || storedRecoveryKeyMatches && backupUsable);
|
|
1631
|
+
const stagedKeyValid = await this.checkSecretStorageKey(stagedKeyId ?? void 0).catch(() => void 0);
|
|
1632
|
+
const stagedRecoveryKeyConfirmedBySecretStorage = stagedKeyValid === true;
|
|
1633
|
+
return await settleRecoveryKey(status, stagedRecoveryKeyUsed && (stagedRecoveryKeyConfirmedBySecretStorage || stagedRecoveryKeyUsed && !(stagedKeyValid === false) && !stagedRecoveryKeyConfirmedBySecretStorage && !backupUsableBeforeStagedRecovery && backupUsable) || storedRecoveryKeyMatches && backupUsable);
|
|
1710
1634
|
} catch (err) {
|
|
1711
1635
|
await this.recoveryKeyStore.discardStagedRecoveryKey();
|
|
1712
1636
|
return await fail(formatErrorMessage(err));
|
|
@@ -1746,18 +1670,14 @@ var MatrixClient = class extends MatrixClientVerification {
|
|
|
1746
1670
|
await this.recoveryKeyStore.discardStagedRecoveryKey();
|
|
1747
1671
|
return await fail(backupError);
|
|
1748
1672
|
}
|
|
1749
|
-
if (typeof crypto.restoreKeyBackup !== "function") {
|
|
1750
|
-
await this.recoveryKeyStore.discardStagedRecoveryKey();
|
|
1751
|
-
return await fail("Matrix crypto backend does not support full key backup restore");
|
|
1752
|
-
}
|
|
1753
1673
|
const restore = await crypto.restoreKeyBackup();
|
|
1754
1674
|
if (rawRecoveryKey) await this.recoveryKeyStore.commitStagedRecoveryKey({ keyId: await this.resolveDefaultSecretStorageKeyId(crypto) });
|
|
1755
1675
|
const finalBackup = await this.getRoomKeyBackupStatus();
|
|
1756
1676
|
return {
|
|
1757
1677
|
success: true,
|
|
1758
1678
|
backupVersion: backup.serverVersion,
|
|
1759
|
-
imported:
|
|
1760
|
-
total:
|
|
1679
|
+
imported: restore.imported,
|
|
1680
|
+
total: restore.total,
|
|
1761
1681
|
loadedFromSecretStorage,
|
|
1762
1682
|
restoredAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1763
1683
|
backup: finalBackup
|
|
@@ -1803,7 +1723,7 @@ var MatrixClient = class extends MatrixClientVerification {
|
|
|
1803
1723
|
forceNewRecoveryKey: options.rotateRecoveryKey === true,
|
|
1804
1724
|
allowSecretStorageRecreateWithoutRecoveryKey: true
|
|
1805
1725
|
});
|
|
1806
|
-
await
|
|
1726
|
+
await crypto.checkKeyBackupAndEnable();
|
|
1807
1727
|
const backup = await this.getRoomKeyBackupStatus();
|
|
1808
1728
|
const createdVersion = backup.serverVersion;
|
|
1809
1729
|
if (!createdVersion) return await fail("Matrix room key backup is still missing after reset.");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as getMatrixScopedEnvVarNames } from "./env-vars-
|
|
1
|
+
import { t as getMatrixScopedEnvVarNames } from "./env-vars-aEBngJPa.mjs";
|
|
2
2
|
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
3
3
|
import { collectSecretInputAssignment, createChannelSecretTargetRegistryEntries, getChannelSurface, hasConfiguredSecretInputValue, hasOwnProperty, normalizeSecretStringValue } from "openclaw/plugin-sdk/channel-secret-basic-runtime";
|
|
4
4
|
//#region extensions/matrix/src/secret-contract.ts
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries, t as channelSecrets } from "./secret-contract-
|
|
1
|
+
import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries, t as channelSecrets } from "./secret-contract-DSBRvhdZ.mjs";
|
|
2
2
|
import "../secret-contract-api.js";
|
|
3
3
|
export { channelSecrets, collectRuntimeConfigAssignments, secretTargetRegistryEntries };
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { i as __exportAll } from "./doctor-contract-CsTNmbMa.mjs";
|
|
2
2
|
import { t as getMatrixRuntime } from "./runtime-1kn1P6io.mjs";
|
|
3
3
|
import { a as resolveMatrixAccountConfig } from "./account-config-CRsKoMqJ.mjs";
|
|
4
|
-
import {
|
|
4
|
+
import { a as normalizeMatrixResolvableTarget, n as isMatrixQualifiedUserId } from "./target-ids-HhcaKX1n.mjs";
|
|
5
5
|
import { n as withMatrixSendCurrentness, o as buildMatrixReactionContent, t as captureMatrixSendCurrentness } from "./send-currentness-C2rMVVIQ.mjs";
|
|
6
|
-
import { _ as MsgType, d as buildMatrixMessageRelation, f as resolveMatrixReplyToEventId, g as MSC4357_LIVE_KEY, l as isStrictDirectRoom, m as EventType, n as inspectMatrixDirectRooms, p as resolveMatrixThreadRootId, r as persistMatrixDirectRoomMapping, v as RelationType } from "./direct-management-
|
|
7
|
-
import { n as getMatrixEventProjection } from "./event-helpers-
|
|
6
|
+
import { _ as MsgType, d as buildMatrixMessageRelation, f as resolveMatrixReplyToEventId, g as MSC4357_LIVE_KEY, l as isStrictDirectRoom, m as EventType, n as inspectMatrixDirectRooms, p as resolveMatrixThreadRootId, r as persistMatrixDirectRoomMapping, v as RelationType } from "./direct-management-B3wYhx_M.mjs";
|
|
7
|
+
import { n as getMatrixEventProjection } from "./event-helpers-CxNgMQqH.mjs";
|
|
8
8
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
9
9
|
import { createMessageReceiptFromOutboundResults } from "openclaw/plugin-sdk/channel-outbound";
|
|
10
|
+
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
10
11
|
import { asFiniteNumber, asNullableObjectRecord, asNullableRecord, isRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeOptionalStringifiedId } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
11
12
|
import { FormatCapabilityProfile, convertMarkdownTables, findCodeRegions, isInsideCode, markdownToIR, renderMarkdownWithMarkers, tokenizeHtmlTags } from "openclaw/plugin-sdk/text-chunking";
|
|
12
13
|
import { createHash } from "node:crypto";
|
|
13
14
|
import path from "node:path";
|
|
14
|
-
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
15
15
|
import { isVoiceMessageCompatibleAudio } from "openclaw/plugin-sdk/media-runtime";
|
|
16
16
|
import { loadOutboundMediaFromUrl } from "openclaw/plugin-sdk/outbound-media";
|
|
17
17
|
import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime";
|
|
@@ -23,12 +23,11 @@ import MarkdownIt from "markdown-it";
|
|
|
23
23
|
import { isAutoLinkedFileRef } from "openclaw/plugin-sdk/text-autolink-runtime";
|
|
24
24
|
import { parseBuffer } from "music-metadata";
|
|
25
25
|
//#region extensions/matrix/src/matrix/send/client.ts
|
|
26
|
-
const loadMatrixSendClientRuntime = createLazyRuntimeModule(() => import("./client-bootstrap-
|
|
26
|
+
const loadMatrixSendClientRuntime = createLazyRuntimeModule(() => import("./client-bootstrap-D05xy1HB.mjs"));
|
|
27
27
|
function resolveMediaMaxBytes(accountId, cfg) {
|
|
28
28
|
if (!cfg) throw new Error("Matrix media limits requires a resolved runtime config. Load and resolve config at the command or gateway boundary, then pass cfg through the runtime path.");
|
|
29
|
-
const resolvedCfg = requireRuntimeConfig(cfg, "Matrix media limits");
|
|
30
29
|
const mediaMaxMb = resolveMatrixAccountConfig({
|
|
31
|
-
cfg
|
|
30
|
+
cfg,
|
|
32
31
|
accountId
|
|
33
32
|
}).mediaMaxMb;
|
|
34
33
|
return typeof mediaMaxMb === "number" && mediaMaxMb > 0 ? mediaMaxMb * 1024 * 1024 : void 0;
|
|
@@ -209,7 +208,7 @@ function isPlan(value) {
|
|
|
209
208
|
function decodePlan(bytes) {
|
|
210
209
|
let value;
|
|
211
210
|
try {
|
|
212
|
-
value = JSON.parse(new TextDecoder().decode(bytes));
|
|
211
|
+
value = JSON.parse(new TextDecoder("utf-8", { fatal: true }).decode(bytes));
|
|
213
212
|
} catch {
|
|
214
213
|
throw new MatrixDeliveryPlanInvariantError("Matrix durable delivery plan is invalid JSON");
|
|
215
214
|
}
|
|
@@ -297,8 +296,7 @@ function assertCompletePartTopology(plans) {
|
|
|
297
296
|
const partCount = plans[0]?.partCount;
|
|
298
297
|
if (!partCount) throw new MatrixDeliveryPlanInvariantError("Matrix ambiguous delivery has no event plan");
|
|
299
298
|
if (plans.some((plan) => plan.partCount !== partCount)) throw new MatrixDeliveryPlanInvariantError("Matrix durable delivery plan part topology is inconsistent");
|
|
300
|
-
|
|
301
|
-
if (storedParts.size !== partCount || Array.from({ length: partCount }, (_, partIndex) => partIndex).some((partIndex) => !storedParts.has(partIndex))) throw new MatrixDeliveryPlanInvariantError("Matrix ambiguous delivery has an incomplete event plan");
|
|
299
|
+
if (new Set(plans.map((plan) => plan.partIndex)).size !== partCount) throw new MatrixDeliveryPlanInvariantError("Matrix ambiguous delivery has an incomplete event plan");
|
|
302
300
|
}
|
|
303
301
|
async function requireTransactionScope(client) {
|
|
304
302
|
const scope = (await client.getTransactionScopeId()).trim();
|
|
@@ -387,14 +385,6 @@ async function cleanupMatrixDeliveryPlans(ctx) {
|
|
|
387
385
|
}
|
|
388
386
|
//#endregion
|
|
389
387
|
//#region extensions/matrix/src/matrix/poll-types.ts
|
|
390
|
-
/**
|
|
391
|
-
* Matrix Poll Types (MSC3381)
|
|
392
|
-
*
|
|
393
|
-
* Defines types for Matrix poll events:
|
|
394
|
-
* - m.poll.start - Creates a new poll
|
|
395
|
-
* - m.poll.response - Records a vote
|
|
396
|
-
* - m.poll.end - Closes a poll
|
|
397
|
-
*/
|
|
398
388
|
const M_POLL_START = "m.poll.start";
|
|
399
389
|
const M_POLL_RESPONSE = "m.poll.response";
|
|
400
390
|
const M_POLL_END = "m.poll.end";
|
|
@@ -713,22 +703,13 @@ function findInlineMetadataRanges(markdown, references) {
|
|
|
713
703
|
}
|
|
714
704
|
if (markdown[index] === "]" && !isMarkdownEscaped(markdown, index)) labelStack.pop();
|
|
715
705
|
if (markdown[index] === "<") {
|
|
716
|
-
const autolink = /^<[A-Za-z][A-Za-z0-9+.-]{1,31}:[^<>\s]
|
|
706
|
+
const autolink = /^<(?:[A-Za-z][A-Za-z0-9+.-]{1,31}:[^<>\s]*|[^<>\s@]+@[^<>\s@]+)>/u.exec(markdown.slice(index));
|
|
717
707
|
if (autolink && !isMarkdownEscaped(markdown, index)) {
|
|
718
708
|
ranges.push({
|
|
719
709
|
start: index,
|
|
720
710
|
end: index + autolink[0].length
|
|
721
711
|
});
|
|
722
712
|
index += autolink[0].length - 1;
|
|
723
|
-
continue;
|
|
724
|
-
}
|
|
725
|
-
const emailAutolink = /^<[^<>\s@]+@[^<>\s@]+>/u.exec(markdown.slice(index));
|
|
726
|
-
if (emailAutolink && !isMarkdownEscaped(markdown, index)) {
|
|
727
|
-
ranges.push({
|
|
728
|
-
start: index,
|
|
729
|
-
end: index + emailAutolink[0].length
|
|
730
|
-
});
|
|
731
|
-
index += emailAutolink[0].length - 1;
|
|
732
713
|
}
|
|
733
714
|
}
|
|
734
715
|
}
|
|
@@ -1360,8 +1341,7 @@ function chunkMatrixText(text, opts) {
|
|
|
1360
1341
|
...preparedText,
|
|
1361
1342
|
chunks: preparedText.convertedText ? [preparedText.convertedText] : []
|
|
1362
1343
|
};
|
|
1363
|
-
const
|
|
1364
|
-
const chunkMode = getMatrixRuntime().channel.text.resolveChunkMode(cfg, "matrix", opts.accountId);
|
|
1344
|
+
const chunkMode = getMatrixRuntime().channel.text.resolveChunkMode(opts.cfg, "matrix", opts.accountId);
|
|
1365
1345
|
const analysis = analyzeMatrixSpoilers(preparedText.convertedText);
|
|
1366
1346
|
const collisionRedacted = analysis.metadataCollision ? renderMatrixBody(analysis) : void 0;
|
|
1367
1347
|
const chunkSegment = (segmentText) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as resolveMatrixAccountConfig, n as hasExplicitMatrixAccountConfig } from "./account-config-CRsKoMqJ.mjs";
|
|
2
|
-
import "./
|
|
3
|
-
import { n as bootstrapMatrixVerification } from "./verification-
|
|
2
|
+
import "./setup-core-CKnNTfgD.mjs";
|
|
3
|
+
import { n as bootstrapMatrixVerification } from "./verification-B3VswneT.mjs";
|
|
4
4
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
5
5
|
//#region extensions/matrix/src/setup-bootstrap.ts
|
|
6
6
|
async function maybeBootstrapNewEncryptedMatrixAccount(params) {
|