add reminder rollup RPC and broker query

Surface reminder activity statistics (scheduled, delivered, pending counts)
for each agent over configurable time windows. Needed by the per-agent
stats page to display reminder metrics.

Adds:
- ReminderStats struct and ReminderRollup request/response variants
- Broker::reminder_rollup_for(agent, since_secs) method
- Agent and manager socket handlers for the new RPC
- SocketReply mapping for response conversion
This commit is contained in:
iris 2026-05-20 13:11:02 +02:00 committed by Mara
parent 4715e88fff
commit 91bfa269fd
5 changed files with 89 additions and 0 deletions

View file

@ -207,6 +207,14 @@ async fn dispatch(req: &AgentRequest, agent: &str, coord: &Arc<Coordinator>) ->
},
}
}
AgentRequest::ReminderRollup { since_secs } => {
match coord.broker.reminder_rollup_for(agent, *since_secs) {
Ok(stats) => AgentResponse::ReminderRollup(stats),
Err(e) => AgentResponse::Err {
message: format!("{e:#}"),
},
}
}
AgentRequest::Whoami => AgentResponse::Whoami {
name: agent.to_owned(),
role: "agent".to_owned(),