@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,7 +1,7 @@
|
|
|
1
1
|
import { i as __exportAll } from "./doctor-contract-CsTNmbMa.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { n as isMatrixQualifiedUserId } from "./target-ids-HhcaKX1n.mjs";
|
|
3
3
|
import { a as MATRIX_REACTION_EVENT_TYPE, i as MATRIX_ANNOTATION_RELATION_TYPE } from "./send-currentness-C2rMVVIQ.mjs";
|
|
4
|
-
import { asOptionalRecord, normalizeNullableString, normalizeOptionalString, normalizeTrimmedStringList, normalizeUniqueTrimmedStringList
|
|
4
|
+
import { asOptionalRecord, normalizeNullableString, normalizeOptionalString, normalizeTrimmedStringList, normalizeUniqueTrimmedStringList } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
5
|
import { KeyedAsyncQueue } from "openclaw/plugin-sdk/keyed-async-queue";
|
|
6
6
|
//#region extensions/matrix/src/matrix/send/types.ts
|
|
7
7
|
const MsgType = {
|
|
@@ -136,9 +136,6 @@ function normalizeRemoteUserId(remoteUserId) {
|
|
|
136
136
|
if (!isMatrixQualifiedUserId(normalized)) throw new Error(`Matrix user IDs must be fully qualified (got "${remoteUserId}")`);
|
|
137
137
|
return normalized;
|
|
138
138
|
}
|
|
139
|
-
function normalizeRoomIdList(values) {
|
|
140
|
-
return uniqueStrings(Array.from(values, (value) => value.trim()).filter(Boolean));
|
|
141
|
-
}
|
|
142
139
|
function resolveDirectAccountDataWriteQueue(client) {
|
|
143
140
|
const existing = directAccountDataWriteQueues.get(client);
|
|
144
141
|
if (existing) return existing;
|
|
@@ -150,7 +147,7 @@ async function writeMatrixDirectRoomMappings(params) {
|
|
|
150
147
|
return await resolveDirectAccountDataWriteQueue(params.client).enqueue(DIRECT_ACCOUNT_DATA_QUEUE_KEY, async () => {
|
|
151
148
|
const directContentBefore = await readMatrixDirectAccountData(params.client);
|
|
152
149
|
const current = normalizeUniqueTrimmedStringList(directContentBefore[params.remoteUserId]);
|
|
153
|
-
const next =
|
|
150
|
+
const next = normalizeUniqueTrimmedStringList([...params.roomIds, ...current]);
|
|
154
151
|
const directContentAfter = {
|
|
155
152
|
...directContentBefore,
|
|
156
153
|
[params.remoteUserId]: next
|
|
@@ -164,22 +161,6 @@ async function writeMatrixDirectRoomMappings(params) {
|
|
|
164
161
|
};
|
|
165
162
|
});
|
|
166
163
|
}
|
|
167
|
-
async function classifyDirectRoomCandidate(params) {
|
|
168
|
-
const evidence = await inspectMatrixDirectRoomEvidence({
|
|
169
|
-
client: params.client,
|
|
170
|
-
roomId: params.roomId,
|
|
171
|
-
remoteUserId: params.remoteUserId,
|
|
172
|
-
selfUserId: params.selfUserId
|
|
173
|
-
});
|
|
174
|
-
const strict = evidence.strict && (params.source === "account-data" || evidence.memberStateFlag !== false);
|
|
175
|
-
return {
|
|
176
|
-
roomId: params.roomId,
|
|
177
|
-
joinedMembers: evidence.joinedMembers,
|
|
178
|
-
strict,
|
|
179
|
-
explicit: strict && (params.source === "account-data" || evidence.viaMemberState),
|
|
180
|
-
source: params.source
|
|
181
|
-
};
|
|
182
|
-
}
|
|
183
164
|
async function persistMatrixDirectRoomMapping(params) {
|
|
184
165
|
const remoteUserId = normalizeRemoteUserId(params.remoteUserId);
|
|
185
166
|
return (await writeMatrixDirectRoomMappings({
|
|
@@ -196,15 +177,10 @@ async function promoteMatrixDirectRoomCandidate(params) {
|
|
|
196
177
|
remoteUserId,
|
|
197
178
|
selfUserId: params.selfUserId
|
|
198
179
|
});
|
|
199
|
-
if (!evidence.strict) return {
|
|
180
|
+
if (!evidence.strict || evidence.memberStateFlag === false) return {
|
|
200
181
|
classifyAsDirect: false,
|
|
201
182
|
repaired: false,
|
|
202
|
-
reason: "not-strict"
|
|
203
|
-
};
|
|
204
|
-
if (evidence.memberStateFlag === false) return {
|
|
205
|
-
classifyAsDirect: false,
|
|
206
|
-
repaired: false,
|
|
207
|
-
reason: "local-explicit-false"
|
|
183
|
+
reason: evidence.strict ? "local-explicit-false" : "not-strict"
|
|
208
184
|
};
|
|
209
185
|
try {
|
|
210
186
|
const repaired = await persistMatrixDirectRoomMapping({
|
|
@@ -230,33 +206,31 @@ async function promoteMatrixDirectRoomCandidate(params) {
|
|
|
230
206
|
async function inspectMatrixDirectRooms(params) {
|
|
231
207
|
const remoteUserId = normalizeRemoteUserId(params.remoteUserId);
|
|
232
208
|
const selfUserId = normalizeOptionalString(await params.client.getUserId().catch(() => null)) ?? null;
|
|
209
|
+
const classifyRoom = async (roomId, source) => {
|
|
210
|
+
const evidence = await inspectMatrixDirectRoomEvidence({
|
|
211
|
+
client: params.client,
|
|
212
|
+
roomId,
|
|
213
|
+
remoteUserId,
|
|
214
|
+
selfUserId
|
|
215
|
+
});
|
|
216
|
+
const strict = evidence.strict && (source === "account-data" || evidence.memberStateFlag !== false);
|
|
217
|
+
return {
|
|
218
|
+
roomId,
|
|
219
|
+
joinedMembers: evidence.joinedMembers,
|
|
220
|
+
strict,
|
|
221
|
+
explicit: strict && (source === "account-data" || evidence.viaMemberState),
|
|
222
|
+
source
|
|
223
|
+
};
|
|
224
|
+
};
|
|
233
225
|
const directContent = await readMatrixDirectAccountData(params.client).catch(() => ({}));
|
|
234
226
|
const mappedRoomIds = normalizeUniqueTrimmedStringList(directContent[remoteUserId]);
|
|
235
|
-
const mappedRooms = await Promise.all(mappedRoomIds.map(async (roomId) => await
|
|
236
|
-
client: params.client,
|
|
237
|
-
roomId,
|
|
238
|
-
remoteUserId,
|
|
239
|
-
selfUserId,
|
|
240
|
-
source: "account-data"
|
|
241
|
-
})));
|
|
227
|
+
const mappedRooms = await Promise.all(mappedRoomIds.map(async (roomId) => await classifyRoom(roomId, "account-data")));
|
|
242
228
|
const mappedStrict = mappedRooms.find((room) => room.strict);
|
|
243
|
-
|
|
244
|
-
if (typeof params.client.getJoinedRooms === "function") try {
|
|
245
|
-
const resolved = await params.client.getJoinedRooms();
|
|
246
|
-
joinedRooms = Array.isArray(resolved) ? resolved : [];
|
|
247
|
-
} catch {
|
|
248
|
-
joinedRooms = [];
|
|
249
|
-
}
|
|
229
|
+
const joinedRooms = await params.client.getJoinedRooms().catch(() => []);
|
|
250
230
|
const discoveredStrictRooms = [];
|
|
251
|
-
for (const roomId of
|
|
231
|
+
for (const roomId of normalizeUniqueTrimmedStringList(joinedRooms)) {
|
|
252
232
|
if (mappedRoomIds.includes(roomId)) continue;
|
|
253
|
-
const candidate = await
|
|
254
|
-
client: params.client,
|
|
255
|
-
roomId,
|
|
256
|
-
remoteUserId,
|
|
257
|
-
selfUserId,
|
|
258
|
-
source: "joined"
|
|
259
|
-
});
|
|
233
|
+
const candidate = await classifyRoom(roomId, "joined");
|
|
260
234
|
if (candidate.strict) discoveredStrictRooms.push(candidate);
|
|
261
235
|
}
|
|
262
236
|
const discoveredStrictRoomIds = discoveredStrictRooms.map((room) => room.roomId);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { i as __exportAll } from "./doctor-contract-CsTNmbMa.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { u as resolveMatrixAuth } from "./client-
|
|
4
|
-
import { t as MatrixAuthedHttpClient } from "./http-client-
|
|
2
|
+
import { i as normalizeMatrixMessagingTarget, n as isMatrixQualifiedUserId } from "./target-ids-HhcaKX1n.mjs";
|
|
3
|
+
import { u as resolveMatrixAuth } from "./client-vPPbaxNp.mjs";
|
|
4
|
+
import { t as MatrixAuthedHttpClient } from "./http-client-ByR4STVQ.mjs";
|
|
5
5
|
import { isRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
6
|
//#region extensions/matrix/src/directory-live.ts
|
|
7
7
|
var directory_live_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as MsgType } from "./direct-management-
|
|
2
|
-
import { a as sendSingleTextMessageMatrix, f as prepareMatrixSingleText, t as editMessageMatrix } from "./send-
|
|
1
|
+
import { _ as MsgType } from "./direct-management-B3wYhx_M.mjs";
|
|
2
|
+
import { a as sendSingleTextMessageMatrix, f as prepareMatrixSingleText, t as editMessageMatrix } from "./send-LCOuTVc1.mjs";
|
|
3
3
|
import { createFinalizableDraftLifecycle } from "openclaw/plugin-sdk/channel-outbound";
|
|
4
4
|
//#region extensions/matrix/src/matrix/draft-stream.ts
|
|
5
5
|
const DEFAULT_THROTTLE_MS = 1e3;
|
|
@@ -40,7 +40,6 @@ function createMatrixDraftStream(params) {
|
|
|
40
40
|
log?.(`draft-stream: preview exceeded single-event limit (${preparedText.convertedText.length} > ${preparedText.singleEventLimit})`);
|
|
41
41
|
return false;
|
|
42
42
|
}
|
|
43
|
-
if (sendFailed) return false;
|
|
44
43
|
if (preparedText.trimmedText === lastSentText) return true;
|
|
45
44
|
try {
|
|
46
45
|
if (!currentEventId) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { s as resolveMatrixDefaultOrOnlyAccountId } from "./account-selection-
|
|
1
|
+
import { s as resolveMatrixDefaultOrOnlyAccountId } from "./account-selection-Bs_jCAaG.mjs";
|
|
2
2
|
import { t as resolveMatrixConfigFieldPath } from "./config-paths-CnREYb1Y.mjs";
|
|
3
3
|
import { normalizeOptionalAccountId } from "openclaw/plugin-sdk/account-id";
|
|
4
4
|
//#region extensions/matrix/src/matrix/encryption-guidance.ts
|
|
@@ -11,7 +11,7 @@ const MATRIX_SCOPED_ENV_SUFFIXES = [
|
|
|
11
11
|
const MATRIX_GLOBAL_ENV_KEYS = MATRIX_SCOPED_ENV_SUFFIXES.map((suffix) => `MATRIX_${suffix}`);
|
|
12
12
|
const MATRIX_SCOPED_ENV_RE = new RegExp(`^MATRIX_(.+)_(${MATRIX_SCOPED_ENV_SUFFIXES.join("|")})$`);
|
|
13
13
|
function resolveMatrixEnvAccountToken(accountId) {
|
|
14
|
-
return
|
|
14
|
+
return normalizeAccountId(accountId).toUpperCase().replace(/[-_]/g, (char) => char === "-" ? "_X2D_" : "_X5F_");
|
|
15
15
|
}
|
|
16
16
|
function getMatrixScopedEnvVarNames(accountId) {
|
|
17
17
|
const token = resolveMatrixEnvAccountToken(accountId);
|
|
@@ -25,22 +25,7 @@ function getMatrixScopedEnvVarNames(accountId) {
|
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
27
|
function decodeMatrixEnvAccountToken(token) {
|
|
28
|
-
|
|
29
|
-
for (let index = 0; index < token.length;) {
|
|
30
|
-
const hexEscape = /^_X([0-9A-F]+)_/.exec(token.slice(index));
|
|
31
|
-
if (hexEscape) {
|
|
32
|
-
const hex = hexEscape[1];
|
|
33
|
-
const codePoint = hex ? Number.parseInt(hex, 16) : NaN;
|
|
34
|
-
if (!Number.isInteger(codePoint) || codePoint > 1114111) return;
|
|
35
|
-
decoded += String.fromCodePoint(codePoint);
|
|
36
|
-
index += hexEscape[0].length;
|
|
37
|
-
continue;
|
|
38
|
-
}
|
|
39
|
-
const char = token[index];
|
|
40
|
-
if (!char || !/[A-Z0-9]/.test(char)) return;
|
|
41
|
-
decoded += char.toLowerCase();
|
|
42
|
-
index += 1;
|
|
43
|
-
}
|
|
28
|
+
const decoded = token.replace(/_X(?:2D|5F)_/g, (escape) => escape === "_X2D_" ? "-" : "_").toLowerCase();
|
|
44
29
|
const normalized = normalizeOptionalAccountId(decoded);
|
|
45
30
|
if (!normalized) return;
|
|
46
31
|
return resolveMatrixEnvAccountToken(normalized) === token ? normalized : void 0;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
2
|
+
import { safeParseJson, truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
2
3
|
//#region extensions/matrix/src/matrix/sdk/event-helpers.ts
|
|
3
4
|
const matrixEventProjections = /* @__PURE__ */ new WeakMap();
|
|
4
5
|
function getMatrixEventProjection(event) {
|
|
@@ -41,12 +42,9 @@ function parseMxc(url) {
|
|
|
41
42
|
}
|
|
42
43
|
function buildHttpError(statusCode, bodyText) {
|
|
43
44
|
let message = `Matrix HTTP ${statusCode}`;
|
|
44
|
-
if (bodyText.trim())
|
|
45
|
-
const parsed =
|
|
46
|
-
|
|
47
|
-
else message = truncateUtf16Safe(bodyText, 500);
|
|
48
|
-
} catch {
|
|
49
|
-
message = truncateUtf16Safe(bodyText, 500);
|
|
45
|
+
if (bodyText.trim()) {
|
|
46
|
+
const parsed = safeParseJson(bodyText);
|
|
47
|
+
message = normalizeOptionalString(parsed?.error) ?? truncateUtf16Safe(bodyText, 500);
|
|
50
48
|
}
|
|
51
49
|
return Object.assign(new Error(message), { statusCode });
|
|
52
50
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as resolveMatrixAccountConfig } from "./account-config-CRsKoMqJ.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { i as normalizeMatrixUserId } from "./channel.setup-
|
|
2
|
+
import { _ as resolveMatrixAccount, g as resolveDefaultMatrixAccountId } from "./setup-core-CKnNTfgD.mjs";
|
|
3
|
+
import { i as normalizeMatrixUserId } from "./channel.setup-CwuYD_CT.mjs";
|
|
4
4
|
import { doesApprovalRequestSelectChannelAccount } from "openclaw/plugin-sdk/approval-native-runtime";
|
|
5
5
|
import { createChannelApprovalAuth, resolveApprovalApprovers } from "openclaw/plugin-sdk/approval-auth-runtime";
|
|
6
6
|
import { createChannelExecApprovalProfile, getExecApprovalReplyMetadata, isChannelExecApprovalClientEnabledFromConfig, isChannelExecApprovalTargetRecipient, matchesApprovalRequestFilters } from "openclaw/plugin-sdk/approval-client-runtime";
|
|
@@ -40,6 +40,9 @@ function resolveMatrixExecApprovalConfig(params) {
|
|
|
40
40
|
function isMatrixExecApprovalAccountEligible(params) {
|
|
41
41
|
const account = resolveMatrixAccount(params);
|
|
42
42
|
if (!account.enabled || !account.configured) return false;
|
|
43
|
+
return matchesMatrixApprovalConfig(params);
|
|
44
|
+
}
|
|
45
|
+
function matchesMatrixApprovalConfig(params) {
|
|
43
46
|
const config = resolveMatrixExecApprovalConfig(params);
|
|
44
47
|
return isChannelExecApprovalClientEnabledFromConfig({
|
|
45
48
|
enabled: config?.enabled,
|
|
@@ -121,16 +124,7 @@ function isMatrixAnyApprovalClientEnabled(params) {
|
|
|
121
124
|
function shouldHandleMatrixApprovalRequest(params) {
|
|
122
125
|
if (params.approvalKind !== "exec" && params.approvalKind !== "plugin" && params.approvalKind !== "system-agent") return false;
|
|
123
126
|
if (!matchesMatrixRequestAccount(params)) return false;
|
|
124
|
-
|
|
125
|
-
if (!isChannelExecApprovalClientEnabledFromConfig({
|
|
126
|
-
enabled: config?.enabled,
|
|
127
|
-
approverCount: getMatrixApprovalApprovers(params).length
|
|
128
|
-
})) return false;
|
|
129
|
-
return matchesApprovalRequestFilters({
|
|
130
|
-
request: params.request.request,
|
|
131
|
-
agentFilter: config?.agentFilter,
|
|
132
|
-
sessionFilter: config?.sessionFilter
|
|
133
|
-
});
|
|
127
|
+
return matchesMatrixApprovalConfig(params);
|
|
134
128
|
}
|
|
135
129
|
function buildFilterCheckRequest(params) {
|
|
136
130
|
if (params.metadata.approvalKind === "plugin") return {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as getMatrixRuntime } from "./runtime-1kn1P6io.mjs";
|
|
2
|
-
import { t as claimCurrentTokenStorageState } from "./storage-
|
|
3
|
-
import { a as readPersistedStoreFromStore, r as openMatrixSyncCacheStoreOptions, s as writeMatrixSyncCacheStateToStore, t as deleteMatrixSyncCacheStateFromStore } from "./sync-cache-state-
|
|
2
|
+
import { t as claimCurrentTokenStorageState } from "./storage-DkC6bHgA.mjs";
|
|
3
|
+
import { a as readPersistedStoreFromStore, r as openMatrixSyncCacheStoreOptions, s as writeMatrixSyncCacheStateToStore, t as deleteMatrixSyncCacheStateFromStore } from "./sync-cache-state-D4G-fi3t.mjs";
|
|
4
4
|
import { t as LogService } from "./logger-CXQnpXCt.mjs";
|
|
5
5
|
import { MemoryStore, SyncAccumulator } from "matrix-js-sdk/lib/matrix.js";
|
|
6
6
|
import { createAsyncLock } from "openclaw/plugin-sdk/async-lock-runtime";
|
|
@@ -90,9 +90,6 @@ var SqliteBackedMatrixSyncStore = class SqliteBackedMatrixSyncStore extends Memo
|
|
|
90
90
|
if (force) return this.flush();
|
|
91
91
|
return Promise.resolve();
|
|
92
92
|
}
|
|
93
|
-
wantsSave() {
|
|
94
|
-
return false;
|
|
95
|
-
}
|
|
96
93
|
async deleteAllData() {
|
|
97
94
|
const store = this.requireStore();
|
|
98
95
|
this.clearPersistTimer();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as buildHttpError } from "./event-helpers-
|
|
1
|
+
import { t as buildHttpError } from "./event-helpers-CxNgMQqH.mjs";
|
|
2
2
|
import { PlatformMessageNotDispatchedError } from "openclaw/plugin-sdk/error-runtime";
|
|
3
3
|
import { parseMediaContentLength } from "openclaw/plugin-sdk/media-runtime";
|
|
4
4
|
import { buildTimeoutAbortSignal } from "openclaw/plugin-sdk/extension-shared";
|
|
5
|
-
import { captureChannelReadAuthority } from "openclaw/plugin-sdk/fetch-runtime";
|
|
5
|
+
import { captureChannelReadAuthority, captureEffectAuthority } from "openclaw/plugin-sdk/fetch-runtime";
|
|
6
6
|
import { readResponseWithLimit } from "openclaw/plugin-sdk/response-limit-runtime";
|
|
7
7
|
import { fetchWithRuntimeDispatcherOrMockedGlobal } from "openclaw/plugin-sdk/runtime-fetch";
|
|
8
8
|
import { closeDispatcher, createPinnedDispatcher, resolvePinnedHostnameWithPolicy } from "openclaw/plugin-sdk/ssrf-dispatcher";
|
|
@@ -82,22 +82,32 @@ function buildBufferedResponse(params) {
|
|
|
82
82
|
} catch {}
|
|
83
83
|
return response;
|
|
84
84
|
}
|
|
85
|
-
async function
|
|
86
|
-
const contentLength = params.response.headers.get("content-length");
|
|
87
|
-
if (!contentLength) return;
|
|
88
|
-
let length;
|
|
85
|
+
async function consumeMatrixResponse(response, release, options, project) {
|
|
89
86
|
try {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
87
|
+
const contentLength = response.headers.get("content-length");
|
|
88
|
+
if (contentLength) try {
|
|
89
|
+
const length = parseMediaContentLength(contentLength);
|
|
90
|
+
if (!(length === null || length <= options.maxBytes)) throw options.createSizeError(length);
|
|
91
|
+
} catch (error) {
|
|
92
|
+
await response.body?.cancel(error).catch(() => void 0);
|
|
93
|
+
throw error;
|
|
94
|
+
}
|
|
95
|
+
const buffer = await readResponseWithLimit(response, options.maxBytes, {
|
|
96
|
+
...options.readOptions,
|
|
97
|
+
onOverflow: ({ size }) => options.createSizeError(size)
|
|
98
|
+
});
|
|
99
|
+
options.assertCurrent?.();
|
|
100
|
+
return project(buffer);
|
|
101
|
+
} finally {
|
|
102
|
+
try {
|
|
103
|
+
await release();
|
|
104
|
+
} finally {
|
|
105
|
+
options.assertCurrent?.();
|
|
106
|
+
}
|
|
94
107
|
}
|
|
95
|
-
if (length === null || length <= params.maxBytes) return;
|
|
96
|
-
const error = params.createError(length);
|
|
97
|
-
await params.response.body?.cancel(error).catch(() => void 0);
|
|
98
|
-
throw error;
|
|
99
108
|
}
|
|
100
109
|
async function fetchWithMatrixGuardedRedirects(params) {
|
|
110
|
+
const effect = captureEffectAuthority();
|
|
101
111
|
const assertDispatchCurrent = () => {
|
|
102
112
|
params.assertCurrent?.();
|
|
103
113
|
params.assertSendCurrent?.();
|
|
@@ -141,8 +151,17 @@ async function fetchWithMatrixGuardedRedirects(params) {
|
|
|
141
151
|
};
|
|
142
152
|
assertDispatchCurrent();
|
|
143
153
|
signal?.throwIfAborted();
|
|
144
|
-
|
|
145
|
-
const response = await
|
|
154
|
+
let entered = false;
|
|
155
|
+
const response = await effect.initiate(() => {
|
|
156
|
+
entered = true;
|
|
157
|
+
assertDispatchCurrent();
|
|
158
|
+
signal?.throwIfAborted();
|
|
159
|
+
dispatched = true;
|
|
160
|
+
return fetchWithRuntimeDispatcherOrMockedGlobal(fetchUrl, requestInit);
|
|
161
|
+
}).catch((error) => {
|
|
162
|
+
if (!entered) throw new MatrixSdkAuthorityError(error);
|
|
163
|
+
throw error;
|
|
164
|
+
});
|
|
146
165
|
if (!isRedirectStatus(response.status)) return {
|
|
147
166
|
response,
|
|
148
167
|
release: async () => {
|
|
@@ -219,26 +238,15 @@ function createMatrixGuardedFetch(params) {
|
|
|
219
238
|
dispatcherPolicy: params.dispatcherPolicy,
|
|
220
239
|
beforeDispatch: beforeRequest ? () => beforeRequest(resource, init) : void 0
|
|
221
240
|
});
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
source: response,
|
|
232
|
-
body: Uint8Array.from(body),
|
|
233
|
-
url
|
|
234
|
-
});
|
|
235
|
-
} finally {
|
|
236
|
-
try {
|
|
237
|
-
await release();
|
|
238
|
-
} finally {
|
|
239
|
-
assertCurrent?.();
|
|
240
|
-
}
|
|
241
|
-
}
|
|
241
|
+
return await consumeMatrixResponse(response, release, {
|
|
242
|
+
maxBytes: MATRIX_SDK_RESPONSE_MAX_BYTES,
|
|
243
|
+
createSizeError: (size) => /* @__PURE__ */ new Error(`Matrix SDK response exceeds size limit (${size} bytes > ${MATRIX_SDK_RESPONSE_MAX_BYTES} bytes)`),
|
|
244
|
+
assertCurrent
|
|
245
|
+
}, (body) => buildBufferedResponse({
|
|
246
|
+
source: response,
|
|
247
|
+
body: Uint8Array.from(body),
|
|
248
|
+
url
|
|
249
|
+
}));
|
|
242
250
|
});
|
|
243
251
|
}
|
|
244
252
|
async function performMatrixRequest(params) {
|
|
@@ -273,32 +281,20 @@ async function performMatrixRequest(params) {
|
|
|
273
281
|
assertSendCurrent: params.assertSendCurrent,
|
|
274
282
|
signal: params.signal
|
|
275
283
|
});
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
createError: createSizeError
|
|
283
|
-
});
|
|
284
|
-
const buffer = await readResponseWithLimit(response, maxBytes, {
|
|
285
|
-
onOverflow: ({ size }) => createSizeError(size),
|
|
284
|
+
const maxBytes = params.maxBytes ?? (params.raw ? MATRIX_SDK_RESPONSE_MAX_BYTES : MATRIX_JSON_RESPONSE_MAX_BYTES);
|
|
285
|
+
return await consumeMatrixResponse(response, release, {
|
|
286
|
+
maxBytes,
|
|
287
|
+
createSizeError: (size) => params.raw ? new MatrixMediaSizeLimitError(`Matrix media exceeds configured size limit (${size} bytes > ${maxBytes} bytes)`) : /* @__PURE__ */ new Error(`Matrix JSON response exceeds configured size limit (${size} bytes > ${maxBytes} bytes)`),
|
|
288
|
+
assertCurrent,
|
|
289
|
+
readOptions: {
|
|
286
290
|
chunkTimeoutMs: params.readIdleTimeoutMs,
|
|
287
291
|
onIdleTimeout: ({ chunkTimeoutMs }) => /* @__PURE__ */ new Error(`${params.raw ? "Matrix media download" : "Matrix JSON response"} stalled: no data received for ${chunkTimeoutMs}ms`)
|
|
288
|
-
});
|
|
289
|
-
assertCurrent?.();
|
|
290
|
-
return {
|
|
291
|
-
response,
|
|
292
|
-
text: buffer.toString("utf8"),
|
|
293
|
-
buffer
|
|
294
|
-
};
|
|
295
|
-
} finally {
|
|
296
|
-
try {
|
|
297
|
-
await release();
|
|
298
|
-
} finally {
|
|
299
|
-
assertCurrent?.();
|
|
300
292
|
}
|
|
301
|
-
}
|
|
293
|
+
}, (buffer) => ({
|
|
294
|
+
response,
|
|
295
|
+
text: buffer.toString("utf8"),
|
|
296
|
+
buffer
|
|
297
|
+
}));
|
|
302
298
|
}
|
|
303
299
|
//#endregion
|
|
304
300
|
//#region extensions/matrix/src/matrix/sdk/http-client.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as MATRIX_REACTION_EVENT_TYPE } from "./send-currentness-C2rMVVIQ.mjs";
|
|
2
|
-
import { _ as isPollEventType, b as resolvePollReferenceEventId, d as resolveMatrixReplacementContent, g as formatPollResultsAsText, m as buildPollResultsSummary, r as sendMessageMatrix, t as editMessageMatrix, u as resolveMatrixMessageAttachment, v as isPollStartType, y as parsePollStart } from "./send-
|
|
3
|
-
import { r as withResolvedRoomAction } from "./client-
|
|
4
|
-
import { n as isMatrixNotFoundError } from "./errors-
|
|
2
|
+
import { _ as isPollEventType, b as resolvePollReferenceEventId, d as resolveMatrixReplacementContent, g as formatPollResultsAsText, m as buildPollResultsSummary, r as sendMessageMatrix, t as editMessageMatrix, u as resolveMatrixMessageAttachment, v as isPollStartType, y as parsePollStart } from "./send-LCOuTVc1.mjs";
|
|
3
|
+
import { r as withResolvedRoomAction } from "./client-BlTvpEWC.mjs";
|
|
4
|
+
import { n as isMatrixNotFoundError } from "./errors-Bw4EHwKX.mjs";
|
|
5
5
|
import { asNullableObjectRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
6
|
//#region extensions/matrix/src/matrix/poll-summary.ts
|
|
7
7
|
function resolveMatrixPollRootEventId(event) {
|
|
@@ -212,7 +212,7 @@ async function readMatrixMessages(roomId, opts = {}) {
|
|
|
212
212
|
const rawAfter = normalizeOptionalString(opts.after);
|
|
213
213
|
const dir = opts.after ? "f" : "b";
|
|
214
214
|
const threadId = normalizeOptionalString(opts.threadId);
|
|
215
|
-
const isThreadRelationsStartCursor = threadId ?
|
|
215
|
+
const isThreadRelationsStartCursor = threadId ? rawBefore === encodeMatrixThreadRelationsStartCursor(threadId) : false;
|
|
216
216
|
const token = isThreadRelationsStartCursor ? void 0 : rawBefore ?? rawAfter;
|
|
217
217
|
const threadRootSummary = threadId !== void 0 && !token && !isThreadRelationsStartCursor && threadId ? await fetchDisplayableThreadRootSummary(client, resolvedRoom, threadId) : void 0;
|
|
218
218
|
const rootCountsTowardLimit = threadRootSummary !== void 0;
|
|
@@ -285,18 +285,6 @@ function encodeMatrixThreadRelationsStartCursor(threadId) {
|
|
|
285
285
|
}), "utf8").toString("base64url");
|
|
286
286
|
return `${MATRIX_THREAD_RELATIONS_START_CURSOR_PREFIX}${payload}`;
|
|
287
287
|
}
|
|
288
|
-
function isMatrixThreadRelationsStartCursor(raw, threadId) {
|
|
289
|
-
if (!raw?.startsWith(MATRIX_THREAD_RELATIONS_START_CURSOR_PREFIX)) return false;
|
|
290
|
-
const encoded = raw.slice(39);
|
|
291
|
-
try {
|
|
292
|
-
const bytes = Buffer.from(encoded, "base64url");
|
|
293
|
-
if (bytes.toString("base64url") !== encoded) return false;
|
|
294
|
-
const decoded = JSON.parse(bytes.toString("utf8"));
|
|
295
|
-
return decoded.v === 1 && decoded.threadId === threadId && encodeMatrixThreadRelationsStartCursor(decoded.threadId) === raw;
|
|
296
|
-
} catch {
|
|
297
|
-
return false;
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
288
|
async function fetchDisplayableThreadRootSummary(client, resolvedRoom, threadId) {
|
|
301
289
|
const rawRootEvent = await client.getEvent(resolvedRoom, threadId).catch(() => null);
|
|
302
290
|
if (!rawRootEvent) return;
|