feat(monitor): channels working — inbox uses {data:[...]} + debug events
Some checks failed
CI / test (push) Failing after 3s

Fixed inbox API response parsing: {data:[...]} not {messages:[...]}.
Added debugChannel helper for real-time debug events via channels.
MONITOR_INTERVAL env override for faster iteration.

Channels confirmed working:
- agent.complete: workspace status changes
- inbox.message: unread message notifications
- monitor.debug: debug trace events

Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
Snider 2026-03-21 19:24:07 +00:00
parent b5dcdd1261
commit 1e9278fd9d

View file

@ -322,9 +322,12 @@ func (m *Subsystem) checkInbox() string {
} `json:"data"`
}
if json.NewDecoder(httpResp.Body).Decode(&resp) != nil {
m.debugChannel("checkInbox: failed to decode response")
return ""
}
m.debugChannel(fmt.Sprintf("checkInbox: got %d messages", len(resp.Data)))
unread := 0
senders := make(map[string]int)
latestSubject := ""