Skip to main content

Matrix

This is a shipped runtime-backed surface: direct sends are implemented, the serve loop is implemented, and the channel can join multi-channel-serve or gateway run.

At A Glance

FieldValue
Catalog idmatrix
Config keymatrix
Implementation statusruntime_backed
Transportmatrix_client_server_sync
Aliasesnone
Default send target kindconversation

Minimal Config

[matrix]
enabled = true
base_url = "https://matrix.example.org"
user_id = "@loongbot:example.org"
access_token_env = "MATRIX_ACCESS_TOKEN"
allowed_room_ids = ["!ops:example.org"]

Smoke Test

loong matrix-send --target "!ops:example.org" --text "hello from loong"
loong matrix-serve --once

Command Surface

OperationCommandUsage or status
direct sendmatrix-sendUsage: loong matrix-send [OPTIONS] —target <TARGET> —text <TEXT>
sync reply loopmatrix-serveUsage: loong matrix-serve [OPTIONS]

Required Fields For Send

RequirementConfig pathsEnv pointer pathsDefault env
channel enabledmatrix.enabled
matrix.accounts.<account>.enabled
nonenone
access tokenmatrix.access_token
matrix.accounts.<account>.access_token
matrix.access_token_env
matrix.accounts.<account>.access_token_env
MATRIX_ACCESS_TOKEN
homeserver base urlmatrix.base_url
matrix.accounts.<account>.base_url
nonenone

Required Fields For Serve

RequirementConfig pathsEnv pointer pathsDefault env
channel enabledmatrix.enabled
matrix.accounts.<account>.enabled
nonenone
access tokenmatrix.access_token
matrix.accounts.<account>.access_token
matrix.access_token_env
matrix.accounts.<account>.access_token_env
MATRIX_ACCESS_TOKEN
homeserver base urlmatrix.base_url
matrix.accounts.<account>.base_url
nonenone
allowed room idsmatrix.allowed_room_ids
matrix.accounts.<account>.allowed_room_ids
nonenone
user id when ignore_self_messages is enabledmatrix.user_id
matrix.accounts.<account>.user_id
nonenone

Gateway And Ownership

This surface can run directly through its own *-serve command, or under Gateway And Supervision through multi-channel-serve and gateway run.

Operator Notes

  • Point base_url at the homeserver, not a Matrix web client URL.
  • Set user_id when self-message filtering matters for the room topology.