hyperhive/hive-matrix-mcp
Repository files (latest commit first)
Filename Latest commit message Latest commit date
atlas 6ea81aae65 hive-c0re: render the new agent option paths into generated agent flakes
meta.rs writes each agent's flake, and it still named the pre-move
`hyperhive.*` paths — so every agent rebuild would print a rename
deprecation warning about a line no human wrote and no operator could fix.
A warning nobody can act on trains everyone to ignore the ones that matter,
which is the whole value of the alias shims.

Repoints the FORWARDED_VAR_OPTIONS table and every other emitted option
assignment (otel.*, docs.source, claudeCodePath, github.enable, user.name,
claudeMemoryMaxBytes) to `services.hyperhive.agent.*`, with the test
expectations that pin the rendered text. The flake input named `hyperhive`
(`hyperhive.url`, `hyperhive.inputs.nixpkgs.follows`,
`hyperhive.nixosConfigurations.*`), hive-tier `services.hyperhive.*` paths,
and the `@hyperhive.local` git identity share the word and are untouched.

Also repoints the same option paths where they appear in comments, rustdoc
and runtime message strings across the other crates — a refusal message
naming `hyperhive.allowedRecipients` sends an operator to a path that will
stop existing. Prose under docs/ is deliberately not in this commit.

Refs #4473
2026-09-17 20:19:30 +02:00
..
src hive-c0re: render the new agent option paths into generated agent flakes 2026-09-17 20:19:30 +02:00
Cargo.toml refactor(sock): one socket client, retry as a policy value 2026-07-26 22:44:48 +02:00
README.md feat(#2659): serve hive-matrix-mcp over persistent streamable-http, drop stdio bridge 2026-07-24 12:44:39 +02:00

hive-matrix-mcp

Per-agent matrix integration: a long-running daemon (hive-matrix-daemon) that holds a matrix-sdk Client + sync loop per configured account and serves the matrix tool surface (send_message, send_dm, list_rooms, read_room, …) directly over streamable-http. No stdio bridge, no per-turn respawn — claude reconnects to the same stable URL every turn.

When to use it

Look here when changing matrix tool behaviour, multi-account handling, or the incoming-event → todo/wake path. The daemon owns the whole lifecycle: per-account bring-up (accounts.rs, client.rs), the sync loop that sweeps invites/unread rooms into the harness's in-agent todo socket (timeline.rs, wake.rs), and the MCP tool router itself (mcp.rs).

Shape

One bin (hive-matrix-daemon, src/main.rs) built from the crate's own lib (src/lib.rs):

  • accounts.rs — multi-account config + the account→Client dispatch registry (main is always the hive-internal primary; extras come from HIVE_MATRIX_ACCOUNTS).
  • client.rs — session restore, stale-token recovery, avatar sync, cross-signing bootstrap.
  • timeline.rs / wake.rs — per-sync-callback invite/unread sweeps that push todos onto HIVE_AGENT_SOCKET.
  • handlers.rs — per-tool dispatch, returns protocol::DaemonResponse.
  • mcp.rs — the rmcp tool router + serve_http, resolving each call's optional account arg against the registry before calling into handlers.
  • paths.rs — per-agent path resolution (token file, matrix-sdk state dir, homeserver URL, accounts snapshot).