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 gateway run 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 channels send matrix --target "!ops:example.org" --text "hello from loong"
loong channels serve matrix --once

Command Surface

OperationCommandUsage or status
direct sendchannels send matrixUsage: loong channels send matrix [OPTIONS] —target <TARGET> —text <TEXT>
sync reply loopchannels serve matrixUsage: loong channels serve matrix [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 channels serve matrix, or under Gateway And Supervision through 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.