Documentation
¶
Overview ¶
Package notify raises OS notifications for needs_human, dead letters and budget exhaustion (RFC 7.4). Title = agent, body = summary (max 280 chars), never the raw inbound body. ping.go sends the same events to a phone, with no summary.
Index ¶
Constants ¶
const PingTestText = "smif test ping"
PingTestText is the body of `smif notify test`.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Event ¶
type Event struct {
Kind string `json:"kind"` // needs_human | dead_letter | budget | claude_unavailable | session_waiting | session_answered
Agent string `json:"agent"`
Summary string `json:"summary"`
MessageID string `json:"message_id,omitempty"`
At time.Time `json:"at"`
}
Event is one notification.
type Pinger ¶ added in v0.2.0
type Pinger struct {
// contains filtered or unexported fields
}
Pinger posts pings. It holds no URL: the caller gives the current one for each ping, so a config reload needs no new Pinger.
func NewPinger ¶ added in v0.2.0
NewPinger builds a Pinger. failed hears each lost ping of Send, from another goroutine, and never gets the URL.