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".
Command/PublicURL are guarded by mu (docs/plans/volume-only-daemon.md §論点 f: `notify.command`/`web.public_url` are both classified "dynamic" — silently hot-reloadable via `boid config set/apply/edit`). Every pre-this-PR caller constructs a Service once at daemon startup and never touches these fields again, so the zero-value mutex is safe to add without changing any existing call site's behavior; internal/server's config-apply path is the only new caller of Update.
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).