Watch
0
0
Fork
You've already forked hyperhive
0
hyperhive/swarm-matrix-client
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-10-18 12:36:52 +02:00
..
src hive-c0re: provision rooms through swarm-matrix-client 2026-10-18 12:36:52 +02:00
Cargo.toml swarm-controller: log matrix accounts in and out through swarm-matrix-client 2026-10-17 23:26:33 +02:00
README.md swarm-controller: log matrix accounts in and out through swarm-matrix-client 2026-10-17 23:26:33 +02:00

swarm-matrix-client

The appservice calls against the swarm's homeserver, shared by the two binaries that make them: swarm-matrix-ctl (inside the matrix container, for a hive's sender account) and swarm-controller (for each agent's account, with the swarm's own appservice token).

Three calls, all client-server API: register an account as the appservice, log in to an existing one as the appservice, and ask a token who it is. Both mints pin the device id hyperhive-<localpart>, so a second login replaces that device's token instead of adding a device.

swarm-controller also logs an operator-linked account in with its password (password_login) and invalidates its token (logout) on whatever homeserver the operator names. Neither call is an appservice call, so neither carries the appservice token.

🩸 A secret is a path, never a value

Every error here is built from the response's status and its errcode, never its body: a successful /register or /login body is an access token, and an error body is one malformed response away from being the same bytes.