Back to Openclaw

Matrix Spec Support

extensions/matrix/SPEC-SUPPORT.md

2026.5.514.1 KB
Original Source

Matrix Spec Support

Current Matrix spec/event support tracked for the bundled Matrix plugin.

Scope:

  • code-backed today-state only
  • plugin behavior only; not a claim of full Matrix spec coverage
  • update this file when adding or removing Matrix event/spec support

Legend:

  • in: inbound handling
  • out: outbound send/edit/emit
  • tools: CLI/action/runtime tooling built on that surface

Support Matrix

SurfaceSpec / event idsSupportNotesEvidence
Core messagesm.room.messagein/out/toolsbase text/media message surfacesrc/matrix/send/types.ts, src/matrix/actions/messages.ts
Rich textorg.matrix.custom.htmloutMarkdown rendered to Matrix HTMLsrc/matrix/send/formatting.ts
Repliesm.in_reply_toin/outreply relation supportsrc/matrix/send/formatting.ts
Editsm.replacein/out/toolsMatrix edit flow; edit body uses * <text> fallback formatsrc/matrix/send/types.ts, src/matrix/draft-stream.test.ts
Threadsm.threadin/out/toolsthread send, routing, session/thread policysrc/matrix/send/types.ts, src/matrix/monitor/types.ts, src/matrix/monitor/threads.test.ts
Direct roomsm.directin/out/toolsDM routing, cache, repair, outbound target selectionsrc/matrix/send/types.ts, src/matrix/sdk.ts, src/matrix/send/targets.test.ts, src/matrix/direct-management.test.ts
Reactionsm.reaction, m.annotationin/out/toolssend, summarize, inbound reaction routingsrc/matrix/reaction-common.ts, src/matrix/monitor/reaction-events.test.ts
Read receiptsm.readoutsent on inbound message receiptsrc/matrix/sdk.ts, src/matrix/monitor/handler.ts
Typingtyping APIouttyping keepalive while reply runssrc/matrix/sdk.ts, src/matrix/send.ts, src/matrix/monitor/handler.ts
Mentionsm.mentionsin/out/toolsstable mention metadata on sends/edits/media captions/poll fallback textsrc/matrix/send/formatting.ts, src/matrix/monitor/mentions.ts, src/matrix/send.test.ts
Mention link compathttps://matrix.to/#/...in/outemit + validate visible-label mentions in formatted HTMLsrc/matrix/format.ts, src/matrix/monitor/mentions.ts
Pollsm.poll.start, m.poll.response, m.poll.endin/out/toolsstable poll create/read/vote/summary flowsrc/matrix/poll-types.ts, src/matrix/actions/polls.ts, src/matrix/poll-summary.ts
Poll compatorg.matrix.msc3381.poll.start, org.matrix.msc3381.poll.response, org.matrix.msc3381.poll.endin/outunstable poll compat still emitted/parsed where neededsrc/matrix/poll-types.ts, src/matrix/send.test.ts
Poll relationsm.referencein/out/toolspoll votes/results linked to root poll eventsrc/matrix/poll-types.ts, src/matrix/actions/polls.ts, src/matrix/poll-summary.ts
Extensible text fallbackorg.matrix.msc1767.textin/outpoll text fallback/compatsrc/matrix/poll-types.ts
Voice messagesorg.matrix.msc3245.voiceoutvoice-bubble marker on compatible audio sendssrc/matrix/send/media.ts, src/matrix/send/types.ts
Voice audio metadataorg.matrix.msc1767.audiooutduration metadata for voice sendssrc/matrix/send/media.ts, src/matrix/send/types.ts
Locationm.location, geo:ininbound parse to text/context; no outbound location send tracked heresrc/matrix/monitor/types.ts, src/matrix/monitor/location.ts, src/matrix/monitor/handler.ts
E2EE room eventsm.room.encryptedin/out/toolsencrypted event hydration, decrypt, encrypted media sendsrc/matrix/monitor/types.ts, src/matrix/sdk.ts, docs/channels/matrix.md
Encrypted media previewsfile, thumbnail_fileoutencrypted thumbnails for encrypted image eventssrc/matrix/send/media.ts, docs/channels/matrix.md
Device verificationm.key.verification.*, m.key.verification.requestin/toolsrequest/ready/start/SAS/done/cancel notices and CLI flowssrc/matrix/monitor/verification-utils.ts, src/matrix/monitor/events.test.ts, docs/channels/matrix.md
Streaming/live markersorg.matrix.msc4357.liveoutlive draft/edit markers for partial streamingsrc/matrix/send/types.ts, src/matrix/send.ts, src/matrix/draft-stream.ts

