semprini-core now refuses /_synapse/admin/* at the edge (SR-05) — it needed
no auth of its own and let anyone on the internet create or deactivate
Matrix accounts given the registration shared secret. This script already
reads that secret straight out of the user-synapse container; it now
resolves the container's semprini_internal address the same way
semprini-core's scripts/setup-matrix-alerts.py does, and uses it for every
call instead of the public hostname.
Verified live against the real maintainer bot account: it found the
existing token still valid and re-used the existing room, unchanged.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Two independent bugs:
1. 429 "long context" — agentic sessions read enough files to exceed the
200K standard window; on the default [1m] model Synapse escalates into
the paid 1M tier. Pin claude_model to claude-opus-4-8 (200K window)
so Claude Code compacts context instead. Updated config.example.json
and the maintainer.py default / comment accordingly.
2. Bot silently ignores operator replies — the DM room was created with
is_direct:true, causing Element to auto-enable E2E encryption. This
stdlib-only bot cannot decrypt m.room.encrypted events, so all admin
messages were dropped without any log output. Fix:
- register-matrix-bot.sh now creates rooms with is_direct:false and
preset:private_chat (Synapse does not force encryption on non-DM
rooms).
- matrix_poll_admin() now logs a loud WARN if an encrypted event
arrives, instead of silently skipping it.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The homeserver authenticates humans via Keycloak OIDC and has password
login disabled, so register-matrix-bot.sh's password-login flow could
never obtain a token. Rewrite it to create the bot and mint a standalone
access token through Synapse's shared-secret admin API
(/_synapse/admin/v1/register), which works with registration + password
login turned off.
- Use the claude-code identity (@claude-code:semprini.me) as the bot.
- Avoid the admin "login as user" API: it returns a puppet token that
Synapse revokes when the issuing admin is deactivated.
- Make re-runs idempotent: reuse a still-valid token/room; only recreate
the account when no valid token is on hand.
- Read the registration shared secret from the running synapse container.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
systemd-deployed daemon that drives the semprini-core stack-support agent
headless via Claude Code, monitors health via Uptime Kuma, applies safe
upgrades, and escalates to the operator over Matrix.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>