feat(#2659): serve hive-matrix-mcp over persistent streamable-http, drop stdio bridge
This commit is contained in:
parent
ae8d1aaac4
commit
a66b7ab298
21 changed files with 411 additions and 856 deletions
|
|
@ -1,5 +1,4 @@
|
|||
//! Per-agent filesystem paths used by both `hive-matrix-daemon` and the
|
||||
//! stdio MCP bridge.
|
||||
//! Per-agent filesystem paths used by `hive-matrix-daemon`.
|
||||
//!
|
||||
//! All paths are overridable via env vars for dev / test scenarios and
|
||||
//! to let the harness point the daemon at non-default locations when
|
||||
|
|
@ -13,14 +12,6 @@ use std::path::PathBuf;
|
|||
/// `localhost` to the same machine.
|
||||
pub const DEFAULT_HOMESERVER: &str = "http://localhost:8008";
|
||||
|
||||
/// Default unix socket path the daemon listens on inside the agent
|
||||
/// container. The stdio MCP bridge `connect()`s here on every tool call.
|
||||
/// Lives under systemd's `RuntimeDirectory=hive-matrix` (a tmpfs path
|
||||
/// that disappears on container restart — fine, because the daemon
|
||||
/// recreates the socket on its own boot) so the agent unix user
|
||||
/// can bind a socket inside it without root in `/run`.
|
||||
pub const DEFAULT_DAEMON_SOCKET: &str = "/run/hive-matrix/socket";
|
||||
|
||||
/// Resolve the matrix access-token file path. Override via
|
||||
/// `HIVE_MATRIX_TOKEN_FILE`; default is `<HYPERHIVE_STATE_DIR>/matrix-token`,
|
||||
/// the path `hive-c0re::matrix::ensure_user_for` writes to on agent
|
||||
|
|
@ -41,14 +32,6 @@ pub fn homeserver_url() -> String {
|
|||
std::env::var("HIVE_MATRIX_URL").unwrap_or_else(|_| DEFAULT_HOMESERVER.to_owned())
|
||||
}
|
||||
|
||||
/// Resolve the daemon's unix socket path. Override via
|
||||
/// `HIVE_MATRIX_SOCKET`; default is `/run/hive-matrix/socket`.
|
||||
#[must_use]
|
||||
pub fn daemon_socket() -> PathBuf {
|
||||
std::env::var_os("HIVE_MATRIX_SOCKET")
|
||||
.map_or_else(|| PathBuf::from(DEFAULT_DAEMON_SOCKET), PathBuf::from)
|
||||
}
|
||||
|
||||
/// Persistent sqlite store directory for matrix-sdk's state (event
|
||||
/// cache, devices, etc.). Lives under the per-agent state dir so it
|
||||
/// survives container restart but gets wiped on `destroy --purge`.
|
||||
|
|
|
|||
Loading…
Reference in a new issue