Explicit MSCs In Use

These MSCs are explicitly referenced in the plugin today:

  • MSC3381: polls
  • MSC1767: extensible-events fallback fields used for polls and voice metadata
  • MSC3245: voice message marker
  • MSC4357: live streaming marker

Evidence:

  • src/matrix/poll-types.ts
  • src/matrix/send/media.ts
  • src/matrix/send/types.ts
  • src/matrix/draft-stream.ts

Non-goals

This file does not claim:

  • full client-server API coverage
  • full room-state/event coverage inherited from matrix-js-sdk
  • outbound support for any surface not listed above

If a new Matrix feature lands, add a row with:

  1. exact event/spec id
  2. support shape (in, out, tools)
  3. at least one code path proving it

Missing / Candidate Specs

Recommended next additions, prioritized by user-visible value and closeness to current code:

PrioritySurfaceSpec / event idsWhy add itCurrent gap
highSticker messagesm.stickerstable spec; common client surface; we already classify sticker attachments on read pathsno explicit inbound m.sticker event handling and no outbound sticker send path
highOutbound location messagesm.location, geo_uristable spec; docs already say Matrix supports location, but current implementation is inbound-onlyno outbound location send/action API
mediumPrivate + richer read markersm.read.private, m.fully_readstable spec; better privacy and cleaner read-state behavior than public-only m.readcurrent code only sends public m.read receipts
mediumThread-aware receiptsm.read with thread_idstable spec; better alignment with Matrix thread UXcurrent receipt send path has no thread_id support
mediumUnread markersm.marked_unreadstable spec; useful for operator workflows and room triage toolingno room account-data support for unread markers
lowEmote messagesm.emotestable spec; easy parity win for bots/action toolsno explicit send/action support
lowPoll close paritym.poll.end, org.matrix.msc3381.poll.endcompletes the poll lifecycle on a surface we already parseplugin parses poll-end events but does not expose an outbound close flow
lowAnimated media metadatainfo.is_animated on m.image / m.stickernewer stable metadata; helps clients decide whether to fetch/render animated originalsmedia info builders do not populate animation metadata

Why these are listed

  • m.sticker is a stable spec surface in the latest Matrix Client-Server API, and the plugin already has partial sticker awareness in message summarization.
  • m.location is a stable spec surface in the latest Matrix Client-Server API. The plugin currently parses inbound location events from geo_uri, but does not send them.
  • m.read.private, m.fully_read, and threaded receipts are stable read-marker/read-receipt surfaces in the latest Matrix Client-Server API. The plugin currently posts plain m.read receipts only.
  • m.marked_unread is a stable room account-data surface in the latest Matrix Client-Server API and would be useful if Matrix actions grow more operator/client-like room triage controls.
  • m.emote is a stable message type and a relatively small addition compared with the items above.
  • m.poll.end is already represented in local poll types, so exposing a close-poll send/tool flow is a contained follow-up.
  • info.is_animated is a smaller metadata-parity item, but easy to miss once sticker support exists.

Probably not worth prioritizing here

  • VoIP / m.call.*: valid Matrix spec area and a plausible future direction here, just not a near-term priority relative to messaging, receipt, and room-state gaps.

Gap Evidence

  • sticker partial only: src/matrix/media-text.ts
  • location inbound only: src/matrix/monitor/location.ts, src/matrix/monitor/handler.ts
  • public receipt only: src/matrix/sdk.ts, src/matrix/send.ts, src/matrix/monitor/handler.ts
  • poll-end constants only: src/matrix/poll-types.ts
  • no animation metadata emit: src/matrix/send/media.ts

External Spec References