@openclaw/matrix 2026.11.3 → 2026.11.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-CWsL5zIU.mjs → account-selection-UUPhMBmu.mjs} +10 -10
- package/dist/.setup/{approval-handler.runtime-Co2elSYS.mjs → approval-handler.runtime-Ca12_7Qa.mjs} +16 -51
- package/dist/.setup/{approval-reactions-D2pEUrFS.mjs → approval-reactions-BazmsDbe.mjs} +2 -2
- package/dist/.setup/{channel-BBvOdxTc.mjs → channel-CX7k81dL.mjs} +291 -360
- package/dist/.setup/channel.runtime-K_hHX-9W.mjs +73 -0
- package/dist/.setup/{channel.setup-p6oll48W.mjs → channel.setup-B00zzOOL.mjs} +28 -45
- package/dist/.setup/{cli-C2XKMk1U.mjs → cli-dz9hd2dR.mjs} +248 -308
- package/dist/.setup/{cli-metadata-C60BW1oa.mjs → cli-metadata-CwUhA9CY.mjs} +1 -1
- package/dist/.setup/{client-Cxv-iMwp.mjs → client-CFPYqaYK.mjs} +5 -5
- package/dist/.setup/{client-BEl7PU1_.mjs → client-D1bsidwU.mjs} +87 -174
- package/dist/.setup/{client-bootstrap-D1vLveT2.mjs → client-bootstrap-CTT0VF6v.mjs} +5 -10
- package/dist/.setup/{client-support-D-xHScuo.mjs → client-support-B_Mp4Qk9.mjs} +1 -15
- package/dist/.setup/{create-client-CrY1E3hg.mjs → create-client-Ccf5wyS3.mjs} +5 -5
- package/dist/.setup/{credentials-udso1z0C.mjs → credentials-kT20jk_u.mjs} +6 -20
- package/dist/.setup/{credentials-read-Dj7Hj87M.mjs → credentials-read-CM6wXUjL.mjs} +2 -2
- package/dist/.setup/{crypto-runtime-DqX7VD1W.mjs → crypto-runtime-DZNytKX5.mjs} +73 -159
- package/dist/.setup/{crypto-state-store-DclM-fO5.mjs → crypto-state-store-BZLlwkv_.mjs} +14 -10
- package/dist/.setup/{crypto-store-ownership-Dr-T40Rp.mjs → crypto-store-ownership-CiQ1l_O7.mjs} +1 -1
- package/dist/.setup/{crypto-unsafe-state-doctor-BG9qMu0B.mjs → crypto-unsafe-state-doctor-Dh1dtuSz.mjs} +6 -5
- package/dist/.setup/{deps-L_1bUAGL.mjs → deps-D-W_QQjz.mjs} +4 -3
- package/dist/.setup/device-health-Ck2YpEVN.mjs +8 -0
- package/dist/.setup/{direct-management-ZcjZgYEl.mjs → direct-management-Dp1giZ34.mjs} +21 -27
- package/dist/.setup/{directory-live-_yaRaktv.mjs → directory-live-ufzRheWx.mjs} +4 -4
- package/dist/.setup/{draft-stream-vO_qjwJb.mjs → draft-stream-BPjjKSoI.mjs} +10 -16
- package/dist/.setup/{encryption-guidance-BLUoN4aV.mjs → encryption-guidance-Br3Lv9Hm.mjs} +1 -1
- package/dist/.setup/{exec-approvals-BFT-ee9F.mjs → exec-approvals-BwEOyI1-.mjs} +31 -41
- package/dist/.setup/{file-sync-store-BxUPmUoJ.mjs → file-sync-store-BpS12yaK.mjs} +81 -8
- package/dist/.setup/{http-client-ByR4STVQ.mjs → http-client-B_ohXrBm.mjs} +19 -31
- package/dist/.setup/{idb-persistence-C2TsCHY2.mjs → idb-persistence-BTOsltD9.mjs} +21 -14
- package/dist/.setup/{joined-room-encryption-DBbLkdvv.mjs → joined-room-encryption-C0gHa2DG.mjs} +3 -2
- package/dist/.setup/{messages-TuEa_BPZ.mjs → messages-DpJ9naJa.mjs} +39 -22
- package/dist/.setup/{monitor-B86Ll4B8.mjs → monitor-Rzl3naSn.mjs} +693 -857
- package/dist/.setup/{onboarding-DOLEjkg2.mjs → onboarding-BK-V2ZLT.mjs} +115 -127
- package/dist/.setup/{outbound-BWsyqwt1.mjs → outbound-DMMVmZjV.mjs} +2 -2
- package/dist/.setup/{profile-update-DiXSVBki.mjs → profile-update-RLsY-gu6.mjs} +14 -14
- package/dist/.setup/{reaction-events-CuUeYcBC.mjs → reaction-events-UA_g6jEX.mjs} +74 -99
- package/dist/.setup/{resolve-targets-Dd70hGcM.mjs → resolve-targets-DYW8ULZS.mjs} +1 -1
- package/dist/.setup/{retired-state-C4UnLIg4.mjs → retired-state-JGUEBE72.mjs} +41 -2
- package/dist/.setup/{room-info-C13IUffQ.mjs → room-info-Dhc4efkA.mjs} +21 -8
- package/dist/.setup/runtime-setter-api-i2MOXoT3.mjs +2 -0
- package/dist/.setup/{sdk-DNW03GqJ.mjs → sdk-DPXiQ3jr.mjs} +92 -105
- package/dist/.setup/secret-contract-api-Dukgvike.mjs +2 -0
- package/dist/.setup/{send-BGgwE5pV.mjs → send-HHAbKARg.mjs} +168 -250
- package/dist/.setup/{send-currentness-C2rMVVIQ.mjs → send-currentness-DGxiiBn9.mjs} +9 -15
- package/dist/.setup/{setup-bootstrap-BCbltIf_.mjs → setup-bootstrap-DaT2j28V.mjs} +2 -2
- package/dist/.setup/{setup-core-Di6NtQ_J.mjs → setup-core-DcqQbLZv.mjs} +18 -41
- package/dist/.setup/setup-plugin-api-Cg4TelGZ.mjs +2 -0
- package/dist/.setup/{startup-verification-8xvGpdtK.mjs → startup-verification-UkaoSldm.mjs} +9 -23
- package/dist/.setup/{storage-CN4dxdtV.mjs → storage-C3N6YZIn.mjs} +8 -20
- package/dist/.setup/{subagent-hooks-CSY4iwa_.mjs → subagent-hooks-CfGAysJi.mjs} +1 -1
- package/dist/.setup/{sync-cache-state-L1kwjhjj.mjs → sync-cache-state-BKVaKRzQ.mjs} +5 -8
- package/dist/.setup/sync-state-CWbp0QSY.mjs +12 -0
- package/dist/.setup/task-runner-DY3aKiQa.mjs +52 -0
- package/dist/.setup/{thread-bindings-pNgPVdof.mjs → thread-bindings-891JsKXF.mjs} +34 -50
- package/dist/.setup/{thread-bindings-shared-CPjUA0Ib.mjs → thread-bindings-shared-QmZOfX9Q.mjs} +2 -2
- package/dist/.setup/{tool-actions-CFC7ZpIt.mjs → tool-actions-yFZH_7mC.mjs} +59 -67
- package/dist/.setup/{url-validation-CF6pG6eE.mjs → url-validation-By_2hsXr.mjs} +1 -2
- package/dist/.setup/{verification-CuT5ZBDO.mjs → verification-CcZIVL8P.mjs} +6 -6
- package/dist/.source-module-urls/1cd4d4ff8d44e1c8b830932b44d7cf8a7f3350e09e169910e1d7a85e131b7bea.json +1 -0
- package/dist/api.js +6 -6
- package/dist/auth-presence.js +1 -1
- package/dist/channel-plugin-api.js +1 -2
- package/dist/cli-metadata.js +1 -2
- package/dist/contract-api.js +2 -2
- package/dist/doctor-contract-api.js +110 -120
- package/dist/helper-api.js +1 -1
- package/dist/index.js +1 -1
- package/dist/plugin-entry.handlers.runtime.js +2 -2
- package/dist/runtime-api.js +3 -3
- package/dist/runtime-setter-api.js +1 -2
- package/dist/secret-contract-api.js +1 -2
- package/dist/session-binding-contract-api.js +1 -1
- package/dist/setup-entry.js +3 -3
- package/dist/setup-plugin-api.js +1 -2
- package/dist/subagent-hooks-api.js +1 -1
- package/dist/thread-binding-api.js +1 -2
- package/dist/thread-bindings-runtime.js +1 -2
- package/node_modules/@babel/runtime/helpers/asyncIterator.js +1 -1
- package/node_modules/@babel/runtime/helpers/createForOfIteratorHelper.js +12 -6
- package/node_modules/@babel/runtime/helpers/esm/asyncIterator.js +1 -1
- package/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js +12 -6
- package/node_modules/@babel/runtime/helpers/esm/interopRequireWildcard.js +16 -19
- package/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +5 -5
- package/node_modules/@babel/runtime/helpers/interopRequireWildcard.js +16 -19
- package/node_modules/@babel/runtime/helpers/toPrimitive.js +5 -5
- package/node_modules/@babel/runtime/package.json +1 -1
- package/node_modules/@openclaw/fs-safe/CHANGELOG.md +94 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-parser.wasm +0 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-file-input.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/copy-file-input.js +3 -1
- package/node_modules/@openclaw/fs-safe/dist/copy-path-admission.js +2 -2
- package/node_modules/@openclaw/fs-safe/dist/copy-root-file-sync.js +8 -1
- package/node_modules/@openclaw/fs-safe/dist/file-open-error.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/file-open-error.js +14 -0
- package/node_modules/@openclaw/fs-safe/dist/file-sync.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/file-sync.js +6 -1
- package/node_modules/@openclaw/fs-safe/dist/guest-native-python.js +3 -0
- package/node_modules/@openclaw/fs-safe/dist/native-binding.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/native-config.js +14 -3
- package/node_modules/@openclaw/fs-safe/dist/native-operations.js +2 -0
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write-windows.js +9 -2
- package/node_modules/@openclaw/fs-safe/dist/native-staged-file.js +40 -32
- package/node_modules/@openclaw/fs-safe/dist/output.js +6 -0
- package/node_modules/@openclaw/fs-safe/dist/owner-dacl.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/owner-dacl.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/path.js +5 -1
- package/node_modules/@openclaw/fs-safe/dist/pinned-write-staged.js +25 -2
- package/node_modules/@openclaw/fs-safe/dist/publication-handle.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/publication-handle.js +32 -0
- package/node_modules/@openclaw/fs-safe/dist/publish-copy-stage.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/publish-copy-stage.js +19 -9
- package/node_modules/@openclaw/fs-safe/dist/publish-file.js +23 -24
- package/node_modules/@openclaw/fs-safe/dist/publish-rename-fallback.d.ts +21 -0
- package/node_modules/@openclaw/fs-safe/dist/publish-rename-fallback.js +102 -0
- package/node_modules/@openclaw/fs-safe/dist/root-create-native.js +2 -0
- package/node_modules/@openclaw/fs-safe/dist/root-directory-entry.d.ts +3 -1
- package/node_modules/@openclaw/fs-safe/dist/root-directory-entry.js +8 -5
- package/node_modules/@openclaw/fs-safe/dist/root-directory-list-types.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/root-directory-list.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/root-directory-list.js +19 -9
- package/node_modules/@openclaw/fs-safe/dist/root-file-final-admission.js +3 -3
- package/node_modules/@openclaw/fs-safe/dist/root-path-existing.d.ts +2 -2
- package/node_modules/@openclaw/fs-safe/dist/root-path-existing.js +27 -13
- package/node_modules/@openclaw/fs-safe/dist/root-path.js +2 -2
- package/node_modules/@openclaw/fs-safe/dist/sibling-staged-file.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/sibling-staged-file.js +18 -3
- package/node_modules/@openclaw/fs-safe/dist/watch-hints.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/watch-hints.js +68 -21
- package/node_modules/@openclaw/fs-safe/dist/watch-io-error.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-io-error.js +27 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-io-worker.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-io-worker.js +93 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-io.d.ts +47 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-io.js +236 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-native.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/watch-native.js +3 -3
- package/node_modules/@openclaw/fs-safe/dist/watch-probe.d.ts +16 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-probe.js +135 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-rescan.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/watch-rescan.js +86 -24
- package/node_modules/@openclaw/fs-safe/dist/watch-scan.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-scan.js +78 -16
- package/node_modules/@openclaw/fs-safe/dist/watch-stream.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-stream.js +23 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-types.d.ts +3 -1
- package/node_modules/@openclaw/fs-safe/dist/watch.js +60 -13
- package/node_modules/@openclaw/fs-safe/dist/windows-security-facts.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/windows-security-facts.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-security-helper.exe +0 -0
- package/node_modules/@openclaw/fs-safe/docs/advanced.md +5 -2
- package/node_modules/@openclaw/fs-safe/docs/compiler-qualification.md +392 -0
- package/node_modules/@openclaw/fs-safe/docs/config.md +7 -1
- package/node_modules/@openclaw/fs-safe/docs/contributing.md +25 -5
- package/node_modules/@openclaw/fs-safe/docs/copy.md +10 -0
- package/node_modules/@openclaw/fs-safe/docs/durability.md +9 -3
- package/node_modules/@openclaw/fs-safe/docs/errors.md +13 -0
- package/node_modules/@openclaw/fs-safe/docs/migrating-to-0.5.md +6 -4
- package/node_modules/@openclaw/fs-safe/docs/native-helper.md +6 -4
- package/node_modules/@openclaw/fs-safe/docs/output.md +4 -2
- package/node_modules/@openclaw/fs-safe/docs/path.md +5 -2
- package/node_modules/@openclaw/fs-safe/docs/permissions.md +15 -0
- package/node_modules/@openclaw/fs-safe/docs/security-model.md +9 -0
- package/node_modules/@openclaw/fs-safe/docs/staged-file.md +2 -0
- package/node_modules/@openclaw/fs-safe/docs/testing.md +1 -1
- package/node_modules/@openclaw/fs-safe/docs/watch.md +62 -5
- package/node_modules/@openclaw/fs-safe/docs/writing.md +6 -1
- package/node_modules/@openclaw/fs-safe/package.json +18 -16
- 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-freebsd-arm64/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-freebsd-arm64/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-freebsd-x64/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-freebsd-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-arm64-msvc/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-win32-arm64-msvc/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/@tokenizer/inflate/README.md +30 -1
- package/node_modules/@tokenizer/inflate/lib/GzipHandler.js +1 -1
- package/node_modules/@tokenizer/inflate/lib/ZipHandler.d.ts +8 -3
- package/node_modules/@tokenizer/inflate/lib/ZipHandler.js +101 -26
- package/node_modules/@tokenizer/inflate/lib/ZipLimitError.d.ts +16 -0
- package/node_modules/@tokenizer/inflate/lib/ZipLimitError.js +10 -0
- package/node_modules/@tokenizer/inflate/lib/ZipToken.d.ts +1 -1
- package/node_modules/@tokenizer/inflate/lib/ZipToken.js +11 -7
- package/node_modules/@tokenizer/inflate/lib/index.d.ts +2 -1
- package/node_modules/@tokenizer/inflate/lib/index.js +2 -1
- package/node_modules/@tokenizer/inflate/package.json +16 -15
- package/node_modules/argparse/lib/argparse.js +1 -1
- package/node_modules/argparse/package.json +1 -1
- package/node_modules/fake-indexeddb/build/cjs/FDBCursor.js +20 -18
- package/node_modules/fake-indexeddb/build/cjs/FDBKeyRange.js +6 -6
- package/node_modules/fake-indexeddb/build/cjs/FDBTransaction.js +20 -2
- package/node_modules/fake-indexeddb/build/cjs/lib/RecordStore.js +3 -3
- package/node_modules/fake-indexeddb/build/cjs/lib/binarySearchTree.js +11 -13
- package/node_modules/fake-indexeddb/build/cjs/lib/cmp.js +44 -14
- package/node_modules/fake-indexeddb/build/cjs/test/fakeIndexedDB/auto.js +54 -0
- package/node_modules/fake-indexeddb/build/cjs/test/fakeIndexedDB/binarySearchTree.js +413 -0
- package/node_modules/fake-indexeddb/build/cjs/test/fakeIndexedDB/fakeIndexedDB.js +1018 -0
- package/node_modules/fake-indexeddb/build/cjs/test/fakeIndexedDB/forceCloseDatabase.js +99 -0
- package/node_modules/fake-indexeddb/build/cjs/test/fakeIndexedDB/getAll.js +707 -0
- package/node_modules/fake-indexeddb/build/cjs/test/fakeIndexedDB/memoryLeaks.js +42 -0
- package/node_modules/fake-indexeddb/build/esm/FDBCursor.js +19 -18
- package/node_modules/fake-indexeddb/build/esm/FDBKeyRange.js +6 -6
- package/node_modules/fake-indexeddb/build/esm/FDBTransaction.js +20 -2
- package/node_modules/fake-indexeddb/build/esm/lib/RecordStore.js +3 -3
- package/node_modules/fake-indexeddb/build/esm/lib/binarySearchTree.js +11 -13
- package/node_modules/fake-indexeddb/build/esm/lib/cmp.js +41 -11
- package/node_modules/fake-indexeddb/build/esm/test/fakeIndexedDB/auto.js +52 -0
- package/node_modules/fake-indexeddb/build/esm/test/fakeIndexedDB/binarySearchTree.js +409 -0
- package/node_modules/fake-indexeddb/build/esm/test/fakeIndexedDB/fakeIndexedDB.js +1014 -0
- package/node_modules/fake-indexeddb/build/esm/test/fakeIndexedDB/forceCloseDatabase.js +95 -0
- package/node_modules/fake-indexeddb/build/esm/test/fakeIndexedDB/getAll.js +703 -0
- package/node_modules/fake-indexeddb/build/esm/test/fakeIndexedDB/memoryLeaks.js +38 -0
- package/node_modules/fake-indexeddb/package.json +1 -1
- package/node_modules/file-type/node_modules/strtok3/LICENSE.txt +21 -0
- package/node_modules/file-type/node_modules/strtok3/README.md +591 -0
- package/node_modules/file-type/node_modules/strtok3/lib/AbortSignal.d.ts +2 -0
- package/node_modules/file-type/node_modules/strtok3/lib/AbortSignal.js +7 -0
- package/node_modules/file-type/node_modules/strtok3/lib/AbstractTokenizer.d.ts +114 -0
- package/node_modules/file-type/node_modules/strtok3/lib/AbstractTokenizer.js +196 -0
- package/node_modules/file-type/node_modules/strtok3/lib/BlobTokenizer.d.ts +29 -0
- package/node_modules/file-type/node_modules/strtok3/lib/BlobTokenizer.js +56 -0
- package/node_modules/file-type/node_modules/strtok3/lib/BufferSizeError.d.ts +19 -0
- package/node_modules/file-type/node_modules/strtok3/lib/BufferSizeError.js +27 -0
- package/node_modules/file-type/node_modules/strtok3/lib/BufferTokenizer.d.ts +29 -0
- package/node_modules/file-type/node_modules/strtok3/lib/BufferTokenizer.js +50 -0
- package/node_modules/file-type/node_modules/strtok3/lib/FileTokenizer.d.ts +47 -0
- package/node_modules/file-type/node_modules/strtok3/lib/FileTokenizer.js +83 -0
- package/node_modules/file-type/node_modules/strtok3/lib/NotRegularFileError.d.ts +5 -0
- package/node_modules/file-type/node_modules/strtok3/lib/NotRegularFileError.js +8 -0
- package/node_modules/file-type/node_modules/strtok3/lib/ReadStreamTokenizer.d.ts +34 -0
- package/node_modules/file-type/node_modules/strtok3/lib/ReadStreamTokenizer.js +125 -0
- package/node_modules/file-type/node_modules/strtok3/lib/core.d.ts +41 -0
- package/node_modules/file-type/node_modules/strtok3/lib/core.js +69 -0
- package/node_modules/file-type/node_modules/strtok3/lib/index.d.ts +17 -0
- package/node_modules/file-type/node_modules/strtok3/lib/index.js +23 -0
- package/node_modules/file-type/node_modules/strtok3/lib/stream/AbstractStreamReader.d.ts +54 -0
- package/node_modules/file-type/node_modules/strtok3/lib/stream/AbstractStreamReader.js +73 -0
- package/node_modules/file-type/node_modules/strtok3/lib/stream/Deferred.d.ts +6 -0
- package/node_modules/file-type/node_modules/strtok3/lib/stream/Deferred.js +10 -0
- package/node_modules/file-type/node_modules/strtok3/lib/stream/Errors.d.ts +10 -0
- package/node_modules/file-type/node_modules/strtok3/lib/stream/Errors.js +16 -0
- package/node_modules/file-type/node_modules/strtok3/lib/stream/StreamReader.d.ts +30 -0
- package/node_modules/file-type/node_modules/strtok3/lib/stream/StreamReader.js +104 -0
- package/node_modules/file-type/node_modules/strtok3/lib/stream/WebStreamByobReader.d.ts +14 -0
- package/node_modules/file-type/node_modules/strtok3/lib/stream/WebStreamByobReader.js +29 -0
- package/node_modules/file-type/node_modules/strtok3/lib/stream/WebStreamDefaultReader.d.ts +19 -0
- package/node_modules/file-type/node_modules/strtok3/lib/stream/WebStreamDefaultReader.js +67 -0
- package/node_modules/file-type/node_modules/strtok3/lib/stream/WebStreamReader.d.ts +14 -0
- package/node_modules/file-type/node_modules/strtok3/lib/stream/WebStreamReader.js +13 -0
- package/node_modules/file-type/node_modules/strtok3/lib/stream/WebStreamReaderFactory.d.ts +5 -0
- package/node_modules/file-type/node_modules/strtok3/lib/stream/WebStreamReaderFactory.js +19 -0
- package/node_modules/file-type/node_modules/strtok3/lib/stream/index.d.ts +6 -0
- package/node_modules/file-type/node_modules/strtok3/lib/stream/index.js +5 -0
- package/node_modules/file-type/node_modules/strtok3/lib/types.d.ts +146 -0
- package/node_modules/file-type/node_modules/strtok3/lib/types.js +1 -0
- package/node_modules/file-type/node_modules/strtok3/package.json +95 -0
- package/node_modules/file-type/package.json +28 -27
- package/node_modules/file-type/readme.md +32 -3
- package/node_modules/file-type/source/detectors/ebml.js +2 -2
- package/node_modules/file-type/source/detectors/png.js +1 -0
- package/node_modules/file-type/source/detectors/zip.js +71 -112
- package/node_modules/file-type/source/index.d.ts +18 -8
- package/node_modules/file-type/source/index.js +75 -49
- package/node_modules/file-type/source/index.test-d.ts +29 -21
- package/node_modules/file-type/source/supported.js +4 -0
- package/node_modules/file-type/source/tokens.js +2 -2
- package/node_modules/markdown-it/dist/browser/markdown-it.esm.min.mjs +737 -686
- package/node_modules/markdown-it/dist/browser/markdown-it.esm.min.mjs.map +1 -1
- package/node_modules/markdown-it/dist/browser/markdown-it.umd.min.js +8 -8
- package/node_modules/markdown-it/dist/browser/markdown-it.umd.min.js.map +1 -1
- package/node_modules/markdown-it/dist/markdown-it.cjs.js +660 -518
- package/node_modules/markdown-it/dist/markdown-it.cjs.js.map +1 -1
- package/node_modules/markdown-it/dist/markdown-it.d.mts +1 -0
- package/node_modules/markdown-it/dist/markdown-it.mjs +179 -124
- package/node_modules/markdown-it/dist/markdown-it.mjs.map +1 -1
- package/node_modules/markdown-it/package.json +11 -11
- package/node_modules/matrix-js-sdk/CHANGELOG.md +23 -0
- package/node_modules/matrix-js-sdk/lib/@types/PushRules.d.ts +3 -1
- package/node_modules/matrix-js-sdk/lib/@types/PushRules.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/PushRules.js +2 -0
- package/node_modules/matrix-js-sdk/lib/@types/PushRules.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/event.d.ts +1 -0
- package/node_modules/matrix-js-sdk/lib/@types/event.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/event.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/matrix-sdk-crypto-wasm.d.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/client.d.ts +88 -37
- package/node_modules/matrix-js-sdk/lib/client.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/client.js +72 -47
- package/node_modules/matrix-js-sdk/lib/client.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/crypto-api/index.d.ts +3 -3
- package/node_modules/matrix-js-sdk/lib/crypto-api/index.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/crypto-api/index.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/embedded.d.ts +17 -1
- package/node_modules/matrix-js-sdk/lib/embedded.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/embedded.js +46 -1
- package/node_modules/matrix-js-sdk/lib/embedded.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/errors.d.ts +1 -1
- package/node_modules/matrix-js-sdk/lib/errors.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/errors.js +2 -2
- package/node_modules/matrix-js-sdk/lib/errors.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/http-api/fetch.d.ts +7 -1
- package/node_modules/matrix-js-sdk/lib/http-api/fetch.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/http-api/fetch.js +14 -5
- package/node_modules/matrix-js-sdk/lib/http-api/fetch.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/http-api/interface.d.ts +34 -8
- package/node_modules/matrix-js-sdk/lib/http-api/interface.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/http-api/interface.js +10 -3
- package/node_modules/matrix-js-sdk/lib/http-api/interface.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/http-api/refresh.d.ts +30 -11
- package/node_modules/matrix-js-sdk/lib/http-api/refresh.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/http-api/refresh.js +72 -5
- package/node_modules/matrix-js-sdk/lib/http-api/refresh.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrix.d.ts +1 -1
- package/node_modules/matrix-js-sdk/lib/matrix.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrix.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/CallMembership.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/CallMembership.js +20 -6
- package/node_modules/matrix-js-sdk/lib/matrixrtc/CallMembership.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/IMembershipManager.d.ts +5 -0
- package/node_modules/matrix-js-sdk/lib/matrixrtc/IMembershipManager.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/IMembershipManager.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MatrixRTCSession.d.ts +27 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MatrixRTCSession.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MatrixRTCSession.js +58 -36
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MatrixRTCSession.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MatrixRTCSessionManager.js +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MatrixRTCSessionManager.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MembershipManager.d.ts +76 -0
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MembershipManager.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MembershipManager.js +264 -47
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MembershipManager.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/index.d.ts +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/index.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/index.js +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/index.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/common.d.ts +8 -0
- package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/common.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/common.js +10 -0
- package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/common.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/index.d.ts +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/index.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/index.js +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/index.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/types.d.ts +104 -11
- package/node_modules/matrix-js-sdk/lib/matrixrtc/types.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/types.js +263 -19
- package/node_modules/matrix-js-sdk/lib/matrixrtc/types.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/utils.d.ts +22 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/utils.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/utils.js +38 -0
- package/node_modules/matrix-js-sdk/lib/matrixrtc/utils.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/room-sticky-events.d.ts +7 -0
- package/node_modules/matrix-js-sdk/lib/models/room-sticky-events.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/room-sticky-events.js +27 -0
- package/node_modules/matrix-js-sdk/lib/models/room-sticky-events.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/thread.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/thread.js +8 -0
- package/node_modules/matrix-js-sdk/lib/models/thread.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/oauth/authorize.js +1 -1
- package/node_modules/matrix-js-sdk/lib/oauth/authorize.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/oauth/index.d.ts +3 -5
- package/node_modules/matrix-js-sdk/lib/oauth/index.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/oauth/index.js +7 -7
- package/node_modules/matrix-js-sdk/lib/oauth/index.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/oauth/tokenRefresher.d.ts +10 -4
- package/node_modules/matrix-js-sdk/lib/oauth/tokenRefresher.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/oauth/tokenRefresher.js +34 -24
- package/node_modules/matrix-js-sdk/lib/oauth/tokenRefresher.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/receipt-accumulator.d.ts +10 -11
- package/node_modules/matrix-js-sdk/lib/receipt-accumulator.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/receipt-accumulator.js +26 -25
- package/node_modules/matrix-js-sdk/lib/receipt-accumulator.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/room-summary-api.d.ts +71 -0
- package/node_modules/matrix-js-sdk/lib/room-summary-api.d.ts.map +1 -0
- package/node_modules/matrix-js-sdk/lib/room-summary-api.js +82 -0
- package/node_modules/matrix-js-sdk/lib/room-summary-api.js.map +1 -0
- package/node_modules/matrix-js-sdk/lib/rust-crypto/backup.d.ts +7 -0
- package/node_modules/matrix-js-sdk/lib/rust-crypto/backup.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/backup.js +41 -25
- package/node_modules/matrix-js-sdk/lib/rust-crypto/backup.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/sync.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/sync.js +6 -1
- package/node_modules/matrix-js-sdk/lib/sync.js.map +1 -1
- package/node_modules/matrix-js-sdk/package.json +6 -6
- package/node_modules/matrix-js-sdk/src/@types/PushRules.ts +2 -0
- package/node_modules/matrix-js-sdk/src/@types/event.ts +1 -1
- package/node_modules/matrix-js-sdk/src/@types/matrix-sdk-crypto-wasm.d.ts +15 -12
- package/node_modules/matrix-js-sdk/src/client.ts +105 -62
- package/node_modules/matrix-js-sdk/src/crypto-api/index.ts +3 -3
- package/node_modules/matrix-js-sdk/src/embedded.ts +61 -2
- package/node_modules/matrix-js-sdk/src/errors.ts +2 -1
- package/node_modules/matrix-js-sdk/src/http-api/fetch.ts +14 -5
- package/node_modules/matrix-js-sdk/src/http-api/interface.ts +36 -8
- package/node_modules/matrix-js-sdk/src/http-api/refresh.ts +101 -17
- package/node_modules/matrix-js-sdk/src/matrix.ts +1 -1
- package/node_modules/matrix-js-sdk/src/matrixrtc/CallMembership.ts +22 -4
- package/node_modules/matrix-js-sdk/src/matrixrtc/IMembershipManager.ts +6 -0
- package/node_modules/matrix-js-sdk/src/matrixrtc/MatrixRTCSession.ts +72 -49
- package/node_modules/matrix-js-sdk/src/matrixrtc/MatrixRTCSessionManager.ts +1 -1
- package/node_modules/matrix-js-sdk/src/matrixrtc/MembershipManager.ts +284 -61
- package/node_modules/matrix-js-sdk/src/matrixrtc/index.ts +7 -1
- package/node_modules/matrix-js-sdk/src/matrixrtc/membershipData/common.ts +12 -0
- package/node_modules/matrix-js-sdk/src/matrixrtc/membershipData/index.ts +1 -1
- package/node_modules/matrix-js-sdk/src/matrixrtc/types.ts +351 -23
- package/node_modules/matrix-js-sdk/src/matrixrtc/utils.ts +54 -1
- package/node_modules/matrix-js-sdk/src/models/room-sticky-events.ts +26 -1
- package/node_modules/matrix-js-sdk/src/models/thread.ts +9 -0
- package/node_modules/matrix-js-sdk/src/oauth/authorize.ts +1 -1
- package/node_modules/matrix-js-sdk/src/oauth/index.ts +7 -8
- package/node_modules/matrix-js-sdk/src/oauth/tokenRefresher.ts +15 -5
- package/node_modules/matrix-js-sdk/src/receipt-accumulator.ts +30 -26
- package/node_modules/matrix-js-sdk/src/room-summary-api.ts +114 -0
- package/node_modules/matrix-js-sdk/src/rust-crypto/backup.ts +46 -33
- package/node_modules/matrix-js-sdk/src/sync.ts +9 -1
- package/node_modules/music-metadata/README.md +125 -37
- package/node_modules/music-metadata/lib/ParseError.d.ts +10 -3
- package/node_modules/music-metadata/lib/ParseError.js +2 -0
- package/node_modules/music-metadata/lib/ParserFactory.d.ts +1 -1
- package/node_modules/music-metadata/lib/ParserFactory.js +20 -8
- package/node_modules/music-metadata/lib/aiff/AiffParser.d.ts +1 -0
- package/node_modules/music-metadata/lib/aiff/AiffParser.js +25 -17
- package/node_modules/music-metadata/lib/aiff/AiffToken.d.ts +9 -3
- package/node_modules/music-metadata/lib/aiff/AiffToken.js +10 -0
- package/node_modules/music-metadata/lib/apev2/APEv2Parser.d.ts +4 -3
- package/node_modules/music-metadata/lib/apev2/APEv2Parser.js +6 -30
- package/node_modules/music-metadata/lib/asf/AsfGuid.js +49 -49
- package/node_modules/music-metadata/lib/asf/AsfObject.d.ts +12 -6
- package/node_modules/music-metadata/lib/asf/AsfObject.js +201 -58
- package/node_modules/music-metadata/lib/asf/AsfParser.d.ts +4 -0
- package/node_modules/music-metadata/lib/asf/AsfParser.js +119 -27
- package/node_modules/music-metadata/lib/caf/CafLoader.d.ts +2 -0
- package/node_modules/music-metadata/lib/caf/CafLoader.js +8 -0
- package/node_modules/music-metadata/lib/caf/CafParser.d.ts +37 -0
- package/node_modules/music-metadata/lib/caf/CafParser.js +253 -0
- package/node_modules/music-metadata/lib/caf/CafTagMap.d.ts +8 -0
- package/node_modules/music-metadata/lib/caf/CafTagMap.js +38 -0
- package/node_modules/music-metadata/lib/caf/CafToken.d.ts +75 -0
- package/node_modules/music-metadata/lib/caf/CafToken.js +135 -0
- package/node_modules/music-metadata/lib/common/Allocation.d.ts +14 -0
- package/node_modules/music-metadata/lib/common/Allocation.js +70 -0
- package/node_modules/music-metadata/lib/common/BasicParser.d.ts +2 -0
- package/node_modules/music-metadata/lib/common/BasicParser.js +8 -0
- package/node_modules/music-metadata/lib/common/CaseInsensitiveTagMap.d.ts +1 -1
- package/node_modules/music-metadata/lib/common/CaseInsensitiveTagMap.js +3 -3
- package/node_modules/music-metadata/lib/common/CombinedTagMapper.js +4 -3
- package/node_modules/music-metadata/lib/common/GenericTagMapper.d.ts +1 -1
- package/node_modules/music-metadata/lib/common/GenericTagMapper.js +4 -2
- package/node_modules/music-metadata/lib/common/GenericTagTypes.d.ts +2 -2
- package/node_modules/music-metadata/lib/common/MetadataCollector.d.ts +6 -5
- package/node_modules/music-metadata/lib/common/MetadataCollector.js +57 -30
- package/node_modules/music-metadata/lib/common/TrackInfo.d.ts +8 -0
- package/node_modules/music-metadata/lib/common/TrackInfo.js +68 -0
- package/node_modules/music-metadata/lib/common/Util.d.ts +1 -1
- package/node_modules/music-metadata/lib/common/Util.js +6 -12
- package/node_modules/music-metadata/lib/core.d.ts +1 -1
- package/node_modules/music-metadata/lib/core.js +10 -18
- package/node_modules/music-metadata/lib/dsdiff/DsdiffLoader.js +1 -1
- package/node_modules/music-metadata/lib/dsdiff/DsdiffParser.d.ts +7 -3
- package/node_modules/music-metadata/lib/dsdiff/DsdiffParser.js +69 -33
- package/node_modules/music-metadata/lib/dsf/DsfParser.d.ts +4 -3
- package/node_modules/music-metadata/lib/dsf/DsfParser.js +1 -1
- package/node_modules/music-metadata/lib/ebml/EbmlIterator.d.ts +28 -19
- package/node_modules/music-metadata/lib/ebml/EbmlIterator.js +97 -67
- package/node_modules/music-metadata/lib/ebml/types.d.ts +36 -8
- package/node_modules/music-metadata/lib/ebml/types.js +2 -1
- package/node_modules/music-metadata/lib/flac/FlacParser.js +10 -18
- package/node_modules/music-metadata/lib/id3v1/ID3v1Parser.d.ts +1 -1
- package/node_modules/music-metadata/lib/id3v1/ID3v1Parser.js +5 -1
- package/node_modules/music-metadata/lib/id3v2/AbstractID3Parser.js +1 -4
- package/node_modules/music-metadata/lib/id3v2/EmbeddedID3v2.d.ts +5 -0
- package/node_modules/music-metadata/lib/id3v2/EmbeddedID3v2.js +29 -0
- package/node_modules/music-metadata/lib/id3v2/FrameParser.d.ts +5 -3
- package/node_modules/music-metadata/lib/id3v2/FrameParser.js +59 -33
- package/node_modules/music-metadata/lib/id3v2/ID3v2Parser.js +15 -8
- package/node_modules/music-metadata/lib/index.d.ts +2 -0
- package/node_modules/music-metadata/lib/index.js +8 -4
- package/node_modules/music-metadata/lib/matroska/MatroskaDtd.d.ts +630 -2
- package/node_modules/music-metadata/lib/matroska/MatroskaDtd.js +58 -40
- package/node_modules/music-metadata/lib/matroska/MatroskaParser.d.ts +4 -0
- package/node_modules/music-metadata/lib/matroska/MatroskaParser.js +211 -68
- package/node_modules/music-metadata/lib/matroska/types.d.ts +33 -131
- package/node_modules/music-metadata/lib/matroska/types.js +1 -18
- package/node_modules/music-metadata/lib/mp4/Atom.js +7 -0
- package/node_modules/music-metadata/lib/mp4/AtomToken.d.ts +17 -4
- package/node_modules/music-metadata/lib/mp4/AtomToken.js +124 -21
- package/node_modules/music-metadata/lib/mp4/MP4Parser.d.ts +12 -3
- package/node_modules/music-metadata/lib/mp4/MP4Parser.js +559 -242
- package/node_modules/music-metadata/lib/mpeg/AdtsFrameHeader.d.ts +17 -0
- package/node_modules/music-metadata/lib/mpeg/AdtsFrameHeader.js +44 -0
- package/node_modules/music-metadata/lib/mpeg/MpegFrameHeader.d.ts +41 -0
- package/node_modules/music-metadata/lib/mpeg/MpegFrameHeader.js +84 -0
- package/node_modules/music-metadata/lib/mpeg/MpegParser.d.ts +11 -24
- package/node_modules/music-metadata/lib/mpeg/MpegParser.js +77 -337
- package/node_modules/music-metadata/lib/musepack/MusepackConentError.d.ts +4 -3
- package/node_modules/music-metadata/lib/musepack/sv7/BitReader.js +3 -2
- package/node_modules/music-metadata/lib/musepack/sv7/MpcSv7Parser.js +3 -6
- package/node_modules/music-metadata/lib/musepack/sv8/MpcSv8Parser.js +1 -4
- package/node_modules/music-metadata/lib/musepack/sv8/StreamVersion8.js +1 -0
- package/node_modules/music-metadata/lib/ogg/OggLoader.js +1 -1
- package/node_modules/music-metadata/lib/ogg/OggParser.d.ts +4 -3
- package/node_modules/music-metadata/lib/ogg/OggParser.js +54 -9
- package/node_modules/music-metadata/lib/ogg/OggStreamMetadata.d.ts +14 -0
- package/node_modules/music-metadata/lib/ogg/OggStreamMetadata.js +27 -0
- package/node_modules/music-metadata/lib/ogg/OggToken.d.ts +1 -0
- package/node_modules/music-metadata/lib/ogg/OggToken.js +3 -1
- package/node_modules/music-metadata/lib/ogg/flac/FlacStream.d.ts +3 -1
- package/node_modules/music-metadata/lib/ogg/flac/FlacStream.js +21 -3
- package/node_modules/music-metadata/lib/ogg/opus/Opus.d.ts +4 -3
- package/node_modules/music-metadata/lib/ogg/opus/Opus.js +1 -0
- package/node_modules/music-metadata/lib/ogg/opus/OpusStream.js +4 -2
- package/node_modules/music-metadata/lib/ogg/speex/SpeexStream.js +2 -1
- package/node_modules/music-metadata/lib/ogg/theora/Theora.d.ts +5 -0
- package/node_modules/music-metadata/lib/ogg/theora/Theora.js +7 -2
- package/node_modules/music-metadata/lib/ogg/theora/TheoraStream.d.ts +5 -2
- package/node_modules/music-metadata/lib/ogg/theora/TheoraStream.js +43 -3
- package/node_modules/music-metadata/lib/ogg/vorbis/Vorbis.js +4 -3
- package/node_modules/music-metadata/lib/ogg/vorbis/VorbisDecoder.d.ts +11 -0
- package/node_modules/music-metadata/lib/ogg/vorbis/VorbisDecoder.js +29 -0
- package/node_modules/music-metadata/lib/ogg/vorbis/VorbisStream.d.ts +6 -4
- package/node_modules/music-metadata/lib/ogg/vorbis/VorbisStream.js +24 -18
- package/node_modules/music-metadata/lib/riff/RiffChunk.js +3 -0
- package/node_modules/music-metadata/lib/type.d.ts +49 -6
- package/node_modules/music-metadata/lib/type.js +22 -1
- package/node_modules/music-metadata/lib/wav/WaveChunk.d.ts +4 -3
- package/node_modules/music-metadata/lib/wav/WaveChunk.js +2 -0
- package/node_modules/music-metadata/lib/wav/WaveParser.d.ts +0 -1
- package/node_modules/music-metadata/lib/wav/WaveParser.js +21 -23
- package/node_modules/music-metadata/lib/wavpack/WavPackParser.d.ts +4 -3
- package/node_modules/music-metadata/lib/wavpack/WavPackParser.js +6 -6
- package/node_modules/music-metadata/package.json +26 -22
- package/node_modules/strtok3/LICENSE.txt +21 -21
- package/node_modules/strtok3/README.md +712 -399
- package/node_modules/strtok3/lib/AbortSignal.d.ts +2 -0
- package/node_modules/strtok3/lib/AbortSignal.js +7 -0
- package/node_modules/strtok3/lib/AbstractTokenizer.d.ts +40 -2
- package/node_modules/strtok3/lib/AbstractTokenizer.js +101 -16
- package/node_modules/strtok3/lib/BlobTokenizer.d.ts +1 -1
- package/node_modules/strtok3/lib/BlobTokenizer.js +14 -11
- package/node_modules/strtok3/lib/BufferSizeError.d.ts +19 -0
- package/node_modules/strtok3/lib/BufferSizeError.js +27 -0
- package/node_modules/strtok3/lib/BufferTokenizer.d.ts +1 -1
- package/node_modules/strtok3/lib/BufferTokenizer.js +7 -9
- package/node_modules/strtok3/lib/FileTokenizer.d.ts +13 -3
- package/node_modules/strtok3/lib/FileTokenizer.js +29 -7
- package/node_modules/strtok3/lib/NotRegularFileError.d.ts +5 -0
- package/node_modules/strtok3/lib/NotRegularFileError.js +8 -0
- package/node_modules/strtok3/lib/ReadStreamTokenizer.js +32 -9
- package/node_modules/strtok3/lib/TokenizerBoundaryError.d.ts +7 -0
- package/node_modules/strtok3/lib/TokenizerBoundaryError.js +10 -0
- package/node_modules/strtok3/lib/TokenizerView.d.ts +9 -0
- package/node_modules/strtok3/lib/TokenizerView.js +184 -0
- package/node_modules/strtok3/lib/core.d.ts +10 -6
- package/node_modules/strtok3/lib/core.js +16 -22
- package/node_modules/strtok3/lib/index.d.ts +5 -4
- package/node_modules/strtok3/lib/index.js +3 -2
- package/node_modules/strtok3/lib/isRandomAccessTokenizer.d.ts +6 -0
- package/node_modules/strtok3/lib/isRandomAccessTokenizer.js +10 -0
- package/node_modules/strtok3/lib/stream/AbstractStreamReader.js +5 -3
- package/node_modules/strtok3/lib/stream/Errors.js +3 -3
- package/node_modules/strtok3/lib/stream/StreamReader.d.ts +4 -3
- package/node_modules/strtok3/lib/stream/StreamReader.js +46 -25
- package/node_modules/strtok3/lib/stream/WebStreamByobReader.js +5 -3
- package/node_modules/strtok3/lib/stream/WebStreamDefaultReader.d.ts +1 -1
- package/node_modules/strtok3/lib/stream/WebStreamDefaultReader.js +9 -4
- package/node_modules/strtok3/lib/stream/WebStreamReader.d.ts +13 -3
- package/node_modules/strtok3/lib/stream/WebStreamReader.js +1 -1
- package/node_modules/strtok3/lib/stream/WebStreamReaderFactory.js +1 -1
- package/node_modules/strtok3/lib/stream/index.d.ts +1 -1
- package/node_modules/strtok3/lib/types.d.ts +25 -1
- package/node_modules/strtok3/package.json +97 -94
- package/node_modules/typebox/build/format/duration.d.mts +2 -2
- package/node_modules/typebox/build/format/duration.mjs +2 -2
- package/node_modules/typebox/build/format/idn_email.d.mts +1 -0
- package/node_modules/typebox/build/format/idn_email.mjs +1 -0
- package/node_modules/typebox/build/format/idn_hostname.d.mts +1 -1
- package/node_modules/typebox/build/format/idn_hostname.mjs +1 -1
- package/node_modules/typebox/build/format/ipv4.d.mts +2 -2
- package/node_modules/typebox/build/format/ipv4.mjs +2 -2
- package/node_modules/typebox/build/format/ipv6.d.mts +1 -1
- package/node_modules/typebox/build/format/ipv6.mjs +1 -1
- package/node_modules/typebox/build/format/relative_json_pointer.d.mts +2 -2
- package/node_modules/typebox/build/format/relative_json_pointer.mjs +2 -2
- package/node_modules/typebox/build/schema/build.mjs +1 -0
- package/node_modules/typebox/build/schema/engine/_unique.d.mts +4 -2
- package/node_modules/typebox/build/schema/engine/_unique.mjs +7 -3
- package/node_modules/typebox/build/schema/engine/additionalItems.mjs +3 -3
- package/node_modules/typebox/build/schema/engine/additionalProperties.d.mts +0 -3
- package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +15 -17
- package/node_modules/typebox/build/schema/engine/contains.mjs +3 -3
- package/node_modules/typebox/build/schema/engine/index.d.mts +1 -0
- package/node_modules/typebox/build/schema/engine/index.mjs +1 -0
- package/node_modules/typebox/build/schema/engine/items.mjs +7 -4
- package/node_modules/typebox/build/schema/engine/maxContains.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/minContains.mjs +3 -3
- package/node_modules/typebox/build/schema/engine/oneOf.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/patternProperties.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/propertyNames.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/unevaluatedItems.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/unevaluatedProperties.mjs +2 -2
- package/node_modules/typebox/build/system/hashing/hash.mjs +63 -34
- package/node_modules/typebox/build/system/locale/en_US.mjs +2 -1
- package/node_modules/typebox/build/system/memory/assign.d.mts +2 -8
- package/node_modules/typebox/build/system/memory/assign.mjs +13 -6
- package/node_modules/typebox/build/system/memory/clone.d.mts +4 -5
- package/node_modules/typebox/build/system/memory/clone.mjs +8 -96
- package/node_modules/typebox/build/system/memory/create.d.mts +1 -5
- package/node_modules/typebox/build/system/memory/create.mjs +18 -13
- package/node_modules/typebox/build/system/memory/deep.d.mts +2 -0
- package/node_modules/typebox/build/system/memory/deep.mjs +108 -0
- package/node_modules/typebox/build/system/memory/discard.d.mts +1 -1
- package/node_modules/typebox/build/system/memory/discard.mjs +9 -8
- package/node_modules/typebox/build/system/memory/finalize.d.mts +4 -0
- package/node_modules/typebox/build/system/memory/finalize.mjs +30 -0
- package/node_modules/typebox/build/system/memory/keys.d.mts +2 -0
- package/node_modules/typebox/build/system/memory/keys.mjs +8 -0
- package/node_modules/typebox/build/system/memory/update.d.mts +1 -4
- package/node_modules/typebox/build/system/memory/update.mjs +43 -16
- package/node_modules/typebox/build/type/engine/call/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/call/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/evaluate/composite.d.mts +2 -24
- package/node_modules/typebox/build/type/engine/evaluate/composite.mjs +2 -29
- package/node_modules/typebox/build/type/engine/evaluate/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/evaluate/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/evaluate/narrow.d.mts +5 -1
- package/node_modules/typebox/build/type/engine/evaluate/narrow.mjs +6 -1
- package/node_modules/typebox/build/type/engine/evaluate/property.d.mts +30 -0
- package/node_modules/typebox/build/type/engine/evaluate/property.mjs +29 -0
- package/node_modules/typebox/build/type/engine/immutable/instantiate_add.d.mts +1 -3
- package/node_modules/typebox/build/type/engine/immutable/instantiate_add.mjs +1 -4
- package/node_modules/typebox/build/type/engine/object/from_intersect.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/object/from_intersect.mjs +2 -2
- package/node_modules/typebox/build/type/engine/object/from_union.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/object/from_union.mjs +2 -2
- package/node_modules/typebox/build/type/engine/optional/instantiate_add.d.mts +1 -3
- package/node_modules/typebox/build/type/engine/optional/instantiate_add.mjs +1 -4
- package/node_modules/typebox/build/type/engine/readonly/instantiate_add.d.mts +1 -3
- package/node_modules/typebox/build/type/engine/readonly/instantiate_add.mjs +1 -4
- package/node_modules/typebox/build/type/engine/this/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/this/index.mjs +1 -0
- package/node_modules/typebox/build/value/clone/clone.d.mts +4 -3
- package/node_modules/typebox/build/value/clone/clone.mjs +5 -7
- package/node_modules/typebox/build/value/repair/from_cyclic.d.mts +2 -0
- package/node_modules/typebox/build/value/repair/from_cyclic.mjs +6 -0
- package/node_modules/typebox/build/value/shared/union_priority_sort.mjs +25 -14
- package/node_modules/typebox/package.json +1 -1
- package/node_modules/typebox/readme.md +1 -1
- package/node_modules/zod/package.json +1 -1
- package/node_modules/zod/src/v4/classic/tests/array.test.ts +27 -0
- package/node_modules/zod/src/v4/classic/tests/map.test.ts +7 -0
- package/node_modules/zod/src/v4/classic/tests/set.test.ts +6 -0
- package/node_modules/zod/src/v4/core/compile.ts +9 -0
- package/node_modules/zod/src/v4/core/schemas.ts +35 -1
- package/node_modules/zod/src/v4/core/util.ts +13 -0
- package/node_modules/zod/src/v4/core/versions.ts +1 -1
- package/node_modules/zod/v4/core/compile.cjs +8 -0
- package/node_modules/zod/v4/core/compile.js +8 -0
- package/node_modules/zod/v4/core/schemas.cjs +30 -0
- package/node_modules/zod/v4/core/schemas.d.cts +3 -1
- package/node_modules/zod/v4/core/schemas.d.ts +3 -1
- package/node_modules/zod/v4/core/schemas.js +30 -0
- package/node_modules/zod/v4/core/util.cjs +15 -0
- package/node_modules/zod/v4/core/util.d.cts +2 -0
- package/node_modules/zod/v4/core/util.d.ts +2 -0
- package/node_modules/zod/v4/core/util.js +14 -0
- package/node_modules/zod/v4/core/versions.cjs +1 -1
- package/node_modules/zod/v4/core/versions.js +1 -1
- package/openclaw.plugin.json +11 -0
- package/package.json +11 -11
- package/dist/.setup/channel.runtime-DyX4mM8d.mjs +0 -76
- package/dist/.setup/device-health-D6_ECUVe.mjs +0 -21
- package/dist/.setup/inbound-dedupe-sW_gaR44.mjs +0 -48
- package/dist/.setup/runtime-setter-api-DtxDAM-x.mjs +0 -3
- package/dist/.setup/secret-contract-api-CiuSYjUy.mjs +0 -3
- package/dist/.setup/setup-plugin-api-ORC_4yEA.mjs +0 -3
- package/dist/.setup/sqlite-state-LByPx4Yp.mjs +0 -37
- package/node_modules/music-metadata/node_modules/content-type/LICENSE +0 -22
- package/node_modules/music-metadata/node_modules/content-type/README.md +0 -71
- package/node_modules/music-metadata/node_modules/content-type/dist/index.d.ts +0 -46
- package/node_modules/music-metadata/node_modules/content-type/dist/index.js +0 -176
- package/node_modules/music-metadata/node_modules/content-type/dist/index.js.map +0 -1
- package/node_modules/music-metadata/node_modules/content-type/package.json +0 -52
- package/node_modules/typebox/build/system/memory/freeze.d.mts +0 -4
- package/node_modules/typebox/build/system/memory/freeze.mjs +0 -6
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { n as __exportAll } from "./runtime-doctor-migrations-hxP-CXX7.mjs";
|
|
2
|
-
import { i as requiresExplicitMatrixDefaultAccount, u as resolveMatrixEnvAuthReadiness } from "./account-selection-
|
|
2
|
+
import { i as requiresExplicitMatrixDefaultAccount, u as resolveMatrixEnvAuthReadiness } from "./account-selection-UUPhMBmu.mjs";
|
|
3
3
|
import { a as resolveMatrixAccountConfig } from "./account-config-CRsKoMqJ.mjs";
|
|
4
|
-
import { a as createMatrixSetupDmPolicy, g as resolveDefaultMatrixAccountId, m as listMatrixAccountIds, n as finishMatrixSetupAfterConfigWrite, o as moveSingleMatrixAccountConfigToNamedAccount, p as updateMatrixAccountConfig, v as resolveMatrixAccountAsync } from "./setup-core-
|
|
4
|
+
import { a as createMatrixSetupDmPolicy, g as resolveDefaultMatrixAccountId, m as listMatrixAccountIds, n as finishMatrixSetupAfterConfigWrite, o as moveSingleMatrixAccountConfigToNamedAccount, p as updateMatrixAccountConfig, v as resolveMatrixAccountAsync } from "./setup-core-DcqQbLZv.mjs";
|
|
5
5
|
import { r as isMatrixRoomId, t as isMatrixInviteAutoJoinTarget } from "./target-ids-HhcaKX1n.mjs";
|
|
6
|
-
import { n as validateMatrixHomeserverUrl, t as resolveValidatedMatrixHomeserverUrl } from "./url-validation-
|
|
7
|
-
import { n as ensureMatrixSdkInstalled, r as isMatrixSdkAvailable } from "./deps-
|
|
6
|
+
import { n as validateMatrixHomeserverUrl, t as resolveValidatedMatrixHomeserverUrl } from "./url-validation-By_2hsXr.mjs";
|
|
7
|
+
import { n as ensureMatrixSdkInstalled, r as isMatrixSdkAvailable } from "./deps-D-W_QQjz.mjs";
|
|
8
8
|
import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id";
|
|
9
9
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeStringifiedOptionalString, normalizeUniqueStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
10
10
|
import { formatDocsLink, hasConfiguredSecretInput, mergeAllowFromEntries, normalizeAccountId as normalizeAccountId$1, promptAccountId, promptChannelAccessConfig, setSetupChannelEnabled, splitSetupEntries } from "openclaw/plugin-sdk/setup";
|
|
@@ -87,13 +87,13 @@ async function promptMatrixAllowFrom(params) {
|
|
|
87
87
|
pending.push(part);
|
|
88
88
|
}
|
|
89
89
|
if (pending.length > 0) {
|
|
90
|
-
const { resolveMatrixTargets } = await import("./resolve-targets-
|
|
90
|
+
const { resolveMatrixTargets } = await import("./resolve-targets-DYW8ULZS.mjs").then((n) => n.n);
|
|
91
91
|
const results = await resolveMatrixTargets({
|
|
92
92
|
cfg,
|
|
93
93
|
accountId,
|
|
94
94
|
inputs: pending,
|
|
95
95
|
kind: "user"
|
|
96
|
-
})
|
|
96
|
+
});
|
|
97
97
|
for (const result of results) {
|
|
98
98
|
if (result?.resolved && result.id) {
|
|
99
99
|
resolvedIds.push(result.id);
|
|
@@ -124,115 +124,6 @@ function setMatrixAutoJoin(cfg, autoJoin, autoJoinAllowlist, accountId) {
|
|
|
124
124
|
autoJoinAllowlist: autoJoin === "allowlist" ? autoJoinAllowlist : null
|
|
125
125
|
});
|
|
126
126
|
}
|
|
127
|
-
async function configureMatrixInviteAutoJoin(params) {
|
|
128
|
-
const accountId = resolveMatrixOnboardingAccountId(params.cfg, params.accountId);
|
|
129
|
-
const existingConfig = resolveMatrixAccountConfig({
|
|
130
|
-
cfg: params.cfg,
|
|
131
|
-
accountId
|
|
132
|
-
});
|
|
133
|
-
const currentPolicy = existingConfig.autoJoin ?? "off";
|
|
134
|
-
const currentAllowlist = (existingConfig.autoJoinAllowlist ?? []).map((entry) => String(entry));
|
|
135
|
-
const hasExistingConfig = existingConfig.autoJoin !== void 0 || currentAllowlist.length > 0;
|
|
136
|
-
await params.prompter.note([
|
|
137
|
-
"WARNING: Matrix invite auto-join defaults to off.",
|
|
138
|
-
"OpenClaw agents will not join invited rooms or fresh DM-style invites unless you set autoJoin.",
|
|
139
|
-
"Choose \"allowlist\" to restrict joins or \"always\" to join every invite."
|
|
140
|
-
].join("\n"), "Matrix invite auto-join");
|
|
141
|
-
if (!await params.prompter.confirm({
|
|
142
|
-
message: hasExistingConfig ? "Update Matrix invite auto-join?" : "Configure Matrix invite auto-join?",
|
|
143
|
-
initialValue: hasExistingConfig ? currentPolicy !== "off" : true
|
|
144
|
-
})) return params.cfg;
|
|
145
|
-
const selectedPolicy = await params.prompter.select({
|
|
146
|
-
message: "Matrix invite auto-join",
|
|
147
|
-
options: matrixInviteAutoJoinOptions,
|
|
148
|
-
initialValue: currentPolicy
|
|
149
|
-
});
|
|
150
|
-
if (!isMatrixInviteAutoJoinPolicy(selectedPolicy)) throw new Error(`Unsupported Matrix invite auto-join policy: ${String(selectedPolicy)}`);
|
|
151
|
-
const policy = selectedPolicy;
|
|
152
|
-
if (policy === "off") await params.prompter.note(["Matrix invite auto-join remains off.", "Agents will not join invited rooms or fresh DM-style invites until you change autoJoin."].join("\n"), "Matrix invite auto-join");
|
|
153
|
-
if (policy !== "allowlist") return setMatrixAutoJoin(params.cfg, policy, [], accountId);
|
|
154
|
-
while (true) {
|
|
155
|
-
const rawAllowlist = await params.prompter.text({
|
|
156
|
-
message: "Matrix invite auto-join allowlist (comma-separated)",
|
|
157
|
-
placeholder: "!roomId:server, !roomId, #alias:server, *",
|
|
158
|
-
initialValue: currentAllowlist[0] ? currentAllowlist.join(", ") : void 0,
|
|
159
|
-
validate: (value) => {
|
|
160
|
-
return splitSetupEntries(value).length > 0 ? void 0 : "Required";
|
|
161
|
-
}
|
|
162
|
-
});
|
|
163
|
-
const allowlist = normalizeUniqueStringEntries(splitSetupEntries(rawAllowlist));
|
|
164
|
-
const invalidEntries = allowlist.filter((entry) => !isMatrixInviteAutoJoinTarget(entry));
|
|
165
|
-
if (allowlist.length === 0 || invalidEntries.length > 0) {
|
|
166
|
-
await params.prompter.note(["Use only stable Matrix invite targets for auto-join: !roomId:server (or the suffixless !roomId form on room version 12+), #alias:server, or *.", invalidEntries.length > 0 ? `Invalid: ${invalidEntries.join(", ")}` : void 0].filter(Boolean).join("\n"), "Matrix invite auto-join");
|
|
167
|
-
continue;
|
|
168
|
-
}
|
|
169
|
-
return setMatrixAutoJoin(params.cfg, "allowlist", allowlist, accountId);
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
async function configureMatrixAccessPrompts(params) {
|
|
173
|
-
let next = params.cfg;
|
|
174
|
-
if (params.forceAllowFrom) next = await promptMatrixAllowFrom({
|
|
175
|
-
cfg: next,
|
|
176
|
-
prompter: params.prompter,
|
|
177
|
-
accountId: params.accountId
|
|
178
|
-
});
|
|
179
|
-
const existingAccountConfig = resolveMatrixAccountConfig({
|
|
180
|
-
cfg: next,
|
|
181
|
-
accountId: params.accountId
|
|
182
|
-
});
|
|
183
|
-
const existingGroups = existingAccountConfig.groups ?? existingAccountConfig.rooms;
|
|
184
|
-
const accessConfig = await promptChannelAccessConfig({
|
|
185
|
-
prompter: params.prompter,
|
|
186
|
-
label: "Matrix rooms",
|
|
187
|
-
currentPolicy: existingAccountConfig.groupPolicy ?? "allowlist",
|
|
188
|
-
currentEntries: Object.keys(existingGroups ?? {}),
|
|
189
|
-
placeholder: "!roomId:server, !roomId, #alias:server, Project Room",
|
|
190
|
-
updatePrompt: Boolean(existingGroups)
|
|
191
|
-
});
|
|
192
|
-
if (accessConfig) {
|
|
193
|
-
if (accessConfig.policy !== "allowlist") next = updateMatrixAccountConfig(next, params.accountId, { groupPolicy: accessConfig.policy });
|
|
194
|
-
else {
|
|
195
|
-
let roomKeys = accessConfig.entries;
|
|
196
|
-
if (accessConfig.entries.length > 0) try {
|
|
197
|
-
const resolvedIds = [];
|
|
198
|
-
const unresolved = [];
|
|
199
|
-
for (const entry of accessConfig.entries) {
|
|
200
|
-
const trimmed = normalizeOptionalString(entry) ?? "";
|
|
201
|
-
if (!trimmed) continue;
|
|
202
|
-
const cleaned = trimmed.replace(/^(room|channel):/i, "").trim();
|
|
203
|
-
if (isMatrixRoomId(cleaned)) {
|
|
204
|
-
resolvedIds.push(cleaned);
|
|
205
|
-
continue;
|
|
206
|
-
}
|
|
207
|
-
const { listMatrixDirectoryGroupsLive } = await import("./directory-live-_yaRaktv.mjs").then((n) => n.t);
|
|
208
|
-
const matches = await listMatrixDirectoryGroupsLive({
|
|
209
|
-
cfg: next,
|
|
210
|
-
accountId: params.accountId,
|
|
211
|
-
query: trimmed,
|
|
212
|
-
limit: 10
|
|
213
|
-
});
|
|
214
|
-
const best = matches.find((match) => normalizeLowercaseStringOrEmpty(match.name) === normalizeLowercaseStringOrEmpty(trimmed)) ?? matches[0];
|
|
215
|
-
if (best?.id) resolvedIds.push(best.id);
|
|
216
|
-
else unresolved.push(entry);
|
|
217
|
-
}
|
|
218
|
-
roomKeys = [...resolvedIds, ...unresolved.map((entry) => normalizeOptionalString(entry)).filter((entry) => Boolean(entry))];
|
|
219
|
-
if (resolvedIds.length > 0 || unresolved.length > 0) await params.prompter.note([resolvedIds.length > 0 ? `Resolved: ${resolvedIds.join(", ")}` : void 0, unresolved.length > 0 ? `Unresolved (kept as typed): ${unresolved.join(", ")}` : void 0].filter(Boolean).join("\n"), "Matrix rooms");
|
|
220
|
-
} catch (err) {
|
|
221
|
-
await params.prompter.note(`Room lookup failed; keeping entries as typed. ${String(err)}`, "Matrix rooms");
|
|
222
|
-
}
|
|
223
|
-
next = updateMatrixAccountConfig(next, params.accountId, {
|
|
224
|
-
groupPolicy: "allowlist",
|
|
225
|
-
groups: Object.fromEntries(roomKeys.map((key) => [key, { enabled: true }])),
|
|
226
|
-
rooms: null
|
|
227
|
-
});
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
return await configureMatrixInviteAutoJoin({
|
|
231
|
-
cfg: next,
|
|
232
|
-
prompter: params.prompter,
|
|
233
|
-
accountId: params.accountId
|
|
234
|
-
});
|
|
235
|
-
}
|
|
236
127
|
const dmPolicy = createMatrixSetupDmPolicy(promptMatrixAllowFrom);
|
|
237
128
|
async function runMatrixConfigure(params) {
|
|
238
129
|
let next = params.cfg;
|
|
@@ -264,6 +155,113 @@ async function runMatrixConfigure(params) {
|
|
|
264
155
|
defaultAccountId
|
|
265
156
|
});
|
|
266
157
|
}
|
|
158
|
+
const selectedAccountId = accountId;
|
|
159
|
+
async function configureMatrixAccessPrompts(cfg) {
|
|
160
|
+
const { prompter, forceAllowFrom } = params;
|
|
161
|
+
let accessCfg = cfg;
|
|
162
|
+
if (forceAllowFrom) accessCfg = await promptMatrixAllowFrom({
|
|
163
|
+
cfg: accessCfg,
|
|
164
|
+
prompter,
|
|
165
|
+
accountId: selectedAccountId
|
|
166
|
+
});
|
|
167
|
+
const existingAccountConfig = resolveMatrixAccountConfig({
|
|
168
|
+
cfg: accessCfg,
|
|
169
|
+
accountId: selectedAccountId
|
|
170
|
+
});
|
|
171
|
+
const existingGroups = existingAccountConfig.groups ?? existingAccountConfig.rooms;
|
|
172
|
+
const accessConfig = await promptChannelAccessConfig({
|
|
173
|
+
prompter,
|
|
174
|
+
label: "Matrix rooms",
|
|
175
|
+
currentPolicy: existingAccountConfig.groupPolicy ?? "allowlist",
|
|
176
|
+
currentEntries: Object.keys(existingGroups ?? {}),
|
|
177
|
+
placeholder: "!roomId:server, !roomId, #alias:server, Project Room",
|
|
178
|
+
updatePrompt: Boolean(existingGroups)
|
|
179
|
+
});
|
|
180
|
+
if (accessConfig) {
|
|
181
|
+
if (accessConfig.policy !== "allowlist") accessCfg = updateMatrixAccountConfig(accessCfg, selectedAccountId, { groupPolicy: accessConfig.policy });
|
|
182
|
+
else {
|
|
183
|
+
let roomKeys = accessConfig.entries;
|
|
184
|
+
if (accessConfig.entries.length > 0) try {
|
|
185
|
+
const resolvedIds = [];
|
|
186
|
+
const unresolved = [];
|
|
187
|
+
for (const entry of accessConfig.entries) {
|
|
188
|
+
const trimmed = normalizeOptionalString(entry) ?? "";
|
|
189
|
+
if (!trimmed) continue;
|
|
190
|
+
const cleaned = trimmed.replace(/^(room|channel):/i, "").trim();
|
|
191
|
+
if (isMatrixRoomId(cleaned)) {
|
|
192
|
+
resolvedIds.push(cleaned);
|
|
193
|
+
continue;
|
|
194
|
+
}
|
|
195
|
+
const { listMatrixDirectoryGroupsLive } = await import("./directory-live-ufzRheWx.mjs").then((n) => n.t);
|
|
196
|
+
const matches = await listMatrixDirectoryGroupsLive({
|
|
197
|
+
cfg: accessCfg,
|
|
198
|
+
accountId: selectedAccountId,
|
|
199
|
+
query: trimmed,
|
|
200
|
+
limit: 10
|
|
201
|
+
});
|
|
202
|
+
const best = matches.find((match) => normalizeLowercaseStringOrEmpty(match.name) === normalizeLowercaseStringOrEmpty(trimmed)) ?? matches[0];
|
|
203
|
+
if (best?.id) resolvedIds.push(best.id);
|
|
204
|
+
else unresolved.push(entry);
|
|
205
|
+
}
|
|
206
|
+
roomKeys = [...resolvedIds, ...unresolved.map((entry) => normalizeOptionalString(entry)).filter((entry) => Boolean(entry))];
|
|
207
|
+
if (resolvedIds.length > 0 || unresolved.length > 0) await prompter.note([resolvedIds.length > 0 ? `Resolved: ${resolvedIds.join(", ")}` : void 0, unresolved.length > 0 ? `Unresolved (kept as typed): ${unresolved.join(", ")}` : void 0].filter(Boolean).join("\n"), "Matrix rooms");
|
|
208
|
+
} catch (err) {
|
|
209
|
+
await prompter.note(`Room lookup failed; keeping entries as typed. ${String(err)}`, "Matrix rooms");
|
|
210
|
+
}
|
|
211
|
+
accessCfg = updateMatrixAccountConfig(accessCfg, selectedAccountId, {
|
|
212
|
+
groupPolicy: "allowlist",
|
|
213
|
+
groups: Object.fromEntries(roomKeys.map((key) => [key, { enabled: true }])),
|
|
214
|
+
rooms: null
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
async function configureMatrixInviteAutoJoin(inviteCfg) {
|
|
219
|
+
const inviteAccountId = resolveMatrixOnboardingAccountId(inviteCfg, selectedAccountId);
|
|
220
|
+
const existingConfig = resolveMatrixAccountConfig({
|
|
221
|
+
cfg: inviteCfg,
|
|
222
|
+
accountId: inviteAccountId
|
|
223
|
+
});
|
|
224
|
+
const currentPolicy = existingConfig.autoJoin ?? "off";
|
|
225
|
+
const currentAllowlist = (existingConfig.autoJoinAllowlist ?? []).map((entry) => String(entry));
|
|
226
|
+
const hasExistingConfig = existingConfig.autoJoin !== void 0 || currentAllowlist.length > 0;
|
|
227
|
+
await prompter.note([
|
|
228
|
+
"WARNING: Matrix invite auto-join defaults to off.",
|
|
229
|
+
"OpenClaw agents will not join invited rooms or fresh DM-style invites unless you set autoJoin.",
|
|
230
|
+
"Choose \"allowlist\" to restrict joins or \"always\" to join every invite."
|
|
231
|
+
].join("\n"), "Matrix invite auto-join");
|
|
232
|
+
if (!await prompter.confirm({
|
|
233
|
+
message: hasExistingConfig ? "Update Matrix invite auto-join?" : "Configure Matrix invite auto-join?",
|
|
234
|
+
initialValue: hasExistingConfig ? currentPolicy !== "off" : true
|
|
235
|
+
})) return inviteCfg;
|
|
236
|
+
const selectedPolicy = await prompter.select({
|
|
237
|
+
message: "Matrix invite auto-join",
|
|
238
|
+
options: matrixInviteAutoJoinOptions,
|
|
239
|
+
initialValue: currentPolicy
|
|
240
|
+
});
|
|
241
|
+
if (!isMatrixInviteAutoJoinPolicy(selectedPolicy)) throw new Error(`Unsupported Matrix invite auto-join policy: ${String(selectedPolicy)}`);
|
|
242
|
+
const policy = selectedPolicy;
|
|
243
|
+
if (policy === "off") await prompter.note(["Matrix invite auto-join remains off.", "Agents will not join invited rooms or fresh DM-style invites until you change autoJoin."].join("\n"), "Matrix invite auto-join");
|
|
244
|
+
if (policy !== "allowlist") return setMatrixAutoJoin(inviteCfg, policy, [], inviteAccountId);
|
|
245
|
+
while (true) {
|
|
246
|
+
const rawAllowlist = await prompter.text({
|
|
247
|
+
message: "Matrix invite auto-join allowlist (comma-separated)",
|
|
248
|
+
placeholder: "!roomId:server, !roomId, #alias:server, *",
|
|
249
|
+
initialValue: currentAllowlist[0] ? currentAllowlist.join(", ") : void 0,
|
|
250
|
+
validate: (value) => {
|
|
251
|
+
return splitSetupEntries(value).length > 0 ? void 0 : "Required";
|
|
252
|
+
}
|
|
253
|
+
});
|
|
254
|
+
const allowlist = normalizeUniqueStringEntries(splitSetupEntries(rawAllowlist));
|
|
255
|
+
const invalidEntries = allowlist.filter((entry) => !isMatrixInviteAutoJoinTarget(entry));
|
|
256
|
+
if (allowlist.length === 0 || invalidEntries.length > 0) {
|
|
257
|
+
await prompter.note(["Use only stable Matrix invite targets for auto-join: !roomId:server (or the suffixless !roomId form on room version 12+), #alias:server, or *.", invalidEntries.length > 0 ? `Invalid: ${invalidEntries.join(", ")}` : void 0].filter(Boolean).join("\n"), "Matrix invite auto-join");
|
|
258
|
+
continue;
|
|
259
|
+
}
|
|
260
|
+
return setMatrixAutoJoin(inviteCfg, "allowlist", allowlist, inviteAccountId);
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
return await configureMatrixInviteAutoJoin(accessCfg);
|
|
264
|
+
}
|
|
267
265
|
const existing = resolveMatrixAccountConfig({
|
|
268
266
|
cfg: next,
|
|
269
267
|
accountId
|
|
@@ -282,12 +280,7 @@ async function runMatrixConfigure(params) {
|
|
|
282
280
|
initialValue: true
|
|
283
281
|
})) {
|
|
284
282
|
next = updateMatrixAccountConfig(next, accountId, { enabled: true });
|
|
285
|
-
next = await configureMatrixAccessPrompts(
|
|
286
|
-
cfg: next,
|
|
287
|
-
prompter: params.prompter,
|
|
288
|
-
forceAllowFrom: params.forceAllowFrom,
|
|
289
|
-
accountId
|
|
290
|
-
});
|
|
283
|
+
next = await configureMatrixAccessPrompts(next);
|
|
291
284
|
return {
|
|
292
285
|
cfg: next,
|
|
293
286
|
accountId
|
|
@@ -382,12 +375,7 @@ async function runMatrixConfigure(params) {
|
|
|
382
375
|
deviceName: deviceName || null,
|
|
383
376
|
encryption: enableEncryption
|
|
384
377
|
});
|
|
385
|
-
next = await configureMatrixAccessPrompts(
|
|
386
|
-
cfg: next,
|
|
387
|
-
prompter: params.prompter,
|
|
388
|
-
forceAllowFrom: params.forceAllowFrom,
|
|
389
|
-
accountId
|
|
390
|
-
});
|
|
378
|
+
next = await configureMatrixAccessPrompts(next);
|
|
391
379
|
return {
|
|
392
380
|
cfg: next,
|
|
393
381
|
accountId
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as matrixPresentationCapabilities } from "./channel-
|
|
2
|
-
import { i as sendPollMatrix, r as sendMessageMatrix } from "./send-
|
|
1
|
+
import { r as matrixPresentationCapabilities } from "./channel-CX7k81dL.mjs";
|
|
2
|
+
import { i as sendPollMatrix, r as sendMessageMatrix } from "./send-HHAbKARg.mjs";
|
|
3
3
|
import { createMessageReceiptFromOutboundResults, createReplyToFanout, resolveOutboundSendDep } from "openclaw/plugin-sdk/channel-outbound";
|
|
4
4
|
import { asOptionalRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
5
|
import { chunkTextForOutbound } from "openclaw/plugin-sdk/text-chunking";
|
|
@@ -1,42 +1,43 @@
|
|
|
1
1
|
import { t as getMatrixRuntime } from "./runtime-1kn1P6io.mjs";
|
|
2
|
-
import { d as syncMatrixOwnProfile, p as updateMatrixAccountConfig } from "./setup-core-
|
|
2
|
+
import { d as syncMatrixOwnProfile, p as updateMatrixAccountConfig } from "./setup-core-DcqQbLZv.mjs";
|
|
3
3
|
import { n as resolveMatrixConfigPath } from "./config-paths-CnREYb1Y.mjs";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { l as resolveMatrixAuthContext } from "./client-D1bsidwU.mjs";
|
|
5
|
+
import { n as withResolvedActionClient } from "./client-CFPYqaYK.mjs";
|
|
6
6
|
//#region extensions/matrix/src/matrix/actions/profile.ts
|
|
7
7
|
async function updateMatrixOwnProfile(opts = {}) {
|
|
8
|
-
const displayName = opts.displayName?.trim();
|
|
9
|
-
const avatarUrl = opts.avatarUrl?.trim();
|
|
10
|
-
const avatarPath = opts.avatarPath?.trim();
|
|
11
8
|
const runtime = getMatrixRuntime();
|
|
12
9
|
return await withResolvedActionClient(opts, async (client) => {
|
|
13
10
|
const userId = await client.getUserId();
|
|
14
11
|
return await syncMatrixOwnProfile({
|
|
15
12
|
client,
|
|
16
13
|
userId,
|
|
17
|
-
displayName: displayName
|
|
18
|
-
avatarUrl: avatarUrl
|
|
19
|
-
avatarPath: avatarPath
|
|
14
|
+
displayName: opts.displayName,
|
|
15
|
+
avatarUrl: opts.avatarUrl,
|
|
16
|
+
avatarPath: opts.avatarPath,
|
|
20
17
|
loadAvatarFromUrl: async (url, maxBytes) => await runtime.media.loadWebMedia(url, maxBytes),
|
|
21
18
|
loadAvatarFromPath: async (path, maxBytes) => await runtime.media.loadWebMedia(path, {
|
|
22
19
|
maxBytes,
|
|
23
20
|
localRoots: opts.mediaLocalRoots
|
|
24
21
|
})
|
|
25
22
|
});
|
|
26
|
-
}
|
|
23
|
+
});
|
|
27
24
|
}
|
|
28
25
|
//#endregion
|
|
29
26
|
//#region extensions/matrix/src/profile-update.ts
|
|
30
27
|
async function applyMatrixProfileUpdate(params) {
|
|
31
28
|
const runtime = getMatrixRuntime();
|
|
32
29
|
const persistedCfg = runtime.config.current();
|
|
33
|
-
const
|
|
30
|
+
const cfg = params.cfg ?? persistedCfg;
|
|
34
31
|
const displayName = params.displayName?.trim() || null;
|
|
35
32
|
const avatarUrl = params.avatarUrl?.trim() || null;
|
|
36
33
|
const avatarPath = params.avatarPath?.trim() || null;
|
|
37
34
|
if (!displayName && !avatarUrl && !avatarPath) throw new Error("Provide name/displayName and/or avatarUrl/avatarPath.");
|
|
35
|
+
const accountId = resolveMatrixAuthContext({
|
|
36
|
+
cfg,
|
|
37
|
+
accountId: params.account
|
|
38
|
+
}).accountId;
|
|
38
39
|
const synced = await updateMatrixOwnProfile({
|
|
39
|
-
cfg
|
|
40
|
+
cfg,
|
|
40
41
|
accountId,
|
|
41
42
|
displayName: displayName ?? void 0,
|
|
42
43
|
avatarUrl: avatarUrl ?? void 0,
|
|
@@ -52,12 +53,11 @@ async function applyMatrixProfileUpdate(params) {
|
|
|
52
53
|
nextConfig: updated,
|
|
53
54
|
afterWrite: { mode: "auto" }
|
|
54
55
|
});
|
|
55
|
-
const { skipped: _skipped, ...profile } = synced;
|
|
56
56
|
return {
|
|
57
57
|
accountId,
|
|
58
58
|
displayName,
|
|
59
59
|
avatarUrl: persistedAvatarUrl ?? null,
|
|
60
|
-
profile,
|
|
60
|
+
profile: synced,
|
|
61
61
|
configPath: resolveMatrixConfigPath(updated, accountId)
|
|
62
62
|
};
|
|
63
63
|
}
|
|
@@ -1,102 +1,21 @@
|
|
|
1
1
|
import { a as resolveMatrixAccountConfig } from "./account-config-CRsKoMqJ.mjs";
|
|
2
|
-
import { a as
|
|
3
|
-
import { c as extractMatrixReactionAnnotation } from "./send-currentness-
|
|
4
|
-
import { p as resolveMatrixThreadRootId } from "./direct-management-
|
|
5
|
-
import { i as resolveMatrixApprovalReactionTargetWithPersistence, o as unregisterMatrixApprovalReactionTargetsForApproval } from "./approval-reactions-
|
|
2
|
+
import { a as resolveMatrixInboundRouteAsync, o as resolveMatrixThreadRouting } from "./channel-CX7k81dL.mjs";
|
|
3
|
+
import { c as extractMatrixReactionAnnotation } from "./send-currentness-DGxiiBn9.mjs";
|
|
4
|
+
import { p as resolveMatrixThreadRootId } from "./direct-management-Dp1giZ34.mjs";
|
|
5
|
+
import { i as resolveMatrixApprovalReactionTargetWithPersistence, o as unregisterMatrixApprovalReactionTargetsForApproval } from "./approval-reactions-BazmsDbe.mjs";
|
|
6
6
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
7
7
|
import { isApprovalNotFoundError } from "openclaw/plugin-sdk/error-runtime";
|
|
8
8
|
import { normalizeAccountId } from "openclaw/plugin-sdk/routing";
|
|
9
9
|
import { getSessionBindingService } from "openclaw/plugin-sdk/session-binding-runtime";
|
|
10
10
|
//#region extensions/matrix/src/matrix/monitor/reaction-events.ts
|
|
11
|
-
const loadApprovalReactionAuth = createLazyRuntimeModule(() => import("./channel-
|
|
11
|
+
const loadApprovalReactionAuth = createLazyRuntimeModule(() => import("./channel-CX7k81dL.mjs").then((n) => n.s));
|
|
12
12
|
const loadExecApprovalResolver = createLazyRuntimeModule(() => import("openclaw/plugin-sdk/approval-gateway-runtime"));
|
|
13
|
-
const loadMatrixSend = createLazyRuntimeModule(() => import("./send-
|
|
13
|
+
const loadMatrixSend = createLazyRuntimeModule(() => import("./send-HHAbKARg.mjs").then((n) => n.s));
|
|
14
14
|
function buildMatrixApprovalTerminalText(result) {
|
|
15
15
|
const approval = result.approval;
|
|
16
16
|
const terminalLabel = approval.status === "allowed" ? approval.decision === "allow-always" ? "Allowed always" : "Allowed once" : approval.status === "denied" ? "Denied" : approval.status === "expired" ? "Expired" : "Cancelled";
|
|
17
17
|
return `${result.applied ? "Resolved" : "Already resolved"}: ${terminalLabel}\n\nID: ${approval.id}`;
|
|
18
18
|
}
|
|
19
|
-
async function retireMatrixApprovalReactionTargets(params) {
|
|
20
|
-
const accountId = normalizeAccountId(params.accountId);
|
|
21
|
-
const registeredTargets = await unregisterMatrixApprovalReactionTargetsForApproval({
|
|
22
|
-
accountId,
|
|
23
|
-
approvalId: params.approvalId,
|
|
24
|
-
approvalKind: params.approvalKind
|
|
25
|
-
});
|
|
26
|
-
const targets = /* @__PURE__ */ new Map();
|
|
27
|
-
for (const target of [...registeredTargets, {
|
|
28
|
-
accountId,
|
|
29
|
-
roomId: params.roomId,
|
|
30
|
-
eventId: params.targetEventId
|
|
31
|
-
}]) targets.set(JSON.stringify([
|
|
32
|
-
target.accountId,
|
|
33
|
-
target.roomId,
|
|
34
|
-
target.eventId
|
|
35
|
-
]), target);
|
|
36
|
-
const { editMessageMatrix } = await loadMatrixSend();
|
|
37
|
-
const terminalText = buildMatrixApprovalTerminalText(params.result);
|
|
38
|
-
const failedUpdates = (await Promise.allSettled(Array.from(targets.values(), async (target) => {
|
|
39
|
-
await editMessageMatrix(target.roomId, target.eventId, terminalText, {
|
|
40
|
-
cfg: params.cfg,
|
|
41
|
-
accountId: target.accountId,
|
|
42
|
-
client: params.client
|
|
43
|
-
});
|
|
44
|
-
}))).filter((update) => update.status === "rejected").length;
|
|
45
|
-
if (failedUpdates > 0) params.logVerboseMessage(`matrix: failed to terminalize ${failedUpdates} approval prompt(s) id=${params.approvalId}`);
|
|
46
|
-
}
|
|
47
|
-
function resolveMatrixReactionNotificationMode(params) {
|
|
48
|
-
const matrixConfig = params.cfg.channels?.matrix;
|
|
49
|
-
return resolveMatrixAccountConfig({
|
|
50
|
-
cfg: params.cfg,
|
|
51
|
-
accountId: params.accountId
|
|
52
|
-
}).reactionNotifications ?? matrixConfig?.reactionNotifications ?? "own";
|
|
53
|
-
}
|
|
54
|
-
async function maybeResolveMatrixApprovalReaction(params) {
|
|
55
|
-
if (!params.target) return false;
|
|
56
|
-
const { isMatrixApprovalReactionAuthorizedSender } = await loadApprovalReactionAuth();
|
|
57
|
-
if (!isMatrixApprovalReactionAuthorizedSender({
|
|
58
|
-
...params,
|
|
59
|
-
approvalKind: params.target.approvalKind
|
|
60
|
-
})) return false;
|
|
61
|
-
const { resolveApprovalOverGateway } = await loadExecApprovalResolver();
|
|
62
|
-
try {
|
|
63
|
-
const result = await resolveApprovalOverGateway({
|
|
64
|
-
cfg: params.cfg,
|
|
65
|
-
approvalId: params.target.approvalId,
|
|
66
|
-
approvalKind: params.target.approvalKind,
|
|
67
|
-
decision: params.target.decision,
|
|
68
|
-
channel: "matrix",
|
|
69
|
-
accountId: params.accountId,
|
|
70
|
-
senderId: params.senderId
|
|
71
|
-
});
|
|
72
|
-
await retireMatrixApprovalReactionTargets({
|
|
73
|
-
cfg: params.cfg,
|
|
74
|
-
accountId: params.accountId,
|
|
75
|
-
client: params.client,
|
|
76
|
-
roomId: params.roomId,
|
|
77
|
-
targetEventId: params.targetEventId,
|
|
78
|
-
approvalId: params.target.approvalId,
|
|
79
|
-
approvalKind: params.target.approvalKind,
|
|
80
|
-
result,
|
|
81
|
-
logVerboseMessage: params.logVerboseMessage
|
|
82
|
-
});
|
|
83
|
-
const canonicalDecision = "decision" in result.approval ? result.approval.decision : "none";
|
|
84
|
-
params.logVerboseMessage(`matrix: approval reaction resolved id=${params.target.approvalId} sender=${params.senderId} applied=${result.applied} status=${result.approval.status} decision=${canonicalDecision}`);
|
|
85
|
-
return true;
|
|
86
|
-
} catch (err) {
|
|
87
|
-
if (isApprovalNotFoundError(err)) {
|
|
88
|
-
await unregisterMatrixApprovalReactionTargetsForApproval({
|
|
89
|
-
accountId: params.accountId,
|
|
90
|
-
approvalId: params.target.approvalId,
|
|
91
|
-
approvalKind: params.target.approvalKind
|
|
92
|
-
});
|
|
93
|
-
params.logVerboseMessage(`matrix: approval reaction ignored for expired approval id=${params.target.approvalId} sender=${params.senderId}`);
|
|
94
|
-
return true;
|
|
95
|
-
}
|
|
96
|
-
params.logVerboseMessage(`matrix: approval reaction failed id=${params.target.approvalId} sender=${params.senderId}: ${String(err)}`);
|
|
97
|
-
throw err;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
19
|
async function handleInboundMatrixReaction(params) {
|
|
101
20
|
const reaction = extractMatrixReactionAnnotation(params.event.content);
|
|
102
21
|
if (!reaction?.eventId) return;
|
|
@@ -107,20 +26,76 @@ async function handleInboundMatrixReaction(params) {
|
|
|
107
26
|
eventId: reaction.eventId,
|
|
108
27
|
reactionKey: reaction.key
|
|
109
28
|
});
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
29
|
+
const { cfg, accountId, senderId, client, roomId, logVerboseMessage } = params;
|
|
30
|
+
const targetEventId = reaction.eventId;
|
|
31
|
+
if (await (async () => {
|
|
32
|
+
if (!approvalTarget) return false;
|
|
33
|
+
const { isMatrixApprovalReactionAuthorizedSender } = await loadApprovalReactionAuth();
|
|
34
|
+
if (!isMatrixApprovalReactionAuthorizedSender({
|
|
35
|
+
cfg,
|
|
36
|
+
accountId,
|
|
37
|
+
senderId,
|
|
38
|
+
approvalKind: approvalTarget.approvalKind
|
|
39
|
+
})) return false;
|
|
40
|
+
const { resolveApprovalOverGateway } = await loadExecApprovalResolver();
|
|
41
|
+
try {
|
|
42
|
+
const result = await resolveApprovalOverGateway({
|
|
43
|
+
cfg,
|
|
44
|
+
approvalId: approvalTarget.approvalId,
|
|
45
|
+
approvalKind: approvalTarget.approvalKind,
|
|
46
|
+
decision: approvalTarget.decision,
|
|
47
|
+
channel: "matrix",
|
|
48
|
+
accountId,
|
|
49
|
+
senderId
|
|
50
|
+
});
|
|
51
|
+
const retiredAccountId = normalizeAccountId(accountId);
|
|
52
|
+
const registeredTargets = await unregisterMatrixApprovalReactionTargetsForApproval({
|
|
53
|
+
accountId: retiredAccountId,
|
|
54
|
+
approvalId: approvalTarget.approvalId,
|
|
55
|
+
approvalKind: approvalTarget.approvalKind
|
|
56
|
+
});
|
|
57
|
+
const targets = /* @__PURE__ */ new Map();
|
|
58
|
+
for (const target of [...registeredTargets, {
|
|
59
|
+
accountId: retiredAccountId,
|
|
60
|
+
roomId,
|
|
61
|
+
eventId: targetEventId
|
|
62
|
+
}]) targets.set(JSON.stringify([
|
|
63
|
+
target.accountId,
|
|
64
|
+
target.roomId,
|
|
65
|
+
target.eventId
|
|
66
|
+
]), target);
|
|
67
|
+
const { editMessageMatrix } = await loadMatrixSend();
|
|
68
|
+
const terminalText = buildMatrixApprovalTerminalText(result);
|
|
69
|
+
const failedUpdates = (await Promise.allSettled(Array.from(targets.values(), async (target) => {
|
|
70
|
+
await editMessageMatrix(target.roomId, target.eventId, terminalText, {
|
|
71
|
+
cfg,
|
|
72
|
+
accountId: target.accountId,
|
|
73
|
+
client
|
|
74
|
+
});
|
|
75
|
+
}))).filter((update) => update.status === "rejected").length;
|
|
76
|
+
if (failedUpdates > 0) logVerboseMessage(`matrix: failed to terminalize ${failedUpdates} approval prompt(s) id=${approvalTarget.approvalId}`);
|
|
77
|
+
const canonicalDecision = "decision" in result.approval ? result.approval.decision : "none";
|
|
78
|
+
logVerboseMessage(`matrix: approval reaction resolved id=${approvalTarget.approvalId} sender=${senderId} applied=${result.applied} status=${result.approval.status} decision=${canonicalDecision}`);
|
|
79
|
+
return true;
|
|
80
|
+
} catch (err) {
|
|
81
|
+
if (isApprovalNotFoundError(err)) {
|
|
82
|
+
await unregisterMatrixApprovalReactionTargetsForApproval({
|
|
83
|
+
accountId,
|
|
84
|
+
approvalId: approvalTarget.approvalId,
|
|
85
|
+
approvalKind: approvalTarget.approvalKind
|
|
86
|
+
});
|
|
87
|
+
logVerboseMessage(`matrix: approval reaction ignored for expired approval id=${approvalTarget.approvalId} sender=${senderId}`);
|
|
88
|
+
return true;
|
|
89
|
+
}
|
|
90
|
+
logVerboseMessage(`matrix: approval reaction failed id=${approvalTarget.approvalId} sender=${senderId}: ${String(err)}`);
|
|
91
|
+
throw err;
|
|
92
|
+
}
|
|
93
|
+
})()) return;
|
|
94
|
+
const matrixConfig = params.cfg.channels?.matrix;
|
|
95
|
+
const notificationMode = resolveMatrixAccountConfig({
|
|
121
96
|
cfg: params.cfg,
|
|
122
97
|
accountId: params.accountId
|
|
123
|
-
});
|
|
98
|
+
}).reactionNotifications ?? matrixConfig?.reactionNotifications ?? "own";
|
|
124
99
|
if (notificationMode === "off") return;
|
|
125
100
|
const targetEvent = await params.client.getEvent(params.roomId, reaction.eventId).catch((err) => {
|
|
126
101
|
params.logVerboseMessage(`matrix: failed resolving reaction target room=${params.roomId} id=${reaction.eventId}: ${String(err)}`);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as __exportAll } from "./runtime-doctor-migrations-hxP-CXX7.mjs";
|
|
2
2
|
import { i as normalizeMatrixMessagingTarget, n as isMatrixQualifiedUserId } from "./target-ids-HhcaKX1n.mjs";
|
|
3
|
-
import { n as listMatrixDirectoryGroupsLive, r as listMatrixDirectoryPeersLive } from "./directory-live-
|
|
3
|
+
import { n as listMatrixDirectoryGroupsLive, r as listMatrixDirectoryPeersLive } from "./directory-live-ufzRheWx.mjs";
|
|
4
4
|
import { normalizeOptionalLowercaseString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
5
|
//#region extensions/matrix/src/resolve-targets.ts
|
|
6
6
|
var resolve_targets_exports = /* @__PURE__ */ __exportAll({ resolveMatrixTargets: () => resolveMatrixTargets });
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { t as getMatrixRuntime } from "./runtime-1kn1P6io.mjs";
|
|
1
2
|
import { extractErrorCode } from "openclaw/plugin-sdk/error-runtime";
|
|
2
3
|
import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
4
|
import path from "node:path";
|
|
5
|
+
import os from "node:os";
|
|
4
6
|
import fs from "node:fs/promises";
|
|
5
7
|
//#region extensions/matrix/src/matrix/chunked-state.ts
|
|
6
8
|
function chunkMatrixStateJson(value, maxBytes, maxChunks, limitMessage) {
|
|
@@ -38,12 +40,49 @@ async function readMatrixStateChunks(store, keys, kind) {
|
|
|
38
40
|
return chunks;
|
|
39
41
|
}
|
|
40
42
|
async function writeMatrixStateChunks(store, rows, chunkKeyPrefix) {
|
|
41
|
-
const nextChunkKeys = new Set(rows.chunks.map((row) => row.key));
|
|
42
43
|
for (const row of rows.chunks) await store.register(row.key, row.value);
|
|
43
44
|
await store.register(rows.meta.key, rows.meta.value);
|
|
45
|
+
await pruneMatrixStateChunks(store, rows.chunks.map((row) => row.key), chunkKeyPrefix);
|
|
46
|
+
}
|
|
47
|
+
async function pruneMatrixStateChunks(store, retainedKeys, chunkKeyPrefix) {
|
|
48
|
+
const nextChunkKeys = new Set(retainedKeys);
|
|
44
49
|
for (const row of await store.entries()) if (row.key.startsWith(chunkKeyPrefix) && !nextChunkKeys.has(row.key)) await store.delete(row.key);
|
|
45
50
|
}
|
|
46
51
|
//#endregion
|
|
52
|
+
//#region extensions/matrix/src/matrix/sqlite-state.ts
|
|
53
|
+
function resolveStateDirOverride(options) {
|
|
54
|
+
if (!options) return;
|
|
55
|
+
return options.stateDir || getMatrixRuntime().state.resolveStateDir(options.env ?? process.env, os.homedir);
|
|
56
|
+
}
|
|
57
|
+
function resolveMatrixSqliteStateKey(options) {
|
|
58
|
+
return resolveStateDirOverride(options) ?? "";
|
|
59
|
+
}
|
|
60
|
+
function resolveMatrixSqliteStateEnv(options) {
|
|
61
|
+
const stateDir = resolveStateDirOverride(options);
|
|
62
|
+
if (!stateDir) return options?.env;
|
|
63
|
+
return {
|
|
64
|
+
...options?.env ?? process.env,
|
|
65
|
+
OPENCLAW_STATE_DIR: stateDir
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
async function updateMatrixKeyedState(store, key, update, onUndefined = "keep") {
|
|
69
|
+
let observation = await store.observe(key);
|
|
70
|
+
for (;;) {
|
|
71
|
+
const value = update(observation.value);
|
|
72
|
+
if (value === void 0 && onUndefined === "skip") return false;
|
|
73
|
+
const result = await store.compareAndApply(key, observation.comparison, value === void 0 ? {
|
|
74
|
+
operation: "update",
|
|
75
|
+
action: "keep"
|
|
76
|
+
} : {
|
|
77
|
+
operation: "update",
|
|
78
|
+
action: "set",
|
|
79
|
+
value
|
|
80
|
+
});
|
|
81
|
+
if (result.status !== "conflict") return true;
|
|
82
|
+
observation = result.current;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
//#endregion
|
|
47
86
|
//#region extensions/matrix/src/matrix/retired-state.ts
|
|
48
87
|
const RETIRED_MATRIX_STATE_FILENAMES = /* @__PURE__ */ new Set([
|
|
49
88
|
"thread-bindings.json",
|
|
@@ -71,4 +110,4 @@ async function assertMatrixSupportedStateFile(filePath) {
|
|
|
71
110
|
throw new Error(describeRetiredMatrixState(filePath));
|
|
72
111
|
}
|
|
73
112
|
//#endregion
|
|
74
|
-
export { describeRetiredMatrixState as a,
|
|
113
|
+
export { describeRetiredMatrixState as a, updateMatrixKeyedState as c, readMatrixStateChunks as d, writeMatrixStateChunks as f, assertMatrixSupportedStateRoot as i, chunkMatrixStateJson as l, RETIRED_MATRIX_STATE_REMEDIATION as n, resolveMatrixSqliteStateEnv as o, assertMatrixSupportedStateFile as r, resolveMatrixSqliteStateKey as s, RETIRED_MATRIX_STATE_FILENAMES as t, pruneMatrixStateChunks as u };
|