@openclaw/matrix 2026.10.5-beta.4 → 2026.10.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/{approval-handler.runtime-rxLn8CbP.mjs → approval-handler.runtime-CsqMdj7h.mjs} +9 -9
- package/dist/.setup/{approval-reactions-DhB6gNPU.mjs → approval-reactions-D2pEUrFS.mjs} +1 -1
- package/dist/.setup/{channel-BcwGspPw.mjs → channel-Dw4_imdd.mjs} +132 -111
- package/dist/.setup/{channel.runtime-CUc6rbu1.mjs → channel.runtime-2EEtIlyu.mjs} +6 -6
- package/dist/.setup/{channel.setup-CwuYD_CT.mjs → channel.setup-Be8TYKMA.mjs} +8 -3
- package/dist/.setup/{cli-mbL9jCro.mjs → cli-CEmWh7wh.mjs} +99 -37
- package/dist/.setup/{cli-metadata-6MOGuyHq.mjs → cli-metadata-CBLGwJT6.mjs} +1 -1
- package/dist/.setup/{client-BlTvpEWC.mjs → client-BKiiI29H.mjs} +3 -3
- package/dist/.setup/{client-vPPbaxNp.mjs → client-C4Gibhzl.mjs} +94 -120
- package/dist/.setup/{client-bootstrap-D05xy1HB.mjs → client-bootstrap-kOIDV4z_.mjs} +3 -3
- package/dist/.setup/{create-client-CroC4BVc.mjs → create-client-BS8UYx6N.mjs} +23 -15
- package/dist/.setup/{credentials-Bf9PQ7xs.mjs → credentials-CPnJZaZB.mjs} +3 -5
- package/dist/.setup/{credentials-read-CqRiEAQa.mjs → credentials-read-D2ULV55A.mjs} +12 -4
- package/dist/.setup/{crypto-runtime-CpJ0b7vY.mjs → crypto-runtime-D8yY7kjD.mjs} +168 -290
- package/dist/.setup/crypto-state-store-D4wrCvFs.mjs +185 -0
- package/dist/.setup/crypto-store-ownership-Z_Y5WRKr.mjs +174 -0
- package/dist/.setup/crypto-unsafe-state-doctor-C8szCYmf.mjs +54 -0
- package/dist/.setup/{directory-live-B1WbfSHo.mjs → directory-live-BpSz-FQB.mjs} +1 -1
- package/dist/.setup/{draft-stream-Bdrh7dRt.mjs → draft-stream-DYf0th1n.mjs} +1 -1
- package/dist/.setup/{exec-approvals-BgNWWJg1.mjs → exec-approvals-DaM-5OA5.mjs} +33 -43
- package/dist/.setup/{file-sync-store-BdKx_gMi.mjs → file-sync-store-CUH8EAJq.mjs} +3 -3
- package/dist/.setup/idb-persistence-BHTYPRe_.mjs +233 -0
- package/dist/.setup/idb-persistence-lock-Bh3ZLIsE.mjs +14 -0
- package/dist/.setup/{messages-B1CZqU8u.mjs → messages-_XHVg3do.mjs} +3 -18
- package/dist/.setup/{monitor-Dk_fQL1k.mjs → monitor-DRUSJ_Ev.mjs} +31 -39
- package/dist/.setup/{onboarding-CrSexor_.mjs → onboarding-CK9Ksgio.mjs} +3 -3
- package/dist/.setup/{outbound-LR3SqPIq.mjs → outbound-D5Z_4FBg.mjs} +28 -36
- package/dist/.setup/{profile-update-C7bjaGR6.mjs → profile-update--Pf3jCXD.mjs} +2 -2
- package/dist/.setup/{reaction-events-CTSvOlXO.mjs → reaction-events-BG9spedG.mjs} +6 -6
- package/dist/.setup/{resolve-targets-BVVbbvP6.mjs → resolve-targets-BJ5sIKeM.mjs} +1 -1
- package/dist/.setup/{retired-state-DW5pLH05.mjs → retired-state-DOCruzWd.mjs} +10 -10
- package/dist/.setup/{room-info-9Uqlpt1V.mjs → room-info-BE7bbX_c.mjs} +3 -3
- package/dist/.setup/runtime-setter-api-i2MOXoT3.mjs +2 -0
- package/dist/.setup/{sdk-Cfc6m7fY.mjs → sdk-ByU8So5S.mjs} +242 -139
- package/dist/.setup/secret-contract-DxyzKSzf.mjs +90 -0
- package/dist/.setup/secret-contract-api-Dukgvike.mjs +2 -0
- package/dist/.setup/{send-LCOuTVc1.mjs → send-BprM-Wmx.mjs} +19 -42
- package/dist/.setup/{setup-bootstrap-CV-hHBXu.mjs → setup-bootstrap-DmznRqYe.mjs} +2 -6
- package/dist/.setup/{setup-core-CKnNTfgD.mjs → setup-core-DcCk1_Tv.mjs} +4 -7
- package/dist/.setup/setup-plugin-api-BU6UGksW.mjs +2 -0
- package/dist/.setup/{startup-verification-CgfUb4yJ.mjs → startup-verification-UU8DUvi4.mjs} +5 -13
- package/dist/.setup/state-layout-walk-BQMgMykU.mjs +27 -0
- package/dist/.setup/{storage-DkC6bHgA.mjs → storage-l8V0XsGM.mjs} +7 -166
- package/dist/.setup/{subagent-hooks-D8jyeQsO.mjs → subagent-hooks-CSY4iwa_.mjs} +7 -6
- package/dist/.setup/{sync-cache-state-D4G-fi3t.mjs → sync-cache-state-Cnm4TCEI.mjs} +1 -1
- package/dist/.setup/thread-bindings-rrwQAS6R.mjs +620 -0
- package/dist/.setup/{thread-bindings-shared-CbsFNbAY.mjs → thread-bindings-shared-CPjUA0Ib.mjs} +26 -5
- package/dist/.setup/{tool-actions-DAp6_XSJ.mjs → tool-actions-DBrk6Yei.mjs} +9 -11
- package/dist/.setup/{verification-B3VswneT.mjs → verification--qUbmRd-.mjs} +2 -2
- package/dist/api.js +6 -6
- package/dist/auth-presence.js +16 -2
- package/dist/channel-plugin-api.js +1 -2
- package/dist/cli-metadata.js +1 -2
- package/dist/contract-api.js +2 -2
- package/dist/doctor-contract-api.js +20 -27
- package/dist/index.js +38 -12
- package/dist/plugin-entry.handlers.runtime.js +32 -5
- package/dist/runtime-api.js +3 -3
- package/dist/runtime-setter-api.js +1 -2
- package/dist/secret-contract-api.js +1 -2
- package/dist/session-binding-contract-api.js +1 -1
- package/dist/setup-entry.js +3 -3
- package/dist/setup-plugin-api.js +1 -2
- package/dist/subagent-hooks-api.js +1 -1
- package/dist/thread-binding-api.js +1 -2
- package/dist/thread-bindings-runtime.js +1 -2
- package/node_modules/@openclaw/fs-safe/CHANGELOG.md +148 -0
- package/node_modules/@openclaw/fs-safe/README.md +20 -4
- package/node_modules/@openclaw/fs-safe/dist/advanced.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/advanced.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-merge.js +28 -3
- package/node_modules/@openclaw/fs-safe/dist/archive-parser.wasm +0 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-read.js +11 -5
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-loader.js +4 -2
- package/node_modules/@openclaw/fs-safe/dist/archive.js +2 -2
- package/node_modules/@openclaw/fs-safe/dist/atomic-io.js +2 -2
- package/node_modules/@openclaw/fs-safe/dist/bounded-read.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/bounded-read.js +9 -2
- package/node_modules/@openclaw/fs-safe/dist/clone-metadata.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/clone-metadata.js +2 -1
- package/node_modules/@openclaw/fs-safe/dist/config.d.ts +6 -0
- package/node_modules/@openclaw/fs-safe/dist/config.js +5 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-file-input.d.ts +3 -1
- package/node_modules/@openclaw/fs-safe/dist/copy-file-input.js +8 -7
- package/node_modules/@openclaw/fs-safe/dist/copy-link.d.ts +26 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-link.js +170 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-metadata.d.ts +9 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-metadata.js +39 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-path-admission.js +11 -2
- package/node_modules/@openclaw/fs-safe/dist/copy-root-file-sync.d.ts +2 -4
- package/node_modules/@openclaw/fs-safe/dist/copy-root-file-sync.js +4 -2
- package/node_modules/@openclaw/fs-safe/dist/copy-tree-portable.js +3 -6
- package/node_modules/@openclaw/fs-safe/dist/copy.js +3 -3
- package/node_modules/@openclaw/fs-safe/dist/create.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/creation-boundary.js +7 -4
- package/node_modules/@openclaw/fs-safe/dist/darwin-acl.d.ts +12 -0
- package/node_modules/@openclaw/fs-safe/dist/darwin-acl.js +29 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-durability.d.ts +7 -4
- package/node_modules/@openclaw/fs-safe/dist/directory-guard.js +20 -5
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-node.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-node.js +27 -2
- package/node_modules/@openclaw/fs-safe/dist/directory-receipt.d.ts +7 -7
- package/node_modules/@openclaw/fs-safe/dist/directory-receipt.js +9 -4
- package/node_modules/@openclaw/fs-safe/dist/durability.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/entry-publication.js +2 -2
- package/node_modules/@openclaw/fs-safe/dist/exact-identity.d.ts +17 -0
- package/node_modules/@openclaw/fs-safe/dist/exact-identity.js +29 -0
- package/node_modules/@openclaw/fs-safe/dist/file-handle-transfer.js +4 -2
- package/node_modules/@openclaw/fs-safe/dist/file-hash.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/file-hash.js +11 -9
- package/node_modules/@openclaw/fs-safe/dist/file-identity.d.ts +7 -1
- package/node_modules/@openclaw/fs-safe/dist/file-identity.js +27 -5
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-admission.js +1 -2
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync.js +8 -1
- package/node_modules/@openclaw/fs-safe/dist/file-lock.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/file-write-lease.d.ts +9 -0
- package/node_modules/@openclaw/fs-safe/dist/file-write-lease.js +42 -0
- package/node_modules/@openclaw/fs-safe/dist/guarded-mkdir.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/guarded-mkdir.js +22 -15
- package/node_modules/@openclaw/fs-safe/dist/guest-native-python.js +3 -0
- package/node_modules/@openclaw/fs-safe/dist/hardlink-fallback.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/hardlink-fallback.js +5 -0
- package/node_modules/@openclaw/fs-safe/dist/index.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/index.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-ownership.js +16 -3
- package/node_modules/@openclaw/fs-safe/dist/local-file-descriptor.js +24 -13
- package/node_modules/@openclaw/fs-safe/dist/native-binding.d.ts +85 -18
- package/node_modules/@openclaw/fs-safe/dist/native-config.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/native-config.js +11 -0
- package/node_modules/@openclaw/fs-safe/dist/native-directory-observation.js +6 -4
- package/node_modules/@openclaw/fs-safe/dist/native-fallback-warning.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/native-fallback-warning.js +26 -2
- package/node_modules/@openclaw/fs-safe/dist/native-guidance.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/native-guidance.js +21 -0
- package/node_modules/@openclaw/fs-safe/dist/native-move-fallback.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/native-move-fallback.js +2 -0
- package/node_modules/@openclaw/fs-safe/dist/native-operations.js +8 -6
- package/node_modules/@openclaw/fs-safe/dist/native-parent-admission.d.ts +44 -4
- package/node_modules/@openclaw/fs-safe/dist/native-parent-admission.js +85 -15
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write-windows.d.ts +3 -3
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write-windows.js +33 -6
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write.d.ts +4 -1
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write.js +22 -3
- package/node_modules/@openclaw/fs-safe/dist/native-policy-directory-observation.js +4 -3
- package/node_modules/@openclaw/fs-safe/dist/native-policy-parent.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/native-policy-parent.js +3 -0
- package/node_modules/@openclaw/fs-safe/dist/native-staged-file-metadata.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/native-staged-file-metadata.js +16 -0
- 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 +15 -5
- package/node_modules/@openclaw/fs-safe/dist/native-stat-identity.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/native-stat-identity.js +7 -0
- package/node_modules/@openclaw/fs-safe/dist/native-status.d.ts +17 -0
- package/node_modules/@openclaw/fs-safe/dist/native-status.js +30 -0
- package/node_modules/@openclaw/fs-safe/dist/native.d.ts +31 -4
- package/node_modules/@openclaw/fs-safe/dist/native.js +107 -9
- package/node_modules/@openclaw/fs-safe/dist/opened-realpath.js +9 -1
- package/node_modules/@openclaw/fs-safe/dist/overwrite-file-handle.js +4 -1
- package/node_modules/@openclaw/fs-safe/dist/owner-dacl-batch.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/owner-dacl.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/permission-exec.js +9 -1
- package/node_modules/@openclaw/fs-safe/dist/permissions-public.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/permissions-public.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/permissions-windows.js +83 -47
- package/node_modules/@openclaw/fs-safe/dist/pinned-open.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-open.js +8 -3
- package/node_modules/@openclaw/fs-safe/dist/pinned-write-input.js +13 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-write-staged.js +10 -8
- package/node_modules/@openclaw/fs-safe/dist/pinned-write-types.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/pinned-write.js +7 -5
- package/node_modules/@openclaw/fs-safe/dist/pipe.d.ts +9 -0
- package/node_modules/@openclaw/fs-safe/dist/pipe.js +26 -0
- package/node_modules/@openclaw/fs-safe/dist/private-directory.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/private-producer-handoff.js +2 -5
- package/node_modules/@openclaw/fs-safe/dist/private-temp-workspace.d.ts +3 -2
- package/node_modules/@openclaw/fs-safe/dist/private-temp-workspace.js +38 -10
- package/node_modules/@openclaw/fs-safe/dist/publish-copy-stage.js +92 -10
- package/node_modules/@openclaw/fs-safe/dist/publish-file-failure.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/publish-file-failure.js +3 -0
- package/node_modules/@openclaw/fs-safe/dist/publish-file.d.ts +5 -3
- package/node_modules/@openclaw/fs-safe/dist/publish-file.js +26 -20
- package/node_modules/@openclaw/fs-safe/dist/read-opened-file.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/read-opened-file.js +3 -4
- package/node_modules/@openclaw/fs-safe/dist/realpath.js +32 -0
- package/node_modules/@openclaw/fs-safe/dist/regular-file.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/regular-file.js +11 -15
- package/node_modules/@openclaw/fs-safe/dist/replace-file-descriptor.js +3 -2
- package/node_modules/@openclaw/fs-safe/dist/root-copy.d.ts +18 -0
- package/node_modules/@openclaw/fs-safe/dist/root-copy.js +128 -0
- package/node_modules/@openclaw/fs-safe/dist/root-create-native.d.ts +8 -13
- package/node_modules/@openclaw/fs-safe/dist/root-create-native.js +252 -27
- package/node_modules/@openclaw/fs-safe/dist/root-directory-creation.js +5 -1
- package/node_modules/@openclaw/fs-safe/dist/root-directory-list-types.d.ts +11 -8
- package/node_modules/@openclaw/fs-safe/dist/root-directory-list.js +35 -13
- package/node_modules/@openclaw/fs-safe/dist/root-file-open-batch-sync.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/root-file-open-batch-sync.js +108 -0
- package/node_modules/@openclaw/fs-safe/dist/root-file.d.ts +7 -0
- package/node_modules/@openclaw/fs-safe/dist/root-file.js +15 -0
- package/node_modules/@openclaw/fs-safe/dist/root-impl.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/root-impl.js +154 -175
- package/node_modules/@openclaw/fs-safe/dist/root-mkdir-native.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/root-mkdir-native.js +239 -0
- package/node_modules/@openclaw/fs-safe/dist/root-move-noreplace.js +37 -15
- package/node_modules/@openclaw/fs-safe/dist/root-native-creation-path.d.ts +32 -0
- package/node_modules/@openclaw/fs-safe/dist/root-native-creation-path.js +56 -0
- package/node_modules/@openclaw/fs-safe/dist/root-options.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/root-public-types.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-remove-native.js +95 -16
- package/node_modules/@openclaw/fs-safe/dist/root-remove.js +6 -4
- package/node_modules/@openclaw/fs-safe/dist/root-walk.js +23 -19
- package/node_modules/@openclaw/fs-safe/dist/root-write-admission.js +8 -6
- package/node_modules/@openclaw/fs-safe/dist/root-write-publication.js +5 -1
- package/node_modules/@openclaw/fs-safe/dist/secure-file-windows.js +3 -1
- package/node_modules/@openclaw/fs-safe/dist/secure-file.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/secure-file.js +10 -4
- package/node_modules/@openclaw/fs-safe/dist/sibling-staged-file.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-reclaim.js +2 -2
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-retained.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-target.js +8 -1
- package/node_modules/@openclaw/fs-safe/dist/staged-directory.d.ts +13 -0
- package/node_modules/@openclaw/fs-safe/dist/staged-directory.js +29 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-child-admission.js +5 -3
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-descriptor.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-descriptor.js +13 -2
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-owner.js +71 -3
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-ownership.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-ownership.js +22 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-types.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/test-hooks.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/test-hooks.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/trash.js +2 -2
- package/node_modules/@openclaw/fs-safe/dist/types.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-native.js +2 -2
- package/node_modules/@openclaw/fs-safe/dist/windows-appcontainer.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-appcontainer.js +39 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-owner.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-owner.js +25 -36
- package/node_modules/@openclaw/fs-safe/dist/windows-security-command.js +24 -5
- package/node_modules/@openclaw/fs-safe/dist/windows-security-facts.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/windows-security-facts.js +4 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-security-helper.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-security-helper.exe +0 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-security-helper.js +7 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-test-hooks.d.ts +16 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-test-hooks.js +51 -0
- package/node_modules/@openclaw/fs-safe/dist/write-file-handle.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/write-file-handle.js +12 -10
- package/node_modules/@openclaw/fs-safe/docs/advanced.md +2 -1
- package/node_modules/@openclaw/fs-safe/docs/archive.md +16 -0
- package/node_modules/@openclaw/fs-safe/docs/config.md +71 -1
- package/node_modules/@openclaw/fs-safe/docs/contributing.md +45 -5
- package/node_modules/@openclaw/fs-safe/docs/copy.md +45 -5
- package/node_modules/@openclaw/fs-safe/docs/durability.md +34 -7
- package/node_modules/@openclaw/fs-safe/docs/errors.md +8 -0
- package/node_modules/@openclaw/fs-safe/docs/guest.md +2 -0
- package/node_modules/@openclaw/fs-safe/docs/install.md +47 -27
- package/node_modules/@openclaw/fs-safe/docs/migrating-to-0.5.md +6 -6
- package/node_modules/@openclaw/fs-safe/docs/migrating-to-0.6.md +1 -1
- package/node_modules/@openclaw/fs-safe/docs/native-helper.md +79 -6
- package/node_modules/@openclaw/fs-safe/docs/native.md +279 -8
- package/node_modules/@openclaw/fs-safe/docs/permissions.md +64 -15
- package/node_modules/@openclaw/fs-safe/docs/pipe.md +81 -0
- package/node_modules/@openclaw/fs-safe/docs/platform-capabilities.md +63 -0
- package/node_modules/@openclaw/fs-safe/docs/public-api.md +10 -0
- package/node_modules/@openclaw/fs-safe/docs/queue-link-free-design.md +237 -0
- package/node_modules/@openclaw/fs-safe/docs/quickstart.md +23 -3
- package/node_modules/@openclaw/fs-safe/docs/reading.md +56 -2
- package/node_modules/@openclaw/fs-safe/docs/regular-file.md +2 -0
- package/node_modules/@openclaw/fs-safe/docs/secret-file.md +5 -5
- package/node_modules/@openclaw/fs-safe/docs/secure-file.md +1 -1
- package/node_modules/@openclaw/fs-safe/docs/security-model.md +35 -0
- package/node_modules/@openclaw/fs-safe/docs/sidecar-lock.md +31 -13
- package/node_modules/@openclaw/fs-safe/docs/staged-file.md +18 -0
- package/node_modules/@openclaw/fs-safe/docs/store.md +15 -0
- package/node_modules/@openclaw/fs-safe/docs/temp.md +39 -0
- package/node_modules/@openclaw/fs-safe/docs/testing.md +13 -0
- package/node_modules/@openclaw/fs-safe/docs/types.md +51 -81
- package/node_modules/@openclaw/fs-safe/docs/walk.md +4 -1
- package/node_modules/@openclaw/fs-safe/docs/watch.md +3 -2
- package/node_modules/@openclaw/fs-safe/docs/writing.md +121 -14
- package/node_modules/@openclaw/fs-safe/package.json +21 -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 +29 -0
- package/node_modules/@openclaw/fs-safe-freebsd-x64/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-freebsd-x64/package.json +29 -0
- 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 +29 -0
- 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/typebox/build/value/clean/from_object.mjs +1 -1
- package/node_modules/typebox/package.json +1 -1
- package/openclaw.plugin.json +3 -0
- package/package.json +7 -6
- package/dist/.setup/runtime-setter-api-DtxDAM-x.mjs +0 -3
- package/dist/.setup/secret-contract-DSBRvhdZ.mjs +0 -95
- package/dist/.setup/secret-contract-api-DzEJ-X7n.mjs +0 -3
- package/dist/.setup/setup-plugin-api-BDAYk1a5.mjs +0 -3
- package/dist/.setup/thread-bindings-CT4P-OSZ.mjs +0 -365
- package/node_modules/@openclaw/fs-safe/dist/windows-security-bridge.cs +0 -336
- package/node_modules/@openclaw/fs-safe/dist/windows-security-bridge.ps1 +0 -90
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import { t as getMatrixRuntime } from "./runtime-1kn1P6io.mjs";
|
|
2
|
+
import { n as RETIRED_MATRIX_STATE_REMEDIATION } from "./retired-state-DOCruzWd.mjs";
|
|
3
|
+
import { c as writeMatrixIdbSnapshotJson, r as readMatrixIdbSnapshotJson } from "./crypto-state-store-D4wrCvFs.mjs";
|
|
4
|
+
import { t as LogService } from "./logger-CXQnpXCt.mjs";
|
|
5
|
+
import { n as MATRIX_IDB_SNAPSHOT_LOCK_OPTIONS } from "./idb-persistence-lock-Bh3ZLIsE.mjs";
|
|
6
|
+
import { toErrorObject } from "openclaw/plugin-sdk/error-runtime";
|
|
7
|
+
import { asOptionalObjectRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
8
|
+
import path from "node:path";
|
|
9
|
+
import fs from "node:fs";
|
|
10
|
+
import { withFileLock } from "openclaw/plugin-sdk/file-lock";
|
|
11
|
+
import { IDBFactory, indexedDB } from "fake-indexeddb";
|
|
12
|
+
//#region extensions/matrix/src/matrix/sdk/idb-persistence.ts
|
|
13
|
+
const LEGACY_SNAPSHOT_DIAGNOSTIC = {
|
|
14
|
+
code: "matrix-idb-snapshot-requires-doctor",
|
|
15
|
+
message: "Matrix IndexedDB snapshot exists outside the current SQLite state",
|
|
16
|
+
remediation: RETIRED_MATRIX_STATE_REMEDIATION
|
|
17
|
+
};
|
|
18
|
+
var MatrixIdbSnapshotMigrationRequiredError = class extends Error {
|
|
19
|
+
constructor() {
|
|
20
|
+
super(`${LEGACY_SNAPSHOT_DIAGNOSTIC.message}; ${LEGACY_SNAPSHOT_DIAGNOSTIC.remediation}`);
|
|
21
|
+
this.code = LEGACY_SNAPSHOT_DIAGNOSTIC.code;
|
|
22
|
+
this.remediation = LEGACY_SNAPSHOT_DIAGNOSTIC.remediation;
|
|
23
|
+
this.name = "MatrixIdbSnapshotMigrationRequiredError";
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
function isValidIdbIndexSnapshot(value) {
|
|
27
|
+
const candidate = asOptionalObjectRecord(value);
|
|
28
|
+
return typeof candidate?.name === "string" && (typeof candidate.keyPath === "string" || Array.isArray(candidate.keyPath) && candidate.keyPath.every((entry) => typeof entry === "string")) && typeof candidate.multiEntry === "boolean" && typeof candidate.unique === "boolean";
|
|
29
|
+
}
|
|
30
|
+
function isValidIdbRecordSnapshot(value) {
|
|
31
|
+
const candidate = asOptionalObjectRecord(value);
|
|
32
|
+
return Boolean(candidate && "key" in candidate && "value" in candidate);
|
|
33
|
+
}
|
|
34
|
+
function isValidIdbStoreSnapshot(value) {
|
|
35
|
+
const candidate = asOptionalObjectRecord(value);
|
|
36
|
+
const keyPath = candidate?.keyPath;
|
|
37
|
+
const validKeyPath = keyPath === null || typeof keyPath === "string" || Array.isArray(keyPath) && keyPath.every((entry) => typeof entry === "string");
|
|
38
|
+
return typeof candidate?.name === "string" && validKeyPath && typeof candidate.autoIncrement === "boolean" && Array.isArray(candidate.indexes) && candidate.indexes.every((entry) => isValidIdbIndexSnapshot(entry)) && Array.isArray(candidate.records) && candidate.records.every((entry) => isValidIdbRecordSnapshot(entry));
|
|
39
|
+
}
|
|
40
|
+
function isValidIdbDatabaseSnapshot(value) {
|
|
41
|
+
const candidate = asOptionalObjectRecord(value);
|
|
42
|
+
return typeof candidate?.name === "string" && typeof candidate.version === "number" && Number.isFinite(candidate.version) && candidate.version > 0 && Array.isArray(candidate.stores) && candidate.stores.every((entry) => isValidIdbStoreSnapshot(entry));
|
|
43
|
+
}
|
|
44
|
+
function parseSnapshotPayload(data) {
|
|
45
|
+
const parsed = JSON.parse(data);
|
|
46
|
+
if (!Array.isArray(parsed) || parsed.length === 0) return null;
|
|
47
|
+
if (!parsed.every((entry) => isValidIdbDatabaseSnapshot(entry))) throw new Error("Malformed IndexedDB snapshot payload");
|
|
48
|
+
return parsed;
|
|
49
|
+
}
|
|
50
|
+
async function validateMatrixIdbSnapshotJson(data) {
|
|
51
|
+
const snapshot = parseSnapshotPayload(data);
|
|
52
|
+
if (!snapshot) throw new Error("Malformed IndexedDB snapshot payload");
|
|
53
|
+
await preflightIndexedDatabases(snapshot);
|
|
54
|
+
}
|
|
55
|
+
function idbReq(req) {
|
|
56
|
+
return new Promise((resolve, reject) => {
|
|
57
|
+
req.addEventListener("success", () => resolve(req.result), { once: true });
|
|
58
|
+
req.addEventListener("error", () => reject(toErrorObject(req.error, "Non-Error rejection")), { once: true });
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
async function dumpIndexedDatabases(databasePrefix) {
|
|
62
|
+
const idb = indexedDB;
|
|
63
|
+
const dbList = await idb.databases();
|
|
64
|
+
const snapshot = [];
|
|
65
|
+
const expectedPrefix = databasePrefix ? `${databasePrefix}::` : null;
|
|
66
|
+
for (const { name, version } of dbList) {
|
|
67
|
+
if (!name || !version) continue;
|
|
68
|
+
if (expectedPrefix && !name.startsWith(expectedPrefix)) continue;
|
|
69
|
+
const db = await idbReq(idb.open(name, version));
|
|
70
|
+
const stores = [];
|
|
71
|
+
for (const storeName of db.objectStoreNames) {
|
|
72
|
+
const store = db.transaction(storeName, "readonly").objectStore(storeName);
|
|
73
|
+
const storeInfo = {
|
|
74
|
+
name: storeName,
|
|
75
|
+
keyPath: store.keyPath,
|
|
76
|
+
autoIncrement: store.autoIncrement,
|
|
77
|
+
indexes: [],
|
|
78
|
+
records: []
|
|
79
|
+
};
|
|
80
|
+
for (const idxName of store.indexNames) {
|
|
81
|
+
const idx = store.index(idxName);
|
|
82
|
+
storeInfo.indexes.push({
|
|
83
|
+
name: idxName,
|
|
84
|
+
keyPath: idx.keyPath,
|
|
85
|
+
multiEntry: idx.multiEntry,
|
|
86
|
+
unique: idx.unique
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
const keys = await idbReq(store.getAllKeys());
|
|
90
|
+
const values = await idbReq(store.getAll());
|
|
91
|
+
storeInfo.records = keys.map((k, i) => ({
|
|
92
|
+
key: k,
|
|
93
|
+
value: values[i]
|
|
94
|
+
}));
|
|
95
|
+
stores.push(storeInfo);
|
|
96
|
+
}
|
|
97
|
+
snapshot.push({
|
|
98
|
+
name,
|
|
99
|
+
version,
|
|
100
|
+
stores
|
|
101
|
+
});
|
|
102
|
+
db.close();
|
|
103
|
+
}
|
|
104
|
+
return snapshot;
|
|
105
|
+
}
|
|
106
|
+
async function clearAccountIndexedDatabases(databasePrefix) {
|
|
107
|
+
if (!databasePrefix) return;
|
|
108
|
+
const names = await indexedDB.databases();
|
|
109
|
+
for (const { name } of names) if (name?.startsWith(`${databasePrefix}::`)) await idbReq(indexedDB.deleteDatabase(name));
|
|
110
|
+
}
|
|
111
|
+
async function restoreIndexedDatabases(snapshot, idb) {
|
|
112
|
+
for (const dbSnap of snapshot) {
|
|
113
|
+
const request = idb.open(dbSnap.name, dbSnap.version);
|
|
114
|
+
request.addEventListener("upgradeneeded", () => {
|
|
115
|
+
const db = request.result;
|
|
116
|
+
for (const storeSnap of dbSnap.stores) {
|
|
117
|
+
const opts = {};
|
|
118
|
+
if (storeSnap.keyPath !== null) opts.keyPath = storeSnap.keyPath;
|
|
119
|
+
if (storeSnap.autoIncrement) opts.autoIncrement = true;
|
|
120
|
+
const store = db.createObjectStore(storeSnap.name, opts);
|
|
121
|
+
for (const idx of storeSnap.indexes) store.createIndex(idx.name, idx.keyPath, {
|
|
122
|
+
unique: idx.unique,
|
|
123
|
+
multiEntry: idx.multiEntry
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
const db = await idbReq(request);
|
|
128
|
+
try {
|
|
129
|
+
for (const storeSnap of dbSnap.stores) {
|
|
130
|
+
if (storeSnap.records.length === 0) continue;
|
|
131
|
+
const tx = db.transaction(storeSnap.name, "readwrite");
|
|
132
|
+
await new Promise((resolve, reject) => {
|
|
133
|
+
let enqueueError;
|
|
134
|
+
tx.addEventListener("complete", () => resolve(), { once: true });
|
|
135
|
+
tx.addEventListener("abort", () => reject(enqueueError ?? toErrorObject(tx.error, "IndexedDB restore transaction aborted")), { once: true });
|
|
136
|
+
try {
|
|
137
|
+
const store = tx.objectStore(storeSnap.name);
|
|
138
|
+
for (const rec of storeSnap.records) if (storeSnap.keyPath !== null) store.put(rec.value);
|
|
139
|
+
else store.put(rec.value, rec.key);
|
|
140
|
+
} catch (err) {
|
|
141
|
+
enqueueError = toErrorObject(err, "IndexedDB restore enqueue failed");
|
|
142
|
+
tx.abort();
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
} finally {
|
|
147
|
+
db.close();
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
function resolveDefaultIdbSnapshotPath() {
|
|
152
|
+
const stateDir = process.env.OPENCLAW_STATE_DIR || path.join(process.env.HOME || "/tmp", ".openclaw");
|
|
153
|
+
return path.join(stateDir, "matrix", "crypto-idb-snapshot.json");
|
|
154
|
+
}
|
|
155
|
+
async function preflightIndexedDatabases(snapshot, databasePrefix) {
|
|
156
|
+
const names = /* @__PURE__ */ new Set();
|
|
157
|
+
for (const { name } of snapshot) {
|
|
158
|
+
if (names.has(name) || databasePrefix && !name.startsWith(`${databasePrefix}::`)) throw new Error("Malformed IndexedDB snapshot database names");
|
|
159
|
+
names.add(name);
|
|
160
|
+
}
|
|
161
|
+
await restoreIndexedDatabases(snapshot, new IDBFactory());
|
|
162
|
+
}
|
|
163
|
+
async function readCanonicalSnapshot(snapshotPath, stateRuntime) {
|
|
164
|
+
throwIfLegacySnapshotNeedsDoctor(snapshotPath);
|
|
165
|
+
const snapshotJson = await readMatrixIdbSnapshotJson(path.dirname(snapshotPath), stateRuntime);
|
|
166
|
+
if (snapshotJson === null) return null;
|
|
167
|
+
const snapshot = parseSnapshotPayload(snapshotJson);
|
|
168
|
+
if (!snapshot) throw new Error("Malformed IndexedDB snapshot payload");
|
|
169
|
+
return snapshot;
|
|
170
|
+
}
|
|
171
|
+
async function restoreIdbFromDisk(snapshotPath, stateRuntime, databasePrefix) {
|
|
172
|
+
const resolvedPath = snapshotPath ?? resolveDefaultIdbSnapshotPath();
|
|
173
|
+
let callbackStarted = false;
|
|
174
|
+
try {
|
|
175
|
+
const snapshotStateRuntime = stateRuntime ?? getMatrixRuntime().state;
|
|
176
|
+
return await withFileLock(resolvedPath, MATRIX_IDB_SNAPSHOT_LOCK_OPTIONS, async () => {
|
|
177
|
+
callbackStarted = true;
|
|
178
|
+
const snapshot = await readCanonicalSnapshot(resolvedPath, snapshotStateRuntime);
|
|
179
|
+
if (snapshot === null) {
|
|
180
|
+
await clearAccountIndexedDatabases(databasePrefix);
|
|
181
|
+
return false;
|
|
182
|
+
}
|
|
183
|
+
await preflightIndexedDatabases(snapshot, databasePrefix);
|
|
184
|
+
await clearAccountIndexedDatabases(databasePrefix);
|
|
185
|
+
await restoreIndexedDatabases(snapshot, indexedDB);
|
|
186
|
+
LogService.info("IdbPersistence", `Restored ${snapshot.length} IndexedDB database(s) from Matrix SQLite state`);
|
|
187
|
+
return true;
|
|
188
|
+
});
|
|
189
|
+
} catch (err) {
|
|
190
|
+
if (err instanceof MatrixIdbSnapshotMigrationRequiredError) throw err;
|
|
191
|
+
if (!callbackStarted && fs.existsSync(resolvedPath)) throwLegacySnapshotMigrationRequired();
|
|
192
|
+
LogService.warn("IdbPersistence", "Failed to restore IndexedDB snapshot from SQLite:", err);
|
|
193
|
+
throw err;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
async function persistIdbToDisk(params) {
|
|
197
|
+
const snapshotPath = params?.snapshotPath ?? resolveDefaultIdbSnapshotPath();
|
|
198
|
+
let callbackStarted = false;
|
|
199
|
+
try {
|
|
200
|
+
const stateRuntime = params?.stateRuntime ?? getMatrixRuntime().state;
|
|
201
|
+
fs.mkdirSync(path.dirname(snapshotPath), { recursive: true });
|
|
202
|
+
const persistedCount = await withFileLock(snapshotPath, MATRIX_IDB_SNAPSHOT_LOCK_OPTIONS, async () => {
|
|
203
|
+
callbackStarted = true;
|
|
204
|
+
const storageRootDir = path.dirname(snapshotPath);
|
|
205
|
+
await readCanonicalSnapshot(snapshotPath, stateRuntime);
|
|
206
|
+
const snapshot = await dumpIndexedDatabases(params?.databasePrefix);
|
|
207
|
+
if (params?.abortSignal?.aborted || snapshot.length === 0) return 0;
|
|
208
|
+
await writeMatrixIdbSnapshotJson({
|
|
209
|
+
storageRootDir,
|
|
210
|
+
snapshotJson: JSON.stringify(snapshot),
|
|
211
|
+
databaseCount: snapshot.length,
|
|
212
|
+
stateRuntime
|
|
213
|
+
});
|
|
214
|
+
return snapshot.length;
|
|
215
|
+
});
|
|
216
|
+
if (persistedCount === 0) return;
|
|
217
|
+
LogService.debug("IdbPersistence", `Persisted ${persistedCount} IndexedDB database(s) to Matrix SQLite state`);
|
|
218
|
+
} catch (err) {
|
|
219
|
+
if (err instanceof MatrixIdbSnapshotMigrationRequiredError) throw err;
|
|
220
|
+
if (!callbackStarted && fs.existsSync(snapshotPath)) throwLegacySnapshotMigrationRequired();
|
|
221
|
+
LogService.warn("IdbPersistence", "Failed to persist IndexedDB snapshot:", err);
|
|
222
|
+
if (params?.strict) throw err;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
function throwIfLegacySnapshotNeedsDoctor(snapshotPath) {
|
|
226
|
+
if (fs.existsSync(snapshotPath)) throwLegacySnapshotMigrationRequired();
|
|
227
|
+
}
|
|
228
|
+
function throwLegacySnapshotMigrationRequired() {
|
|
229
|
+
LogService.warn("IdbPersistence", LEGACY_SNAPSHOT_DIAGNOSTIC);
|
|
230
|
+
throw new MatrixIdbSnapshotMigrationRequiredError();
|
|
231
|
+
}
|
|
232
|
+
//#endregion
|
|
233
|
+
export { persistIdbToDisk, resolveDefaultIdbSnapshotPath, restoreIdbFromDisk, validateMatrixIdbSnapshotJson };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//#region extensions/matrix/src/matrix/sdk/idb-persistence-lock.ts
|
|
2
|
+
const MATRIX_IDB_PERSIST_INTERVAL_MS = 6e4;
|
|
3
|
+
const MATRIX_IDB_SNAPSHOT_LOCK_OPTIONS = {
|
|
4
|
+
retries: {
|
|
5
|
+
retries: 18,
|
|
6
|
+
factor: 2,
|
|
7
|
+
minTimeout: 50,
|
|
8
|
+
maxTimeout: 5e3,
|
|
9
|
+
randomize: true
|
|
10
|
+
},
|
|
11
|
+
stale: 3e5
|
|
12
|
+
};
|
|
13
|
+
//#endregion
|
|
14
|
+
export { MATRIX_IDB_SNAPSHOT_LOCK_OPTIONS as n, MATRIX_IDB_PERSIST_INTERVAL_MS as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as MATRIX_REACTION_EVENT_TYPE } from "./send-currentness-C2rMVVIQ.mjs";
|
|
2
|
-
import { _ as isPollEventType, b as resolvePollReferenceEventId, d as resolveMatrixReplacementContent, g as formatPollResultsAsText, m as buildPollResultsSummary,
|
|
3
|
-
import { r as withResolvedRoomAction } from "./client-
|
|
2
|
+
import { _ as isPollEventType, b as resolvePollReferenceEventId, d as resolveMatrixReplacementContent, g as formatPollResultsAsText, m as buildPollResultsSummary, t as editMessageMatrix, u as resolveMatrixMessageAttachment, v as isPollStartType, y as parsePollStart } from "./send-BprM-Wmx.mjs";
|
|
3
|
+
import { r as withResolvedRoomAction } from "./client-BKiiI29H.mjs";
|
|
4
4
|
import { n as isMatrixNotFoundError } from "./errors-Bw4EHwKX.mjs";
|
|
5
5
|
import { asNullableObjectRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
6
|
//#region extensions/matrix/src/matrix/poll-summary.ts
|
|
@@ -168,21 +168,6 @@ function resolveLatestMatrixReplacements(events) {
|
|
|
168
168
|
replacements
|
|
169
169
|
};
|
|
170
170
|
}
|
|
171
|
-
async function sendMatrixMessage(to, content, opts = {}) {
|
|
172
|
-
if (!opts.cfg) throw new Error("Matrix message actions require a resolved runtime config.");
|
|
173
|
-
return await sendMessageMatrix(to, content, {
|
|
174
|
-
cfg: opts.cfg,
|
|
175
|
-
mediaUrl: opts.mediaUrl,
|
|
176
|
-
...opts.mediaAccess ? { mediaAccess: opts.mediaAccess } : {},
|
|
177
|
-
mediaLocalRoots: opts.mediaLocalRoots,
|
|
178
|
-
replyToId: opts.replyToId,
|
|
179
|
-
threadId: opts.threadId,
|
|
180
|
-
audioAsVoice: opts.audioAsVoice,
|
|
181
|
-
accountId: opts.accountId ?? void 0,
|
|
182
|
-
client: opts.client,
|
|
183
|
-
timeoutMs: opts.timeoutMs
|
|
184
|
-
});
|
|
185
|
-
}
|
|
186
171
|
async function editMatrixMessage(roomId, messageId, content, opts = {}) {
|
|
187
172
|
if (!opts.cfg) throw new Error("Matrix message actions require a resolved runtime config.");
|
|
188
173
|
if (!content.trim()) throw new Error("Matrix edit requires content");
|
|
@@ -306,4 +291,4 @@ async function isMatrixPollRootThreaded(params) {
|
|
|
306
291
|
return hydratedRoot ? isMatrixThreadEvent(hydratedRoot) : false;
|
|
307
292
|
}
|
|
308
293
|
//#endregion
|
|
309
|
-
export {
|
|
294
|
+
export { fetchEventSummary as a, resolveMatrixActionLimit as c, readMatrixMessages as i, fetchMatrixPollSnapshot as l, editMatrixMessage as n, readPinnedEvents as o, readMatrixMessage as r, EventType as s, deleteMatrixMessage as t };
|
|
@@ -1,22 +1,23 @@
|
|
|
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 { h as resolveConfiguredMatrixBotUserIds } from "./setup-core-
|
|
4
|
-
import { a as resolveMatrixThreadRouting, i as
|
|
5
|
-
import { a as resolveMatrixAllowListMatch, i as normalizeMatrixUserId, r as normalizeMatrixAllowList } from "./channel.setup-
|
|
3
|
+
import { h as resolveConfiguredMatrixBotUserIds } from "./setup-core-DcCk1_Tv.mjs";
|
|
4
|
+
import { a as resolveMatrixThreadRouting, i as resolveMatrixInboundRouteAsync, n as resolveMatrixStoredSessionMeta, o as resolveMatrixRoomConfig } from "./channel-Dw4_imdd.mjs";
|
|
5
|
+
import { a as resolveMatrixAllowListMatch, i as normalizeMatrixUserId, r as normalizeMatrixAllowList } from "./channel.setup-Be8TYKMA.mjs";
|
|
6
6
|
import { n as isMatrixQualifiedUserId, r as isMatrixRoomId, t as isMatrixInviteAutoJoinTarget } from "./target-ids-HhcaKX1n.mjs";
|
|
7
7
|
import { a as MATRIX_REACTION_EVENT_TYPE } from "./send-currentness-C2rMVVIQ.mjs";
|
|
8
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-B3wYhx_M.mjs";
|
|
9
|
-
import { _ as isPollEventType, c as formatMatrixMessageText, d as resolveMatrixReplacementContent, h as formatPollAsText, l as isLikelyBareFilename, r as sendMessageMatrix, u as resolveMatrixMessageAttachment, v as isPollStartType, w as setBoundedMap, y as parsePollStart } from "./send-
|
|
10
|
-
import { t as createMatrixThreadBindingManager } from "./thread-bindings-
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
9
|
+
import { _ as isPollEventType, c as formatMatrixMessageText, d as resolveMatrixReplacementContent, h as formatPollAsText, l as isLikelyBareFilename, r as sendMessageMatrix, u as resolveMatrixMessageAttachment, v as isPollStartType, w as setBoundedMap, y as parsePollStart } from "./send-BprM-Wmx.mjs";
|
|
10
|
+
import { t as createMatrixThreadBindingManager } from "./thread-bindings-rrwQAS6R.mjs";
|
|
11
|
+
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-C4Gibhzl.mjs";
|
|
12
|
+
import { i as readMatrixMessages, l as fetchMatrixPollSnapshot } from "./messages-_XHVg3do.mjs";
|
|
13
13
|
import { i as isMatrixMediaSizeLimitError, r as MatrixMediaSizeLimitError } from "./http-client-ByR4STVQ.mjs";
|
|
14
|
-
import { n as prepareMatrixReplyPayload, r as resolveMatrixExtraContent } from "./outbound-
|
|
15
|
-
import { t as resolveMatrixTargets } from "./resolve-targets-
|
|
14
|
+
import { n as prepareMatrixReplyPayload, r as resolveMatrixExtraContent } from "./outbound-D5Z_4FBg.mjs";
|
|
15
|
+
import { t as resolveMatrixTargets } from "./resolve-targets-BJ5sIKeM.mjs";
|
|
16
16
|
import { t as formatMatrixEncryptedEventDisabledWarning } from "./encryption-guidance-D5_IsDIy.mjs";
|
|
17
17
|
import { createMatrixInboundEventDeduper } from "./inbound-dedupe-C-EBGY0B.mjs";
|
|
18
18
|
import { a as isMatrixAccessTokenInvalidatedError, d as isMatrixDisconnectedSyncState, f as isMatrixReadySyncState, p as isMatrixTerminalSyncState } from "./client-support-D-xHScuo.mjs";
|
|
19
|
-
import { r as getMatrixRoomInfo, t as createMatrixRoomInfoResolver } from "./room-info-
|
|
19
|
+
import { r as getMatrixRoomInfo, t as createMatrixRoomInfoResolver } from "./room-info-BE7bbX_c.mjs";
|
|
20
|
+
import { channelBlockedPatch, channelReadyPatch, channelStoppedPatch, createTransportActivityStatusPatch } from "openclaw/plugin-sdk/gateway-runtime";
|
|
20
21
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
21
22
|
import { createChannelDeliveryAccumulator, createChannelProgressDraftCompositor, createLivePreviewLifecycle, createPreviewMessageReceipt, createReplyPrefixOptions, createTypingCallbacks, logTypingFailure, resolveChannelStreamingBlockEnabled, waitUntilAbort } from "openclaw/plugin-sdk/channel-outbound";
|
|
22
23
|
import { extractErrorCode, formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
@@ -27,7 +28,7 @@ import { addAllowlistUserEntriesFromConfigEntry, buildAllowlistResolutionSummary
|
|
|
27
28
|
import { normalizeStringEntries as normalizeStringEntries$1 } from "openclaw/plugin-sdk/string-normalization-runtime";
|
|
28
29
|
import { isFutureDateTimestampMs, parseStrictFiniteNumber, resolveExpiresAtMsFromDurationMs, resolveOptionalIntegerOption, resolvePromptHistoryLimit } from "openclaw/plugin-sdk/number-runtime";
|
|
29
30
|
import { resolveAgentRoute, resolveInboundLastRouteSessionKey } from "openclaw/plugin-sdk/routing";
|
|
30
|
-
import {
|
|
31
|
+
import { getSessionEntryAsync, resolveStorePath } from "openclaw/plugin-sdk/session-store-runtime";
|
|
31
32
|
import { KeyedAsyncQueue } from "openclaw/plugin-sdk/keyed-async-queue";
|
|
32
33
|
import { escapeRegExp, sliceUtf16Safe, truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
33
34
|
import { buildTtsSupplementMediaPayload, getReplyPayloadTtsSupplement, resolveSendableOutboundReplyParts } from "openclaw/plugin-sdk/reply-payload";
|
|
@@ -49,7 +50,6 @@ import { createChannelPreflightAudio, formatAudioTranscriptForAgent } from "open
|
|
|
49
50
|
import { mergePairLoopGuardConfig } from "openclaw/plugin-sdk/pair-loop-guard-runtime";
|
|
50
51
|
import { buildInboundHistoryFromEntries } from "openclaw/plugin-sdk/reply-history";
|
|
51
52
|
import { decodeHtmlEntities } from "openclaw/plugin-sdk/html-entity-runtime";
|
|
52
|
-
import { channelBlockedPatch, channelReadyPatch, channelStoppedPatch, createTransportActivityStatusPatch } from "openclaw/plugin-sdk/gateway-runtime";
|
|
53
53
|
//#region extensions/matrix/src/matrix/monitor/auto-join.ts
|
|
54
54
|
function registerMatrixAutoJoin(params) {
|
|
55
55
|
const { client, accountConfig, runtime } = params;
|
|
@@ -1260,14 +1260,14 @@ function registerMatrixMonitorEvents(params) {
|
|
|
1260
1260
|
accountId: auth.accountId,
|
|
1261
1261
|
conversationId: roomId,
|
|
1262
1262
|
deliverTo: `room:${roomId}`,
|
|
1263
|
-
route:
|
|
1263
|
+
route: (await resolveMatrixInboundRouteAsync({
|
|
1264
1264
|
cfg,
|
|
1265
1265
|
accountId: auth.accountId,
|
|
1266
1266
|
roomId,
|
|
1267
1267
|
senderId: auth.userId,
|
|
1268
1268
|
isDirectMessage: false,
|
|
1269
1269
|
resolveAgentRoute
|
|
1270
|
-
}).route,
|
|
1270
|
+
})).route,
|
|
1271
1271
|
roomAllowed,
|
|
1272
1272
|
resolveRoomContext: async ({ messageLimit }) => {
|
|
1273
1273
|
const info = await getMatrixRoomInfo(roomId, options);
|
|
@@ -1510,11 +1510,11 @@ function markTrackedRoomIfFirst(set, roomId) {
|
|
|
1510
1510
|
}
|
|
1511
1511
|
return true;
|
|
1512
1512
|
}
|
|
1513
|
-
function resolveMatrixSharedDmContextNotice(params) {
|
|
1513
|
+
async function resolveMatrixSharedDmContextNotice(params) {
|
|
1514
1514
|
if ((params.dmSessionScope ?? "per-user") === "per-room") return null;
|
|
1515
1515
|
if (params.sentRooms.has(params.roomId)) return null;
|
|
1516
1516
|
try {
|
|
1517
|
-
const currentSession = resolveMatrixStoredSessionMeta(
|
|
1517
|
+
const currentSession = resolveMatrixStoredSessionMeta(await getSessionEntryAsync({
|
|
1518
1518
|
storePath: params.storePath,
|
|
1519
1519
|
sessionKey: params.sessionKey
|
|
1520
1520
|
}));
|
|
@@ -1574,11 +1574,11 @@ function formatMatrixToolProgressMarkdownCode(text) {
|
|
|
1574
1574
|
}
|
|
1575
1575
|
//#endregion
|
|
1576
1576
|
//#region extensions/matrix/src/matrix/monitor/handler-runtime.ts
|
|
1577
|
-
const loadMatrixSendModule = createLazyRuntimeModule(() => import("./send-
|
|
1577
|
+
const loadMatrixSendModule = createLazyRuntimeModule(() => import("./send-BprM-Wmx.mjs").then((n) => n.s));
|
|
1578
1578
|
const loadAcpBindingRuntime = createLazyRuntimeModule(() => import("openclaw/plugin-sdk/acp-binding-runtime"));
|
|
1579
1579
|
const loadSessionBindingRuntime = createLazyRuntimeModule(() => import("openclaw/plugin-sdk/session-binding-runtime"));
|
|
1580
|
-
const loadMatrixReactionEvents = createLazyRuntimeModule(() => import("./reaction-events-
|
|
1581
|
-
const loadMatrixDraftStream = createLazyRuntimeModule(() => import("./draft-stream-
|
|
1580
|
+
const loadMatrixReactionEvents = createLazyRuntimeModule(() => import("./reaction-events-BG9spedG.mjs"));
|
|
1581
|
+
const loadMatrixDraftStream = createLazyRuntimeModule(() => import("./draft-stream-DYf0th1n.mjs"));
|
|
1582
1582
|
async function matrixTextWouldActivateMentions(client, text) {
|
|
1583
1583
|
const { resolveMatrixMentionsForBody } = await loadMatrixSendModule();
|
|
1584
1584
|
const mentions = await resolveMatrixMentionsForBody({
|
|
@@ -1645,7 +1645,7 @@ async function resolveMatrixInboundContext(config) {
|
|
|
1645
1645
|
route: _route
|
|
1646
1646
|
});
|
|
1647
1647
|
const sharedDmNoticeSessionKey = threadTarget ? _route.mainSessionKey || _route.sessionKey : _route.sessionKey;
|
|
1648
|
-
const sharedDmContextNotice = isDirectMessage ? hasExplicitSessionBinding ? null : resolveMatrixSharedDmContextNotice({
|
|
1648
|
+
const sharedDmContextNotice = isDirectMessage ? hasExplicitSessionBinding ? null : await resolveMatrixSharedDmContextNotice({
|
|
1649
1649
|
storePath,
|
|
1650
1650
|
sessionKey: sharedDmNoticeSessionKey,
|
|
1651
1651
|
roomId,
|
|
@@ -1736,6 +1736,7 @@ async function resolveMatrixInboundContext(config) {
|
|
|
1736
1736
|
},
|
|
1737
1737
|
sessionTranscript: { historyLimit: isRoom ? historyLimit : 0 },
|
|
1738
1738
|
access: {
|
|
1739
|
+
toolPolicy: isRoom ? roomConfig?.tools ?? {} : void 0,
|
|
1739
1740
|
...isRoom ? { mentions: {
|
|
1740
1741
|
canDetectMention: true,
|
|
1741
1742
|
wasMentioned,
|
|
@@ -1745,6 +1746,7 @@ async function resolveMatrixInboundContext(config) {
|
|
|
1745
1746
|
},
|
|
1746
1747
|
extra: {
|
|
1747
1748
|
GroupSubject: isRoom ? roomName ?? roomId : void 0,
|
|
1749
|
+
GroupChannel: isRoom ? roomId : void 0,
|
|
1748
1750
|
GroupId: isRoom ? roomId : void 0,
|
|
1749
1751
|
...locationPayload?.context,
|
|
1750
1752
|
CommandSource: "text",
|
|
@@ -1942,7 +1944,6 @@ function createRoomHistoryTracker(maxQueueSize = DEFAULT_MAX_QUEUE_SIZE, maxRoom
|
|
|
1942
1944
|
const roomQueues = /* @__PURE__ */ new Map();
|
|
1943
1945
|
/** Maps `{agentId, roomId, scope}` → absolute consumed-up-to index */
|
|
1944
1946
|
const agentWatermarks = /* @__PURE__ */ new Map();
|
|
1945
|
-
let nextQueueGeneration = 1;
|
|
1946
1947
|
function clearWatermarks(roomId, threadRootId) {
|
|
1947
1948
|
for (const key of agentWatermarks.keys()) {
|
|
1948
1949
|
const parsed = JSON.parse(key);
|
|
@@ -1953,7 +1954,6 @@ function createRoomHistoryTracker(maxQueueSize = DEFAULT_MAX_QUEUE_SIZE, maxRoom
|
|
|
1953
1954
|
return {
|
|
1954
1955
|
entries: [],
|
|
1955
1956
|
baseIndex: 0,
|
|
1956
|
-
generation: nextQueueGeneration++,
|
|
1957
1957
|
preparedTriggers: /* @__PURE__ */ new Map()
|
|
1958
1958
|
};
|
|
1959
1959
|
}
|
|
@@ -2006,10 +2006,7 @@ function createRoomHistoryTracker(maxQueueSize = DEFAULT_MAX_QUEUE_SIZE, maxRoom
|
|
|
2006
2006
|
queue.entries.splice(0, overflow);
|
|
2007
2007
|
queue.baseIndex += overflow;
|
|
2008
2008
|
}
|
|
2009
|
-
return {
|
|
2010
|
-
snapshotIdx: queue.baseIndex + queue.entries.length,
|
|
2011
|
-
queueGeneration: queue.generation
|
|
2012
|
-
};
|
|
2009
|
+
return { snapshotIdx: queue.baseIndex + queue.entries.length };
|
|
2013
2010
|
}
|
|
2014
2011
|
function wmKey(agentId, roomId, threadRootId) {
|
|
2015
2012
|
return JSON.stringify({
|
|
@@ -2055,7 +2052,7 @@ function createRoomHistoryTracker(maxQueueSize = DEFAULT_MAX_QUEUE_SIZE, maxRoom
|
|
|
2055
2052
|
const queue = getScopedQueue(roomId, threadRootId);
|
|
2056
2053
|
if (slot) {
|
|
2057
2054
|
const rel = slot.slotIdx - queue.baseIndex;
|
|
2058
|
-
if (
|
|
2055
|
+
if (rel < 0 || rel >= queue.entries.length) slot = void 0;
|
|
2059
2056
|
}
|
|
2060
2057
|
const retryKey = preparedTriggerKey(agentId, entry.messageId);
|
|
2061
2058
|
if (retryKey) {
|
|
@@ -2068,17 +2065,14 @@ function createRoomHistoryTracker(maxQueueSize = DEFAULT_MAX_QUEUE_SIZE, maxRoom
|
|
|
2068
2065
|
if (slot) queue.entries[slot.slotIdx - queue.baseIndex] = entry;
|
|
2069
2066
|
const prepared = {
|
|
2070
2067
|
history: computePendingHistory(queue, agentId, roomId, limit, slot?.slotIdx, slot?.watermarkIdx, threadRootId),
|
|
2071
|
-
...slot ? {
|
|
2072
|
-
snapshotIdx: slot.slotIdx + 1,
|
|
2073
|
-
queueGeneration: queue.generation
|
|
2074
|
-
} : appendToQueue(queue, entry)
|
|
2068
|
+
...slot ? { snapshotIdx: slot.slotIdx + 1 } : appendToQueue(queue, entry)
|
|
2075
2069
|
};
|
|
2076
2070
|
if (retryKey) return rememberPreparedTrigger(queue, retryKey, prepared);
|
|
2077
2071
|
return prepared;
|
|
2078
2072
|
}
|
|
2079
2073
|
function finalizePending(roomId, slot, entry, threadRootId) {
|
|
2080
2074
|
const queue = findScopedQueue(roomId, threadRootId);
|
|
2081
|
-
if (!queue
|
|
2075
|
+
if (!queue) return;
|
|
2082
2076
|
const rel = slot.slotIdx - queue.baseIndex;
|
|
2083
2077
|
if (rel < 0 || rel >= queue.entries.length) return;
|
|
2084
2078
|
queue.entries[rel] = entry;
|
|
@@ -2116,7 +2110,6 @@ function createRoomHistoryTracker(maxQueueSize = DEFAULT_MAX_QUEUE_SIZE, maxRoom
|
|
|
2116
2110
|
agentWatermarks.delete(key);
|
|
2117
2111
|
return;
|
|
2118
2112
|
}
|
|
2119
|
-
if (queue.generation !== snapshot.queueGeneration) return;
|
|
2120
2113
|
const firstReservedRel = queue.entries.findIndex((entry, index) => entry.reserved === true && queue.baseIndex + index < snapshot.snapshotIdx);
|
|
2121
2114
|
if (firstReservedRel >= 0) markConsumedAfterReservedGap(queue, key, firstReservedRel, snapshot.snapshotIdx);
|
|
2122
2115
|
rememberWatermark(key, firstReservedRel >= 0 ? queue.baseIndex + firstReservedRel : snapshot.snapshotIdx);
|
|
@@ -2562,7 +2555,7 @@ async function resolveMatrixIngressContent(config) {
|
|
|
2562
2555
|
return null;
|
|
2563
2556
|
}
|
|
2564
2557
|
};
|
|
2565
|
-
const { route: _route, configuredBinding: _configuredBinding, runtimeBindingId: _runtimeBindingId } =
|
|
2558
|
+
const { route: _route, configuredBinding: _configuredBinding, runtimeBindingId: _runtimeBindingId } = await resolveMatrixInboundRouteAsync({
|
|
2566
2559
|
cfg,
|
|
2567
2560
|
accountId,
|
|
2568
2561
|
roomId,
|
|
@@ -2758,7 +2751,7 @@ async function resolveMatrixIngressContent(config) {
|
|
|
2758
2751
|
}
|
|
2759
2752
|
if (_runtimeBindingId) {
|
|
2760
2753
|
const { getSessionBindingService } = await loadSessionBindingRuntime();
|
|
2761
|
-
getSessionBindingService().
|
|
2754
|
+
await getSessionBindingService().touchAsync(_runtimeBindingId, eventTs ?? void 0, {
|
|
2762
2755
|
channel: "matrix",
|
|
2763
2756
|
accountId
|
|
2764
2757
|
});
|
|
@@ -3603,10 +3596,10 @@ function shouldPromoteRecentInviteRoom(params) {
|
|
|
3603
3596
|
//#endregion
|
|
3604
3597
|
//#region extensions/matrix/src/matrix/monitor/startup.ts
|
|
3605
3598
|
const loadMatrixStartupMaintenanceDeps = createLazyRuntimeModule(() => Promise.all([
|
|
3606
|
-
import("./setup-core-
|
|
3599
|
+
import("./setup-core-DcCk1_Tv.mjs").then((n) => n.f),
|
|
3607
3600
|
import("./device-health-Be60VF1w.mjs").then((n) => n.t),
|
|
3608
|
-
import("./setup-core-
|
|
3609
|
-
import("./startup-verification-
|
|
3601
|
+
import("./setup-core-DcCk1_Tv.mjs").then((n) => n.u),
|
|
3602
|
+
import("./startup-verification-UU8DUvi4.mjs")
|
|
3610
3603
|
]).then(([configUpdateModule, deviceHealthModule, profileModule, startupVerificationModule]) => ({
|
|
3611
3604
|
updateMatrixAccountConfig: configUpdateModule.updateMatrixAccountConfig,
|
|
3612
3605
|
summarizeMatrixDeviceHealth: deviceHealthModule.summarizeMatrixDeviceHealth,
|
|
@@ -3811,7 +3804,6 @@ function createMatrixMonitorSyncLifecycle(params) {
|
|
|
3811
3804
|
return {
|
|
3812
3805
|
async waitForFatalStop() {
|
|
3813
3806
|
if (fatalError) throw fatalError;
|
|
3814
|
-
if (resolveFatalWait || rejectFatalWait) throw new Error("Matrix fatal-stop wait already in progress");
|
|
3815
3807
|
await new Promise((resolve, reject) => {
|
|
3816
3808
|
resolveFatalWait = resolve;
|
|
3817
3809
|
rejectFatalWait = (error) => reject(error);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { i as __exportAll } from "./doctor-contract-CsTNmbMa.mjs";
|
|
2
2
|
import { i as requiresExplicitMatrixDefaultAccount, u as resolveMatrixEnvAuthReadiness } from "./account-selection-Bs_jCAaG.mjs";
|
|
3
3
|
import { a as resolveMatrixAccountConfig } from "./account-config-CRsKoMqJ.mjs";
|
|
4
|
-
import { a as createMatrixSetupDmPolicy, g as resolveDefaultMatrixAccountId, m as listMatrixAccountIds, n as finishMatrixSetupAfterConfigWrite, o as moveSingleMatrixAccountConfigToNamedAccount, p as updateMatrixAccountConfig, v as resolveMatrixAccountAsync } from "./setup-core-
|
|
4
|
+
import { a as createMatrixSetupDmPolicy, g as resolveDefaultMatrixAccountId, m as listMatrixAccountIds, n as finishMatrixSetupAfterConfigWrite, o as moveSingleMatrixAccountConfigToNamedAccount, p as updateMatrixAccountConfig, v as resolveMatrixAccountAsync } from "./setup-core-DcCk1_Tv.mjs";
|
|
5
5
|
import { r as isMatrixRoomId, t as isMatrixInviteAutoJoinTarget } from "./target-ids-HhcaKX1n.mjs";
|
|
6
6
|
import { n as validateMatrixHomeserverUrl, t as resolveValidatedMatrixHomeserverUrl } from "./url-validation-CF6pG6eE.mjs";
|
|
7
7
|
import { n as ensureMatrixSdkInstalled, r as isMatrixSdkAvailable } from "./deps-L_1bUAGL.mjs";
|
|
@@ -87,7 +87,7 @@ async function promptMatrixAllowFrom(params) {
|
|
|
87
87
|
pending.push(part);
|
|
88
88
|
}
|
|
89
89
|
if (pending.length > 0) {
|
|
90
|
-
const { resolveMatrixTargets } = await import("./resolve-targets-
|
|
90
|
+
const { resolveMatrixTargets } = await import("./resolve-targets-BJ5sIKeM.mjs").then((n) => n.n);
|
|
91
91
|
const results = await resolveMatrixTargets({
|
|
92
92
|
cfg,
|
|
93
93
|
accountId,
|
|
@@ -204,7 +204,7 @@ async function configureMatrixAccessPrompts(params) {
|
|
|
204
204
|
resolvedIds.push(cleaned);
|
|
205
205
|
continue;
|
|
206
206
|
}
|
|
207
|
-
const { listMatrixDirectoryGroupsLive } = await import("./directory-live-
|
|
207
|
+
const { listMatrixDirectoryGroupsLive } = await import("./directory-live-BpSz-FQB.mjs").then((n) => n.t);
|
|
208
208
|
const matches = await listMatrixDirectoryGroupsLive({
|
|
209
209
|
cfg: next,
|
|
210
210
|
accountId: params.accountId,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as matrixPresentationCapabilities } from "./channel-
|
|
2
|
-
import { i as sendPollMatrix, r as sendMessageMatrix } from "./send-
|
|
1
|
+
import { r as matrixPresentationCapabilities } from "./channel-Dw4_imdd.mjs";
|
|
2
|
+
import { i as sendPollMatrix, r as sendMessageMatrix } from "./send-BprM-Wmx.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";
|
|
@@ -122,50 +122,42 @@ const matrixOutbound = {
|
|
|
122
122
|
deliveryQueueId,
|
|
123
123
|
signal,
|
|
124
124
|
assertDirectAdapterHandoff,
|
|
125
|
-
onPlatformSendDispatch
|
|
125
|
+
onPlatformSendDispatch,
|
|
126
|
+
audioAsVoice: payload.audioAsVoice ?? audioAsVoice,
|
|
127
|
+
onDeliveryResult: resolveMatrixDeliveryProgress(onDeliveryResult)
|
|
126
128
|
};
|
|
129
|
+
const sendPart = (text, index, mediaUrl) => send(to, text, {
|
|
130
|
+
...sendOptions,
|
|
131
|
+
mediaUrl,
|
|
132
|
+
replyToId: resolveReplyToId(),
|
|
133
|
+
deliveryPartIndex: index,
|
|
134
|
+
deliveryPartCount: urls.length || 1,
|
|
135
|
+
extraContent: index === 0 ? resolveMatrixExtraContent(payload) : void 0
|
|
136
|
+
});
|
|
127
137
|
if (urls.length > 0) {
|
|
128
138
|
const sentResults = [];
|
|
129
|
-
|
|
139
|
+
await sendPayloadMediaSequence({
|
|
130
140
|
text: payloadText,
|
|
131
141
|
mediaUrls: urls,
|
|
132
|
-
send:
|
|
133
|
-
...sendOptions,
|
|
134
|
-
mediaUrl,
|
|
135
|
-
replyToId: resolveReplyToId(),
|
|
136
|
-
audioAsVoice: payload.audioAsVoice ?? audioAsVoice,
|
|
137
|
-
deliveryPartIndex: index,
|
|
138
|
-
deliveryPartCount: urls.length,
|
|
139
|
-
extraContent: isFirst ? resolveMatrixExtraContent(payload) : void 0,
|
|
140
|
-
onDeliveryResult: resolveMatrixDeliveryProgress(onDeliveryResult)
|
|
141
|
-
}),
|
|
142
|
+
send: ({ text, mediaUrl, index }) => sendPart(text, index, mediaUrl),
|
|
142
143
|
onResult: (result) => {
|
|
143
144
|
sentResults.push(result);
|
|
144
145
|
}
|
|
145
146
|
});
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
}
|
|
147
|
+
const lastResult = sentResults.at(-1);
|
|
148
|
+
const receipt = createMessageReceiptFromOutboundResults({ results: sentResults });
|
|
149
|
+
receipt.parts = receipt.parts.map((part, index) => ({
|
|
150
|
+
...part,
|
|
151
|
+
index
|
|
152
|
+
}));
|
|
153
|
+
return attachChannelToResult("matrix", toMatrixOutboundResult({
|
|
154
|
+
...lastResult,
|
|
155
|
+
primaryMessageId: receipt.primaryPlatformMessageId,
|
|
156
|
+
receipt,
|
|
157
|
+
content: sentResults.map((result) => result.content).join("\n")
|
|
158
|
+
}));
|
|
159
159
|
}
|
|
160
|
-
const result = await
|
|
161
|
-
...sendOptions,
|
|
162
|
-
replyToId: resolveReplyToId(),
|
|
163
|
-
audioAsVoice: payload.audioAsVoice ?? audioAsVoice,
|
|
164
|
-
deliveryPartIndex: 0,
|
|
165
|
-
deliveryPartCount: 1,
|
|
166
|
-
extraContent: resolveMatrixExtraContent(payload),
|
|
167
|
-
onDeliveryResult: resolveMatrixDeliveryProgress(onDeliveryResult)
|
|
168
|
-
});
|
|
160
|
+
const result = await sendPart(payloadText, 0);
|
|
169
161
|
return attachChannelToResult("matrix", toMatrixOutboundResult(result));
|
|
170
162
|
},
|
|
171
163
|
sendText: (ctx) => sendMatrixOutbound(ctx),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as getMatrixRuntime } from "./runtime-1kn1P6io.mjs";
|
|
2
|
-
import { d as syncMatrixOwnProfile, p as updateMatrixAccountConfig } from "./setup-core-
|
|
2
|
+
import { d as syncMatrixOwnProfile, p as updateMatrixAccountConfig } from "./setup-core-DcCk1_Tv.mjs";
|
|
3
3
|
import { n as resolveMatrixConfigPath } from "./config-paths-CnREYb1Y.mjs";
|
|
4
|
-
import { n as withResolvedActionClient } from "./client-
|
|
4
|
+
import { n as withResolvedActionClient } from "./client-BKiiI29H.mjs";
|
|
5
5
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
6
6
|
//#region extensions/matrix/src/matrix/actions/profile.ts
|
|
7
7
|
async function updateMatrixOwnProfile(opts = {}) {
|