avelino/dotagent

Add notifier driver: `discord` (webhook)

Open

#15 建立於 2026年5月20日

在 GitHub 查看
 (0 留言) (0 反應) (0 負責人)Rust (1 fork)github user discovery
area: notifygood first issuetype: feature

倉庫指標

Star
 (2 star)
PR 合併指標
 (PR 指標待抓取)

描述

dotagent ships built-in notifier drivers under crates/dotagent-notify/ for desktop, slack, imessage, ntfy, pushover. Discord is a common ask for hobby projects, gaming clans, and small teams that don't run Slack.

Proposal

A new in-process driver discord that posts to a Discord webhook URL.

Manifest shape:

[[notifiers]]
driver = "discord"
webhook_url = "https://discord.com/api/webhooks/..."
username = "dotagent"          # optional override
avatar_url = "https://..."     # optional

The driver posts to the webhook with a Discord-formatted embed containing agent name, schedule, exit code, stderr tail. Same lifecycle as the other built-in notifiers — runs in-process inside the daemon.

Acceptance criteria

  • Posts to a Discord webhook and renders correctly in the Discord channel.
  • Uses reqwest with rustls-tls (no OpenSSL — repo convention).
  • [security] allow-list works: network = ["discord.com"] plays nice.
  • Validation rejects empty webhook_url with a clear error.
  • Doc page added under docs/plugins/notify-discord.md (or docs/concepts/notifications.md extended).
  • Example in examples/ or a snippet in the doc.

Where to start

Non-goals

  • Bot token auth. Webhook only for v1.
  • Slash commands, threads, role mentions. Plain message is enough.

貢獻者指南