@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,32 +1,20 @@
|
|
|
1
1
|
import { t as getMatrixRuntime } from "./runtime-1kn1P6io.mjs";
|
|
2
2
|
import { a as listBindingsForAccount, c as setBindingRecord, f as toMatrixBindingTargetKind, o as removeBindingRecord, p as toSessionBindingRecord, r as getMatrixThreadBindingManagerEntry, s as resolveBindingKey, t as deleteMatrixThreadBindingManagerEntry, u as setMatrixThreadBindingManagerEntry } from "./thread-bindings-shared-hxKkYC1W.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import { a as resolveMatrixStateFilePath, t as claimCurrentTokenStorageState } from "./storage-
|
|
5
|
-
import { r as sendMessageMatrix } from "./send-
|
|
3
|
+
import { o as resolveMatrixSqliteStateEnv, r as assertMatrixSupportedStateFile, s as resolveMatrixSqliteStateKey } from "./retired-state-BXUQ2I-C.mjs";
|
|
4
|
+
import { a as resolveMatrixStateFilePath, t as claimCurrentTokenStorageState } from "./storage-D7agewjH.mjs";
|
|
5
|
+
import { r as sendMessageMatrix } from "./send-B1Y2L4wj.mjs";
|
|
6
6
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
7
7
|
import { createHash } from "node:crypto";
|
|
8
8
|
import path from "node:path";
|
|
9
|
+
import { resolveOptionalIntegerOption } from "openclaw/plugin-sdk/number-runtime";
|
|
9
10
|
import { registerSessionBindingAdapter, resolveThreadBindingFarewellText, resolveThreadBindingLifecycle, unregisterSessionBindingAdapter } from "openclaw/plugin-sdk/thread-bindings-session-runtime";
|
|
10
|
-
import fs from "node:fs/promises";
|
|
11
|
-
import { tryReadJson } from "@openclaw/fs-safe/json";
|
|
12
11
|
import { resolveSessionAgentIdStrict } from "openclaw/plugin-sdk/agent-scope-runtime";
|
|
13
12
|
import { resolveAgentIdFromSessionKey } from "openclaw/plugin-sdk/session-key-runtime";
|
|
14
13
|
//#region extensions/matrix/src/matrix/thread-bindings.ts
|
|
15
|
-
const STORE_VERSION = 1;
|
|
16
14
|
const THREAD_BINDINGS_NAMESPACE = "thread-bindings";
|
|
17
|
-
const THREAD_BINDINGS_MIGRATIONS_NAMESPACE = "thread-bindings-migrations";
|
|
18
15
|
const THREAD_BINDINGS_MAX_ENTRIES = 1e4;
|
|
19
16
|
const THREAD_BINDINGS_SWEEP_INTERVAL_MS = 6e4;
|
|
20
17
|
const TOUCH_PERSIST_DELAY_MS = 3e4;
|
|
21
|
-
async function resolveBindingsPath(params) {
|
|
22
|
-
return resolveMatrixStateFilePath({
|
|
23
|
-
auth: params.auth,
|
|
24
|
-
accountId: params.accountId,
|
|
25
|
-
env: params.env,
|
|
26
|
-
stateDir: params.stateDir,
|
|
27
|
-
filename: "thread-bindings.json"
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
18
|
function createThreadBindingStore(params) {
|
|
31
19
|
return getMatrixRuntime().state.openKeyedStore({
|
|
32
20
|
namespace: THREAD_BINDINGS_NAMESPACE,
|
|
@@ -34,21 +22,10 @@ function createThreadBindingStore(params) {
|
|
|
34
22
|
env: resolveMatrixSqliteStateEnv(params)
|
|
35
23
|
});
|
|
36
24
|
}
|
|
37
|
-
function createThreadBindingMigrationStore(params) {
|
|
38
|
-
return getMatrixRuntime().state.openKeyedStore({
|
|
39
|
-
namespace: THREAD_BINDINGS_MIGRATIONS_NAMESPACE,
|
|
40
|
-
maxEntries: 1e3,
|
|
41
|
-
env: resolveMatrixSqliteStateEnv(params)
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
25
|
function buildThreadBindingStoreKey(record) {
|
|
45
26
|
const digest = createHash("sha256").update(record.accountId).update("\0").update(record.parentConversationId ?? "").update("\0").update(record.conversationId).digest("hex");
|
|
46
27
|
return `${record.accountId}:${digest}`;
|
|
47
28
|
}
|
|
48
|
-
function buildLegacyThreadBindingsImportKey(params) {
|
|
49
|
-
const digest = createHash("sha256").update(params.accountId).update("\0").update(params.legacyFilePath).digest("hex");
|
|
50
|
-
return `${params.accountId}:${digest}`;
|
|
51
|
-
}
|
|
52
29
|
function normalizeBindingRecord(entry, accountId) {
|
|
53
30
|
if (!entry || typeof entry !== "object" || Array.isArray(entry)) return null;
|
|
54
31
|
const record = entry;
|
|
@@ -57,8 +34,8 @@ function normalizeBindingRecord(entry, accountId) {
|
|
|
57
34
|
const parentConversationId = normalizeOptionalString(record.parentConversationId);
|
|
58
35
|
const targetSessionKey = normalizeOptionalString(record.targetSessionKey) ?? "";
|
|
59
36
|
if (!conversationId || !targetSessionKey) return null;
|
|
60
|
-
const boundAt =
|
|
61
|
-
const lastActivityAt =
|
|
37
|
+
const boundAt = resolveOptionalIntegerOption(record.boundAt) ?? Date.now();
|
|
38
|
+
const lastActivityAt = resolveOptionalIntegerOption(record.lastActivityAt) ?? boundAt;
|
|
62
39
|
return {
|
|
63
40
|
accountId,
|
|
64
41
|
conversationId,
|
|
@@ -70,20 +47,10 @@ function normalizeBindingRecord(entry, accountId) {
|
|
|
70
47
|
boundBy: normalizeOptionalString(record.boundBy) || void 0,
|
|
71
48
|
boundAt,
|
|
72
49
|
lastActivityAt: Math.max(lastActivityAt, boundAt),
|
|
73
|
-
idleTimeoutMs:
|
|
74
|
-
maxAgeMs:
|
|
50
|
+
idleTimeoutMs: resolveOptionalIntegerOption(record.idleTimeoutMs, { min: 0 }),
|
|
51
|
+
maxAgeMs: resolveOptionalIntegerOption(record.maxAgeMs, { min: 0 })
|
|
75
52
|
};
|
|
76
53
|
}
|
|
77
|
-
async function loadBindingsFromLegacyDisk(filePath, accountId) {
|
|
78
|
-
const value = await tryReadJson(filePath);
|
|
79
|
-
if (value?.version !== STORE_VERSION || !Array.isArray(value.bindings)) return [];
|
|
80
|
-
const loaded = [];
|
|
81
|
-
for (const entry of value.bindings) {
|
|
82
|
-
const record = normalizeBindingRecord(entry, accountId);
|
|
83
|
-
if (record) loaded.push(record);
|
|
84
|
-
}
|
|
85
|
-
return loaded;
|
|
86
|
-
}
|
|
87
54
|
async function loadBindingsFromPluginState(params) {
|
|
88
55
|
const store = createThreadBindingStore(params);
|
|
89
56
|
const loaded = [];
|
|
@@ -140,12 +107,14 @@ async function sendFarewellMessage(params) {
|
|
|
140
107
|
}
|
|
141
108
|
async function createMatrixThreadBindingManager(params) {
|
|
142
109
|
if (params.auth.accountId !== params.accountId) throw new Error(`Matrix thread binding account mismatch: requested ${params.accountId}, auth resolved ${params.auth.accountId}`);
|
|
143
|
-
const legacyFilePath = await
|
|
110
|
+
const legacyFilePath = await resolveMatrixStateFilePath({
|
|
111
|
+
filename: "thread-bindings.json",
|
|
144
112
|
auth: params.auth,
|
|
145
113
|
accountId: params.accountId,
|
|
146
114
|
env: params.env,
|
|
147
115
|
stateDir: params.stateDir
|
|
148
116
|
});
|
|
117
|
+
await assertMatrixSupportedStateFile(legacyFilePath);
|
|
149
118
|
const sqliteStateDir = path.dirname(legacyFilePath);
|
|
150
119
|
const storageKey = resolveMatrixSqliteStateKey({
|
|
151
120
|
env: params.env,
|
|
@@ -156,28 +125,11 @@ async function createMatrixThreadBindingManager(params) {
|
|
|
156
125
|
if (existingEntry.storageKey === storageKey) return existingEntry.manager;
|
|
157
126
|
await existingEntry.manager.stop();
|
|
158
127
|
}
|
|
159
|
-
const
|
|
128
|
+
const loaded = await loadBindingsFromPluginState({
|
|
160
129
|
accountId: params.accountId,
|
|
161
130
|
env: params.env,
|
|
162
131
|
stateDir: sqliteStateDir
|
|
163
132
|
});
|
|
164
|
-
const migrationStore = createThreadBindingMigrationStore({
|
|
165
|
-
env: params.env,
|
|
166
|
-
stateDir: sqliteStateDir
|
|
167
|
-
});
|
|
168
|
-
const legacyImportKey = buildLegacyThreadBindingsImportKey({
|
|
169
|
-
accountId: params.accountId,
|
|
170
|
-
legacyFilePath
|
|
171
|
-
});
|
|
172
|
-
const pluginLoadedKeys = new Set(pluginLoaded.map((record) => buildThreadBindingStoreKey(record)));
|
|
173
|
-
let legacyHadRows = false;
|
|
174
|
-
let legacyLoaded = [];
|
|
175
|
-
if (!await migrationStore.lookup(legacyImportKey)) {
|
|
176
|
-
const legacyCandidates = await loadBindingsFromLegacyDisk(legacyFilePath, params.accountId);
|
|
177
|
-
legacyHadRows = legacyCandidates.length > 0;
|
|
178
|
-
legacyLoaded = legacyCandidates.filter((record) => !pluginLoadedKeys.has(buildThreadBindingStoreKey(record)));
|
|
179
|
-
}
|
|
180
|
-
const loaded = [...pluginLoaded, ...legacyLoaded];
|
|
181
133
|
for (const record of loaded) setBindingRecord(record);
|
|
182
134
|
let persistQueue = Promise.resolve();
|
|
183
135
|
const enqueuePersist = (bindings) => {
|
|
@@ -204,13 +156,6 @@ async function createMatrixThreadBindingManager(params) {
|
|
|
204
156
|
idleTimeoutMs: params.idleTimeoutMs,
|
|
205
157
|
maxAgeMs: params.maxAgeMs
|
|
206
158
|
};
|
|
207
|
-
if (legacyHadRows) {
|
|
208
|
-
if (legacyLoaded.length > 0) await persist();
|
|
209
|
-
await migrationStore.register(legacyImportKey, { importedAt: Date.now() });
|
|
210
|
-
await fs.rm(legacyFilePath, { force: true }).catch((err) => {
|
|
211
|
-
params.logVerboseMessage?.(`matrix: failed removing migrated legacy thread bindings account=${params.accountId}: ${String(err)}`);
|
|
212
|
-
});
|
|
213
|
-
}
|
|
214
159
|
let persistTimer = null;
|
|
215
160
|
const schedulePersist = (delayMs) => {
|
|
216
161
|
if (persistTimer) return;
|
|
@@ -387,10 +332,7 @@ async function createMatrixThreadBindingManager(params) {
|
|
|
387
332
|
},
|
|
388
333
|
listBySession: (targetSessionKey) => manager.listBySessionKey(targetSessionKey).map((record) => toSessionBindingRecord(record, defaults)),
|
|
389
334
|
resolveByConversation: (ref) => {
|
|
390
|
-
const record = manager.getByConversation(
|
|
391
|
-
conversationId: ref.conversationId,
|
|
392
|
-
parentConversationId: ref.parentConversationId
|
|
393
|
-
});
|
|
335
|
+
const record = manager.getByConversation(ref);
|
|
394
336
|
return record ? toSessionBindingRecord(record, defaults) : null;
|
|
395
337
|
},
|
|
396
338
|
touch: (bindingId, at) => {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { a as resolveMatrixAccountConfig, o as resolveMatrixBaseConfig } from "./account-config-CRsKoMqJ.mjs";
|
|
2
|
-
import { r as resolveDefaultMatrixAccountId } from "./accounts-
|
|
3
|
-
import { o as resolveMatrixRoomConfig } from "./channel-
|
|
2
|
+
import { r as resolveDefaultMatrixAccountId } from "./accounts-C_r0UlEm.mjs";
|
|
3
|
+
import { o as resolveMatrixRoomConfig } from "./channel-CeRXEAEP.mjs";
|
|
4
4
|
import { i as normalizeMatrixResolvableTarget } from "./target-ids-Nwx7cMVE.mjs";
|
|
5
5
|
import { l as selectOwnMatrixReactionEventIds, s as buildMatrixReactionRelationsPath, u as summarizeMatrixReactionEvents } from "./send-currentness-C2rMVVIQ.mjs";
|
|
6
|
-
import { c as isStrictDirectMembership, s as hasDirectMatrixMemberFlag, u as readJoinedMatrixMembers } from "./direct-management-
|
|
7
|
-
import {
|
|
6
|
+
import { c as isStrictDirectMembership, s as hasDirectMatrixMemberFlag, u as readJoinedMatrixMembers } from "./direct-management-DJtQhLKH.mjs";
|
|
7
|
+
import { C as resolveMatrixRoomId, n as reactMatrixMessage, p as buildPollResponseContent, v as isPollStartType, y as parsePollStart } from "./send-B1Y2L4wj.mjs";
|
|
8
8
|
import { i as parseMxc } from "./event-helpers-CspuhE9k.mjs";
|
|
9
|
-
import { a as sendMatrixMessage, c as EventType, i as readMatrixMessages, l as resolveMatrixActionLimit, n as editMatrixMessage, o as fetchEventSummary, r as readMatrixMessage, s as readPinnedEvents, t as deleteMatrixMessage } from "./messages-
|
|
10
|
-
import { n as withResolvedActionClient, r as withResolvedRoomAction } from "./client-
|
|
11
|
-
import { t as applyMatrixProfileUpdate } from "./profile-update-
|
|
12
|
-
import { _ as scanMatrixVerificationQr, a as confirmMatrixVerificationSas, b as verifyMatrixRecoveryKey, c as getMatrixRoomKeyBackupStatus, d as listMatrixVerifications, f as mismatchMatrixVerificationSas, h as restoreMatrixRoomKeyBackup, i as confirmMatrixVerificationReciprocateQr, l as getMatrixVerificationSas, n as bootstrapMatrixVerification, o as generateMatrixVerificationQr, p as requestMatrixVerification, r as cancelMatrixVerification, s as getMatrixEncryptionStatus, t as acceptMatrixVerification, u as getMatrixVerificationStatus, v as startMatrixVerification } from "./verification-
|
|
13
|
-
import { n as getMatrixMemberInfo, r as getMatrixRoomInfo, t as createMatrixRoomInfoResolver } from "./room-info-
|
|
9
|
+
import { a as sendMatrixMessage, c as EventType, i as readMatrixMessages, l as resolveMatrixActionLimit, n as editMatrixMessage, o as fetchEventSummary, r as readMatrixMessage, s as readPinnedEvents, t as deleteMatrixMessage } from "./messages-uCbwLRKS.mjs";
|
|
10
|
+
import { n as withResolvedActionClient, r as withResolvedRoomAction } from "./client-DY3HExqI.mjs";
|
|
11
|
+
import { t as applyMatrixProfileUpdate } from "./profile-update-C1n8SRqH.mjs";
|
|
12
|
+
import { _ as scanMatrixVerificationQr, a as confirmMatrixVerificationSas, b as verifyMatrixRecoveryKey, c as getMatrixRoomKeyBackupStatus, d as listMatrixVerifications, f as mismatchMatrixVerificationSas, h as restoreMatrixRoomKeyBackup, i as confirmMatrixVerificationReciprocateQr, l as getMatrixVerificationSas, n as bootstrapMatrixVerification, o as generateMatrixVerificationQr, p as requestMatrixVerification, r as cancelMatrixVerification, s as getMatrixEncryptionStatus, t as acceptMatrixVerification, u as getMatrixVerificationStatus, v as startMatrixVerification } from "./verification-kMlFYUn0.mjs";
|
|
13
|
+
import { n as getMatrixMemberInfo, r as getMatrixRoomInfo, t as createMatrixRoomInfoResolver } from "./room-info-BPMbwe8I.mjs";
|
|
14
14
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
15
15
|
import { isRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, uniqueStrings, uniqueValues } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
16
16
|
import { ToolAuthorizationError, createActionGate, jsonResult, readPositiveIntegerParam, readReactionParams, readStringArrayParam, readStringParam } from "openclaw/plugin-sdk/channel-actions";
|
|
@@ -360,7 +360,10 @@ async function handleMatrixAction(ctx) {
|
|
|
360
360
|
conversationReadOrigin: ctx.conversationReadOrigin
|
|
361
361
|
},
|
|
362
362
|
opts: clientOpts,
|
|
363
|
-
run
|
|
363
|
+
run: ({ roomId: resolvedRoomId, client }) => run(resolvedRoomId, {
|
|
364
|
+
...clientOpts,
|
|
365
|
+
client
|
|
366
|
+
})
|
|
364
367
|
});
|
|
365
368
|
return {
|
|
366
369
|
accountId,
|
|
@@ -399,15 +402,14 @@ async function handleMatrixAction(ctx) {
|
|
|
399
402
|
const emojiValue = readStringParam(params, "emoji", { allowEmpty: true });
|
|
400
403
|
const removeValue = typeof params.remove === "boolean" ? params.remove : void 0;
|
|
401
404
|
const roomId = readRoomId(params);
|
|
402
|
-
const {
|
|
405
|
+
const { withReadTarget } = prepareAction("reactions");
|
|
403
406
|
const { emoji, remove, isEmpty } = readReactionParams({
|
|
404
407
|
emoji: emojiValue,
|
|
405
408
|
remove: removeValue
|
|
406
409
|
}, { removeErrorMessage: "Emoji is required to remove a Matrix reaction." });
|
|
407
410
|
if (remove || isEmpty) {
|
|
408
|
-
const result = await withReadTarget(roomId, async (
|
|
409
|
-
...
|
|
410
|
-
client: target.client,
|
|
411
|
+
const result = await withReadTarget(roomId, async (resolvedRoom, actionOpts) => removeMatrixReactions(resolvedRoom, messageId, {
|
|
412
|
+
...actionOpts,
|
|
411
413
|
emoji: remove ? emoji : void 0
|
|
412
414
|
}));
|
|
413
415
|
return jsonResult({
|
|
@@ -415,10 +417,7 @@ async function handleMatrixAction(ctx) {
|
|
|
415
417
|
removed: result.removed
|
|
416
418
|
});
|
|
417
419
|
}
|
|
418
|
-
await withReadTarget(roomId, async (
|
|
419
|
-
...clientOpts,
|
|
420
|
-
client: target.client
|
|
421
|
-
}));
|
|
420
|
+
await withReadTarget(roomId, async (resolvedRoom, actionOpts) => reactMatrixMessage(resolvedRoom, messageId, emoji, actionOpts));
|
|
422
421
|
return jsonResult({
|
|
423
422
|
ok: true,
|
|
424
423
|
added: emoji
|
|
@@ -428,10 +427,9 @@ async function handleMatrixAction(ctx) {
|
|
|
428
427
|
const messageId = readStringParam(params, "messageId", { required: true });
|
|
429
428
|
const limit = readPositiveIntegerParam(params, "limit", { message: "limit must be a positive integer." });
|
|
430
429
|
const roomId = readRoomId(params);
|
|
431
|
-
const {
|
|
432
|
-
const reactions = await withReadTarget(roomId, async (
|
|
433
|
-
...
|
|
434
|
-
client: target.client,
|
|
430
|
+
const { withReadTarget } = prepareAction("reactions");
|
|
431
|
+
const reactions = await withReadTarget(roomId, async (resolvedRoom, actionOpts) => listMatrixReactions(resolvedRoom, messageId, {
|
|
432
|
+
...actionOpts,
|
|
435
433
|
limit: limit ?? void 0
|
|
436
434
|
}));
|
|
437
435
|
return jsonResult({
|
|
@@ -443,10 +441,9 @@ async function handleMatrixAction(ctx) {
|
|
|
443
441
|
const roomId = readStringParam(params, "roomId") ?? readStringParam(params, "channelId") ?? readStringParam(params, "to") ?? (ctx.toolContext?.currentChannelProvider === "matrix" ? ctx.toolContext.currentChannelId : void 0);
|
|
444
442
|
if (!roomId) throw new Error("Matrix emoji-list requires a roomId or current Matrix conversation.");
|
|
445
443
|
const limit = readPositiveIntegerParam(params, "limit", { message: "limit must be a positive integer." });
|
|
446
|
-
const {
|
|
447
|
-
const emojis = await withReadTarget(readRoomId({ roomId }), async (
|
|
448
|
-
...
|
|
449
|
-
client: target.client,
|
|
444
|
+
const { withReadTarget } = prepareAction("reactions");
|
|
445
|
+
const emojis = await withReadTarget(readRoomId({ roomId }), async (resolvedRoom, actionOpts) => listMatrixEmojis(resolvedRoom, {
|
|
446
|
+
...actionOpts,
|
|
450
447
|
limit
|
|
451
448
|
}));
|
|
452
449
|
return jsonResult({
|
|
@@ -461,27 +458,23 @@ async function handleMatrixAction(ctx) {
|
|
|
461
458
|
const after = readStringParam(params, "after");
|
|
462
459
|
const threadId = readStringParam(params, "threadId");
|
|
463
460
|
const messageId = readStringParam(params, "messageId");
|
|
464
|
-
const {
|
|
465
|
-
const result = await withReadTarget(roomId, async (
|
|
461
|
+
const { withReadTarget } = prepareAction("messages");
|
|
462
|
+
const result = await withReadTarget(roomId, async (resolvedRoom, actionOpts) => {
|
|
466
463
|
if (messageId) return {
|
|
467
|
-
messages: projectMatrixMessagesForDisplay([await readMatrixMessage(
|
|
468
|
-
|
|
469
|
-
client: target.client
|
|
470
|
-
})]),
|
|
471
|
-
roomId: target.roomId
|
|
464
|
+
messages: projectMatrixMessagesForDisplay([await readMatrixMessage(resolvedRoom, messageId, actionOpts)]),
|
|
465
|
+
roomId: resolvedRoom
|
|
472
466
|
};
|
|
473
|
-
const messages = await readMatrixMessages(
|
|
467
|
+
const messages = await readMatrixMessages(resolvedRoom, {
|
|
474
468
|
limit: limit ?? void 0,
|
|
475
469
|
before: before ?? void 0,
|
|
476
470
|
after: after ?? void 0,
|
|
477
471
|
threadId: threadId ?? void 0,
|
|
478
|
-
...
|
|
479
|
-
client: target.client
|
|
472
|
+
...actionOpts
|
|
480
473
|
});
|
|
481
474
|
return {
|
|
482
475
|
...messages,
|
|
483
476
|
messages: projectMatrixMessagesForDisplay(messages.messages),
|
|
484
|
-
roomId:
|
|
477
|
+
roomId: resolvedRoom,
|
|
485
478
|
...threadId ? { threadId } : {}
|
|
486
479
|
};
|
|
487
480
|
});
|
|
@@ -497,11 +490,8 @@ async function handleMatrixAction(ctx) {
|
|
|
497
490
|
trim: false
|
|
498
491
|
});
|
|
499
492
|
const roomId = readRoomId(params);
|
|
500
|
-
const {
|
|
501
|
-
const result = await withReadTarget(roomId, async (
|
|
502
|
-
...clientOpts,
|
|
503
|
-
client: target.client
|
|
504
|
-
}));
|
|
493
|
+
const { withReadTarget } = prepareAction("messages");
|
|
494
|
+
const result = await withReadTarget(roomId, async (resolvedRoom, actionOpts) => editMatrixMessage(resolvedRoom, messageId, content, actionOpts));
|
|
505
495
|
return jsonResult({
|
|
506
496
|
ok: true,
|
|
507
497
|
result
|
|
@@ -510,11 +500,10 @@ async function handleMatrixAction(ctx) {
|
|
|
510
500
|
if (action === "delete") {
|
|
511
501
|
const messageId = readStringParam(params, "messageId", { required: true });
|
|
512
502
|
const roomId = readRoomId(params);
|
|
513
|
-
const {
|
|
514
|
-
await withReadTarget(roomId, async (
|
|
503
|
+
const { withReadTarget } = prepareAction("messages");
|
|
504
|
+
await withReadTarget(roomId, async (resolvedRoom, actionOpts) => deleteMatrixMessage(resolvedRoom, messageId, {
|
|
515
505
|
reason: void 0,
|
|
516
|
-
...
|
|
517
|
-
client: target.client
|
|
506
|
+
...actionOpts
|
|
518
507
|
}));
|
|
519
508
|
return jsonResult({
|
|
520
509
|
ok: true,
|
|
@@ -527,20 +516,16 @@ async function handleMatrixAction(ctx) {
|
|
|
527
516
|
messageId: readStringParam(params, "messageId", { required: true })
|
|
528
517
|
};
|
|
529
518
|
const roomId = readRoomId(params);
|
|
530
|
-
const {
|
|
531
|
-
return await withReadTarget(roomId, async (
|
|
532
|
-
const actionOpts = {
|
|
533
|
-
...clientOpts,
|
|
534
|
-
client: target.client
|
|
535
|
-
};
|
|
519
|
+
const { withReadTarget } = prepareAction("pins");
|
|
520
|
+
return await withReadTarget(roomId, async (resolvedRoom, actionOpts) => {
|
|
536
521
|
if (request.kind !== "list") {
|
|
537
|
-
const result = await (request.kind === "pin" ? pinMatrixMessage : unpinMatrixMessage)(
|
|
522
|
+
const result = await (request.kind === "pin" ? pinMatrixMessage : unpinMatrixMessage)(resolvedRoom, request.messageId, actionOpts);
|
|
538
523
|
return jsonResult({
|
|
539
524
|
ok: true,
|
|
540
525
|
pinned: result.pinned
|
|
541
526
|
});
|
|
542
527
|
}
|
|
543
|
-
const result = await listMatrixPins(
|
|
528
|
+
const result = await listMatrixPins(resolvedRoom, actionOpts);
|
|
544
529
|
return jsonResult({
|
|
545
530
|
ok: true,
|
|
546
531
|
pinned: result.pinned,
|
|
@@ -571,11 +556,10 @@ async function handleMatrixAction(ctx) {
|
|
|
571
556
|
if (action === "member-info") {
|
|
572
557
|
const userId = readStringParam(params, "userId", { required: true });
|
|
573
558
|
const roomId = readRoomId(params);
|
|
574
|
-
const {
|
|
575
|
-
const result = await withReadTarget(roomId, async (
|
|
576
|
-
roomId:
|
|
577
|
-
...
|
|
578
|
-
client: target.client
|
|
559
|
+
const { withReadTarget } = prepareAction("memberInfo");
|
|
560
|
+
const result = await withReadTarget(roomId, async (resolvedRoom, actionOpts) => getMatrixMemberInfo(userId, {
|
|
561
|
+
roomId: resolvedRoom,
|
|
562
|
+
...actionOpts
|
|
579
563
|
}));
|
|
580
564
|
return jsonResult({
|
|
581
565
|
ok: true,
|
|
@@ -584,18 +568,15 @@ async function handleMatrixAction(ctx) {
|
|
|
584
568
|
}
|
|
585
569
|
if (action === "channel-info") {
|
|
586
570
|
const roomId = readRoomId(params);
|
|
587
|
-
const {
|
|
588
|
-
const result = await withReadTarget(roomId, async (
|
|
589
|
-
...clientOpts,
|
|
590
|
-
client: target.client
|
|
591
|
-
}));
|
|
571
|
+
const { withReadTarget } = prepareAction("channelInfo");
|
|
572
|
+
const result = await withReadTarget(roomId, async (resolvedRoom, actionOpts) => getMatrixRoomInfo(resolvedRoom, actionOpts));
|
|
592
573
|
return jsonResult({
|
|
593
574
|
ok: true,
|
|
594
575
|
room: result
|
|
595
576
|
});
|
|
596
577
|
}
|
|
597
578
|
if (action === "poll-vote") {
|
|
598
|
-
const {
|
|
579
|
+
const { withReadTarget } = prepareAction();
|
|
599
580
|
const roomId = readRoomId(params);
|
|
600
581
|
const pollId = readStringParam(params, "pollId") ?? readStringParam(params, "messageId");
|
|
601
582
|
if (!pollId) throw new Error("pollId required");
|
|
@@ -603,14 +584,11 @@ async function handleMatrixAction(ctx) {
|
|
|
603
584
|
const optionIndex = readPositiveIntegerParam(params, "pollOptionIndex", { message: "pollOptionIndex must be a positive integer." });
|
|
604
585
|
const optionIds = [...readStringArrayParam(params, "pollOptionIds") ?? [], ...optionId ? [optionId] : []];
|
|
605
586
|
const optionIndexes = [...readPollOptionIndexes(params), ...optionIndex !== void 0 ? [optionIndex] : []];
|
|
606
|
-
const result = await withReadTarget(roomId, async (
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
optionIndexes
|
|
612
|
-
});
|
|
613
|
-
});
|
|
587
|
+
const result = await withReadTarget(roomId, async (resolvedRoom, actionOpts) => voteMatrixPoll(resolvedRoom, pollId, {
|
|
588
|
+
...actionOpts,
|
|
589
|
+
optionIds,
|
|
590
|
+
optionIndexes
|
|
591
|
+
}));
|
|
614
592
|
return jsonResult({
|
|
615
593
|
ok: true,
|
|
616
594
|
result
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as __exportAll } from "./doctor-contract-
|
|
2
|
-
import { i as withStartedActionClient, n as withResolvedActionClient } from "./client-
|
|
3
|
-
import { n as formatMatrixEncryptionUnavailableError } from "./encryption-guidance-
|
|
1
|
+
import { i as __exportAll } from "./doctor-contract-CsTNmbMa.mjs";
|
|
2
|
+
import { i as withStartedActionClient, n as withResolvedActionClient } from "./client-DY3HExqI.mjs";
|
|
3
|
+
import { n as formatMatrixEncryptionUnavailableError } from "./encryption-guidance-BEjKbiMR.mjs";
|
|
4
4
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
5
|
import { setTimeout } from "node:timers/promises";
|
|
6
6
|
//#region extensions/matrix/src/matrix/actions/verification.ts
|
|
@@ -216,11 +216,10 @@ async function runMatrixSelfVerification(params) {
|
|
|
216
216
|
}
|
|
217
217
|
});
|
|
218
218
|
}
|
|
219
|
-
|
|
220
|
-
return await withTrackedMatrixVerification(opts,
|
|
221
|
-
return await crypto.acceptVerification(resolveVerificationId(requestId));
|
|
222
|
-
});
|
|
219
|
+
function createMatrixVerificationAction(run) {
|
|
220
|
+
return async (requestId, opts = {}) => await withTrackedMatrixVerification(opts, (crypto) => run(crypto, resolveVerificationId(requestId)));
|
|
223
221
|
}
|
|
222
|
+
const acceptMatrixVerification = createMatrixVerificationAction((crypto, id) => crypto.acceptVerification(id));
|
|
224
223
|
async function cancelMatrixVerification(requestId, opts = {}) {
|
|
225
224
|
return await withTrackedMatrixVerification(opts, async (crypto) => {
|
|
226
225
|
return await crypto.cancelVerification(resolveVerificationId(requestId), {
|
|
@@ -234,11 +233,7 @@ async function startMatrixVerification(requestId, opts = {}) {
|
|
|
234
233
|
return await crypto.startVerification(resolveVerificationId(requestId), opts.method ?? "sas");
|
|
235
234
|
});
|
|
236
235
|
}
|
|
237
|
-
|
|
238
|
-
return await withTrackedMatrixVerification(opts, async (crypto) => {
|
|
239
|
-
return await crypto.generateVerificationQr(resolveVerificationId(requestId));
|
|
240
|
-
});
|
|
241
|
-
}
|
|
236
|
+
const generateMatrixVerificationQr = createMatrixVerificationAction((crypto, id) => crypto.generateVerificationQr(id));
|
|
242
237
|
async function scanMatrixVerificationQr(requestId, qrDataBase64, opts = {}) {
|
|
243
238
|
return await withTrackedMatrixVerification(opts, async (crypto) => {
|
|
244
239
|
const payload = qrDataBase64.trim();
|
|
@@ -246,11 +241,7 @@ async function scanMatrixVerificationQr(requestId, qrDataBase64, opts = {}) {
|
|
|
246
241
|
return await crypto.scanVerificationQr(resolveVerificationId(requestId), payload);
|
|
247
242
|
});
|
|
248
243
|
}
|
|
249
|
-
|
|
250
|
-
return await withTrackedMatrixVerification(opts, async (crypto) => {
|
|
251
|
-
return await crypto.getVerificationSas(resolveVerificationId(requestId));
|
|
252
|
-
});
|
|
253
|
-
}
|
|
244
|
+
const getMatrixVerificationSas = createMatrixVerificationAction((crypto, id) => crypto.getVerificationSas(id));
|
|
254
245
|
async function confirmMatrixVerificationSas(requestId, opts = {}) {
|
|
255
246
|
return await withTrackedMatrixVerification(opts, async (crypto, client) => {
|
|
256
247
|
const summary = await crypto.confirmVerificationSas(resolveVerificationId(requestId));
|
|
@@ -258,16 +249,8 @@ async function confirmMatrixVerificationSas(requestId, opts = {}) {
|
|
|
258
249
|
return summary;
|
|
259
250
|
});
|
|
260
251
|
}
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
return await crypto.mismatchVerificationSas(resolveVerificationId(requestId));
|
|
264
|
-
});
|
|
265
|
-
}
|
|
266
|
-
async function confirmMatrixVerificationReciprocateQr(requestId, opts = {}) {
|
|
267
|
-
return await withTrackedMatrixVerification(opts, async (crypto) => {
|
|
268
|
-
return await crypto.confirmVerificationReciprocateQr(resolveVerificationId(requestId));
|
|
269
|
-
});
|
|
270
|
-
}
|
|
252
|
+
const mismatchMatrixVerificationSas = createMatrixVerificationAction((crypto, id) => crypto.mismatchVerificationSas(id));
|
|
253
|
+
const confirmMatrixVerificationReciprocateQr = createMatrixVerificationAction((crypto, id) => crypto.confirmVerificationReciprocateQr(id));
|
|
271
254
|
async function getMatrixEncryptionStatus(opts = {}) {
|
|
272
255
|
return await withResolvedActionClient(opts, async (client) => {
|
|
273
256
|
const crypto = requireCrypto(client, opts);
|
package/dist/api.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { a as resolveConfiguredMatrixAccountIds, i as requiresExplicitMatrixDefaultAccount, n as findMatrixAccountEntry, o as resolveMatrixChannelConfig, s as resolveMatrixDefaultOrOnlyAccountId } from "./.setup/account-selection-
|
|
1
|
+
import { a as resolveConfiguredMatrixAccountIds, i as requiresExplicitMatrixDefaultAccount, n as findMatrixAccountEntry, o as resolveMatrixChannelConfig, s as resolveMatrixDefaultOrOnlyAccountId } from "./.setup/account-selection-BDeeqwwR.mjs";
|
|
2
2
|
import { n as listMatrixEnvAccountIds, r as resolveMatrixEnvAccountToken, t as getMatrixScopedEnvVarNames } from "./.setup/env-vars-dGqak9dN.mjs";
|
|
3
3
|
import { a as resolveMatrixCredentialsFilename, i as resolveMatrixCredentialsDir, l as sanitizeMatrixPathSegment, o as resolveMatrixCredentialsPath, r as resolveMatrixAccountStorageRoot, s as resolveMatrixHomeserverKey, t as hashMatrixAccessToken } from "./.setup/storage-paths-B51JM-pC.mjs";
|
|
4
|
-
import { t as matrixPlugin } from "./.setup/channel-
|
|
5
|
-
import { n as matrixSetupAdapter, t as createMatrixSetupWizardProxy } from "./.setup/setup-core-
|
|
4
|
+
import { t as matrixPlugin } from "./.setup/channel-CeRXEAEP.mjs";
|
|
5
|
+
import { n as matrixSetupAdapter, t as createMatrixSetupWizardProxy } from "./.setup/setup-core-6DppLENo.mjs";
|
|
6
6
|
import { d as setMatrixThreadBindingMaxAgeBySessionKey, l as setMatrixThreadBindingIdleTimeoutBySessionKey, n as getMatrixThreadBindingManager } from "./.setup/thread-bindings-shared-hxKkYC1W.mjs";
|
|
7
|
-
import { t as matrixOnboardingAdapter } from "./.setup/onboarding-
|
|
8
|
-
import { t as createMatrixThreadBindingManager } from "./.setup/thread-bindings-
|
|
7
|
+
import { t as matrixOnboardingAdapter } from "./.setup/onboarding-Cm_tOJxs.mjs";
|
|
8
|
+
import { t as createMatrixThreadBindingManager } from "./.setup/thread-bindings-DveHVZqN.mjs";
|
|
9
9
|
export { createMatrixSetupWizardProxy, createMatrixThreadBindingManager, findMatrixAccountEntry, getMatrixScopedEnvVarNames, getMatrixThreadBindingManager, hashMatrixAccessToken, listMatrixEnvAccountIds, matrixOnboardingAdapter, matrixOnboardingAdapter as matrixSetupWizard, matrixPlugin, matrixSetupAdapter, requiresExplicitMatrixDefaultAccount, resolveConfiguredMatrixAccountIds, resolveMatrixAccountStorageRoot, resolveMatrixChannelConfig, resolveMatrixCredentialsDir, resolveMatrixCredentialsFilename, resolveMatrixCredentialsPath, resolveMatrixDefaultOrOnlyAccountId, resolveMatrixEnvAccountToken, resolveMatrixHomeserverKey, sanitizeMatrixPathSegment, setMatrixThreadBindingIdleTimeoutBySessionKey, setMatrixThreadBindingMaxAgeBySessionKey };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as matrixPlugin } from "./.setup/channel-
|
|
1
|
+
import { t as matrixPlugin } from "./.setup/channel-CeRXEAEP.mjs";
|
|
2
2
|
export { matrixPlugin };
|
package/dist/cli-metadata.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as registerMatrixCliMetadata, t as cli_metadata_default } from "./.setup/cli-metadata-
|
|
1
|
+
import { n as registerMatrixCliMetadata, t as cli_metadata_default } from "./.setup/cli-metadata-CtcjBFhc.mjs";
|
|
2
2
|
export { cli_metadata_default as default, registerMatrixCliMetadata };
|
package/dist/contract-api.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { c as singleAccountKeysToMove, n as matrixSetupAdapter, o as namedAccountPromotionKeys, s as resolveSingleAccountPromotionTarget } from "./.setup/setup-core-
|
|
2
|
-
import { t as matrixOnboardingAdapter } from "./.setup/onboarding-
|
|
1
|
+
import { c as singleAccountKeysToMove, n as matrixSetupAdapter, o as namedAccountPromotionKeys, s as resolveSingleAccountPromotionTarget } from "./.setup/setup-core-6DppLENo.mjs";
|
|
2
|
+
import { t as matrixOnboardingAdapter } from "./.setup/onboarding-Cm_tOJxs.mjs";
|
|
3
3
|
export { matrixSetupAdapter, matrixOnboardingAdapter as matrixSetupWizard, namedAccountPromotionKeys, resolveSingleAccountPromotionTarget, singleAccountKeysToMove };
|