Skip to content

adr: gateway — Matrix (continuwuity) + mautrix-go, separate Go gateway process#34

Open
cyber-ayi wants to merge 1 commit into
mainfrom
ops/adr-gateway-matrix-mautrix-go
Open

adr: gateway — Matrix (continuwuity) + mautrix-go, separate Go gateway process#34
cyber-ayi wants to merge 1 commit into
mainfrom
ops/adr-gateway-matrix-mautrix-go

Conversation

@cyber-ayi

Copy link
Copy Markdown
Collaborator

Resolves [exploration/gateway-selection.md] and the ROADMAP gateway gate. Operator-acked 2026-06-25 across a multi-agent third-party gateway + SDK review (a WebFetch summarizer hallucinated mautrix-go's license as AGPL — corrected to MPL-2.0 via the GitHub API).

Decision

Matrix (self-hosted continuwuity, federation-off, plaintext rooms, E2EE-off) + mautrix-go pure client (not bridgev2) run as a separate thin Go gateway process talking to the Python L3 over the IPC seam. Python co-location downgraded to a soft preference; polyglot goes 2 → 3 languages.

Privacy = self-hosting + federation-off (content stays on our box), so the E2EE×bot friction is sidestepped by not running E2EE.

Why this over the prior AstrBot-over-Discord lean

A later pass made Discord a soft constraint and added Matrix/XMPP/Signal/Telegram:

Candidate Verdict
AstrBot (old MVP) ❌ full agent framework w/ own cognition → violates transport-not-brain; AGPL
Telegram / Discord ❌ bot chats non-E2EE, plaintext on third-party cloud → adr-0005 (can't carry secrets)
Signal 🔶 only E2EE+cold-push but pseudo-self-host + heaviest ops; conditional
XMPP + slixmpp kept fallback (lightest ops, healthy SDK; loses on Element UX) — channel is swappable behind the transport seam
matrix-nio ❌ semi-stalled (last release 2024-10), reconnect self-built
mautrix-python ❌ bridge module deprecated, migrated to Go
mautrix-go ✅ healthiest Matrix lib (monthly train, v0.28.1); powers the 7×24 prod bridges; since-token resume + reconnect; Go static binary; MPL-2.0 doesn't infect Python L3

Eliminates gateway-selection's "one real risk" (bypassing AstrBot's cognition) — a pure protocol has none.

Caveats recorded in the ADR

bus-factor=1 (tulir; Go doesn't fix it — pin + fork-ready); default reconnect fixed 10s (customize Syncer.OnFailedSync); continuwuity↔tuwunel fork-churn (conduwuit archived 2026-05-29) — recheck active branch; gateway must stay thin (pure send/recv, no cognition).

Files

  • decisions/adr-pending-37140cf6-gateway-matrix-mautrix-go.md (numbered on merge)
  • exploration/gateway-selection.md — resolved → this ADR
  • ROADMAP.md — gateway gate + Open-explorations row

Depends conceptually on the L2 harness ADR (#33) but touches disjoint files — no merge conflict.

🤖 Generated with Claude Code

…y process

Resolve the operator↔agent channel decision (operator-acked 2026-06-25,
multi-agent third-party gateway + SDK review).

- decisions/adr-pending-37140cf6-gateway-matrix-mautrix-go.md — Matrix, self-
  hosted continuwuity, federation-off, plaintext, E2EE-off; SDK = mautrix-go pure
  client (not bridgev2) as a thin Go gateway process over the IPC seam. Python
  co-location downgraded to soft preference; polyglot 2→3 langs. Rejected: AstrBot
  (transport-not-brain), Telegram/Discord (adr-0005, non-E2EE cloud), Signal
  (pseudo-self-host), matrix-nio / mautrix-python (ailing SDKs). XMPP+slixmpp kept
  as swappable fallback.
- exploration/gateway-selection.md — resolved → this ADR; supersedes the prior
  AstrBot-over-Discord lean.
- ROADMAP.md — gateway gate + Open-explorations row updated.

Session-Id: 019f02bb-6523-7115-a7b6-3fe0adfdda4c
Agent: cc-rc-bot

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant