feat(#2659): serve hive-matrix-mcp over persistent streamable-http, drop stdio bridge

This commit is contained in:
damocles 2026-07-23 20:20:51 +02:00 committed by mara
commit a66b7ab298
21 changed files with 411 additions and 856 deletions

View file

@ -2,14 +2,16 @@
name = "hive-matrix-mcp"
edition.workspace = true
version.workspace = true
readme = "README.md"
[lints]
workspace = true
[dependencies]
anyhow.workspace = true
axum.workspace = true
clap.workspace = true
futures-util.workspace = true
hive-sh4re.workspace = true
matrix-sdk.workspace = true
mime = "0.3"
mime_guess = "2"
@ -23,17 +25,8 @@ tracing.workspace = true
tracing-subscriber.workspace = true
# `hive-matrix-daemon` — long-running per-agent matrix-sdk Client +
# sync loop. Holds the unix socket the stdio MCP bridge talks to and
# emits hyperhive wake signals on incoming room events.
# sync loop. Serves its MCP tools (send_message, list_rooms, …)
# directly over streamable-http — no stdio bridge, no separate bin.
[[bin]]
name = "hive-matrix-daemon"
path = "src/main.rs"
# `hive-matrix-mcp` — thin stdio MCP bridge spawned by claude per turn.
# Forwards every tool call to the daemon over /run/hive-matrix/socket,
# returns the daemon's response shape to claude. No matrix-sdk dep at
# this entrypoint — the heavy crate only loads when the daemon binary
# is invoked.
[[bin]]
name = "hive-matrix-mcp"
path = "src/bin/mcp.rs"