The daemon reads each account's token from `swarm/agents/<agent>/matrix/` as the agent itself, inside its own container, and falls back to the file only when the store has none. This is #4519's read, without its `main` carve-out: the swarm now mints `main` there and no hive writes the file. The daemon unit gets the agent's store identity, spelled the way forge-token.nix spells it. A timer re-starts it while it is down: a token the swarm mints or replaces in the store changes no file, so the path watcher never fires for it, and a daemon that exited on a replaced token would otherwise stay down until the container restarts.
18 lines
607 B
Rust
18 lines
607 B
Rust
//! Shared library for the `hive-matrix-daemon` binary — the only binary
|
|
//! this crate produces. The daemon owns the per-account matrix-sdk
|
|
//! `Client` registry (built at startup, one per configured account) and
|
|
//! serves its MCP tools directly over streamable-http (see [`mcp`]) —
|
|
//! no stdio bridge, no per-turn respawn, no round-trip unix socket.
|
|
//!
|
|
//! Architecture rationale and tool surface mirror the existing
|
|
//! `damocles-daemon` v0 set.
|
|
|
|
pub mod accounts;
|
|
pub mod client;
|
|
pub mod credential;
|
|
pub mod handlers;
|
|
pub mod mcp;
|
|
pub mod paths;
|
|
pub mod protocol;
|
|
pub mod timeline;
|
|
pub mod wake;
|