feat: fire resource subscription notification on agent status change

Monitor now calls Server.ResourceUpdated() for status://agents when
agent completions or inbox changes are detected. Clients subscribed
to this resource get notified automatically via MCP protocol.

Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
Snider 2026-03-17 05:52:12 +00:00
parent 99733bd83e
commit ccfd68ca1a
2 changed files with 7 additions and 0 deletions

Binary file not shown.

View file

@ -134,6 +134,13 @@ func (m *Subsystem) check(ctx context.Context) {
combined := strings.Join(messages, "\n")
m.notify(ctx, combined)
// Notify resource subscribers that agent status changed
if m.server != nil {
m.server.ResourceUpdated(ctx, &mcp.ResourceUpdatedNotificationParams{
URI: "status://agents",
})
}
}
// checkCompletions scans workspace for newly completed agents.