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:
parent
99733bd83e
commit
ccfd68ca1a
2 changed files with 7 additions and 0 deletions
BIN
core-agent
BIN
core-agent
Binary file not shown.
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue