Skip to content

Add Matrix adapter scaffold#13

Merged
mdheller merged 2 commits intomainfrom
work/matrix-adapter-scaffold-rebased
Apr 30, 2026
Merged

Add Matrix adapter scaffold#13
mdheller merged 2 commits intomainfrom
work/matrix-adapter-scaffold-rebased

Conversation

@mdheller
Copy link
Copy Markdown
Contributor

Summary

Adds a dependency-free Matrix adapter scaffold for AgentTerm.

This PR replaces stale PR #12 with the same tested Matrix normalization and posture boundary rebased on current main after the Policy Fabric scaffold merge.

It adds:

  • MatrixE2EEPosture for encrypted-room posture decisions.
  • MatrixRoomEvent normalized event model.
  • MatrixAdapter for room-event normalization, E2EE posture checks, and prepared emit events.
  • Normalization for room ID, alias, event ID, sender MXID, event type, thread root, redactions, membership changes, bridge metadata, and E2EE posture.
  • Tests for threaded messages, bridge metadata, redactions, membership, sensitive-context blocking, verified encrypted rooms, and emit preparation.

Boundary decisions

  • Matrix remains the canonical ChatOps transport.
  • Slack/Discord remain bridge targets represented as metadata, not authority.
  • AgentTerm preserves Matrix metadata instead of flattening messages into generic chat.
  • Sensitive context release fails closed when encrypted-room posture is unknown or unverified.
  • This does not add live homeserver network I/O yet; it creates the contract and test harness for that next step.

Validation

Expected CI:

ruff check .
pytest

Part of #2. Replaces #12.

@mdheller mdheller merged commit c987275 into main Apr 30, 2026
1 check passed
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