feat(04-01): integrate notifications and focus mode into daemon

- Notifier + FocusTimer fields in Daemon, initialized in NewDaemon
- processHookEvent notifies on Working -> Needs Input only (D-01)
- Focus mode suppresses notifications when active (D-05)
- FocusArgs in protocol, "focus" handler in daemon
- CLI "vmux focus <minutes>" command
- Tests for all notification transitions and focus handler
This commit is contained in:
Pierre Martin
2026-03-23 21:26:02 +01:00
parent b96c6d05be
commit efbe31928e
5 changed files with 183 additions and 3 deletions

View File

@@ -13,9 +13,10 @@ type Request struct {
// Response is the JSON message sent back by the daemon.
type Response struct {
OK bool `json:"ok"`
Error string `json:"error,omitempty"`
Sessions []SessionInfo `json:"sessions,omitempty"`
OK bool `json:"ok"`
Error string `json:"error,omitempty"`
Sessions []SessionInfo `json:"sessions,omitempty"`
FocusRemaining float64 `json:"focus_remaining,omitempty"`
}
// SessionInfo is the wire format for a session in IPC responses.
@@ -42,3 +43,8 @@ type LabelArgs struct {
SessionID string `json:"session_id"`
Label string `json:"label"`
}
// FocusArgs carries the duration for the focus command.
type FocusArgs struct {
Minutes int `json:"minutes"`
}