Watch
0
0
Fork
You've already forked hyperhive
0

matrix daemon: stay up when the primary account is down and say why in the tools

This commit is contained in:
damocles 2026-11-28 02:37:21 +01:00 • committed by mara
commit 73ef63a5e5

View file

@ -112,10 +112,12 @@ directly over streamable-http on `services.hyperhive.agent.mcp.matrixHttpPort`
`{ type = "http"; url = ...; }`). Same shape as `hive-bash-daemon` and
the built-in `hyperhive` surface (`hive-mcp-http`) — claude reconnects
to the stable URL every turn instead of respawning a stdio child.
Silently exits when the primary account has no token yet; the
`systemd.paths.hive-matrix-daemon` watcher restarts it when a token file
appears, and, on an agent with a store, a timer restarts it while it's
down so it re-reads a token the swarm minted into the store.
When the primary account has no token yet, or the homeserver rejects it
or is down, the daemon stays up and serves the tools anyway: a call that
needs the account fails with `matrix account "<name>" is not up: <why>`,
and the daemon retries the account every two minutes until it joins. The
`systemd.paths.hive-matrix-daemon` watcher also restarts the daemon when a
token file appears, so a fresh token doesn't wait for the next retry.
**Sync protocol**: when the homeserver advertises sliding sync (MSC4186,
`org.matrix.simplified_msc3575` in `/versions`) the daemon uses it: one