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
commit d348ce885f
5 changed files with 50 additions and 22 deletions

View file

@ -409,7 +409,9 @@ async fn api_loose_ends(State(state): State<AppState>) -> Response {
Flavor::Manager => {
match client::request::<_, hive_sh4re::ManagerResponse>(
&state.socket,
&hive_sh4re::ManagerRequest::GetLooseEnds,
// Manager's own loose ends — the web page is the
// manager's page, not a hive-wide console.
&hive_sh4re::ManagerRequest::GetLooseEnds { agent: None },
)
.await
{