manager: add optional agent param to GetLooseEnds

GetLooseEnds now takes agent: Option<String>:
- None   = manager's own loose ends (default; the bug fix)
- Some("*")    = hive-wide view (every approval/question/reminder)
- Some("name") = that agent's loose ends

The get_loose_ends MCP tool exposes this as an optional agent arg, so
the manager can still scan the whole swarm on demand. The web UI and
post-turn counts pass None (manager's own).
This commit is contained in:
iris 2026-05-20 21:42:21 +02:00 committed by Mara
parent 873d5a083d
commit d348ce885f
5 changed files with 50 additions and 22 deletions

View file

@ -334,7 +334,7 @@ fn now_unix() -> i64 {
async fn fetch_manager_post_turn_counts(socket: &Path) -> (Option<u64>, Option<u64>) {
let threads = match client::request::<_, ManagerResponse>(
socket,
&ManagerRequest::GetLooseEnds,
&ManagerRequest::GetLooseEnds { agent: None },
)
.await
{