Documentation
¶
Overview ¶
Package notify pushes agent events to a logged-in admin in real time.
SSE rather than WebSockets: the traffic is one-directional (server tells the browser something happened), SSE reconnects on its own, and it needs no protocol upgrade through whatever proxy sits in front. A WebSocket would be more machinery for a strictly simpler job.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct {
ID string `json:"id"`
Kind string `json:"kind"` // decision_opened | run_finished | issue_moved | mention
Severity string `json:"severity"` // info | warn | action_required
Title string `json:"title"`
Preview string `json:"preview"`
Link string `json:"link"`
// Sound names a clip the browser plays. Empty means silent — most events
// should be silent, or the alert stops meaning anything.
Sound string `json:"sound"`
Urgency string `json:"urgency"`
IssueID string `json:"issueId,omitempty"`
At string `json:"at"`
}
Event is one push.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) NotifyDecision ¶
func (s *Service) NotifyDecision(ctx context.Context, userID string, issueID string, issueNumber int64, agent, question string)
NotifyDecision is what the orchestrator calls when an agent needs a human.
This is the one event that always makes a sound: it is the only class where nothing proceeds until a person acts, so it is the only one that has earned the right to interrupt.
Click to show internal directories.
Click to hide internal directories.