@openclaw/matrix 2026.9.8 → 2026.10.1-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-B7axQ80R.mjs → account-selection-BDeeqwwR.mjs} +1 -1
- package/dist/.setup/{accounts-WkgrIxMt.mjs → accounts-C_r0UlEm.mjs} +2 -2
- package/dist/.setup/{approval-handler.runtime-C-pw3NvY.mjs → approval-handler.runtime-QkHLH2az.mjs} +14 -19
- package/dist/.setup/{approval-reactions-BrS5ECU0.mjs → approval-reactions-DhB6gNPU.mjs} +11 -25
- package/dist/.setup/{channel-DXenXmj0.mjs → channel-CeRXEAEP.mjs} +17 -46
- package/dist/.setup/{channel.runtime-BXUawOno.mjs → channel.runtime-DBQA2y1F.mjs} +6 -6
- package/dist/.setup/{channel.setup-DWfLaXqT.mjs → channel.setup-DC2t7_PK.mjs} +12 -26
- package/dist/.setup/{cli-IhZO2OEj.mjs → cli-Be8tdNw8.mjs} +24 -45
- package/dist/.setup/{cli-metadata-nowEgdY0.mjs → cli-metadata-CtcjBFhc.mjs} +1 -1
- package/dist/.setup/{client-BXATebyo.mjs → client-DY3HExqI.mjs} +3 -3
- package/dist/.setup/{client-bootstrap-BiHX55is.mjs → client-bootstrap-CZvJjr29.mjs} +1 -1
- package/dist/.setup/{client-Ccv77kwh.mjs → client-kmih04ng.mjs} +21 -40
- package/dist/.setup/{client-support-Bn9Bk0-H.mjs → client-support-D7BlioUb.mjs} +14 -23
- package/dist/.setup/{config-update-5m1Un5gJ.mjs → config-update-CZndPxNd.mjs} +29 -72
- package/dist/.setup/{create-client-DRZ580E3.mjs → create-client-CbJVyFDy.mjs} +5 -5
- package/dist/.setup/{credentials-C9qDO5-2.mjs → credentials-C2dvc_kB.mjs} +1 -1
- package/dist/.setup/{credentials-read-KD4o5biZ.mjs → credentials-read-CqRiEAQa.mjs} +1 -1
- package/dist/.setup/{crypto-runtime-DPjIDF8H.mjs → crypto-runtime-B2AjWo-i.mjs} +223 -79
- package/dist/.setup/{deps-CLQ4EOq7.mjs → deps-CFNl7tQo.mjs} +14 -39
- package/dist/.setup/{device-health-U-yoVjPw.mjs → device-health-Be60VF1w.mjs} +1 -1
- package/dist/.setup/{direct-management-Cn2t8n1V.mjs → direct-management-DJtQhLKH.mjs} +4 -8
- package/dist/.setup/{directory-live-_sw-Q7KO.mjs → directory-live-DW5UykLL.mjs} +3 -3
- package/dist/.setup/{doctor-contract-De6geW0h.mjs → doctor-contract-CsTNmbMa.mjs} +10 -133
- package/dist/.setup/{draft-stream-CdVMstpR.mjs → draft-stream-B87DfA6a.mjs} +4 -8
- package/dist/.setup/{encryption-guidance-B6797jNA.mjs → encryption-guidance-BEjKbiMR.mjs} +1 -1
- package/dist/.setup/{exec-approvals-fsiMQ1ce.mjs → exec-approvals-BLDAMyHs.mjs} +6 -19
- package/dist/.setup/{file-sync-store-B-9bMb_O.mjs → file-sync-store-Clc9iEdn.mjs} +3 -3
- package/dist/.setup/{http-client-C1XvVD3K.mjs → http-client-DfJY5Ck0.mjs} +8 -29
- package/dist/.setup/{inbound-dedupe-BGrMrTTu.mjs → inbound-dedupe-C-EBGY0B.mjs} +1 -1
- package/dist/.setup/{joined-room-encryption-TZoOKXgh.mjs → joined-room-encryption-BAD70N5n.mjs} +1 -1
- package/dist/.setup/logger-CXQnpXCt.mjs +44 -0
- package/dist/.setup/{logging-mhnFQGzB.mjs → logging-BKV8TYQq.mjs} +7 -32
- package/dist/.setup/{messages-Buz27pi5.mjs → messages-uCbwLRKS.mjs} +5 -8
- package/dist/.setup/{monitor-BBg5qgov.mjs → monitor-skIntQVG.mjs} +109 -180
- package/dist/.setup/{onboarding-hJaieQj5.mjs → onboarding-Cm_tOJxs.mjs} +12 -19
- package/dist/.setup/{outbound-C9vBijaH.mjs → outbound-CqQou3ny.mjs} +16 -22
- package/dist/.setup/{profile-B3DD2jYa.mjs → profile-DS0xdJAi.mjs} +11 -31
- package/dist/.setup/{profile-update-CmxIAd4c.mjs → profile-update-C1n8SRqH.mjs} +3 -3
- package/dist/.setup/{reaction-events-mnzc_JvP.mjs → reaction-events-Cqq46xsG.mjs} +5 -5
- package/dist/.setup/{resolve-targets-BFq3q4c9.mjs → resolve-targets-DFeU1Ww6.mjs} +2 -2
- package/dist/.setup/retired-state-BXUQ2I-C.mjs +91 -0
- package/dist/.setup/{room-info-BbTGRJcR.mjs → room-info-BPMbwe8I.mjs} +33 -50
- package/dist/.setup/{sdk-DmRVM0VA.mjs → sdk-CgQGkCsS.mjs} +226 -182
- package/dist/.setup/{send-GOF64QRc.mjs → send-B1Y2L4wj.mjs} +19 -68
- package/dist/.setup/{setup-bootstrap-AzalcuCW.mjs → setup-bootstrap-UNIGyKnk.mjs} +2 -2
- package/dist/.setup/{setup-core-BeifoeL4.mjs → setup-core-6DppLENo.mjs} +5 -5
- package/dist/.setup/{setup-plugin-api-Bsbdw41x.mjs → setup-plugin-api-BRs9bcp4.mjs} +1 -1
- package/dist/.setup/startup-verification-D00eUt74.mjs +122 -0
- package/dist/.setup/storage-D7agewjH.mjs +464 -0
- package/dist/.setup/{sync-cache-state-C6sEmvJK.mjs → sync-cache-state-C2z64uyk.mjs} +10 -24
- package/dist/.setup/{thread-bindings-jXu_9cHE.mjs → thread-bindings-DveHVZqN.mjs} +13 -71
- package/dist/.setup/{tool-actions-Ce7Okg6m.mjs → tool-actions-BqlK2ilM.mjs} +51 -73
- package/dist/.setup/{verification-C45rOZkM.mjs → verification-kMlFYUn0.mjs} +10 -27
- package/dist/api.js +5 -5
- 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 +48 -201
- package/dist/helper-api.js +1 -1
- package/dist/index.js +1 -1
- package/dist/plugin-entry.handlers.runtime.js +1 -1
- package/dist/runtime-api.js +3 -3
- package/dist/session-binding-contract-api.js +1 -1
- package/dist/setup-entry.js +1 -1
- package/dist/setup-plugin-api.js +1 -1
- package/node_modules/@openclaw/fs-safe/CHANGELOG.md +95 -0
- package/node_modules/@openclaw/fs-safe/README.md +70 -379
- package/node_modules/@openclaw/fs-safe/dist/absolute-path.js +35 -51
- package/node_modules/@openclaw/fs-safe/dist/advanced.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/advanced.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-input.js +2 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-parser.wasm +0 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-staging.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-staging.js +9 -10
- package/node_modules/@openclaw/fs-safe/dist/archive.js +2 -5
- package/node_modules/@openclaw/fs-safe/dist/atomic-io.d.ts +51 -0
- package/node_modules/@openclaw/fs-safe/dist/atomic-io.js +242 -0
- package/node_modules/@openclaw/fs-safe/dist/config.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/config.js +1 -1
- 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 +2 -2
- package/node_modules/@openclaw/fs-safe/dist/copy-tree-portable.js +2 -0
- package/node_modules/@openclaw/fs-safe/dist/create.js +12 -5
- package/node_modules/@openclaw/fs-safe/dist/directory-guard.d.ts +11 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-guard.js +4 -7
- package/node_modules/@openclaw/fs-safe/dist/entry-publication-types.d.ts +55 -0
- package/node_modules/@openclaw/fs-safe/dist/entry-publication-types.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/entry-publication.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/entry-publication.js +262 -0
- package/node_modules/@openclaw/fs-safe/dist/exclusive-create.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/exclusive-create.js +22 -0
- package/node_modules/@openclaw/fs-safe/dist/file-cleanup.d.ts +1 -6
- package/node_modules/@openclaw/fs-safe/dist/file-cleanup.js +3 -6
- package/node_modules/@openclaw/fs-safe/dist/file-identity.js +3 -6
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-io.js +2 -2
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-mutation.js +9 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root.js +4 -6
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-stale-admission.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync.js +8 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store-boundary.js +2 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store-sync-write.js +20 -18
- package/node_modules/@openclaw/fs-safe/dist/file-store.js +4 -10
- package/node_modules/@openclaw/fs-safe/dist/fs.d.ts +2 -10
- package/node_modules/@openclaw/fs-safe/dist/fs.js +2 -10
- package/node_modules/@openclaw/fs-safe/dist/guarded-mkdir.d.ts +3 -4
- package/node_modules/@openclaw/fs-safe/dist/guarded-mkdir.js +6 -18
- package/node_modules/@openclaw/fs-safe/dist/guest-dispatch-python.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/guest-native-python.js +0 -2
- package/node_modules/@openclaw/fs-safe/dist/guest.js +3 -9
- package/node_modules/@openclaw/fs-safe/dist/index.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/index.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-directory.js +1 -5
- package/node_modules/@openclaw/fs-safe/dist/json.js +19 -37
- package/node_modules/@openclaw/fs-safe/dist/move-path.js +2 -0
- package/node_modules/@openclaw/fs-safe/dist/mutation-authority.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/mutation-authority.js +9 -1
- package/node_modules/@openclaw/fs-safe/dist/native-binding.d.ts +47 -2
- package/node_modules/@openclaw/fs-safe/dist/native-config.d.ts +1 -9
- package/node_modules/@openclaw/fs-safe/dist/native-config.js +6 -40
- package/node_modules/@openclaw/fs-safe/dist/native-parent-admission.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/native-parent-admission.js +5 -2
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write.js +11 -316
- package/node_modules/@openclaw/fs-safe/dist/native-policy-parent-windows.d.ts +7 -7
- package/node_modules/@openclaw/fs-safe/dist/native-policy-parent-windows.js +28 -175
- package/node_modules/@openclaw/fs-safe/dist/native-policy-parent.d.ts +15 -0
- package/node_modules/@openclaw/fs-safe/dist/native-policy-parent.js +418 -0
- package/node_modules/@openclaw/fs-safe/dist/native-rename-outcome.js +9 -4
- package/node_modules/@openclaw/fs-safe/dist/native-staged-file.js +17 -13
- package/node_modules/@openclaw/fs-safe/dist/native-staged-symlink.js +6 -24
- package/node_modules/@openclaw/fs-safe/dist/native.js +5 -1
- package/node_modules/@openclaw/fs-safe/dist/path-case.js +10 -9
- package/node_modules/@openclaw/fs-safe/dist/path-scope-lexical.js +4 -1
- package/node_modules/@openclaw/fs-safe/dist/path-segment-route.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/path-segment-route.js +3 -0
- package/node_modules/@openclaw/fs-safe/dist/path.js +4 -1
- package/node_modules/@openclaw/fs-safe/dist/permissions-windows.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-admission.js +1 -3
- package/node_modules/@openclaw/fs-safe/dist/pinned-write-staged.js +2 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-write.js +9 -10
- package/node_modules/@openclaw/fs-safe/dist/private-producer-handoff.js +3 -6
- package/node_modules/@openclaw/fs-safe/dist/publish-copy-stage.js +2 -2
- package/node_modules/@openclaw/fs-safe/dist/publish-file.js +4 -3
- package/node_modules/@openclaw/fs-safe/dist/replace-file-buffer.d.ts +3 -4
- package/node_modules/@openclaw/fs-safe/dist/replace-file-buffer.js +18 -32
- package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-fallback.d.ts +5 -17
- package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-fallback.js +92 -230
- package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-source.d.ts +4 -15
- package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-source.js +22 -63
- package/node_modules/@openclaw/fs-safe/dist/replace-file-descriptor.d.ts +9 -34
- package/node_modules/@openclaw/fs-safe/dist/replace-file-descriptor.js +78 -83
- package/node_modules/@openclaw/fs-safe/dist/replace-file-destination.d.ts +18 -20
- package/node_modules/@openclaw/fs-safe/dist/replace-file-destination.js +64 -98
- package/node_modules/@openclaw/fs-safe/dist/replace-file-temp-owner.d.ts +16 -33
- package/node_modules/@openclaw/fs-safe/dist/replace-file-temp-owner.js +61 -200
- package/node_modules/@openclaw/fs-safe/dist/replace-file-types.d.ts +1 -6
- package/node_modules/@openclaw/fs-safe/dist/replace-file.js +76 -216
- package/node_modules/@openclaw/fs-safe/dist/root-boundary.js +14 -24
- package/node_modules/@openclaw/fs-safe/dist/root-context.d.ts +1 -4
- package/node_modules/@openclaw/fs-safe/dist/root-context.js +4 -19
- package/node_modules/@openclaw/fs-safe/dist/root-create-native.d.ts +52 -0
- package/node_modules/@openclaw/fs-safe/dist/root-create-native.js +350 -0
- package/node_modules/@openclaw/fs-safe/dist/root-directory-list-types.d.ts +35 -0
- package/node_modules/@openclaw/fs-safe/dist/root-directory-list-types.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-directory-list.d.ts +2 -27
- package/node_modules/@openclaw/fs-safe/dist/root-directory-list.js +31 -28
- package/node_modules/@openclaw/fs-safe/dist/root-directory.js +1 -4
- package/node_modules/@openclaw/fs-safe/dist/root-errors.js +34 -0
- package/node_modules/@openclaw/fs-safe/dist/root-file.js +9 -21
- package/node_modules/@openclaw/fs-safe/dist/root-impl.js +105 -37
- package/node_modules/@openclaw/fs-safe/dist/root-move-noreplace.d.ts +7 -2
- package/node_modules/@openclaw/fs-safe/dist/root-move-noreplace.js +67 -38
- package/node_modules/@openclaw/fs-safe/dist/root-observed-path.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/root-observed-path.js +0 -2
- package/node_modules/@openclaw/fs-safe/dist/root-options.d.ts +2 -3
- package/node_modules/@openclaw/fs-safe/dist/root-path-existing.js +3 -1
- package/node_modules/@openclaw/fs-safe/dist/root-path-stat.js +68 -85
- package/node_modules/@openclaw/fs-safe/dist/root-path.js +6 -1
- package/node_modules/@openclaw/fs-safe/dist/root-paths-lexical.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/root-paths-lexical.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/root-paths.js +4 -9
- package/node_modules/@openclaw/fs-safe/dist/root-remove-native.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/root-remove-native.js +311 -0
- package/node_modules/@openclaw/fs-safe/dist/root-remove.d.ts +11 -0
- package/node_modules/@openclaw/fs-safe/dist/root-remove.js +3 -1
- package/node_modules/@openclaw/fs-safe/dist/root-walk.d.ts +2 -2
- package/node_modules/@openclaw/fs-safe/dist/root-walk.js +1 -3
- package/node_modules/@openclaw/fs-safe/dist/root-write-admission.d.ts +3 -3
- package/node_modules/@openclaw/fs-safe/dist/root-write-admission.js +8 -10
- package/node_modules/@openclaw/fs-safe/dist/safe-path-segment.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/safe-path-segment.js +0 -4
- package/node_modules/@openclaw/fs-safe/dist/secret-file.js +12 -9
- package/node_modules/@openclaw/fs-safe/dist/secure-temp-dir.d.ts +0 -2
- package/node_modules/@openclaw/fs-safe/dist/sibling-staged-file.js +2 -0
- package/node_modules/@openclaw/fs-safe/dist/sibling-temp.js +7 -4
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-acquire.js +13 -6
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-reclaim.d.ts +0 -3
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-reclaim.js +5 -23
- package/node_modules/@openclaw/fs-safe/dist/staged-file-settlement.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/staged-file-settlement.js +11 -6
- package/node_modules/@openclaw/fs-safe/dist/temp-cleanup.js +1 -8
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-child-admission.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-child-admission.js +2 -9
- package/node_modules/@openclaw/fs-safe/dist/text-atomic.d.ts +1 -6
- package/node_modules/@openclaw/fs-safe/dist/trash.js +6 -2
- package/node_modules/@openclaw/fs-safe/dist/walk.js +100 -46
- package/node_modules/@openclaw/fs-safe/dist/watch-hints.d.ts +7 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-hints.js +235 -19
- package/node_modules/@openclaw/fs-safe/dist/watch-native.d.ts +21 -2
- package/node_modules/@openclaw/fs-safe/dist/watch-native.js +21 -3
- package/node_modules/@openclaw/fs-safe/dist/watch-rescan.d.ts +6 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-rescan.js +111 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-scan.d.ts +13 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-scan.js +27 -4
- package/node_modules/@openclaw/fs-safe/dist/watch-stream.js +2 -0
- package/node_modules/@openclaw/fs-safe/dist/watch.js +131 -40
- package/node_modules/@openclaw/fs-safe/dist/windows-path-alias.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-path-alias.js +24 -6
- package/node_modules/@openclaw/fs-safe/dist/windows-path-syntax.d.ts +13 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-path-syntax.js +51 -0
- package/node_modules/@openclaw/fs-safe/docs/advanced.md +4 -0
- package/node_modules/@openclaw/fs-safe/docs/atomic.md +4 -1
- package/node_modules/@openclaw/fs-safe/docs/config.md +6 -14
- package/node_modules/@openclaw/fs-safe/docs/contributing.md +4 -14
- package/node_modules/@openclaw/fs-safe/docs/durability.md +6 -29
- package/node_modules/@openclaw/fs-safe/docs/entry-publication.md +146 -0
- package/node_modules/@openclaw/fs-safe/docs/errors.md +16 -0
- package/node_modules/@openclaw/fs-safe/docs/file-store.md +28 -5
- package/node_modules/@openclaw/fs-safe/docs/index.md +2 -31
- package/node_modules/@openclaw/fs-safe/docs/install.md +10 -31
- package/node_modules/@openclaw/fs-safe/docs/json.md +1 -1
- package/node_modules/@openclaw/fs-safe/docs/local-roots.md +0 -1
- package/node_modules/@openclaw/fs-safe/docs/migrating-to-0.5.md +12 -12
- package/node_modules/@openclaw/fs-safe/docs/native-helper.md +35 -96
- package/node_modules/@openclaw/fs-safe/docs/native.md +22 -20
- package/node_modules/@openclaw/fs-safe/docs/path.md +1 -1
- package/node_modules/@openclaw/fs-safe/docs/permissions.md +1 -2
- package/node_modules/@openclaw/fs-safe/docs/public-api.md +1 -2
- package/node_modules/@openclaw/fs-safe/docs/reading.md +1 -2
- package/node_modules/@openclaw/fs-safe/docs/root.md +26 -184
- package/node_modules/@openclaw/fs-safe/docs/secret-file.md +1 -1
- package/node_modules/@openclaw/fs-safe/docs/security-model.md +115 -3
- package/node_modules/@openclaw/fs-safe/docs/store.md +2 -2
- package/node_modules/@openclaw/fs-safe/docs/temp.md +29 -65
- package/node_modules/@openclaw/fs-safe/docs/testing.md +90 -58
- package/node_modules/@openclaw/fs-safe/docs/types.md +3 -16
- package/node_modules/@openclaw/fs-safe/docs/walk.md +33 -5
- package/node_modules/@openclaw/fs-safe/docs/watch.md +96 -14
- package/node_modules/@openclaw/fs-safe/docs/writing.md +172 -16
- package/node_modules/@openclaw/fs-safe/package.json +10 -10
- package/node_modules/@openclaw/fs-safe-darwin-arm64/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-darwin-arm64/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-darwin-x64/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-darwin-x64/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-linux-arm64-gnu/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-linux-arm64-gnu/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-linux-arm64-musl/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-linux-arm64-musl/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-linux-x64-gnu/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-linux-x64-gnu/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-linux-x64-musl/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-linux-x64-musl/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-win32-x64-msvc/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-win32-x64-msvc/package.json +1 -1
- package/openclaw.plugin.json +0 -9
- package/package.json +5 -5
- package/dist/.setup/crypto-snapshot-doctor.runtime-44FrCPR7.mjs +0 -91
- package/dist/.setup/doctor-DMvEBx6o.mjs +0 -49
- package/dist/.setup/idb-persistence-DBvfre1X.mjs +0 -227
- package/dist/.setup/idb-persistence-lock-D_mDu4Cf.mjs +0 -27
- package/dist/.setup/logger-CVv56jzH.mjs +0 -74
- package/dist/.setup/startup-verification-Aiy_xVdI.mjs +0 -204
- package/dist/.setup/storage-BXS2cB2i.mjs +0 -288
- package/dist/.setup/storage-metadata-BDRZ7vpX.mjs +0 -371
- package/node_modules/@openclaw/fs-safe/dist/watch-alias.d.ts +0 -6
- package/node_modules/@openclaw/fs-safe/dist/watch-alias.js +0 -88
- package/node_modules/@openclaw/fs-safe/docs/mutation-policy-proof.md +0 -69
- package/node_modules/@openclaw/fs-safe/docs/private-file-store.md +0 -68
- package/node_modules/@openclaw/fs-safe/docs/test-hooks.md +0 -110
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { t as getMatrixRuntime } from "./runtime-1kn1P6io.mjs";
|
|
2
2
|
import { a as resolveMatrixAccountConfig, i as resolveMatrixAccountAllowlistConfig } from "./account-config-CRsKoMqJ.mjs";
|
|
3
|
-
import { n as resolveConfiguredMatrixBotUserIds } from "./accounts-
|
|
4
|
-
import { a as resolveMatrixThreadRouting, i as resolveMatrixInboundRoute, n as resolveMatrixStoredSessionMeta, o as resolveMatrixRoomConfig } from "./channel-
|
|
5
|
-
import { a as resolveMatrixAllowListMatch, i as normalizeMatrixUserId, r as normalizeMatrixAllowList } from "./channel.setup-
|
|
3
|
+
import { n as resolveConfiguredMatrixBotUserIds } from "./accounts-C_r0UlEm.mjs";
|
|
4
|
+
import { a as resolveMatrixThreadRouting, i as resolveMatrixInboundRoute, n as resolveMatrixStoredSessionMeta, o as resolveMatrixRoomConfig } from "./channel-CeRXEAEP.mjs";
|
|
5
|
+
import { a as resolveMatrixAllowListMatch, i as normalizeMatrixUserId, r as normalizeMatrixAllowList } from "./channel.setup-DC2t7_PK.mjs";
|
|
6
6
|
import { n as isMatrixRoomId, t as isMatrixQualifiedUserId } from "./target-ids-Nwx7cMVE.mjs";
|
|
7
7
|
import { a as MATRIX_REACTION_EVENT_TYPE } from "./send-currentness-C2rMVVIQ.mjs";
|
|
8
|
-
import { c as isStrictDirectMembership, f as resolveMatrixReplyToEventId, h as MATRIX_OPENCLAW_FINALIZED_PREVIEW_KEY, i as promoteMatrixDirectRoomCandidate, p as resolveMatrixThreadRootId, s as hasDirectMatrixMemberFlag, u as readJoinedMatrixMembers, v as RelationType } from "./direct-management-
|
|
9
|
-
import {
|
|
10
|
-
import { t as createMatrixThreadBindingManager } from "./thread-bindings-
|
|
11
|
-
import { i as readMatrixMessages, u as fetchMatrixPollSnapshot } from "./messages-
|
|
12
|
-
import { a as isMatrixStartupAbortError, c as getMatrixMonitorTaskSignal, d as resolveMatrixAuthContext, l as backfillMatrixAuthDeviceIdAfterStartup, n as acquireSharedMatrixClient, o as throwIfMatrixStartupAborted, s as createMatrixMonitorTaskRunner, u as resolveMatrixAuth } from "./client-
|
|
13
|
-
import { i as isMatrixMediaSizeLimitError, r as MatrixMediaSizeLimitError } from "./http-client-
|
|
14
|
-
import { n as prepareMatrixReplyPayload, r as resolveMatrixExtraContent } from "./outbound-
|
|
15
|
-
import { t as resolveMatrixTargets } from "./resolve-targets-
|
|
16
|
-
import { t as formatMatrixEncryptedEventDisabledWarning } from "./encryption-guidance-
|
|
17
|
-
import { createMatrixInboundEventDeduper } from "./inbound-dedupe-
|
|
18
|
-
import { a as isMatrixAccessTokenInvalidatedError, d as isMatrixDisconnectedSyncState, f as isMatrixReadySyncState, p as isMatrixTerminalSyncState } from "./client-support-
|
|
19
|
-
import { r as getMatrixRoomInfo, t as createMatrixRoomInfoResolver } from "./room-info-
|
|
8
|
+
import { c as isStrictDirectMembership, f as resolveMatrixReplyToEventId, h as MATRIX_OPENCLAW_FINALIZED_PREVIEW_KEY, i as promoteMatrixDirectRoomCandidate, p as resolveMatrixThreadRootId, s as hasDirectMatrixMemberFlag, u as readJoinedMatrixMembers, v as RelationType } from "./direct-management-DJtQhLKH.mjs";
|
|
9
|
+
import { _ as isPollEventType, c as formatMatrixMessageText, d as resolveMatrixReplacementContent, h as formatPollAsText, l as isLikelyBareFilename, r as sendMessageMatrix, v as isPollStartType, w as setBoundedMap, y as parsePollStart } from "./send-B1Y2L4wj.mjs";
|
|
10
|
+
import { t as createMatrixThreadBindingManager } from "./thread-bindings-DveHVZqN.mjs";
|
|
11
|
+
import { i as readMatrixMessages, u as fetchMatrixPollSnapshot } from "./messages-uCbwLRKS.mjs";
|
|
12
|
+
import { a as isMatrixStartupAbortError, c as getMatrixMonitorTaskSignal, d as resolveMatrixAuthContext, l as backfillMatrixAuthDeviceIdAfterStartup, n as acquireSharedMatrixClient, o as throwIfMatrixStartupAborted, s as createMatrixMonitorTaskRunner, u as resolveMatrixAuth } from "./client-kmih04ng.mjs";
|
|
13
|
+
import { i as isMatrixMediaSizeLimitError, r as MatrixMediaSizeLimitError } from "./http-client-DfJY5Ck0.mjs";
|
|
14
|
+
import { n as prepareMatrixReplyPayload, r as resolveMatrixExtraContent } from "./outbound-CqQou3ny.mjs";
|
|
15
|
+
import { t as resolveMatrixTargets } from "./resolve-targets-DFeU1Ww6.mjs";
|
|
16
|
+
import { t as formatMatrixEncryptedEventDisabledWarning } from "./encryption-guidance-BEjKbiMR.mjs";
|
|
17
|
+
import { createMatrixInboundEventDeduper } from "./inbound-dedupe-C-EBGY0B.mjs";
|
|
18
|
+
import { a as isMatrixAccessTokenInvalidatedError, d as isMatrixDisconnectedSyncState, f as isMatrixReadySyncState, p as isMatrixTerminalSyncState } from "./client-support-D7BlioUb.mjs";
|
|
19
|
+
import { r as getMatrixRoomInfo, t as createMatrixRoomInfoResolver } from "./room-info-BPMbwe8I.mjs";
|
|
20
20
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
21
21
|
import { createChannelProgressDraftCompositor, createLivePreviewLifecycle, createPreviewMessageReceipt, createReplyPrefixOptions, createTypingCallbacks, logTypingFailure, resolveChannelStreamingBlockEnabled, waitUntilAbort } from "openclaw/plugin-sdk/channel-outbound";
|
|
22
22
|
import { normalizeLowercaseStringOrEmpty, normalizeNullableString, normalizeOptionalString, normalizeStringifiedEntries, normalizeUniqueTrimmedStringList, readStringValue, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -147,14 +147,6 @@ function isMatrixDangerousNameMatchingEnabled(params) {
|
|
|
147
147
|
accountId: params.accountId
|
|
148
148
|
}));
|
|
149
149
|
}
|
|
150
|
-
function addUniqueMatrixAllowlistEntry(params) {
|
|
151
|
-
const trimmed = params.entry.trim();
|
|
152
|
-
if (!trimmed) return;
|
|
153
|
-
const key = normalizeMatrixUserId(trimmed);
|
|
154
|
-
if (params.seen.has(key)) return;
|
|
155
|
-
params.seen.add(key);
|
|
156
|
-
params.entries.push(trimmed);
|
|
157
|
-
}
|
|
158
150
|
function logMatrixAllowlistResolution(params) {
|
|
159
151
|
const { label, resolution, allowNameMatching, runtime } = params;
|
|
160
152
|
summarizeMapping(label, allowNameMatching ? resolution.mapping : [], resolution.unresolved, runtime);
|
|
@@ -248,44 +240,36 @@ async function resolveMatrixMonitorLiveUserAllowlist(params) {
|
|
|
248
240
|
});
|
|
249
241
|
const effective = [];
|
|
250
242
|
const seen = /* @__PURE__ */ new Set();
|
|
243
|
+
const addEntry = (entry) => {
|
|
244
|
+
const trimmed = entry.trim();
|
|
245
|
+
const key = normalizeMatrixUserId(trimmed);
|
|
246
|
+
if (trimmed && !seen.has(key)) {
|
|
247
|
+
seen.add(key);
|
|
248
|
+
effective.push(trimmed);
|
|
249
|
+
}
|
|
250
|
+
};
|
|
251
251
|
const startupByInput = new Map((params.startupResolvedEntries ?? []).map((entry) => [entry.input, entry.id]));
|
|
252
252
|
const pending = [];
|
|
253
253
|
for (const entry of liveEntries) {
|
|
254
254
|
const query = normalizeMatrixUserLookupEntry(entry);
|
|
255
255
|
if (entry === "*") {
|
|
256
|
-
|
|
257
|
-
entries: effective,
|
|
258
|
-
seen,
|
|
259
|
-
entry
|
|
260
|
-
});
|
|
256
|
+
addEntry(entry);
|
|
261
257
|
continue;
|
|
262
258
|
}
|
|
263
259
|
if (isMatrixQualifiedUserId(query)) {
|
|
264
|
-
|
|
265
|
-
entries: effective,
|
|
266
|
-
seen,
|
|
267
|
-
entry: normalizeMatrixUserId(query)
|
|
268
|
-
});
|
|
260
|
+
addEntry(normalizeMatrixUserId(query));
|
|
269
261
|
continue;
|
|
270
262
|
}
|
|
271
263
|
const startupId = startupByInput.get(entry);
|
|
272
264
|
if (allowNameMatching && startupId) {
|
|
273
|
-
|
|
274
|
-
entries: effective,
|
|
275
|
-
seen,
|
|
276
|
-
entry: startupId
|
|
277
|
-
});
|
|
265
|
+
addEntry(startupId);
|
|
278
266
|
continue;
|
|
279
267
|
}
|
|
280
268
|
if (allowNameMatching) {
|
|
281
269
|
pending.push(entry);
|
|
282
270
|
continue;
|
|
283
271
|
}
|
|
284
|
-
if (params.failClosedOnUnresolved)
|
|
285
|
-
entries: effective,
|
|
286
|
-
seen,
|
|
287
|
-
entry
|
|
288
|
-
});
|
|
272
|
+
if (params.failClosedOnUnresolved) addEntry(entry);
|
|
289
273
|
}
|
|
290
274
|
if (pending.length === 0) return effective;
|
|
291
275
|
const resolution = await resolveMatrixMonitorUserEntries({
|
|
@@ -302,11 +286,7 @@ async function resolveMatrixMonitorLiveUserAllowlist(params) {
|
|
|
302
286
|
entryKey: normalizeMatrixUserId
|
|
303
287
|
});
|
|
304
288
|
const resolvedEntries = params.failClosedOnUnresolved ? filterFailClosedMatrixAllowlistEntries(canonicalized) : filterResolvedMatrixAllowlistEntries(canonicalized);
|
|
305
|
-
for (const entry of resolvedEntries)
|
|
306
|
-
entries: effective,
|
|
307
|
-
seen,
|
|
308
|
-
entry
|
|
309
|
-
});
|
|
289
|
+
for (const entry of resolvedEntries) addEntry(entry);
|
|
310
290
|
return effective;
|
|
311
291
|
}
|
|
312
292
|
async function resolveMatrixMonitorRoomsConfig(params) {
|
|
@@ -748,21 +728,18 @@ const VERIFICATION_NOTICE_PREFIXES = [
|
|
|
748
728
|
"Matrix verification cancelled by ",
|
|
749
729
|
"Matrix verification SAS with "
|
|
750
730
|
];
|
|
751
|
-
function trimMaybeString(input) {
|
|
752
|
-
return normalizeOptionalString(input) ?? "";
|
|
753
|
-
}
|
|
754
731
|
function isMatrixVerificationEventType(type) {
|
|
755
|
-
return
|
|
732
|
+
return normalizeOptionalString(type)?.startsWith(VERIFICATION_EVENT_PREFIX) === true;
|
|
756
733
|
}
|
|
757
734
|
function isMatrixVerificationRequestMsgType(msgtype) {
|
|
758
|
-
return
|
|
735
|
+
return normalizeOptionalString(msgtype) === VERIFICATION_REQUEST_MSGTYPE;
|
|
759
736
|
}
|
|
760
737
|
function isMatrixVerificationNoticeBody(body) {
|
|
761
|
-
const text =
|
|
738
|
+
const text = normalizeOptionalString(body) ?? "";
|
|
762
739
|
return VERIFICATION_NOTICE_PREFIXES.some((prefix) => text.startsWith(prefix));
|
|
763
740
|
}
|
|
764
741
|
function isMatrixVerificationRoomMessage(content) {
|
|
765
|
-
return isMatrixVerificationRequestMsgType(content.msgtype) ||
|
|
742
|
+
return isMatrixVerificationRequestMsgType(content.msgtype) || normalizeOptionalString(content.msgtype) === "m.notice" && isMatrixVerificationNoticeBody(content.body);
|
|
766
743
|
}
|
|
767
744
|
const matrixVerificationConstants = {
|
|
768
745
|
eventPrefix: VERIFICATION_EVENT_PREFIX,
|
|
@@ -773,7 +750,7 @@ const matrixVerificationConstants = {
|
|
|
773
750
|
const MAX_TRACKED_VERIFICATION_EVENTS = 1024;
|
|
774
751
|
const SAS_NOTICE_RETRY_DELAY_MS = 750;
|
|
775
752
|
const VERIFICATION_EVENT_STARTUP_GRACE_MS = 3e4;
|
|
776
|
-
const loadMatrixDirectRoomDeps = createLazyRuntimeModule(() => Promise.all([import("./direct-management-
|
|
753
|
+
const loadMatrixDirectRoomDeps = createLazyRuntimeModule(() => Promise.all([import("./direct-management-DJtQhLKH.mjs").then((n) => n.t), import("./direct-management-DJtQhLKH.mjs").then((n) => n.o)]).then(([directManagementModule, directRoomModule]) => ({
|
|
777
754
|
inspectMatrixDirectRooms: directManagementModule.inspectMatrixDirectRooms,
|
|
778
755
|
isStrictDirectRoom: directRoomModule.isStrictDirectRoom
|
|
779
756
|
})));
|
|
@@ -892,11 +869,7 @@ async function resolveVerificationSummaryForSignal(client, params) {
|
|
|
892
869
|
remoteUserId: params.senderId
|
|
893
870
|
})) return null;
|
|
894
871
|
const activeByUser = list.filter((entry) => entry.otherUserId === params.senderId && isActiveVerificationSummary(entry)).toSorted((a, b) => resolveSummaryRecency(b) - resolveSummaryRecency(a));
|
|
895
|
-
|
|
896
|
-
return normalizeNullableString(entry.roomId) === params.roomId;
|
|
897
|
-
});
|
|
898
|
-
if (activeInRoom.length > 0) return activeInRoom[0] ?? null;
|
|
899
|
-
return activeByUser[0] ?? null;
|
|
872
|
+
return activeByUser.find((entry) => normalizeNullableString(entry.roomId) === params.roomId) ?? activeByUser[0] ?? null;
|
|
900
873
|
}
|
|
901
874
|
async function resolveVerificationSasNoticeForSignal(client, params) {
|
|
902
875
|
const summary = await resolveVerificationSummaryForSignal(client, params);
|
|
@@ -923,37 +896,6 @@ function trackBounded(set, value) {
|
|
|
923
896
|
}
|
|
924
897
|
return true;
|
|
925
898
|
}
|
|
926
|
-
async function sendVerificationNotice(params) {
|
|
927
|
-
const roomId = normalizeNullableString(params.roomId);
|
|
928
|
-
if (!roomId) return;
|
|
929
|
-
try {
|
|
930
|
-
await params.client.sendMessage(roomId, {
|
|
931
|
-
msgtype: "m.notice",
|
|
932
|
-
body: params.body
|
|
933
|
-
});
|
|
934
|
-
} catch (err) {
|
|
935
|
-
params.logVerboseMessage(`matrix: failed sending verification notice room=${roomId}: ${String(err)}`);
|
|
936
|
-
}
|
|
937
|
-
}
|
|
938
|
-
async function isVerificationNoticeAuthorized(params) {
|
|
939
|
-
if (!params.dmEnabled || params.dmPolicy === "disabled") {
|
|
940
|
-
params.logVerboseMessage(`matrix: blocked verification sender ${params.senderId} (dmPolicy=${params.dmPolicy}, dmEnabled=${String(params.dmEnabled)})`);
|
|
941
|
-
return false;
|
|
942
|
-
}
|
|
943
|
-
const storeAllowFrom = params.dmPolicy !== "allowlist" && params.dmPolicy !== "open" ? await params.readStoreAllowFrom() : [];
|
|
944
|
-
if ((await resolveMatrixMonitorAccessState({
|
|
945
|
-
allowFrom: params.allowFrom,
|
|
946
|
-
storeAllowFrom,
|
|
947
|
-
dmPolicy: params.dmPolicy,
|
|
948
|
-
groupPolicy: "open",
|
|
949
|
-
groupAllowFrom: [],
|
|
950
|
-
roomUsers: [],
|
|
951
|
-
senderId: params.senderId,
|
|
952
|
-
isRoom: false
|
|
953
|
-
})).messageIngress.senderAccess.decision === "allow") return true;
|
|
954
|
-
params.logVerboseMessage(`matrix: blocked verification sender ${params.senderId} (dmPolicy=${params.dmPolicy})`);
|
|
955
|
-
return false;
|
|
956
|
-
}
|
|
957
899
|
function createMatrixVerificationEventRouter(params) {
|
|
958
900
|
const routerStartedAtMs = Date.now();
|
|
959
901
|
const routedVerificationEvents = /* @__PURE__ */ new Set();
|
|
@@ -961,6 +903,37 @@ function createMatrixVerificationEventRouter(params) {
|
|
|
961
903
|
const routedVerificationStageNotices = /* @__PURE__ */ new Set();
|
|
962
904
|
const verificationFlowRooms = /* @__PURE__ */ new Map();
|
|
963
905
|
const verificationUserRooms = /* @__PURE__ */ new Map();
|
|
906
|
+
async function sendVerificationNotice(rawRoomId, body) {
|
|
907
|
+
const roomId = normalizeNullableString(rawRoomId);
|
|
908
|
+
if (!roomId) return;
|
|
909
|
+
try {
|
|
910
|
+
await params.client.sendMessage(roomId, {
|
|
911
|
+
msgtype: "m.notice",
|
|
912
|
+
body
|
|
913
|
+
});
|
|
914
|
+
} catch (err) {
|
|
915
|
+
params.logVerboseMessage(`matrix: failed sending verification notice room=${roomId}: ${String(err)}`);
|
|
916
|
+
}
|
|
917
|
+
}
|
|
918
|
+
async function isVerificationNoticeAuthorized(senderId) {
|
|
919
|
+
if (!params.dmEnabled || params.dmPolicy === "disabled") {
|
|
920
|
+
params.logVerboseMessage(`matrix: blocked verification sender ${senderId} (dmPolicy=${params.dmPolicy}, dmEnabled=${String(params.dmEnabled)})`);
|
|
921
|
+
return false;
|
|
922
|
+
}
|
|
923
|
+
const storeAllowFrom = params.dmPolicy !== "allowlist" && params.dmPolicy !== "open" ? await params.readStoreAllowFrom() : [];
|
|
924
|
+
if ((await resolveMatrixMonitorAccessState({
|
|
925
|
+
allowFrom: params.allowFrom,
|
|
926
|
+
storeAllowFrom,
|
|
927
|
+
dmPolicy: params.dmPolicy,
|
|
928
|
+
groupPolicy: "open",
|
|
929
|
+
groupAllowFrom: [],
|
|
930
|
+
roomUsers: [],
|
|
931
|
+
senderId,
|
|
932
|
+
isRoom: false
|
|
933
|
+
})).messageIngress.senderAccess.decision === "allow") return true;
|
|
934
|
+
params.logVerboseMessage(`matrix: blocked verification sender ${senderId} (dmPolicy=${params.dmPolicy})`);
|
|
935
|
+
return false;
|
|
936
|
+
}
|
|
964
937
|
async function resolveActiveDirectRoomId(remoteUserId) {
|
|
965
938
|
const { inspectMatrixDirectRooms } = await loadMatrixDirectRoomDeps();
|
|
966
939
|
const inspection = await inspectMatrixDirectRooms({
|
|
@@ -994,7 +967,6 @@ function createMatrixVerificationEventRouter(params) {
|
|
|
994
967
|
if (!remoteUserId) return null;
|
|
995
968
|
const recentRoomId = normalizeNullableString(verificationUserRooms.get(remoteUserId));
|
|
996
969
|
const activeRoomId = await resolveActiveDirectRoomId(remoteUserId);
|
|
997
|
-
if (recentRoomId && activeRoomId && recentRoomId === activeRoomId) return recentRoomId;
|
|
998
970
|
if (activeRoomId) return activeRoomId;
|
|
999
971
|
if (recentRoomId && await (await loadMatrixDirectRoomDeps()).isStrictDirectRoom({
|
|
1000
972
|
client: params.client,
|
|
@@ -1014,24 +986,12 @@ function createMatrixVerificationEventRouter(params) {
|
|
|
1014
986
|
params.logVerboseMessage(`matrix: ignoring verification summary outside strict DM room=${roomId} sender=${summary.otherUserId}`);
|
|
1015
987
|
return;
|
|
1016
988
|
}
|
|
1017
|
-
if (!await isVerificationNoticeAuthorized(
|
|
1018
|
-
senderId: summary.otherUserId,
|
|
1019
|
-
allowFrom: params.allowFrom,
|
|
1020
|
-
dmEnabled: params.dmEnabled,
|
|
1021
|
-
dmPolicy: params.dmPolicy,
|
|
1022
|
-
readStoreAllowFrom: params.readStoreAllowFrom,
|
|
1023
|
-
logVerboseMessage: params.logVerboseMessage
|
|
1024
|
-
})) return;
|
|
989
|
+
if (!await isVerificationNoticeAuthorized(summary.otherUserId)) return;
|
|
1025
990
|
const sasNotice = formatVerificationSasNotice(summary);
|
|
1026
991
|
if (!sasNotice) return;
|
|
1027
992
|
const sasFingerprint = `${summary.id}:${JSON.stringify(summary.sas)}`;
|
|
1028
993
|
if (!trackBounded(routedVerificationSasFingerprints, sasFingerprint)) return;
|
|
1029
|
-
await sendVerificationNotice(
|
|
1030
|
-
client: params.client,
|
|
1031
|
-
roomId,
|
|
1032
|
-
body: sasNotice,
|
|
1033
|
-
logVerboseMessage: params.logVerboseMessage
|
|
1034
|
-
});
|
|
994
|
+
await sendVerificationNotice(roomId, sasNotice);
|
|
1035
995
|
}
|
|
1036
996
|
function routeVerificationEvent(roomId, event) {
|
|
1037
997
|
const senderId = normalizeNullableString(event?.sender);
|
|
@@ -1054,14 +1014,7 @@ function createMatrixVerificationEventRouter(params) {
|
|
|
1054
1014
|
params.logVerboseMessage(`matrix: ignoring verification event outside strict DM room=${roomId} sender=${senderId}`);
|
|
1055
1015
|
return;
|
|
1056
1016
|
}
|
|
1057
|
-
if (!await isVerificationNoticeAuthorized(
|
|
1058
|
-
senderId,
|
|
1059
|
-
allowFrom: params.allowFrom,
|
|
1060
|
-
dmEnabled: params.dmEnabled,
|
|
1061
|
-
dmPolicy: params.dmPolicy,
|
|
1062
|
-
readStoreAllowFrom: params.readStoreAllowFrom,
|
|
1063
|
-
logVerboseMessage: params.logVerboseMessage
|
|
1064
|
-
})) return;
|
|
1017
|
+
if (!await isVerificationNoticeAuthorized(senderId)) return;
|
|
1065
1018
|
rememberVerificationUserRoom(senderId, roomId);
|
|
1066
1019
|
if (!trackBounded(routedVerificationEvents, sourceFingerprint)) return;
|
|
1067
1020
|
const stageNotice = formatVerificationStageNotice({
|
|
@@ -1089,13 +1042,7 @@ function createMatrixVerificationEventRouter(params) {
|
|
|
1089
1042
|
const sasFingerprint = `${summary.id}:${JSON.stringify(summary.sas)}`;
|
|
1090
1043
|
if (trackBounded(routedVerificationSasFingerprints, sasFingerprint)) notices.push(sasNotice);
|
|
1091
1044
|
}
|
|
1092
|
-
|
|
1093
|
-
for (const body of notices) await sendVerificationNotice({
|
|
1094
|
-
client: params.client,
|
|
1095
|
-
roomId,
|
|
1096
|
-
body,
|
|
1097
|
-
logVerboseMessage: params.logVerboseMessage
|
|
1098
|
-
});
|
|
1045
|
+
for (const body of notices) await sendVerificationNotice(roomId, body);
|
|
1099
1046
|
};
|
|
1100
1047
|
if (params.runDetachedTask) params.runDetachedTask(`verification event handler room=${roomId} id=${event.event_id ?? "unknown"}`, routeTask);
|
|
1101
1048
|
else routeTask().catch((err) => {
|
|
@@ -1423,7 +1370,7 @@ function truncateMatrixContextBody(value) {
|
|
|
1423
1370
|
}
|
|
1424
1371
|
function summarizeMatrixMessageContextEvent(event) {
|
|
1425
1372
|
if (isPollStartType(event.type)) {
|
|
1426
|
-
const pollSummary =
|
|
1373
|
+
const pollSummary = parsePollStart(event.content);
|
|
1427
1374
|
if (pollSummary) return formatPollAsText(pollSummary);
|
|
1428
1375
|
}
|
|
1429
1376
|
const content = resolveMatrixReplacementContent(event) ?? event.content;
|
|
@@ -1538,7 +1485,7 @@ function resolveMatrixMentionPrecheckText(params) {
|
|
|
1538
1485
|
if (params.locationText?.trim()) return params.locationText.trim();
|
|
1539
1486
|
if (typeof params.content.body === "string" && params.content.body.trim()) return params.content.body.trim();
|
|
1540
1487
|
if (isPollStartType(params.eventType)) {
|
|
1541
|
-
const parsed =
|
|
1488
|
+
const parsed = parsePollStart(params.content);
|
|
1542
1489
|
if (parsed) return formatPollAsText(parsed);
|
|
1543
1490
|
}
|
|
1544
1491
|
return "";
|
|
@@ -1551,16 +1498,13 @@ function hasBundledMatrixReplacementRelation(event) {
|
|
|
1551
1498
|
function resolveMatrixInboundBodyText(params) {
|
|
1552
1499
|
if (params.mediaPlaceholder) return params.rawBody || params.mediaPlaceholder;
|
|
1553
1500
|
if (!params.mediaDownloadFailed || !params.hadMediaUrl) return params.rawBody;
|
|
1554
|
-
|
|
1555
|
-
body: params.rawBody,
|
|
1556
|
-
filename: params.filename,
|
|
1557
|
-
msgtype: params.msgtype
|
|
1558
|
-
});
|
|
1559
|
-
return formatMatrixMediaUnavailableText({
|
|
1501
|
+
return formatMatrixMessageText({
|
|
1560
1502
|
body: params.rawBody,
|
|
1561
1503
|
filename: params.filename,
|
|
1562
|
-
msgtype: params.msgtype
|
|
1563
|
-
|
|
1504
|
+
msgtype: params.msgtype,
|
|
1505
|
+
tooLarge: params.mediaSizeLimitExceeded,
|
|
1506
|
+
unavailable: true
|
|
1507
|
+
}) ?? "";
|
|
1564
1508
|
}
|
|
1565
1509
|
function markTrackedRoomIfFirst(set, roomId) {
|
|
1566
1510
|
if (set.has(roomId)) return false;
|
|
@@ -1635,11 +1579,11 @@ function formatMatrixToolProgressMarkdownCode(text) {
|
|
|
1635
1579
|
}
|
|
1636
1580
|
//#endregion
|
|
1637
1581
|
//#region extensions/matrix/src/matrix/monitor/handler-runtime.ts
|
|
1638
|
-
const loadMatrixSendModule = createLazyRuntimeModule(() => import("./send-
|
|
1582
|
+
const loadMatrixSendModule = createLazyRuntimeModule(() => import("./send-B1Y2L4wj.mjs").then((n) => n.s));
|
|
1639
1583
|
const loadAcpBindingRuntime = createLazyRuntimeModule(() => import("openclaw/plugin-sdk/acp-binding-runtime"));
|
|
1640
1584
|
const loadSessionBindingRuntime = createLazyRuntimeModule(() => import("openclaw/plugin-sdk/session-binding-runtime"));
|
|
1641
|
-
const loadMatrixReactionEvents = createLazyRuntimeModule(() => import("./reaction-events-
|
|
1642
|
-
const loadMatrixDraftStream = createLazyRuntimeModule(() => import("./draft-stream-
|
|
1585
|
+
const loadMatrixReactionEvents = createLazyRuntimeModule(() => import("./reaction-events-Cqq46xsG.mjs"));
|
|
1586
|
+
const loadMatrixDraftStream = createLazyRuntimeModule(() => import("./draft-stream-B87DfA6a.mjs"));
|
|
1643
1587
|
async function matrixTextWouldActivateMentions(client, text) {
|
|
1644
1588
|
const { resolveMatrixMentionsForBody } = await loadMatrixSendModule();
|
|
1645
1589
|
const mentions = await resolveMatrixMentionsForBody({
|
|
@@ -2308,6 +2252,11 @@ async function resolveMatrixIngressAccess(config) {
|
|
|
2308
2252
|
accountId,
|
|
2309
2253
|
meta: { name: senderName }
|
|
2310
2254
|
});
|
|
2255
|
+
if (!code) {
|
|
2256
|
+
logVerboseMessage(`matrix pairing request ignored sender=${senderId} (pending limit reached)`);
|
|
2257
|
+
await commitInboundEventIfClaimedAndDiscardReserved();
|
|
2258
|
+
return;
|
|
2259
|
+
}
|
|
2311
2260
|
if (shouldSendPairingReply(senderId, created)) {
|
|
2312
2261
|
const pairingReply = core.channel.pairing.buildPairingReply({
|
|
2313
2262
|
channel: "matrix",
|
|
@@ -2441,11 +2390,8 @@ function decodeVisibleHtmlEntities(value) {
|
|
|
2441
2390
|
return decoded === "\xA0" ? " " : decoded;
|
|
2442
2391
|
});
|
|
2443
2392
|
}
|
|
2444
|
-
function normalizeVisibleMentionText(value) {
|
|
2445
|
-
return normalizeLowercaseStringOrEmpty(decodeVisibleHtmlEntities(value.replace(/<[^>]+>/g, " ").replace(/[\u200b-\u200f\u202a-\u202e\u2060-\u206f]/g, "")).replace(/\s+/g, " "));
|
|
2446
|
-
}
|
|
2447
2393
|
function extractVisibleMentionText(value) {
|
|
2448
|
-
return
|
|
2394
|
+
return normalizeLowercaseStringOrEmpty(decodeVisibleHtmlEntities((value ?? "").replace(/<[^>]+>/g, " ").replace(/[\u200b-\u200f\u202a-\u202e\u2060-\u206f]/g, "")).replace(/\s+/g, " "));
|
|
2449
2395
|
}
|
|
2450
2396
|
function resolveMatrixUserLocalpart(userId) {
|
|
2451
2397
|
const trimmed = userId.trim();
|
|
@@ -2462,43 +2408,36 @@ function hasVisibleNativeMatrixUserMention(text, userId) {
|
|
|
2462
2408
|
function resolveMatrixMentionPrefixCandidates(params) {
|
|
2463
2409
|
const candidates = [];
|
|
2464
2410
|
const seen = /* @__PURE__ */ new Set();
|
|
2465
|
-
const
|
|
2411
|
+
const localpart = params.userId ? resolveMatrixUserLocalpart(params.userId) : null;
|
|
2412
|
+
for (const candidate of [
|
|
2413
|
+
params.userId,
|
|
2414
|
+
localpart ? `@${localpart}` : null,
|
|
2415
|
+
params.displayName,
|
|
2416
|
+
params.displayName ? `@${params.displayName}` : null,
|
|
2417
|
+
params.displayName ? `@[${params.displayName}]` : null
|
|
2418
|
+
]) {
|
|
2466
2419
|
const trimmed = candidate?.trim();
|
|
2467
|
-
if (!trimmed)
|
|
2420
|
+
if (!trimmed) continue;
|
|
2468
2421
|
const normalized = normalizeLowercaseStringOrEmpty(trimmed);
|
|
2469
|
-
if (seen.has(normalized))
|
|
2422
|
+
if (seen.has(normalized)) continue;
|
|
2470
2423
|
seen.add(normalized);
|
|
2471
2424
|
candidates.push(trimmed);
|
|
2472
|
-
}
|
|
2473
|
-
append(params.userId);
|
|
2474
|
-
const localpart = params.userId ? resolveMatrixUserLocalpart(params.userId) : null;
|
|
2475
|
-
append(localpart ? `@${localpart}` : null);
|
|
2476
|
-
append(params.displayName);
|
|
2477
|
-
append(params.displayName ? `@${params.displayName}` : null);
|
|
2478
|
-
append(params.displayName ? `@[${params.displayName}]` : null);
|
|
2425
|
+
}
|
|
2479
2426
|
return candidates;
|
|
2480
2427
|
}
|
|
2481
|
-
function stripMatchedMatrixMentionPrefix(text,
|
|
2482
|
-
const match = text.match(
|
|
2483
|
-
|
|
2484
|
-
return text.slice(match[0].length).trimStart();
|
|
2485
|
-
}
|
|
2486
|
-
function stripNativeMatrixMentionPrefix(text, candidate) {
|
|
2487
|
-
return stripMatchedMatrixMentionPrefix(text, new RegExp(`^\\s*${escapeRegExp(candidate)}(?:\\s*[:,])?(?:\\s+|$)`, "i"));
|
|
2488
|
-
}
|
|
2489
|
-
function stripRegexMatrixMentionPrefix(text, pattern) {
|
|
2490
|
-
const flags = pattern.flags.replace(/[gy]/g, "");
|
|
2491
|
-
return stripMatchedMatrixMentionPrefix(text, new RegExp(`^\\s*(?:${pattern.source})(?:\\s*[:,])?(?:\\s+|$)`, flags));
|
|
2428
|
+
function stripMatchedMatrixMentionPrefix(text, source, flags) {
|
|
2429
|
+
const match = text.match(new RegExp(`^\\s*${source}(?:\\s*[:,])?(?:\\s+|$)`, flags));
|
|
2430
|
+
return match ? text.slice(match[0].length).trimStart() : null;
|
|
2492
2431
|
}
|
|
2493
2432
|
function stripMatrixMentionPrefix(params) {
|
|
2494
2433
|
const text = params.text;
|
|
2495
2434
|
if (!text) return text;
|
|
2496
2435
|
for (const candidate of resolveMatrixMentionPrefixCandidates(params)) {
|
|
2497
|
-
const stripped =
|
|
2436
|
+
const stripped = stripMatchedMatrixMentionPrefix(text, escapeRegExp(candidate), "i");
|
|
2498
2437
|
if (stripped !== null) return stripped;
|
|
2499
2438
|
}
|
|
2500
2439
|
for (const pattern of params.mentionRegexes ?? []) {
|
|
2501
|
-
const stripped =
|
|
2440
|
+
const stripped = stripMatchedMatrixMentionPrefix(text, `(?:${pattern.source})`, pattern.flags.replace(/[gy]/g, ""));
|
|
2502
2441
|
if (stripped !== null) return stripped;
|
|
2503
2442
|
}
|
|
2504
2443
|
return text;
|
|
@@ -3293,17 +3232,9 @@ function createMatrixHandlerState(config) {
|
|
|
3293
3232
|
};
|
|
3294
3233
|
const shouldSendPairingReply = (senderId, created) => {
|
|
3295
3234
|
const now = Date.now();
|
|
3296
|
-
if (created) {
|
|
3297
|
-
pairingReplySentAtMsBySender.set(senderId, now);
|
|
3298
|
-
return true;
|
|
3299
|
-
}
|
|
3300
3235
|
const lastSentAtMs = pairingReplySentAtMsBySender.get(senderId);
|
|
3301
|
-
if (typeof lastSentAtMs === "number" && now - lastSentAtMs < PAIRING_REPLY_COOLDOWN_MS) return false;
|
|
3302
|
-
pairingReplySentAtMsBySender
|
|
3303
|
-
if (pairingReplySentAtMsBySender.size > MAX_TRACKED_PAIRING_REPLY_SENDERS) {
|
|
3304
|
-
const oldestSender = pairingReplySentAtMsBySender.keys().next().value;
|
|
3305
|
-
if (typeof oldestSender === "string") pairingReplySentAtMsBySender.delete(oldestSender);
|
|
3306
|
-
}
|
|
3236
|
+
if (!created && typeof lastSentAtMs === "number" && now - lastSentAtMs < PAIRING_REPLY_COOLDOWN_MS) return false;
|
|
3237
|
+
setBoundedMap(pairingReplySentAtMsBySender, senderId, now, MAX_TRACKED_PAIRING_REPLY_SENDERS);
|
|
3307
3238
|
return true;
|
|
3308
3239
|
};
|
|
3309
3240
|
return {
|
|
@@ -3721,10 +3652,10 @@ function shouldPromoteRecentInviteRoom(params) {
|
|
|
3721
3652
|
//#endregion
|
|
3722
3653
|
//#region extensions/matrix/src/matrix/monitor/startup.ts
|
|
3723
3654
|
const loadMatrixStartupMaintenanceDeps = createLazyRuntimeModule(() => Promise.all([
|
|
3724
|
-
import("./config-update-
|
|
3725
|
-
import("./device-health-
|
|
3726
|
-
import("./profile-
|
|
3727
|
-
import("./startup-verification-
|
|
3655
|
+
import("./config-update-CZndPxNd.mjs").then((n) => n.t),
|
|
3656
|
+
import("./device-health-Be60VF1w.mjs").then((n) => n.t),
|
|
3657
|
+
import("./profile-DS0xdJAi.mjs").then((n) => n.n),
|
|
3658
|
+
import("./startup-verification-D00eUt74.mjs")
|
|
3728
3659
|
]).then(([configUpdateModule, deviceHealthModule, profileModule, startupVerificationModule]) => ({
|
|
3729
3660
|
updateMatrixAccountConfig: configUpdateModule.updateMatrixAccountConfig,
|
|
3730
3661
|
summarizeMatrixDeviceHealth: deviceHealthModule.summarizeMatrixDeviceHealth,
|
|
@@ -4108,16 +4039,14 @@ async function monitorMatrixProvider(opts = {}) {
|
|
|
4108
4039
|
const warnedEncryptedRooms = /* @__PURE__ */ new Set();
|
|
4109
4040
|
const warnedCryptoMissingRooms = /* @__PURE__ */ new Set();
|
|
4110
4041
|
let healthySyncSinceMs;
|
|
4111
|
-
const
|
|
4042
|
+
const onSyncState = (state) => {
|
|
4043
|
+
const at = Date.now();
|
|
4112
4044
|
if (isMatrixReadySyncState(state)) {
|
|
4113
4045
|
healthySyncSinceMs ??= at;
|
|
4114
4046
|
return;
|
|
4115
4047
|
}
|
|
4116
4048
|
if (isMatrixDisconnectedSyncState(state)) healthySyncSinceMs = void 0;
|
|
4117
4049
|
};
|
|
4118
|
-
const onSyncState = (state) => {
|
|
4119
|
-
noteSyncHealthState(state);
|
|
4120
|
-
};
|
|
4121
4050
|
const monitorRetirement = {
|
|
4122
4051
|
closeTaskAdmission: () => {
|
|
4123
4052
|
monitorSetupClosed = true;
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import { i as __exportAll } from "./doctor-contract-
|
|
2
|
-
import { i as requiresExplicitMatrixDefaultAccount, u as resolveMatrixEnvAuthReadiness } from "./account-selection-
|
|
1
|
+
import { i as __exportAll } from "./doctor-contract-CsTNmbMa.mjs";
|
|
2
|
+
import { i as requiresExplicitMatrixDefaultAccount, u as resolveMatrixEnvAuthReadiness } from "./account-selection-BDeeqwwR.mjs";
|
|
3
3
|
import { a as resolveMatrixAccountConfig } from "./account-config-CRsKoMqJ.mjs";
|
|
4
|
-
import { a as resolveMatrixAccountAsync, r as resolveDefaultMatrixAccountId, t as listMatrixAccountIds } from "./accounts-
|
|
4
|
+
import { a as resolveMatrixAccountAsync, r as resolveDefaultMatrixAccountId, t as listMatrixAccountIds } from "./accounts-C_r0UlEm.mjs";
|
|
5
5
|
import { n as isMatrixRoomId } from "./target-ids-Nwx7cMVE.mjs";
|
|
6
|
-
import { n as updateMatrixAccountConfig } from "./config-update-
|
|
7
|
-
import { a as moveSingleMatrixAccountConfigToNamedAccount, i as createMatrixSetupDmPolicy } from "./setup-core-
|
|
6
|
+
import { n as updateMatrixAccountConfig } from "./config-update-CZndPxNd.mjs";
|
|
7
|
+
import { a as moveSingleMatrixAccountConfigToNamedAccount, i as createMatrixSetupDmPolicy } from "./setup-core-6DppLENo.mjs";
|
|
8
8
|
import { n as validateMatrixHomeserverUrl, t as resolveValidatedMatrixHomeserverUrl } from "./url-validation-CF6pG6eE.mjs";
|
|
9
|
-
import { n as ensureMatrixSdkInstalled, r as isMatrixSdkAvailable } from "./deps-
|
|
9
|
+
import { n as ensureMatrixSdkInstalled, r as isMatrixSdkAvailable } from "./deps-CFNl7tQo.mjs";
|
|
10
10
|
import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id";
|
|
11
11
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeStringifiedOptionalString, normalizeUniqueStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
12
12
|
import { formatDocsLink, hasConfiguredSecretInput, mergeAllowFromEntries, normalizeAccountId as normalizeAccountId$1, promptAccountId, promptChannelAccessConfig, setSetupChannelEnabled, splitSetupEntries } from "openclaw/plugin-sdk/setup";
|
|
13
|
-
import { isPrivateNetworkOptInEnabled } from "openclaw/plugin-sdk/ssrf-policy";
|
|
14
13
|
import { isPrivateOrLoopbackHost } from "openclaw/plugin-sdk/ssrf-runtime";
|
|
15
14
|
//#region extensions/matrix/src/onboarding.ts
|
|
16
15
|
var onboarding_exports = /* @__PURE__ */ __exportAll({ matrixOnboardingAdapter: () => matrixOnboardingAdapter });
|
|
@@ -93,7 +92,7 @@ async function promptMatrixAllowFrom(params) {
|
|
|
93
92
|
pending.push(part);
|
|
94
93
|
}
|
|
95
94
|
if (pending.length > 0) {
|
|
96
|
-
const { resolveMatrixTargets } = await import("./resolve-targets-
|
|
95
|
+
const { resolveMatrixTargets } = await import("./resolve-targets-DFeU1Ww6.mjs").then((n) => n.n);
|
|
97
96
|
const results = await resolveMatrixTargets({
|
|
98
97
|
cfg,
|
|
99
98
|
accountId,
|
|
@@ -213,7 +212,7 @@ async function configureMatrixAccessPrompts(params) {
|
|
|
213
212
|
resolvedIds.push(cleaned);
|
|
214
213
|
continue;
|
|
215
214
|
}
|
|
216
|
-
const { listMatrixDirectoryGroupsLive } = await import("./directory-live-
|
|
215
|
+
const { listMatrixDirectoryGroupsLive } = await import("./directory-live-DW5UykLL.mjs").then((n) => n.t);
|
|
217
216
|
const matches = await listMatrixDirectoryGroupsLive({
|
|
218
217
|
cfg: next,
|
|
219
218
|
accountId: params.accountId,
|
|
@@ -246,13 +245,7 @@ const dmPolicy = createMatrixSetupDmPolicy(promptMatrixAllowFrom);
|
|
|
246
245
|
async function runMatrixConfigure(params) {
|
|
247
246
|
let next = params.cfg;
|
|
248
247
|
const promptText = async (options) => normalizeStringifiedOptionalString(await params.prompter.text(options)) ?? "";
|
|
249
|
-
await ensureMatrixSdkInstalled(
|
|
250
|
-
runtime: params.runtime,
|
|
251
|
-
confirm: async (message) => await params.prompter.confirm({
|
|
252
|
-
message,
|
|
253
|
-
initialValue: true
|
|
254
|
-
})
|
|
255
|
-
});
|
|
248
|
+
await ensureMatrixSdkInstalled();
|
|
256
249
|
const defaultAccountId = resolveDefaultMatrixAccountId(next);
|
|
257
250
|
let accountId = defaultAccountId || DEFAULT_ACCOUNT_ID;
|
|
258
251
|
if (params.intent === "add-account") {
|
|
@@ -322,10 +315,10 @@ async function runMatrixConfigure(params) {
|
|
|
322
315
|
}
|
|
323
316
|
});
|
|
324
317
|
const requiresAllowPrivateNetwork = requiresMatrixPrivateNetworkOptIn(homeserver);
|
|
325
|
-
const shouldPromptAllowPrivateNetwork = requiresAllowPrivateNetwork ||
|
|
318
|
+
const shouldPromptAllowPrivateNetwork = requiresAllowPrivateNetwork || existing.network?.dangerouslyAllowPrivateNetwork === true;
|
|
326
319
|
const allowPrivateNetwork = shouldPromptAllowPrivateNetwork ? await params.prompter.confirm({
|
|
327
320
|
message: "Allow private/internal Matrix homeserver traffic for this account?",
|
|
328
|
-
initialValue:
|
|
321
|
+
initialValue: existing.network?.dangerouslyAllowPrivateNetwork === true || requiresAllowPrivateNetwork
|
|
329
322
|
}) : false;
|
|
330
323
|
if (requiresAllowPrivateNetwork && !allowPrivateNetwork) throw new Error("Matrix homeserver requires explicit private-network opt-in");
|
|
331
324
|
await resolveValidatedMatrixHomeserverUrl(homeserver, { dangerouslyAllowPrivateNetwork: allowPrivateNetwork });
|
|
@@ -467,7 +460,7 @@ const matrixOnboardingAdapter = {
|
|
|
467
460
|
});
|
|
468
461
|
},
|
|
469
462
|
afterConfigWritten: async ({ previousCfg, cfg, accountId, runtime }) => {
|
|
470
|
-
const { runMatrixSetupBootstrapAfterConfigWrite } = await import("./setup-bootstrap-
|
|
463
|
+
const { runMatrixSetupBootstrapAfterConfigWrite } = await import("./setup-bootstrap-UNIGyKnk.mjs");
|
|
471
464
|
await runMatrixSetupBootstrapAfterConfigWrite({
|
|
472
465
|
previousCfg,
|
|
473
466
|
cfg,
|
|
@@ -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-CeRXEAEP.mjs";
|
|
2
|
+
import { i as sendPollMatrix, r as sendMessageMatrix } from "./send-B1Y2L4wj.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";
|
|
@@ -112,27 +112,30 @@ const matrixOutbound = {
|
|
|
112
112
|
});
|
|
113
113
|
const urls = resolveSendableOutboundReplyParts(payload).mediaUrls;
|
|
114
114
|
const payloadText = resolveMatrixPayloadText(payload);
|
|
115
|
+
const sendOptions = {
|
|
116
|
+
cfg,
|
|
117
|
+
mediaAccess,
|
|
118
|
+
mediaLocalRoots,
|
|
119
|
+
mediaReadFile,
|
|
120
|
+
threadId: resolvedThreadId,
|
|
121
|
+
accountId: accountId ?? void 0,
|
|
122
|
+
deliveryQueueId,
|
|
123
|
+
signal,
|
|
124
|
+
assertDirectAdapterHandoff,
|
|
125
|
+
onPlatformSendDispatch
|
|
126
|
+
};
|
|
115
127
|
if (urls.length > 0) {
|
|
116
128
|
const sentResults = [];
|
|
117
129
|
const lastResult = await sendPayloadMediaSequence({
|
|
118
130
|
text: payloadText,
|
|
119
131
|
mediaUrls: urls,
|
|
120
132
|
send: async ({ text, mediaUrl, index, isFirst }) => await send(to, text, {
|
|
121
|
-
|
|
133
|
+
...sendOptions,
|
|
122
134
|
mediaUrl,
|
|
123
|
-
mediaAccess,
|
|
124
|
-
mediaLocalRoots,
|
|
125
|
-
mediaReadFile,
|
|
126
135
|
replyToId: resolveReplyToId(),
|
|
127
|
-
threadId: resolvedThreadId,
|
|
128
|
-
accountId: accountId ?? void 0,
|
|
129
136
|
audioAsVoice: payload.audioAsVoice ?? audioAsVoice,
|
|
130
|
-
deliveryQueueId,
|
|
131
137
|
deliveryPartIndex: index,
|
|
132
138
|
deliveryPartCount: urls.length,
|
|
133
|
-
signal,
|
|
134
|
-
assertDirectAdapterHandoff,
|
|
135
|
-
onPlatformSendDispatch,
|
|
136
139
|
extraContent: isFirst ? resolveMatrixExtraContent(payload) : void 0,
|
|
137
140
|
onDeliveryResult: resolveMatrixDeliveryProgress(onDeliveryResult)
|
|
138
141
|
}),
|
|
@@ -155,20 +158,11 @@ const matrixOutbound = {
|
|
|
155
158
|
}
|
|
156
159
|
}
|
|
157
160
|
const result = await send(to, payloadText, {
|
|
158
|
-
|
|
159
|
-
mediaAccess,
|
|
160
|
-
mediaLocalRoots,
|
|
161
|
-
mediaReadFile,
|
|
161
|
+
...sendOptions,
|
|
162
162
|
replyToId: resolveReplyToId(),
|
|
163
|
-
threadId: resolvedThreadId,
|
|
164
|
-
accountId: accountId ?? void 0,
|
|
165
163
|
audioAsVoice: payload.audioAsVoice ?? audioAsVoice,
|
|
166
|
-
deliveryQueueId,
|
|
167
164
|
deliveryPartIndex: 0,
|
|
168
165
|
deliveryPartCount: 1,
|
|
169
|
-
signal,
|
|
170
|
-
assertDirectAdapterHandoff,
|
|
171
|
-
onPlatformSendDispatch,
|
|
172
166
|
extraContent: resolveMatrixExtraContent(payload),
|
|
173
167
|
onDeliveryResult: resolveMatrixDeliveryProgress(onDeliveryResult)
|
|
174
168
|
});
|