@openclaw/matrix 2026.11.5-beta.4 → 2026.11.10-beta.1
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-config-CRsKoMqJ.mjs → account-config-CVM2a28p.mjs} +1 -2
- package/dist/.setup/{account-selection-UUPhMBmu.mjs → account-selection-Cow3TMFO.mjs} +5 -8
- package/dist/.setup/{approval-handler.runtime-Ca12_7Qa.mjs → approval-handler.runtime-D7KO6ds_.mjs} +8 -9
- package/dist/.setup/{approval-reactions-BazmsDbe.mjs → approval-reactions-Bz_8XB01.mjs} +2 -3
- package/dist/.setup/{backup-health-Dm_YMVFT.mjs → backup-health-BxH69np2.mjs} +1 -2
- package/dist/.setup/{channel-FfaEmyIU.mjs → channel-BJGiol_v.mjs} +30 -40
- package/dist/.setup/{channel.runtime-CkkHG8zy.mjs → channel.runtime-BrSYy4Qm.mjs} +10 -12
- package/dist/.setup/{channel.setup-B00zzOOL.mjs → channel.setup-DJdvsvAL.mjs} +9 -7
- package/dist/.setup/{cli-dz9hd2dR.mjs → cli-CjjggD1Y.mjs} +25 -34
- package/dist/.setup/{cli-metadata-CwUhA9CY.mjs → cli-metadata-nnz3uf_k.mjs} +3 -5
- package/dist/.setup/{client-D1bsidwU.mjs → client-DIeTvz6C.mjs} +21 -26
- package/dist/.setup/{client-bootstrap-CTT0VF6v.mjs → client-bootstrap-CvbnV_7R.mjs} +2 -3
- package/dist/.setup/{client-support-B_Mp4Qk9.mjs → client-support-CqXAOZp3.mjs} +2 -3
- package/dist/.setup/{client-CFPYqaYK.mjs → client-uAX074II.mjs} +4 -5
- package/dist/.setup/{config-paths-CnREYb1Y.mjs → config-paths-DBpHxDyc.mjs} +1 -2
- package/dist/.setup/{create-client-Ccf5wyS3.mjs → create-client-XL9SKJ2s.mjs} +8 -9
- package/dist/.setup/{credentials-kT20jk_u.mjs → credentials-CGgWuhFV.mjs} +5 -6
- package/dist/.setup/{credentials-read-CM6wXUjL.mjs → credentials-read-rPqEpuxv.mjs} +5 -6
- package/dist/.setup/{credentials-state-B3cuUFwZ.mjs → credentials-state-jxq29yQw.mjs} +1 -2
- package/dist/.setup/{crypto-node.runtime-6Aj_ltHQ.mjs → crypto-node.runtime-E_hqXGxm.mjs} +1 -2
- package/dist/.setup/{crypto-runtime-DZNytKX5.mjs → crypto-runtime-D96thr_g.mjs} +10 -15
- package/dist/.setup/{crypto-state-store-BZLlwkv_.mjs → crypto-state-store-CzAmeC_Z.mjs} +4 -4
- package/dist/.setup/{crypto-store-ownership-CiQ1l_O7.mjs → crypto-store-ownership-DPO9WcVz.mjs} +3 -4
- package/dist/.setup/{crypto-unsafe-state-doctor-Dh1dtuSz.mjs → crypto-unsafe-state-doctor-CkhtP1mQ.mjs} +7 -8
- package/dist/.setup/{deps-D-W_QQjz.mjs → deps-CVPT2Ros.mjs} +1 -2
- package/dist/.setup/{device-health-Ck2YpEVN.mjs → device-health-D7n-lPeb.mjs} +2 -3
- package/dist/.setup/{direct-management-Dp1giZ34.mjs → direct-management-D59C1WO-.mjs} +7 -11
- package/dist/.setup/{directory-live-ufzRheWx.mjs → directory-live-5RgaKKuc.mjs} +5 -6
- package/dist/.setup/{doctor-contract-BANpMUbP.mjs → doctor-contract-GiXgCj7k.mjs} +2 -3
- package/dist/.setup/{draft-stream-BPjjKSoI.mjs → draft-stream-CjEpElZ-.mjs} +3 -4
- package/dist/.setup/{encryption-guidance-Br3Lv9Hm.mjs → encryption-guidance-DfbEaKct.mjs} +3 -4
- package/dist/.setup/{env-vars-aEBngJPa.mjs → env-vars-Bh1iOXJ1.mjs} +1 -2
- package/dist/.setup/{errors-Bw4EHwKX.mjs → errors-CL3YJV8U.mjs} +1 -2
- package/dist/.setup/{event-helpers-CxNgMQqH.mjs → event-helpers-DDUjVVf7.mjs} +1 -2
- package/dist/.setup/{exec-approvals-BwEOyI1-.mjs → exec-approvals-DcQS_LNp.mjs} +6 -9
- package/dist/.setup/{file-sync-store-BpS12yaK.mjs → file-sync-store-CAhnwOPA.mjs} +6 -36
- package/dist/.setup/{http-client-B_ohXrBm.mjs → http-client-CqnKFKUH.mjs} +5 -8
- package/dist/.setup/{idb-persistence-BTOsltD9.mjs → idb-persistence-DeGUs--C.mjs} +6 -7
- package/dist/.setup/{idb-persistence-lock-Bh3ZLIsE.mjs → idb-persistence-lock-CH2K6d_3.mjs} +1 -2
- package/dist/.setup/{joined-room-encryption-C0gHa2DG.mjs → joined-room-encryption-9sJK1kM-.mjs} +2 -3
- package/dist/.setup/{logger-CuAzdD8Q.mjs → logger-B9TwnY6C.mjs} +2 -3
- package/dist/.setup/{logging-CoaEyRtA.mjs → logging-Bnsn7s4r.mjs} +3 -4
- package/dist/.setup/{messages-DpJ9naJa.mjs → messages-CmlRhlPp.mjs} +9 -14
- package/dist/.setup/{monitor-vpzawYrB.mjs → monitor-DG8yTCh9.mjs} +98 -137
- package/dist/.setup/{onboarding-BK-V2ZLT.mjs → onboarding-CY_oesMI.mjs} +10 -11
- package/dist/.setup/{outbound-DydCDuvM.mjs → outbound-BY9kS8Kt.mjs} +5 -6
- package/dist/.setup/{profile-update-RLsY-gu6.mjs → profile-update-BRugBHSm.mjs} +13 -10
- package/dist/.setup/{reaction-events-lcgVF3M5.mjs → reaction-events-B1DQTt9d.mjs} +8 -9
- package/dist/.setup/{resolve-targets-DYW8ULZS.mjs → resolve-targets-CUBvJ37V.mjs} +4 -5
- package/dist/.setup/{retired-state-JGUEBE72.mjs → retired-state-BsxdpJNk.mjs} +3 -41
- package/dist/.setup/{room-info-Dhc4efkA.mjs → room-info-CJVhaCvB.mjs} +6 -8
- package/dist/.setup/{runtime-1kn1P6io.mjs → runtime-Ck8TjD7L.mjs} +1 -2
- package/dist/.setup/{runtime-doctor-migrations-hxP-CXX7.mjs → runtime-doctor-migrations-CSvRANPN.mjs} +5 -10
- package/dist/.setup/{runtime-setter-api-i2MOXoT3.mjs → runtime-setter-api-CpwhcBQK.mjs} +1 -1
- package/dist/.setup/{sdk-DPXiQ3jr.mjs → sdk-CRJQM2N0.mjs} +33 -47
- package/dist/.setup/{secret-contract-DxyzKSzf.mjs → secret-contract-AKnr45nw.mjs} +2 -3
- package/dist/.setup/{secret-contract-api-Dukgvike.mjs → secret-contract-api-DMSwMIxd.mjs} +1 -1
- package/dist/.setup/{send-HHAbKARg.mjs → send-QWCT3NT9.mjs} +58 -44
- package/dist/.setup/{send-currentness-DGxiiBn9.mjs → send-currentness-D1x6YP9O.mjs} +2 -4
- package/dist/.setup/{setup-bootstrap-DaT2j28V.mjs → setup-bootstrap-DrBapwjQ.mjs} +4 -5
- package/dist/.setup/{setup-core-DcqQbLZv.mjs → setup-core-B4sVj_9e.mjs} +13 -20
- package/dist/.setup/setup-plugin-api-t9yhI-Tq.mjs +2 -0
- package/dist/.setup/sqlite-state-D6Zpz1q1.mjs +36 -0
- package/dist/.setup/{startup-verification-UkaoSldm.mjs → startup-verification-DfOuAruK.mjs} +5 -5
- package/dist/.setup/{state-layout-walk-BQMgMykU.mjs → state-layout-walk-BqCZTHpp.mjs} +2 -3
- package/dist/.setup/{storage-C3N6YZIn.mjs → storage-CCarF_gm.mjs} +9 -10
- package/dist/.setup/{storage-paths-B51JM-pC.mjs → storage-paths-e_Vq6cvw.mjs} +1 -2
- package/dist/.setup/{subagent-hooks-CfGAysJi.mjs → subagent-hooks-BdbuojSv.mjs} +2 -3
- package/dist/.setup/{sync-cache-state-BKVaKRzQ.mjs → sync-cache-state-BMvqW4Ii.mjs} +5 -5
- package/dist/.setup/{sync-state-CWbp0QSY.mjs → sync-state-Cu1nagBV.mjs} +1 -2
- package/dist/.setup/{target-ids-HhcaKX1n.mjs → target-ids-DltG_ZHJ.mjs} +1 -2
- package/dist/.setup/{task-runner-DY3aKiQa.mjs → task-runner-CYyGHdNW.mjs} +1 -2
- package/dist/.setup/{thread-binding-api-BvuaKpd0.mjs → thread-binding-api-OtSciHmZ.mjs} +2 -3
- package/dist/.setup/{thread-bindings-891JsKXF.mjs → thread-bindings-jNXWItIL.mjs} +54 -23
- package/dist/.setup/{thread-bindings-shared-QmZOfX9Q.mjs → thread-bindings-shared-DEAGGuDA.mjs} +6 -3
- package/dist/.setup/{tool-actions-8mXdq9OV.mjs → tool-actions-4sdtsvN2.mjs} +25 -25
- package/dist/.setup/{url-validation-By_2hsXr.mjs → url-validation-DesoKUns.mjs} +1 -2
- package/dist/.setup/{verification-CcZIVL8P.mjs → verification-DQu-OS0V.mjs} +4 -5
- package/dist/.source-module-urls/1cd4d4ff8d44e1c8b830932b44d7cf8a7f3350e09e169910e1d7a85e131b7bea.json +1 -1
- package/dist/api.js +8 -8
- package/dist/auth-presence.js +2 -3
- 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 +14 -16
- package/dist/helper-api.js +3 -3
- package/dist/index.js +3 -4
- package/dist/plugin-entry.handlers.runtime.js +3 -4
- package/dist/runtime-api.js +7 -8
- package/dist/runtime-setter-api.js +1 -1
- package/dist/secret-contract-api.js +1 -1
- package/dist/session-binding-contract-api.js +2 -2
- package/dist/setup-entry.js +4 -5
- package/dist/setup-plugin-api.js +1 -1
- package/dist/subagent-hooks-api.js +2 -3
- package/dist/thread-binding-api.js +1 -1
- package/dist/thread-bindings-runtime.js +1 -1
- package/node_modules/@openclaw/fs-safe/CHANGELOG.md +45 -1
- package/node_modules/@openclaw/fs-safe/README.md +4 -0
- package/node_modules/@openclaw/fs-safe/dist/absolute-path.js +2 -2
- package/node_modules/@openclaw/fs-safe/dist/advanced.d.ts +2 -2
- package/node_modules/@openclaw/fs-safe/dist/advanced.js +2 -2
- package/node_modules/@openclaw/fs-safe/dist/archive-parser.wasm +0 -0
- package/node_modules/@openclaw/fs-safe/dist/atomic-io.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/atomic-io.js +6 -0
- package/node_modules/@openclaw/fs-safe/dist/atomic.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-node.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-node.js +13 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-options.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-options.js +6 -0
- package/node_modules/@openclaw/fs-safe/dist/errors.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/errors.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-admission.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-admission.js +1 -11
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-acquire.js +3 -3
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-stale-admission.js +2 -3
- package/node_modules/@openclaw/fs-safe/dist/file-store-boundary.d.ts +3 -3
- package/node_modules/@openclaw/fs-safe/dist/file-store-boundary.js +30 -4
- package/node_modules/@openclaw/fs-safe/dist/file-store-prune.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/file-store-prune.js +7 -1
- package/node_modules/@openclaw/fs-safe/dist/file-store-sync-directory.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/file-store-sync-directory.js +30 -4
- package/node_modules/@openclaw/fs-safe/dist/file-store-sync-write.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/file-store-sync-write.js +2 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/file-store.js +5 -0
- package/node_modules/@openclaw/fs-safe/dist/guarded-mkdir.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/guarded-mkdir.js +9 -0
- package/node_modules/@openclaw/fs-safe/dist/json-store.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/native-binding.d.ts +4 -1
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/native-staged-file.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/native-staged-file.js +19 -13
- package/node_modules/@openclaw/fs-safe/dist/overwrite-file-handle.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/overwrite-file-handle.js +27 -5
- package/node_modules/@openclaw/fs-safe/dist/path-prefix.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/path-prefix.js +84 -7
- package/node_modules/@openclaw/fs-safe/dist/pinned-write-input.js +0 -11
- package/node_modules/@openclaw/fs-safe/dist/prepare-directory-mode.d.ts +9 -0
- package/node_modules/@openclaw/fs-safe/dist/prepare-directory-mode.js +61 -0
- package/node_modules/@openclaw/fs-safe/dist/private-temp-workspace.js +2 -1
- package/node_modules/@openclaw/fs-safe/dist/realpath.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/realpath.js +16 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-descriptor.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/replace-file-descriptor.js +8 -6
- package/node_modules/@openclaw/fs-safe/dist/replace-file-types.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/replace-file.js +20 -13
- package/node_modules/@openclaw/fs-safe/dist/root-context.js +4 -1
- package/node_modules/@openclaw/fs-safe/dist/root-create-native.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/root-create-native.js +18 -9
- package/node_modules/@openclaw/fs-safe/dist/root-errors.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/root-errors.js +9 -0
- package/node_modules/@openclaw/fs-safe/dist/root-impl.js +4 -1
- package/node_modules/@openclaw/fs-safe/dist/root-mkdir-native.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/root-mkdir-native.js +35 -16
- package/node_modules/@openclaw/fs-safe/dist/root-path-existing.d.ts +6 -2
- package/node_modules/@openclaw/fs-safe/dist/root-path-existing.js +32 -20
- package/node_modules/@openclaw/fs-safe/dist/root-path.js +32 -26
- package/node_modules/@openclaw/fs-safe/dist/root-write-admission.js +4 -1
- package/node_modules/@openclaw/fs-safe/dist/secret-file.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/secret-file.js +2 -0
- package/node_modules/@openclaw/fs-safe/dist/sibling-temp.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/sibling-temp.js +5 -4
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-policy.d.ts +3 -2
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-policy.js +8 -9
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-stale-admission.js +3 -1
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-types.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/text-atomic.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/types.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-hints.js +12 -3
- package/node_modules/@openclaw/fs-safe/dist/windows-security-helper.exe +0 -0
- package/node_modules/@openclaw/fs-safe/dist/write-file-handle.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/write-file-handle.js +10 -12
- package/node_modules/@openclaw/fs-safe/docs/advanced.md +3 -3
- package/node_modules/@openclaw/fs-safe/docs/atomic.md +16 -3
- package/node_modules/@openclaw/fs-safe/docs/compiler-qualification.md +1 -1
- package/node_modules/@openclaw/fs-safe/docs/contributing.md +27 -18
- package/node_modules/@openclaw/fs-safe/docs/errors.md +3 -1
- package/node_modules/@openclaw/fs-safe/docs/file-store.md +14 -2
- package/node_modules/@openclaw/fs-safe/docs/in-place-write.md +31 -0
- package/node_modules/@openclaw/fs-safe/docs/install.md +1 -1
- package/node_modules/@openclaw/fs-safe/docs/json-store.md +6 -1
- package/node_modules/@openclaw/fs-safe/docs/json.md +5 -1
- package/node_modules/@openclaw/fs-safe/docs/path-prefix.md +14 -4
- package/node_modules/@openclaw/fs-safe/docs/public-api.md +4 -2
- package/node_modules/@openclaw/fs-safe/docs/secret-file.md +5 -1
- package/node_modules/@openclaw/fs-safe/docs/sidecar-lock.md +4 -0
- package/node_modules/@openclaw/fs-safe/docs/temp.md +9 -1
- package/node_modules/@openclaw/fs-safe/docs/types.md +5 -1
- package/node_modules/@openclaw/fs-safe/package.json +12 -12
- 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 +57 -17
- package/node_modules/@tokenizer/inflate/lib/ZipHandler.d.ts +12 -1
- package/node_modules/@tokenizer/inflate/lib/ZipHandler.js +127 -57
- package/node_modules/@tokenizer/inflate/lib/ZipLimitError.d.ts +18 -4
- package/node_modules/@tokenizer/inflate/lib/ZipLimitError.js +1 -1
- package/node_modules/@tokenizer/inflate/lib/index.d.ts +1 -1
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/LICENSE.txt +21 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/README.md +736 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/AbortSignal.d.ts +2 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/AbortSignal.js +7 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/AbstractTokenizer.d.ts +117 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/AbstractTokenizer.js +204 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/BlobTokenizer.d.ts +29 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/BlobTokenizer.js +57 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/BufferSizeError.d.ts +19 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/BufferSizeError.js +27 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/BufferTokenizer.d.ts +29 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/BufferTokenizer.js +51 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/FileTokenizer.d.ts +47 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/FileTokenizer.js +83 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/NotRegularFileError.d.ts +5 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/NotRegularFileError.js +8 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/ReadStreamTokenizer.d.ts +34 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/ReadStreamTokenizer.js +140 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/TokenizerBoundaryError.d.ts +7 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/TokenizerBoundaryError.js +10 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/TokenizerView.d.ts +9 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/TokenizerView.js +184 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/core.d.ts +44 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/core.js +56 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/index.d.ts +17 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/index.js +46 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/isRandomAccessTokenizer.d.ts +6 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/isRandomAccessTokenizer.js +10 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/AbstractStreamReader.d.ts +54 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/AbstractStreamReader.js +73 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/Deferred.d.ts +6 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/Deferred.js +10 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/Errors.d.ts +10 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/Errors.js +16 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/StreamReader.d.ts +34 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/StreamReader.js +125 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/WebStreamByobReader.d.ts +14 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/WebStreamByobReader.js +29 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/WebStreamDefaultReader.d.ts +19 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/WebStreamDefaultReader.js +67 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/WebStreamReader.d.ts +24 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/WebStreamReader.js +13 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/WebStreamReaderFactory.d.ts +5 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/WebStreamReaderFactory.js +19 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/index.d.ts +6 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/index.js +5 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/types.d.ts +163 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/types.js +1 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/package.json +97 -0
- package/node_modules/@tokenizer/inflate/package.json +5 -5
- package/node_modules/fake-indexeddb/README.md +7 -7
- package/node_modules/fake-indexeddb/build/cjs/lib/Index.js +47 -22
- package/node_modules/fake-indexeddb/build/cjs/lib/ObjectStore.js +4 -2
- package/node_modules/fake-indexeddb/build/cjs/lib/RecordStore.js +14 -9
- package/node_modules/fake-indexeddb/build/esm/lib/Index.js +47 -22
- package/node_modules/fake-indexeddb/build/esm/lib/ObjectStore.js +4 -2
- package/node_modules/fake-indexeddb/build/esm/lib/RecordStore.js +14 -9
- package/node_modules/fake-indexeddb/package.json +1 -1
- package/node_modules/file-type/node_modules/strtok3/README.md +154 -9
- package/node_modules/file-type/node_modules/strtok3/lib/AbstractTokenizer.d.ts +3 -0
- package/node_modules/file-type/node_modules/strtok3/lib/AbstractTokenizer.js +12 -4
- package/node_modules/file-type/node_modules/strtok3/lib/BlobTokenizer.js +1 -0
- package/node_modules/file-type/node_modules/strtok3/lib/BufferTokenizer.js +2 -1
- package/node_modules/file-type/node_modules/strtok3/lib/FileTokenizer.d.ts +1 -1
- package/node_modules/file-type/node_modules/strtok3/lib/FileTokenizer.js +3 -3
- package/node_modules/file-type/node_modules/strtok3/lib/ReadStreamTokenizer.js +17 -2
- package/node_modules/file-type/node_modules/strtok3/lib/TokenizerBoundaryError.d.ts +7 -0
- package/node_modules/file-type/node_modules/strtok3/lib/TokenizerBoundaryError.js +10 -0
- package/node_modules/file-type/node_modules/strtok3/lib/TokenizerView.d.ts +9 -0
- package/node_modules/file-type/node_modules/strtok3/lib/TokenizerView.js +184 -0
- package/node_modules/file-type/node_modules/strtok3/lib/core.d.ts +4 -1
- package/node_modules/file-type/node_modules/strtok3/lib/core.js +5 -18
- package/node_modules/file-type/node_modules/strtok3/lib/index.js +28 -5
- package/node_modules/file-type/node_modules/strtok3/lib/isRandomAccessTokenizer.d.ts +6 -0
- package/node_modules/file-type/node_modules/strtok3/lib/isRandomAccessTokenizer.js +10 -0
- package/node_modules/file-type/node_modules/strtok3/lib/stream/StreamReader.d.ts +4 -0
- package/node_modules/file-type/node_modules/strtok3/lib/stream/StreamReader.js +29 -8
- package/node_modules/file-type/node_modules/strtok3/lib/stream/WebStreamReader.d.ts +12 -2
- package/node_modules/file-type/node_modules/strtok3/lib/types.d.ts +19 -2
- package/node_modules/file-type/node_modules/strtok3/package.json +10 -8
- package/node_modules/file-type/package.json +3 -3
- package/node_modules/file-type/source/detectors/ebml.js +31 -16
- package/node_modules/file-type/source/detectors/zip.js +21 -203
- package/node_modules/matrix-js-sdk/CHANGELOG.md +28 -0
- package/node_modules/matrix-js-sdk/lib/matrixrtc/CallMembership.d.ts +30 -25
- package/node_modules/matrix-js-sdk/lib/matrixrtc/CallMembership.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/CallMembership.js +91 -100
- package/node_modules/matrix-js-sdk/lib/matrixrtc/CallMembership.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/EncryptionManager.d.ts +6 -4
- package/node_modules/matrix-js-sdk/lib/matrixrtc/EncryptionManager.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/EncryptionManager.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/IMembershipManager.d.ts +2 -15
- 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/LivekitTransport.d.ts +36 -7
- package/node_modules/matrix-js-sdk/lib/matrixrtc/LivekitTransport.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/LivekitTransport.js +29 -2
- package/node_modules/matrix-js-sdk/lib/matrixrtc/LivekitTransport.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MatrixRTCSession.d.ts +12 -51
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MatrixRTCSession.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MatrixRTCSession.js +10 -66
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MatrixRTCSession.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MembershipManager.d.ts +5 -10
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MembershipManager.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MembershipManager.js +25 -44
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MembershipManager.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/RTCEncryptionManager.d.ts +8 -8
- package/node_modules/matrix-js-sdk/lib/matrixrtc/RTCEncryptionManager.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/RTCEncryptionManager.js +30 -22
- package/node_modules/matrix-js-sdk/lib/matrixrtc/RTCEncryptionManager.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/ToDeviceKeyTransport.js +7 -8
- package/node_modules/matrix-js-sdk/lib/matrixrtc/ToDeviceKeyTransport.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/rtc.d.ts +8 -13
- package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/rtc.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/rtc.js +2 -11
- package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/rtc.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/session.d.ts +6 -2
- package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/session.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/session.js +3 -0
- package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/session.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/types.d.ts +5 -0
- package/node_modules/matrix-js-sdk/lib/matrixrtc/types.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/types.js +5 -0
- package/node_modules/matrix-js-sdk/lib/matrixrtc/types.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/event-timeline-set.d.ts +9 -2
- package/node_modules/matrix-js-sdk/lib/models/event-timeline-set.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/event-timeline-set.js +8 -5
- package/node_modules/matrix-js-sdk/lib/models/event-timeline-set.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/room-sticky-events.d.ts +17 -2
- 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 +88 -47
- package/node_modules/matrix-js-sdk/lib/models/room-sticky-events.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/room.d.ts +1 -1
- package/node_modules/matrix-js-sdk/lib/models/room.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/room.js +8 -2
- package/node_modules/matrix-js-sdk/lib/models/room.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 +23 -2
- package/node_modules/matrix-js-sdk/lib/models/thread.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rendezvous/MSC4108SignInWithQR.d.ts +3 -3
- package/node_modules/matrix-js-sdk/lib/rendezvous/MSC4108SignInWithQR.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rendezvous/MSC4108SignInWithQR.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rendezvous/SignInWithQRFlow.d.ts +95 -0
- package/node_modules/matrix-js-sdk/lib/rendezvous/SignInWithQRFlow.d.ts.map +1 -0
- package/node_modules/matrix-js-sdk/lib/rendezvous/SignInWithQRFlow.js +3 -0
- package/node_modules/matrix-js-sdk/lib/rendezvous/SignInWithQRFlow.js.map +1 -0
- package/node_modules/matrix-js-sdk/lib/rendezvous/index.d.ts +1 -0
- package/node_modules/matrix-js-sdk/lib/rendezvous/index.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rendezvous/index.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/index.js +5 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/index.js.map +1 -1
- package/node_modules/matrix-js-sdk/package.json +3 -3
- package/node_modules/matrix-js-sdk/src/matrixrtc/CallMembership.ts +85 -95
- package/node_modules/matrix-js-sdk/src/matrixrtc/EncryptionManager.ts +6 -4
- package/node_modules/matrix-js-sdk/src/matrixrtc/IMembershipManager.ts +2 -15
- package/node_modules/matrix-js-sdk/src/matrixrtc/LivekitTransport.ts +58 -9
- package/node_modules/matrix-js-sdk/src/matrixrtc/MatrixRTCSession.ts +21 -80
- package/node_modules/matrix-js-sdk/src/matrixrtc/MembershipManager.ts +23 -40
- package/node_modules/matrix-js-sdk/src/matrixrtc/RTCEncryptionManager.ts +51 -39
- package/node_modules/matrix-js-sdk/src/matrixrtc/ToDeviceKeyTransport.ts +7 -7
- package/node_modules/matrix-js-sdk/src/matrixrtc/membershipData/rtc.ts +9 -23
- package/node_modules/matrix-js-sdk/src/matrixrtc/membershipData/session.ts +14 -2
- package/node_modules/matrix-js-sdk/src/matrixrtc/types.ts +6 -0
- package/node_modules/matrix-js-sdk/src/models/event-timeline-set.ts +19 -4
- package/node_modules/matrix-js-sdk/src/models/room-sticky-events.ts +92 -58
- package/node_modules/matrix-js-sdk/src/models/room.ts +8 -2
- package/node_modules/matrix-js-sdk/src/models/thread.ts +25 -3
- package/node_modules/matrix-js-sdk/src/rendezvous/MSC4108SignInWithQR.ts +3 -3
- package/node_modules/matrix-js-sdk/src/rendezvous/SignInWithQRFlow.ts +117 -0
- package/node_modules/matrix-js-sdk/src/rendezvous/index.ts +1 -0
- package/node_modules/matrix-js-sdk/src/rust-crypto/index.ts +5 -1
- package/node_modules/music-metadata/README.md +62 -67
- package/node_modules/music-metadata/lib/ParserFactory.js +3 -1
- package/node_modules/music-metadata/lib/aiff/AiffParser.d.ts +2 -0
- package/node_modules/music-metadata/lib/aiff/AiffParser.js +42 -3
- package/node_modules/music-metadata/lib/aiff/AiffToken.d.ts +1 -0
- package/node_modules/music-metadata/lib/aiff/AiffToken.js +1 -0
- package/node_modules/music-metadata/lib/apev2/APEv2Parser.js +11 -1
- package/node_modules/music-metadata/lib/asf/AsfObject.d.ts +2 -2
- package/node_modules/music-metadata/lib/asf/AsfObject.js +81 -111
- package/node_modules/music-metadata/lib/asf/AsfParser.js +5 -3
- package/node_modules/music-metadata/lib/asf/AsfTagMapper.js +27 -3
- package/node_modules/music-metadata/lib/asf/AsfUtil.d.ts +1 -1
- package/node_modules/music-metadata/lib/caf/CafParser.js +13 -2
- package/node_modules/music-metadata/lib/caf/CafToken.d.ts +2 -2
- package/node_modules/music-metadata/lib/caf/CafToken.js +9 -2
- package/node_modules/music-metadata/lib/common/Allocation.d.ts +6 -0
- package/node_modules/music-metadata/lib/common/Allocation.js +18 -0
- package/node_modules/music-metadata/lib/common/GenericTagMapper.js +1 -1
- package/node_modules/music-metadata/lib/common/MetadataCollector.d.ts +2 -0
- package/node_modules/music-metadata/lib/common/MetadataCollector.js +21 -4
- package/node_modules/music-metadata/lib/common/Util.d.ts +4 -0
- package/node_modules/music-metadata/lib/common/Util.js +34 -1
- package/node_modules/music-metadata/lib/dsdiff/DsdiffParser.d.ts +4 -1
- package/node_modules/music-metadata/lib/dsdiff/DsdiffParser.js +32 -36
- package/node_modules/music-metadata/lib/ebml/EbmlIterator.js +6 -2
- package/node_modules/music-metadata/lib/flac/FlacParser.js +2 -1
- package/node_modules/music-metadata/lib/id3v2/FrameParser.d.ts +7 -3
- package/node_modules/music-metadata/lib/id3v2/FrameParser.js +91 -46
- package/node_modules/music-metadata/lib/id3v2/ID3v22TagMapper.js +6 -0
- package/node_modules/music-metadata/lib/id3v2/ID3v24TagMapper.d.ts +5 -0
- package/node_modules/music-metadata/lib/id3v2/ID3v24TagMapper.js +6 -4
- package/node_modules/music-metadata/lib/id3v2/ID3v2Parser.d.ts +2 -1
- package/node_modules/music-metadata/lib/id3v2/ID3v2Parser.js +57 -15
- package/node_modules/music-metadata/lib/lrc/LyricsParser.d.ts +18 -2
- package/node_modules/music-metadata/lib/lrc/LyricsParser.js +14 -3
- package/node_modules/music-metadata/lib/mp4/Atom.d.ts +3 -3
- package/node_modules/music-metadata/lib/mp4/Atom.js +14 -7
- package/node_modules/music-metadata/lib/mp4/AtomToken.d.ts +25 -25
- package/node_modules/music-metadata/lib/mp4/AtomToken.js +136 -119
- package/node_modules/music-metadata/lib/mp4/MP4Parser.d.ts +16 -2
- package/node_modules/music-metadata/lib/mp4/MP4Parser.js +370 -132
- package/node_modules/music-metadata/lib/mp4/MP4TagMapper.js +30 -0
- package/node_modules/music-metadata/lib/musepack/sv8/StreamVersion8.js +19 -8
- package/node_modules/music-metadata/lib/ogg/OggParser.js +6 -2
- package/node_modules/music-metadata/lib/ogg/OggToken.d.ts +2 -2
- package/node_modules/music-metadata/lib/ogg/OggToken.js +3 -9
- package/node_modules/music-metadata/lib/ogg/flac/FlacStream.d.ts +9 -11
- package/node_modules/music-metadata/lib/ogg/flac/FlacStream.js +111 -27
- package/node_modules/music-metadata/lib/ogg/speex/SpeexStream.js +6 -0
- package/node_modules/music-metadata/lib/ogg/theora/TheoraStream.js +6 -0
- package/node_modules/music-metadata/lib/ogg/vorbis/VorbisDecoder.d.ts +2 -2
- package/node_modules/music-metadata/lib/ogg/vorbis/VorbisDecoder.js +8 -4
- package/node_modules/music-metadata/lib/ogg/vorbis/VorbisStream.d.ts +1 -0
- package/node_modules/music-metadata/lib/ogg/vorbis/VorbisStream.js +23 -3
- package/node_modules/music-metadata/lib/ogg/vorbis/VorbisTagMapper.d.ts +4 -0
- package/node_modules/music-metadata/lib/ogg/vorbis/VorbisTagMapper.js +15 -2
- package/node_modules/music-metadata/lib/riff/RiffInfoTagMap.js +1 -0
- package/node_modules/music-metadata/lib/type.d.ts +23 -6
- package/node_modules/music-metadata/lib/wav/BwfChunk.d.ts +12 -2
- package/node_modules/music-metadata/lib/wav/BwfChunk.js +39 -11
- package/node_modules/music-metadata/lib/wav/WaveParser.js +13 -2
- package/node_modules/music-metadata/package.json +2 -1
- package/node_modules/typebox/build/format/date_time.d.mts +2 -1
- package/node_modules/typebox/build/format/date_time.mjs +12 -3
- package/node_modules/typebox/package.json +1 -1
- package/package.json +9 -9
- package/dist/.setup/setup-plugin-api-Cg4TelGZ.mjs +0 -2
- package/node_modules/fake-indexeddb/build/cjs/test/fakeIndexedDB/auto.js +0 -54
- package/node_modules/fake-indexeddb/build/cjs/test/fakeIndexedDB/binarySearchTree.js +0 -413
- package/node_modules/fake-indexeddb/build/cjs/test/fakeIndexedDB/fakeIndexedDB.js +0 -1018
- package/node_modules/fake-indexeddb/build/cjs/test/fakeIndexedDB/forceCloseDatabase.js +0 -99
- package/node_modules/fake-indexeddb/build/cjs/test/fakeIndexedDB/getAll.js +0 -707
- package/node_modules/fake-indexeddb/build/cjs/test/fakeIndexedDB/memoryLeaks.js +0 -42
- package/node_modules/fake-indexeddb/build/esm/test/fakeIndexedDB/auto.js +0 -52
- package/node_modules/fake-indexeddb/build/esm/test/fakeIndexedDB/binarySearchTree.js +0 -409
- package/node_modules/fake-indexeddb/build/esm/test/fakeIndexedDB/fakeIndexedDB.js +0 -1014
- package/node_modules/fake-indexeddb/build/esm/test/fakeIndexedDB/forceCloseDatabase.js +0 -95
- package/node_modules/fake-indexeddb/build/esm/test/fakeIndexedDB/getAll.js +0 -703
- package/node_modules/fake-indexeddb/build/esm/test/fakeIndexedDB/memoryLeaks.js +0 -38
|
@@ -2253,7 +2253,7 @@ export class Room extends ReadReceipt<RoomEmittedEvents, RoomEventHandlerMap> {
|
|
|
2253
2253
|
/**
|
|
2254
2254
|
* Processes poll events:
|
|
2255
2255
|
* If the event has a decryption failure, it will listen for decryption and tries again.
|
|
2256
|
-
* If it is a poll start event (`m.poll.start`),
|
|
2256
|
+
* If it is a poll start event (`m.poll.start`) for a poll not yet known to the room,
|
|
2257
2257
|
* it creates and stores a Poll model and emits a PollEvent.New event.
|
|
2258
2258
|
* If the event is related to a poll, it will add it to the poll.
|
|
2259
2259
|
* Noop for other cases.
|
|
@@ -2269,6 +2269,10 @@ export class Room extends ReadReceipt<RoomEmittedEvents, RoomEventHandlerMap> {
|
|
|
2269
2269
|
}
|
|
2270
2270
|
|
|
2271
2271
|
if (M_POLL_START.matches(event.getType())) {
|
|
2272
|
+
// Check that we don't already have the poll as events can arrive more than once
|
|
2273
|
+
// in some situations. If we add the poll twice, it will break the existing poll model.
|
|
2274
|
+
if (this.polls.has(event.getId()!)) return;
|
|
2275
|
+
|
|
2272
2276
|
try {
|
|
2273
2277
|
const poll = new Poll(event, this.client, this);
|
|
2274
2278
|
this.polls.set(event.getId()!, poll);
|
|
@@ -3132,7 +3136,9 @@ export class Room extends ReadReceipt<RoomEmittedEvents, RoomEventHandlerMap> {
|
|
|
3132
3136
|
threadId = "",
|
|
3133
3137
|
} = this.eventShouldLiveIn(event, neighbouringEvents, threadRoots);
|
|
3134
3138
|
|
|
3135
|
-
|
|
3139
|
+
// Cached relations are aggregated below and attach when their parent is later hydrated.
|
|
3140
|
+
// Avoid blocking offline startup on a parent fetch.
|
|
3141
|
+
if (!fromCache && !shouldLiveInThread && !shouldLiveInRoom && event.isRelation()) {
|
|
3136
3142
|
try {
|
|
3137
3143
|
const parentEvent = new MatrixEvent(
|
|
3138
3144
|
await this.client.fetchRoomEvent(this.roomId, event.relationEventId!),
|
|
@@ -68,6 +68,28 @@ export function determineFeatureSupport(stable: boolean, unstable: boolean): Fea
|
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
+
/**
|
|
72
|
+
* Cap on how many threads fetch their initial events at the same time. Each fetch is a (recursive) `/relations`
|
|
73
|
+
* request, and opening a thread list creates every thread in the room at once; without a cap a room with dozens
|
|
74
|
+
* of threads fires dozens of concurrent heavy requests, which can starve everything else the homeserver worker is doing.
|
|
75
|
+
*/
|
|
76
|
+
const MAX_CONCURRENT_INITIAL_FETCHES = 3;
|
|
77
|
+
let runningInitialFetches = 0;
|
|
78
|
+
const waitingInitialFetches: (() => void)[] = [];
|
|
79
|
+
|
|
80
|
+
async function withInitialFetchSlot<T>(fn: () => Promise<T>): Promise<T> {
|
|
81
|
+
if (runningInitialFetches >= MAX_CONCURRENT_INITIAL_FETCHES) {
|
|
82
|
+
await new Promise<void>((resolve) => waitingInitialFetches.push(resolve));
|
|
83
|
+
}
|
|
84
|
+
runningInitialFetches++;
|
|
85
|
+
try {
|
|
86
|
+
return await fn();
|
|
87
|
+
} finally {
|
|
88
|
+
runningInitialFetches--;
|
|
89
|
+
waitingInitialFetches.shift()?.();
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
71
93
|
export class Thread extends ReadReceipt<ThreadEmittedEvents, ThreadEventHandlerMap> {
|
|
72
94
|
public static hasServerSideSupport = FeatureSupport.None;
|
|
73
95
|
public static hasServerSideListSupport = FeatureSupport.None;
|
|
@@ -679,9 +701,9 @@ export class Thread extends ReadReceipt<ThreadEmittedEvents, ThreadEventHandlerM
|
|
|
679
701
|
this.timelineSet.addEventsToTimeline([this.rootEvent], true, false, this.liveTimeline, null);
|
|
680
702
|
this.liveTimeline.setPaginationToken(null, Direction.Backward);
|
|
681
703
|
} else {
|
|
682
|
-
this.initalEventFetchProm =
|
|
683
|
-
backwards: true,
|
|
684
|
-
|
|
704
|
+
this.initalEventFetchProm = withInitialFetchSlot(() =>
|
|
705
|
+
this.client.paginateEventTimeline(this.liveTimeline, { backwards: true }),
|
|
706
|
+
);
|
|
685
707
|
await this.initalEventFetchProm;
|
|
686
708
|
}
|
|
687
709
|
// We have now fetched the initial events, so set the flag. We need to do this before
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
type ValidatedAuthMetadata,
|
|
37
37
|
waitForDeviceAuthorization,
|
|
38
38
|
} from "../oauth/index.ts";
|
|
39
|
-
import { type
|
|
39
|
+
import { type SignInWithQRSecrets, type SignInWithQRFlow } from "./SignInWithQRFlow.ts";
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
42
|
* Enum representing the payload types transmissible over [MSC4108](https://github.com/matrix-org/matrix-spec-proposals/pull/4108)
|
|
@@ -106,7 +106,7 @@ interface AcceptedPayload extends MSC4108Payload {
|
|
|
106
106
|
type: PayloadType.ProtocolAccepted;
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
interface SecretsPayload extends MSC4108Payload,
|
|
109
|
+
interface SecretsPayload extends MSC4108Payload, SignInWithQRSecrets {
|
|
110
110
|
type: PayloadType.Secrets;
|
|
111
111
|
}
|
|
112
112
|
|
|
@@ -115,7 +115,7 @@ interface SecretsPayload extends MSC4108Payload, Awaited<ReturnType<NonNullable<
|
|
|
115
115
|
* sign in with QR + OAuth2 flow.
|
|
116
116
|
* @experimental Note that this is UNSTABLE and may have breaking changes without notice.
|
|
117
117
|
*/
|
|
118
|
-
export class MSC4108SignInWithQR {
|
|
118
|
+
export class MSC4108SignInWithQR implements SignInWithQRFlow {
|
|
119
119
|
private readonly ourIntent: QrCodeIntent;
|
|
120
120
|
private _code?: Uint8Array;
|
|
121
121
|
private expectingNewDeviceId?: string;
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2026 Element Creations Ltd.
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import {
|
|
18
|
+
type ClientRendezvousFailureReason,
|
|
19
|
+
type MSC4108FailureReason,
|
|
20
|
+
type RendezvousFailureListener,
|
|
21
|
+
} from "./RendezvousFailureReason.ts";
|
|
22
|
+
import { type DeviceAccessTokenResponse, type ValidatedAuthMetadata } from "../oauth/index.ts";
|
|
23
|
+
import type { SecretsBundleJson } from "../@types/matrix-sdk-crypto-wasm.d.ts";
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* The secrets bundle shared from the existing device to the new device.
|
|
27
|
+
* @experimental Note that this is UNSTABLE and may have breaking changes without notice.
|
|
28
|
+
*/
|
|
29
|
+
export type { SecretsBundleJson as SignInWithQRSecrets } from "../@types/matrix-sdk-crypto-wasm.d.ts";
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Common interface for the sign in with QR + OAuth2 flows, e.g. the 2024 and 2025 versions of
|
|
33
|
+
* [MSC4108](https://github.com/matrix-org/matrix-spec-proposals/pull/4108).
|
|
34
|
+
* @experimental Note that this is UNSTABLE and may have breaking changes without notice.
|
|
35
|
+
*/
|
|
36
|
+
export interface SignInWithQRFlow {
|
|
37
|
+
/**
|
|
38
|
+
* Callback for when the rendezvous fails.
|
|
39
|
+
*/
|
|
40
|
+
onFailure?: RendezvousFailureListener;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Returns the check code for the secure channel or undefined if not generated yet.
|
|
44
|
+
*/
|
|
45
|
+
readonly checkCode: string | undefined;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Returns the code representing the rendezvous suitable for rendering in a QR code or undefined if not generated yet.
|
|
49
|
+
*/
|
|
50
|
+
readonly code: Uint8Array | undefined;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Returns true if the device is the already logged in device reciprocating a new login on the other side of the channel.
|
|
54
|
+
*/
|
|
55
|
+
readonly isExistingDevice: boolean;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Returns true if the device is the new device logging in being reciprocated by the device on the other side of the channel.
|
|
59
|
+
*/
|
|
60
|
+
readonly isNewDevice: boolean;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Generate the code including doing partial set up of the channel where required.
|
|
64
|
+
*/
|
|
65
|
+
generateCode(): Promise<void>;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* The first step in the OAuth2 QR login process.
|
|
69
|
+
* To be called after the QR code has been rendered or scanned.
|
|
70
|
+
* The scanning device has to discover the homeserver details, if they scanned the code then they already have it.
|
|
71
|
+
* If the new device is the one rendering the QR code then it has to wait be sent the homeserver details via the rendezvous channel.
|
|
72
|
+
*
|
|
73
|
+
* Depending on the version of the flow, the homeserver is identified either by `serverName` or `baseUrl`.
|
|
74
|
+
*/
|
|
75
|
+
negotiateProtocols(): Promise<{ serverName?: string; baseUrl?: string }>;
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* The second & third step in the OAuth2 QR login process.
|
|
79
|
+
* To be called after `negotiateProtocols` for the existing device.
|
|
80
|
+
* To be called after OAuth2 negotiation for the new device.
|
|
81
|
+
*
|
|
82
|
+
* @param input - Required for the new device to start the device authorization grant, not required for the existing device reciprocating the login
|
|
83
|
+
*/
|
|
84
|
+
deviceAuthorizationGrant(input?: { metadata: ValidatedAuthMetadata; clientId: string; deviceId: string }): Promise<{
|
|
85
|
+
verificationUri?: string;
|
|
86
|
+
userCode?: string;
|
|
87
|
+
}>;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* The fourth step in the OAuth2 QR login process.
|
|
91
|
+
* The reciprocating device must perform step 5 for this method to resolve.
|
|
92
|
+
* To be called after {@link deviceAuthorizationGrant} only on the new device.
|
|
93
|
+
*/
|
|
94
|
+
completeLoginOnNewDevice(input: { clientId: string }): Promise<DeviceAccessTokenResponse | undefined>;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* The fifth (and final) step in the OAuth2 QR login process.
|
|
98
|
+
* To be called after the new device has completed authentication.
|
|
99
|
+
*/
|
|
100
|
+
shareSecrets(): Promise<{ secrets?: SecretsBundleJson }>;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Decline the login on the existing device.
|
|
104
|
+
*/
|
|
105
|
+
declineLoginOnExistingDevice(): Promise<void>;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Cancels the rendezvous session.
|
|
109
|
+
* @param reason the reason for the cancellation
|
|
110
|
+
*/
|
|
111
|
+
cancel(reason: MSC4108FailureReason | ClientRendezvousFailureReason): Promise<void>;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Closes the rendezvous session.
|
|
115
|
+
*/
|
|
116
|
+
close(): Promise<void>;
|
|
117
|
+
}
|
|
@@ -23,6 +23,7 @@ import { RendezvousIntent } from "./RendezvousIntent.ts";
|
|
|
23
23
|
import { logger } from "../logger.ts";
|
|
24
24
|
|
|
25
25
|
export * from "./MSC4108SignInWithQR.ts";
|
|
26
|
+
export type * from "./SignInWithQRFlow.ts";
|
|
26
27
|
export type * from "./RendezvousChannel.ts";
|
|
27
28
|
export type * from "./RendezvousCode.ts";
|
|
28
29
|
export * from "./RendezvousError.ts";
|
|
@@ -286,7 +286,11 @@ async function initOlmMachine(
|
|
|
286
286
|
logger.info(
|
|
287
287
|
`Checking for pending key bundle for recently-joined room ${roomId} (joined ${new Date(pendingDetails.inviteAcceptedAtMillis).toISOString()})`,
|
|
288
288
|
);
|
|
289
|
-
|
|
289
|
+
// Launch `maybeAcceptKeyBundle` without awaiting it so it cannot block crypto initialisation.
|
|
290
|
+
// Failed or interrupted key queries/downloads leave the pending marker for a later startup to retry.
|
|
291
|
+
rustCrypto.maybeAcceptKeyBundle(roomId, pendingDetails.inviterId.toString()).catch((err) => {
|
|
292
|
+
logger.error("Error attempting to download a pending room key bundle", err);
|
|
293
|
+
});
|
|
290
294
|
} else {
|
|
291
295
|
logger.info(
|
|
292
296
|
`Clearing pending-key-bundle flag for room ${roomId} (too old: joined ${new Date(pendingDetails.inviteAcceptedAtMillis).toISOString()})`,
|
|
@@ -615,6 +615,12 @@ Returns a list of supported MIME-types. This may include some MIME-types which a
|
|
|
615
615
|
Files, buffers, and Blobs support chapters whether `moov` appears before or after `mdat`.
|
|
616
616
|
For forward-only streams, `moov` must appear before the chapter data.
|
|
617
617
|
|
|
618
|
+
- `maxChapterCount`: `number` (default: `1000`)
|
|
619
|
+
|
|
620
|
+
Maximum chapters returned from QuickTime/Nero MP4 and ID3v2 chapter lists.
|
|
621
|
+
Must be a positive safe integer. Excess chapters are omitted with a warning.
|
|
622
|
+
MP4 chapters still require `includeChapters: true`.
|
|
623
|
+
|
|
618
624
|
- `maxMemoryAllocation`: `number` (default: `67108864`, 64 MiB)
|
|
619
625
|
|
|
620
626
|
Maximum bytes buffered for a single metadata payload, accumulated Ogg packet, or tokenizer stream lookahead.
|
|
@@ -627,6 +633,12 @@ Returns a list of supported MIME-types. This may include some MIME-types which a
|
|
|
627
633
|
Audio/video data that is skipped does not count toward this limit. This does not cap total process memory:
|
|
628
634
|
decoded metadata, multiple retained tags, and temporary copies can require additional memory.
|
|
629
635
|
|
|
636
|
+
- `maxMetadataEntries`: `number` (default: `100000`)
|
|
637
|
+
|
|
638
|
+
Maximum entries in an individual decoded metadata list, table, or buffered container structure.
|
|
639
|
+
Must be a positive safe integer. Raise this for files with larger retained tables.
|
|
640
|
+
This count is independent of `maxMemoryAllocation` and does not limit total collected metadata or process memory.
|
|
641
|
+
|
|
630
642
|
- `mkvUseIndex`: `boolean` (default: `false`)
|
|
631
643
|
|
|
632
644
|
When `true`, the parser uses the SeekHead index in Matroska (MKV) files to skip segment and cluster elements.
|
|
@@ -650,6 +662,8 @@ Returns a list of supported MIME-types. This may include some MIME-types which a
|
|
|
650
662
|
|
|
651
663
|
When `true`, embedded cover art (images) will not be extracted.
|
|
652
664
|
Useful for reducing memory and processing when cover images are unnecessary.
|
|
665
|
+
MP4 JPEG/PNG bodies are skipped before buffering, so skipped artwork may exceed
|
|
666
|
+
`maxMemoryAllocation`. Buffered metadata values remain subject to that limit.
|
|
653
667
|
|
|
654
668
|
- `skipPostHeaders`: `boolean` (default: `false`)
|
|
655
669
|
When `true`, tag headers located at the end of the file will not be read.
|
|
@@ -690,6 +704,43 @@ Audio format information. Defined in the TypeScript `IFormat` interface:
|
|
|
690
704
|
- `format.modificationTime?: Date` Track modification / tag update time
|
|
691
705
|
- `format.trackGain?: number` Track gain in dB
|
|
692
706
|
- `format.albumGain?: number` Album gain in dB
|
|
707
|
+
- [`format.chapters?: IChapter[]`](#metadataformatchapters) Chapter titles and timestamps, when available
|
|
708
|
+
|
|
709
|
+
#### `metadata.format.chapters`
|
|
710
|
+
|
|
711
|
+
Chapters use the `IChapter` interface. For MP4 QuickTime and Nero chapter lists,
|
|
712
|
+
set `includeChapters: true` when parsing. Each chapter has a `title` (which can be
|
|
713
|
+
empty), a `start` timestamp, and an optional `end` timestamp.
|
|
714
|
+
|
|
715
|
+
Use the chapter's own `timeScale` to convert both timestamps to seconds. When
|
|
716
|
+
`timeScale` is omitted, its default is **1**: timestamps are already in seconds.
|
|
717
|
+
Do not assume that every chapter uses milliseconds or the audio sample rate.
|
|
718
|
+
A QuickTime chapter track with a missing or zero timescale is rejected; an
|
|
719
|
+
available Nero chapter list is used instead.
|
|
720
|
+
|
|
721
|
+
| Chapter source | Timestamp units | `timeScale` |
|
|
722
|
+
| --- | --- | --- |
|
|
723
|
+
| ID3v2 CHAP | Seconds | Omitted (equivalent to `1`) |
|
|
724
|
+
| MP4 QuickTime chapter track | Chapter track time units | Chapter track's timescale |
|
|
725
|
+
| MP4 Nero `chpl` | 100-nanosecond units | `10000000` |
|
|
726
|
+
|
|
727
|
+
```js
|
|
728
|
+
import { parseFile } from 'music-metadata';
|
|
729
|
+
|
|
730
|
+
const { format } = await parseFile('audiobook.m4b', { includeChapters: true });
|
|
731
|
+
const chapters = (format.chapters ?? []).map(chapter => {
|
|
732
|
+
const timeScale = chapter.timeScale ?? 1;
|
|
733
|
+
return {
|
|
734
|
+
title: chapter.title,
|
|
735
|
+
startSeconds: chapter.start / timeScale,
|
|
736
|
+
endSeconds: chapter.end === undefined ? undefined : chapter.end / timeScale
|
|
737
|
+
};
|
|
738
|
+
});
|
|
739
|
+
```
|
|
740
|
+
|
|
741
|
+
An omitted `end` means the parser did not provide an end timestamp. Applications
|
|
742
|
+
that need chapter ends must choose how to derive missing values. `sampleOffset`,
|
|
743
|
+
when present, is a separate audio sample position; it is not the timestamp scale.
|
|
693
744
|
|
|
694
745
|
#### `metadata.format.trackInfo`
|
|
695
746
|
|
|
@@ -710,41 +761,16 @@ for (const track of videoTracks) {
|
|
|
710
761
|
console.log(format.containerDuration, format.overallBitrate);
|
|
711
762
|
```
|
|
712
763
|
|
|
713
|
-
Each entry describes one
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
statistics remain unset when timing is unavailable; `overallBitrate` also requires a known input size.
|
|
724
|
-
|
|
725
|
-
MPEG-4 derives audio and video timing from media headers, sample tables, and fragments, including
|
|
726
|
-
fragment defaults and decode timestamps. Track bitrates use sample sizes and duration; video properties
|
|
727
|
-
include encoded dimensions, display dimensions, and average frame rate. ASF supplies stream dimensions,
|
|
728
|
-
stream bitrates, and extended stream timing and frame rate when present. Standalone and nested Stream
|
|
729
|
-
Properties Objects describe actual streams; Codec List entries supply names without creating unused tracks.
|
|
730
|
-
|
|
731
|
-
Matroska applies specified defaults for flags, language, channels, and sample rate, and prefers IETF
|
|
732
|
-
language tags when present. Track statistics tags provide duration, bitrate, and frame count; without
|
|
733
|
-
these tags, per-track timing may be unavailable even when segment duration is known. Media clusters
|
|
734
|
-
are not scanned to calculate missing track statistics.
|
|
735
|
-
|
|
736
|
-
Ogg/Theora duration comes from granule positions. Set `duration: true` to allow scanning beyond the
|
|
737
|
-
initial metadata pages. Once a video stream has been fully read, its average bitrate uses that logical
|
|
738
|
-
stream's payload bytes, including codec headers and excluding Ogg framing and other streams. Resolution
|
|
739
|
-
and frame rate are available from the identification header. Audio streams retain their own codec
|
|
740
|
-
bitrate semantics.
|
|
741
|
-
|
|
742
|
-
For Ogg/Opus, the per-track average bitrate uses the logical stream's payload bytes, including codec
|
|
743
|
-
headers and excluding Ogg framing and other streams. It requires the logical stream's end-of-stream
|
|
744
|
-
(EOS) page and a known duration; reaching input EOF alone is insufficient. Set `duration: true` to
|
|
745
|
-
allow scanning when needed. The summary `format.bitrate` retains
|
|
746
|
-
its existing file-size estimate and can differ from the per-track bitrate. Vorbis and Speex use nominal
|
|
747
|
-
bitrates when their headers provide them.
|
|
764
|
+
Each entry describes one track, with its codec, language, duration, bitrate and
|
|
765
|
+
available audio or video properties. Choose tracks by type, language and selection
|
|
766
|
+
flags; their order does not indicate a preferred track.
|
|
767
|
+
|
|
768
|
+
Track properties describe the individual stream, and fields may be absent when
|
|
769
|
+
information is unavailable. Set `duration: true` when you need timing information;
|
|
770
|
+
this can require reading beyond the initial metadata.
|
|
771
|
+
|
|
772
|
+
Use `format.containerDuration` and `format.overallBitrate` for the complete file's
|
|
773
|
+
duration and average bitrate.
|
|
748
774
|
|
|
749
775
|
`metadata.format.trackInfo` is an array of [trackInfo](#trackinfo) objects, empty when no track information is available.
|
|
750
776
|
|
|
@@ -847,38 +873,7 @@ import {uint8ArrayToBase64} from 'uint8array-extras';
|
|
|
847
873
|
img.src = `data:${picture.format};base64,${uint8ArrayToBase64(picture.data)}`;
|
|
848
874
|
```
|
|
849
875
|
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
Dependency diagram:
|
|
853
|
-
```mermaid
|
|
854
|
-
graph TD;
|
|
855
|
-
MMN("music-metadata (Node.js entry point)")-->MMP
|
|
856
|
-
MMN-->FTN
|
|
857
|
-
MMP("music-metadata (primary entry point)")-->S(strtok3)
|
|
858
|
-
MMP-->TY(token-types)
|
|
859
|
-
MMP-->FTP
|
|
860
|
-
MMP-->UAE
|
|
861
|
-
FTN("file-type (Node.js entry point)")-->FTP
|
|
862
|
-
FTP("file-type (primary entry point)")-->S
|
|
863
|
-
S(strtok3)-->TO("@tokenizer/token")
|
|
864
|
-
TY(token-types)-->TO
|
|
865
|
-
TY-->IE("ieee754")
|
|
866
|
-
FTP-->TY
|
|
867
|
-
NS("node:stream")
|
|
868
|
-
FTN-->NS
|
|
869
|
-
FTP-->UAE(uint8array-extras)
|
|
870
|
-
style NS fill:#F88,stroke:#A44
|
|
871
|
-
style IE fill:#CCC,stroke:#888
|
|
872
|
-
style FTN fill:#FAA,stroke:#A44
|
|
873
|
-
style MMN fill:#FAA,stroke:#A44
|
|
874
|
-
```
|
|
875
|
-
|
|
876
|
-
Dependency list:
|
|
877
|
-
- [tokenizer-token](https://github.com/Borewit/tokenizer-token)
|
|
878
|
-
- [strtok3](https://github.com/Borewit/strtok3)
|
|
879
|
-
- [token-types](https://github.com/Borewit/token-types)
|
|
880
|
-
- [file-type](https://github.com/sindresorhus/file-type)
|
|
881
|
-
- [@tokenizer-token](https://github.com/Borewit/tokenizer-token)
|
|
876
|
+
For the internal design and dependencies, see the [architecture guide](doc/architecture.md).
|
|
882
877
|
|
|
883
878
|
## CommonJS backward compatibility
|
|
884
879
|
|
|
@@ -7,7 +7,7 @@ import { aiffParserLoader } from './aiff/AiffLoader.js';
|
|
|
7
7
|
import { apeParserLoader } from './apev2/Apev2Loader.js';
|
|
8
8
|
import { asfParserLoader } from './asf/AsfLoader.js';
|
|
9
9
|
import { cafParserLoader } from './caf/CafLoader.js';
|
|
10
|
-
import { getMaxMemoryAllocation } from './common/Allocation.js';
|
|
10
|
+
import { getMaxChapterCount, getMaxMemoryAllocation, getMaxMetadataEntries } from './common/Allocation.js';
|
|
11
11
|
import { MetadataCollector } from './common/MetadataCollector.js';
|
|
12
12
|
import { createAudioTrackInfo, finalizeContainerInfo } from './common/TrackInfo.js';
|
|
13
13
|
import { scanAppendingHeaders } from './core.js';
|
|
@@ -61,6 +61,8 @@ export class ParserFactory {
|
|
|
61
61
|
}
|
|
62
62
|
async parse(tokenizer, parserLoader, opts = {}) {
|
|
63
63
|
const maxBufferSize = getMaxMemoryAllocation(opts);
|
|
64
|
+
getMaxMetadataEntries(opts);
|
|
65
|
+
getMaxChapterCount(opts);
|
|
64
66
|
if (isRandomAccessTokenizer(tokenizer)) {
|
|
65
67
|
debug('tokenizer supports random-access, scanning for appending headers');
|
|
66
68
|
await scanAppendingHeaders(tokenizer, opts);
|
|
@@ -10,6 +10,8 @@ import * as iff from '../iff/index.js';
|
|
|
10
10
|
export declare class AIFFParser extends BasicParser {
|
|
11
11
|
private isCompressed;
|
|
12
12
|
private soundDataBytes;
|
|
13
|
+
private soundDataComplete;
|
|
14
|
+
private common;
|
|
13
15
|
parse(): Promise<void>;
|
|
14
16
|
readData(header: iff.IChunkHeader): Promise<number>;
|
|
15
17
|
readTextChunk(header: iff.IChunkHeader): Promise<number>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import initDebug from 'debug';
|
|
2
2
|
import * as strtok3 from 'strtok3';
|
|
3
3
|
import * as Token from 'token-types';
|
|
4
|
+
import { getMaxMetadataEntries } from '../common/Allocation.js';
|
|
4
5
|
import { BasicParser } from '../common/BasicParser.js';
|
|
5
6
|
import { FourCcToken } from '../common/FourCC.js';
|
|
6
7
|
import { parseEmbeddedID3v2 } from '../id3v2/EmbeddedID3v2.js';
|
|
@@ -18,6 +19,8 @@ const debug = initDebug('music-metadata:parser:aiff');
|
|
|
18
19
|
export class AIFFParser extends BasicParser {
|
|
19
20
|
isCompressed = null;
|
|
20
21
|
soundDataBytes;
|
|
22
|
+
soundDataComplete = false;
|
|
23
|
+
common;
|
|
21
24
|
async parse() {
|
|
22
25
|
const header = await this.readToken(iff.Header);
|
|
23
26
|
if (header.chunkID !== 'FORM') {
|
|
@@ -38,14 +41,27 @@ export class AIFFParser extends BasicParser {
|
|
|
38
41
|
}
|
|
39
42
|
this.metadata.setFormat('lossless', !this.isCompressed);
|
|
40
43
|
this.metadata.setAudioOnly();
|
|
44
|
+
let remaining = header.chunkSize - FourCcToken.len;
|
|
45
|
+
if (remaining < 0) {
|
|
46
|
+
throw new AiffContentError(`Invalid FORM chunk size: ${header.chunkSize}`);
|
|
47
|
+
}
|
|
41
48
|
try {
|
|
42
|
-
while (
|
|
43
|
-
this.tokenizer.fileInfo.size - this.tokenizer.position >= iff.Header.len) {
|
|
49
|
+
while (remaining >= iff.Header.len) {
|
|
44
50
|
debug(`Reading AIFF chunk at offset=${this.tokenizer.position}`);
|
|
45
51
|
const chunkHeader = await this.readToken(iff.Header);
|
|
52
|
+
remaining -= iff.Header.len;
|
|
53
|
+
const available = this.tokenizer.fileInfo.size;
|
|
54
|
+
if (chunkHeader.chunkSize > remaining ||
|
|
55
|
+
(available !== undefined && chunkHeader.chunkSize > available - this.tokenizer.position)) {
|
|
56
|
+
throw new AiffContentError(`Chunk ${chunkHeader.chunkID} size ${chunkHeader.chunkSize} exceeds remaining FORM data`);
|
|
57
|
+
}
|
|
46
58
|
const nextChunk = 2 * Math.round(chunkHeader.chunkSize / 2);
|
|
47
59
|
const bytesRead = await this.readData(chunkHeader);
|
|
48
|
-
await this.tokenizer.ignore(nextChunk - bytesRead);
|
|
60
|
+
const ignored = await this.tokenizer.ignore(nextChunk - bytesRead);
|
|
61
|
+
if (chunkHeader.chunkID === 'SSND') {
|
|
62
|
+
this.soundDataComplete = ignored === nextChunk - bytesRead;
|
|
63
|
+
}
|
|
64
|
+
remaining -= nextChunk;
|
|
49
65
|
}
|
|
50
66
|
}
|
|
51
67
|
catch (err) {
|
|
@@ -56,6 +72,20 @@ export class AIFFParser extends BasicParser {
|
|
|
56
72
|
throw err;
|
|
57
73
|
}
|
|
58
74
|
}
|
|
75
|
+
// Apple IMA4 COMM stores packet counts; some encoders already store decoded
|
|
76
|
+
// frames. Only expand counts corroborated by the complete SSND payload.
|
|
77
|
+
// Each packet contains 64 frames in 34 bytes per channel.
|
|
78
|
+
const common = this.common;
|
|
79
|
+
if (common?.compressionType === 'ima4' &&
|
|
80
|
+
common.numChannels > 0 &&
|
|
81
|
+
common.numSampleFrames > 0 &&
|
|
82
|
+
common.sampleRate > 0 &&
|
|
83
|
+
this.soundDataComplete &&
|
|
84
|
+
this.soundDataBytes === common.numSampleFrames * common.numChannels * 34) {
|
|
85
|
+
const samples = common.numSampleFrames * 64;
|
|
86
|
+
this.metadata.setFormat('numberOfSamples', samples);
|
|
87
|
+
this.metadata.setFormat('duration', samples / common.sampleRate);
|
|
88
|
+
}
|
|
59
89
|
// COMM and SSND can appear in either order.
|
|
60
90
|
const duration = this.metadata.format.duration;
|
|
61
91
|
if (this.soundDataBytes !== undefined && duration !== undefined && Number.isFinite(duration) && duration > 0) {
|
|
@@ -70,6 +100,7 @@ export class AIFFParser extends BasicParser {
|
|
|
70
100
|
throw new AiffContentError('Failed to parse AIFF.COMM chunk when compression type is unknown');
|
|
71
101
|
}
|
|
72
102
|
const common = await this.readToken(new AiffToken.Common(header, this.isCompressed));
|
|
103
|
+
this.common = common;
|
|
73
104
|
this.metadata.setFormat('bitsPerSample', common.sampleSize);
|
|
74
105
|
this.metadata.setFormat('sampleRate', common.sampleRate);
|
|
75
106
|
this.metadata.setFormat('numberOfChannels', common.numChannels);
|
|
@@ -86,6 +117,7 @@ export class AIFFParser extends BasicParser {
|
|
|
86
117
|
return header.chunkSize;
|
|
87
118
|
}
|
|
88
119
|
case 'SSND': {
|
|
120
|
+
this.soundDataComplete = false;
|
|
89
121
|
if (header.chunkSize < AiffToken.SoundDataHeader.len) {
|
|
90
122
|
throw new AiffContentError('SSND chunk is too small to contain its header');
|
|
91
123
|
}
|
|
@@ -109,6 +141,13 @@ export class AIFFParser extends BasicParser {
|
|
|
109
141
|
}
|
|
110
142
|
async readTextChunk(header) {
|
|
111
143
|
const value = await this.readToken(new Token.StringType(header.chunkSize, 'ascii'));
|
|
144
|
+
let valueCount = 1;
|
|
145
|
+
for (let offset = value.indexOf('\0'); offset >= 0; offset = value.indexOf('\0', offset + 1)) {
|
|
146
|
+
++valueCount;
|
|
147
|
+
}
|
|
148
|
+
if (valueCount > getMaxMetadataEntries(this.options)) {
|
|
149
|
+
throw new AiffContentError(`Text value count ${valueCount} exceeds entry limit ${getMaxMetadataEntries(this.options)}`);
|
|
150
|
+
}
|
|
112
151
|
const values = value
|
|
113
152
|
.split('\0')
|
|
114
153
|
.map(v => v.trim())
|
|
@@ -2,6 +2,7 @@ import * as Token from 'token-types';
|
|
|
2
2
|
import { FourCcToken } from '../common/FourCC.js';
|
|
3
3
|
import { makeUnexpectedFileContentError } from '../ParseError.js';
|
|
4
4
|
export const compressionTypes = {
|
|
5
|
+
ima4: 'IMA4 ADPCM',
|
|
5
6
|
NONE: 'not compressed PCM Apple Computer',
|
|
6
7
|
sowt: 'PCM (byte swapped)',
|
|
7
8
|
fl32: '32-bit floating point IEEE 32-bit float',
|
|
@@ -2,7 +2,7 @@ import { textDecode } from '@borewit/text-codec';
|
|
|
2
2
|
import initDebug from 'debug';
|
|
3
3
|
import * as strtok3 from 'strtok3';
|
|
4
4
|
import { StringType } from 'token-types';
|
|
5
|
-
import { getTokenizerOptions, readBuffer } from '../common/Allocation.js';
|
|
5
|
+
import { getMaxMetadataEntries, getTokenizerOptions, readBuffer } from '../common/Allocation.js';
|
|
6
6
|
import { BasicParser } from '../common/BasicParser.js';
|
|
7
7
|
import * as util from '../common/Util.js';
|
|
8
8
|
import { makeUnexpectedFileContentError } from '../ParseError.js';
|
|
@@ -99,6 +99,9 @@ export class APEv2Parser extends BasicParser {
|
|
|
99
99
|
return this.tryParseApeHeader();
|
|
100
100
|
}
|
|
101
101
|
async parseTags(footer) {
|
|
102
|
+
if (footer.fields > getMaxMetadataEntries(this.options)) {
|
|
103
|
+
throw new ApeContentError(`Tag item count ${footer.fields} exceeds entry limit ${getMaxMetadataEntries(this.options)}`);
|
|
104
|
+
}
|
|
102
105
|
const keyBuffer = new Uint8Array(256); // maximum tag key length
|
|
103
106
|
let bytesRemaining = footer.size - TagFooter.len;
|
|
104
107
|
debug(`Parse APE tags at offset=${this.tokenizer.position}, size=${bytesRemaining}`);
|
|
@@ -134,6 +137,13 @@ export class APEv2Parser extends BasicParser {
|
|
|
134
137
|
case DataType.text_utf8: {
|
|
135
138
|
// utf-8 text-string
|
|
136
139
|
const value = textDecode(await this.readTagValue(tagItemHeader.size), 'utf-8');
|
|
140
|
+
let valueCount = 1;
|
|
141
|
+
for (let offset = value.indexOf('\0'); offset >= 0; offset = value.indexOf('\0', offset + 1)) {
|
|
142
|
+
++valueCount;
|
|
143
|
+
}
|
|
144
|
+
if (valueCount > getMaxMetadataEntries(this.options)) {
|
|
145
|
+
throw new ApeContentError(`Text value count ${valueCount} exceeds entry limit ${getMaxMetadataEntries(this.options)}`);
|
|
146
|
+
}
|
|
137
147
|
const values = value.split(/\x00/g);
|
|
138
148
|
await Promise.all(values.map(val => this.metadata.addTag(tagFormat, key, val)));
|
|
139
149
|
break;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type IGetToken, type ITokenizer } from 'strtok3';
|
|
2
2
|
import type { AnyTagValue, IAudioTrack, IPicture, ITag, IVideoTrack } from '../type.js';
|
|
3
3
|
import AsfGuid from './AsfGuid.js';
|
|
4
4
|
declare const AsfContentParseError_base: {
|
|
@@ -241,7 +241,7 @@ export interface ICodecEntry {
|
|
|
241
241
|
* 3.5: Read the Codec-List-Object, which provides user-friendly information about the codecs and formats used to encode the content found in the ASF file.
|
|
242
242
|
* Ref: http://drang.s4.xrea.com/program/tips/id3tag/wmp/03_asf_top_level_header_object.html#3_5
|
|
243
243
|
*/
|
|
244
|
-
export declare function readCodecEntries(tokenizer: ITokenizer, payloadSize: number): Promise<ICodecEntry[]>;
|
|
244
|
+
export declare function readCodecEntries(tokenizer: ITokenizer, payloadSize: number, maxEntries?: number): Promise<ICodecEntry[]>;
|
|
245
245
|
/**
|
|
246
246
|
* 3.10 Content Description Object (optional, one only)
|
|
247
247
|
* Ref: http://drang.s4.xrea.com/program/tips/id3tag/wmp/03_asf_top_level_header_object.html#3_10
|