feat(#1134): add unread matrix messages as a loose end
When the local matrix daemon has rooms with unread notifications,
get_loose_ends now prepends an UnreadMatrix entry to the output so
agents see pending matrix activity alongside questions/reminders
without message content being exposed.
Changes:
- hive-sh4re: add LooseEnd::UnreadMatrix { rooms: u32 } variant
- hive-matrix-mcp: add DaemonRequest::UnreadCount and handler that
counts joined rooms with notification_count > 0 (server-side push
notification counts, cached by matrix-sdk)
- hive-ag3nt/mcp: inject UnreadMatrix entry on self-queries by
connecting to /run/hive-matrix/socket (HIVE_MATRIX_SOCKET override);
best-effort — agents without matrix configured are unaffected
This commit is contained in:
parent
1386439591
commit
46edc635f2
5 changed files with 114 additions and 14 deletions
|
|
@ -290,6 +290,14 @@ pub enum LooseEnd {
|
|||
due_at: i64,
|
||||
age_seconds: u64,
|
||||
},
|
||||
/// Unread matrix notifications in one or more rooms. Not cancellable —
|
||||
/// use `mark_read` via the matrix MCP to clear. Injected by the
|
||||
/// in-container harness (not hive-c0re) because the matrix daemon
|
||||
/// runs inside the agent container.
|
||||
UnreadMatrix {
|
||||
/// Number of rooms with at least one unread notification.
|
||||
rooms: u32,
|
||||
},
|
||||
}
|
||||
|
||||
/// Kind discriminator for `CancelLooseEnd`. Per-kind store +
|
||||
|
|
|
|||
Loading…
Reference in a new issue