medre-adapter-xmpp
The XMPP adapter for MEDRE.
Install
The XMPP adapter requires Python 3.13 or later because Slixmpp requires it. Use uv to install MEDRE and this adapter in the same persistent tool environment:
uv tool install --python 3.13 medre
medre adapters install xmpp
No sibling clones are required. On Windows, the package-changing command prints a uv installation command to run after MEDRE exits. Adapter installation defaults to package-index requirements; existing saved Git requests and catalogs are preserved. For a locked uv deployment project, private Git sources, local checkouts, and the same-environment requirement, see the adapter installation guide.
When a wheel is unavailable for your Python version and platform, the pinned Slixmpp dependency builds from source. That build uses a Rust toolchain. See the Slixmpp build notes.
Configure
Create an account on an XMPP server with a publicly trusted TLS certificate and join permissions for the selected rooms. Protect the runtime config as private.
medre config native --transport xmpp --adapter-id chat collects the connection
fields offline: the account JID, an optional password, the optional room
nickname, and optional host/port overrides. The form contacts no server, writes
a private YAML file only after the typed config validates, and stores an entered
password only in that file. Creating the TLS account, selecting rooms and peers,
and granting join permissions stay manual: the form references an existing
account and cannot provision one.
adapters:
xmpp:
chat:
adapter_kind: real
jid: bridge@example.org/medre
nickname: medre
rooms: [bridge@conference.example.org]
peers: [friend@example.org]
origin_label: XMPP
routes: {}
Set MEDRE_ADAPTER__CHAT__PASSWORD in the process environment through the secret
management mechanism used for the deployment; an environment override keeps
precedence over a password stored in the file. Both the account's
domain and configured conversations use prepared JIDs. Host and port overrides
are optional and must appear together; omit both to use DNS SRV discovery. The
connection requires verified TLS and offers no plaintext or certificate-check
bypass. Transport encryption is not end-to-end encryption.
Use medre config bridge to connect the instance to another configured adapter.
Use the room's bare JID as its context, or a configured peer's bare JID for a
direct conversation. medre routes plan previews the routes offline. The
adapter rejects destinations absent from rooms and peers and does not infer
rooms from server names. The source side of room messages identifies the actual
occupant (room@service/nick); direct messages use the contact's bare JID.
medre config sample includes SDK-free fake XMPP values after installation.
Fake smoke evidence exercises routing and rendering; it proves no server login
or native transport delivery. For server selection, certificate requirements,
and troubleshooting, see the
XMPP setup guide.
Verify
Confirm the installed adapter and the saved configuration resolve:
medre adapters check --config connections.yaml
Startup joins every configured room before readiness; the setup guide's Verify section shows the bridge checks and a healthy start.
Behavior
- Relay text with MEDRE's shared attribution formatter.
relay_prefixdefaults to[{origin_label}] {sender}:followed by a space; an empty string suppresses it. - Join every configured MUC room before readiness, request zero history, and rejoin after disconnect. Authentication rejection requires operator action.
- Exclude self echoes, delayed history, bodyless typing/receipt notifications, and unsupported edit/retract/reaction compatibility bodies.
- Bridge native replies with destination-scoped references and readable quote fallback; use textual relation fallback when the native target is unavailable.
- Preserve bounded XEP-0393 presentation and explicit unstyled content; retain plain text when semantic styles cannot be represented safely.
- Forward opt-in transient typing through XEP-0085, with negotiated direct peers and configured MUC rooms; activity stays outside message history.
- Bound pending inbound work and reject oversized output without silent clipping.
- Correlate own MUC echoes with trusted room-issued IDs, with bounded waits; missing correlation does not turn a completed transport write into a retry.
- Report local TLS transport writes separately from recipient delivery/read state.
- Record supplied native metadata honestly: the negotiated TLS state on the
transport slot, the room's XEP-0421 occupant-id, and a bounded opted-in
public_factsprojection (message type, stanza-ID trust outcome) feeding core's bridge context. None of these imply end-to-end encryption or sender authority.
This live bridge does not recover offline messages or room archives. XHTML, attachments, presence, read receipts, native mutations, OMEMO and puppeting are not implemented or advertised. The protocol design explains the standards and seams for those extensions. The adapter contract defines behavior; configuration and native metadata schemas publish the shapes.
Development
Keep the core checkout and adapter checkout anywhere. From the core checkout:
uv sync --locked --extra dev
uv run --no-sync medre dev sync --sources /path/to/sources.yaml \
--editable xmpp=/path/to/medre-adapter-xmpp xmpp
uv run --no-sync medre dev test --sources /path/to/sources.yaml \
--editable xmpp=/path/to/medre-adapter-xmpp xmpp -- -q
To opt into Git development, a custom source catalog can provide an xmpp
alias (pin a full merged commit for reproducibility):
adapters:
xmpp: medre-adapter-xmpp @ git+https://github.com/jeremiah-k/medre-adapter-xmpp.git@main
Use medre adapters install xmpp --sources /path/to/sources.yaml with that
catalog. The catalog chooses package sources; runtime YAML contains connection
settings. The source catalog above adds the alias while the editable path
selects the actual checkout. Use dev sync --sdk to install native
dependencies, then the SDK-only selection in contributing
for pinned SDK contracts. Keep the same catalog and editable selection on both
commands; a local .medre-dev.yaml profile can remember them. No temporary
core branch is recorded in package requirements, lockfiles or CI variables.
For an existing Python environment, install the chosen core checkout and this
adapter using that interpreter's pip interface. The deterministic suite needs
core's dev dependencies; the SDK tier additionally needs the pinned Slixmpp SDK.
CI checks core main, resolved once per run, on Python 3.13–3.15 with SDK-free
and native SDK jobs. Keep MEDRE_CORE_REF unset; core_ref is a one-run
qualification input, not a committed dependency.
An authenticated live-server test is separate from these offline checks.
See contributing for the shared Trunk quality gate.
Opt-in native server proof
A two-account test verifies actual MUC ingress and direct egress. Use a dedicated
test server that permits temporary MUC creation. The test creates a uniquely
named room and destroys it in cleanup; it never configures an existing room.
Set MEDRE_XMPP_TEST_CONFIG to a private JSON file outside the checkout:
{
"bot_jid": "bot@example.org/medre",
"bot_password": "REPLACE_IN_PRIVATE_FILE",
"peer_jid": "peer@example.org/test",
"peer_password": "REPLACE_IN_PRIVATE_FILE",
"muc_domain": "conference.example.org"
}
Optional host and port entries override DNS discovery together. For a local
server using a dedicated test CA, SSL_CERT_FILE can select that trusted CA;
certificate validation and hostname checks stay enabled. Run the adapter suite
with -m live after installing its SDK. Credentials, private keys and runtime
state stay outside Git. The offline CI jobs do not start an authenticated server.
Discovery cleanup
Stopping an XMPP connection cancels and awaits its pending entity-capability lookups as well as session setup and outgoing filters. Capability discovery remains enabled while connected; unanswered peer queries cannot retain background callbacks after shutdown.
Metadata
Release files for medre-adapter-xmpp 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| medre_adapter_xmpp-0.3.0.tar.gz | 76.3 kB | With provenance | Details for medre_adapter_xmpp-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| medre_adapter_xmpp-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for medre_adapter_xmpp-0.3.0-py3-none-any.whl |
Total release size: 117.5 kB
Release files / medre_adapter_xmpp-0.3.0.tar.gz
| Download URL | medre_adapter_xmpp-0.3.0.tar.gz |
|---|---|
| Size | 76.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fe1460fe865ea742d029a5a131fd7075147254b32844e332485f59a9dbdd9bec
|
|
BLAKE2b-256 checksum How to use checksums |
3c5c575a0d5b22224b922ed9f5f050aa0cfa76126eb564455c1b8cb32d9cda08
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.
Transparency logRelease files / medre_adapter_xmpp-0.3.0-py3-none-any.whl
| Download URL | medre_adapter_xmpp-0.3.0-py3-none-any.whl |
|---|---|
| Size | 41.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f4291a559d13aa997da3ffa23a8a3cbdc5b5fa762ecc699fcd54ab795f28b6c7
|
|
BLAKE2b-256 checksum How to use checksums |
a5674500195056e533ac7674946ef54313c8514ddab889a278c47462e8bb7681
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.
Transparency logSecurity for medre-adapter-xmpp 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for medre_adapter_xmpp-0.3.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.