Documentation
¶
Overview ¶
Package notify exec's a user-configured command for agent-driven notifications. Triggered explicitly by `boid task notify` calls; no payload diffing or polling.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct {
TaskID string
TaskTitle string
ProjectID string
ProjectName string
Message string
JobID string
// URLPath, when non-empty, overrides the default BOID_TASK_URL target
// resolution. The caller supplies a full path (e.g. "/tasks/abc/questions/q1")
// and Notify prefixes it with PublicURL. Used by ask-mode notifications
// so the user opens the Q&A page directly instead of the job terminal.
URLPath string
}
Event carries the data passed to the notify command via env vars. All fields except TaskID and Message are best-effort: empty strings surface as empty env vars, which the user's script can ignore.
type Service ¶
Service exec's the configured Command for each notification event. A nil receiver or empty Command makes Notify a no-op so the rest of the system does not need to special-case "notifications disabled".
func (*Service) Notify ¶
Notify exec's the service's Command synchronously, passing event data through environment variables. Returns an error if the command fails to start or exits non-zero. Callers should treat the error as notification-side failure (the agent's intent is recorded by the calling boid task notify regardless).