EPIC: Matrix/Element Bridge Integration #377

Closed
opened 2026-02-15 07:00:19 +00:00 by jason.woltje · 0 comments
Owner

Overview

Add Matrix protocol support as an alternative chat platform bridge alongside Discord. The existing IChatProvider interface (apps/api/src/bridge/interfaces/chat-provider.interface.ts) already abstracts platform-specific details — this epic adds a Matrix implementation.

Motivation

  • Replace Discord dependency (privacy concerns, ID verification requirements)
  • E2EE agent control via Element clients (mobile, desktop, web)
  • Federated protocol — no vendor lock-in
  • Matrix rooms provide natural workspace isolation
  • Element clients available on all platforms without app store dependency

Architecture

Matrix complements the existing communication stack:

Layer Current After Matrix
Internal real-time (PWA) Socket.IO Socket.IO (unchanged)
Job queue BullMQ + Valkey BullMQ + Valkey (unchanged)
Status broadcasting Herald Service Herald + Matrix output adapter
External control Discord bridge Discord + Matrix bridges (both via IChatProvider)
AI chat streaming Unimplemented Matrix message edits enable streaming

Key Integration Points

  • IChatProvider — Matrix service implements existing interface
  • CommandParser — Shared across all bridges (platform-agnostic)
  • Herald — Needs Matrix output adapter for status broadcasts
  • BridgeModule — Register MatrixService alongside DiscordService
  • Workspace → Matrix Room mapping (1:1)

Sub-Issues

See linked issues in this milestone for implementation breakdown.

## Overview Add Matrix protocol support as an alternative chat platform bridge alongside Discord. The existing `IChatProvider` interface (`apps/api/src/bridge/interfaces/chat-provider.interface.ts`) already abstracts platform-specific details — this epic adds a Matrix implementation. ## Motivation - Replace Discord dependency (privacy concerns, ID verification requirements) - E2EE agent control via Element clients (mobile, desktop, web) - Federated protocol — no vendor lock-in - Matrix rooms provide natural workspace isolation - Element clients available on all platforms without app store dependency ## Architecture Matrix **complements** the existing communication stack: | Layer | Current | After Matrix | |-------|---------|-------------| | Internal real-time (PWA) | Socket.IO | Socket.IO (unchanged) | | Job queue | BullMQ + Valkey | BullMQ + Valkey (unchanged) | | Status broadcasting | Herald Service | Herald + Matrix output adapter | | External control | Discord bridge | Discord + Matrix bridges (both via IChatProvider) | | AI chat streaming | Unimplemented | Matrix message edits enable streaming | ## Key Integration Points - `IChatProvider` — Matrix service implements existing interface - `CommandParser` — Shared across all bridges (platform-agnostic) - `Herald` — Needs Matrix output adapter for status broadcasts - `BridgeModule` — Register MatrixService alongside DiscordService - Workspace → Matrix Room mapping (1:1) ## Sub-Issues See linked issues in this milestone for implementation breakdown.
jason.woltje added the apiapi labels 2026-02-15 07:00:19 +00:00
jason.woltje added this to the M12-MatrixBridge (0.0.12) milestone 2026-02-15 07:01:50 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mosaic/stack#377