Documentation
¶
Overview ¶
Package notify provides OS desktop notification support and webhook notifications. Desktop notifications dispatch to platform-native tools (notify-send on Linux, osascript on macOS) and silently ignore unsupported platforms or missing tools. Webhook notifications support Slack and Discord incoming webhook URLs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Send ¶
func Send(title, body string)
Send fires a desktop notification with the given title and body. Errors are silently swallowed — notifications are best-effort and must never interrupt or fail the main orchestration loop.
func SendWebhook ¶
SendWebhook sends a rich notification to a Slack, Discord, or custom HTTP webhook URL. The format is auto-detected from the URL:
- hooks.slack.com → Slack attachments format
- discord.com/api/webhooks → Discord embeds format
- anything else → generic JSON: {"title":"...","body":"...","source":"cloop"}
Errors are returned; callers should treat them as best-effort and not block the main orchestration flow.
Types ¶
This section is empty.