manager: scope GetLooseEnds to manager's own items

hive_wide returns ALL agents' reminders and questions, causing other
agents' reminders (e.g. triage) to appear on the manager's web page
and in the get_loose_ends MCP tool. The MCP tool spec says it shows
your own pending items — switch to for_agent(MANAGER_AGENT) which
includes all approvals (manager is sole submitter), questions where
the manager is asker/target, and only the manager's own reminders.

Fixes #118
This commit is contained in:
iris 2026-05-20 21:15:04 +02:00 committed by Mara
parent a13f63f30c
commit 873d5a083d

View file

@ -396,7 +396,7 @@ async fn dispatch(req: &ManagerRequest, coord: &Arc<Coordinator>) -> ManagerResp
},
}
}
ManagerRequest::GetLooseEnds => match crate::loose_ends::hive_wide(coord) {
ManagerRequest::GetLooseEnds => match crate::loose_ends::for_agent(coord, MANAGER_AGENT) {
Ok(loose_ends) => ManagerResponse::LooseEnds { loose_ends },
Err(e) => ManagerResponse::Err {
message: format!("{e:#}"),