agent-orchestrator/packages/plugins/notifier-discord
Dhruv Sharma befd910eeb
feat: emit plugin-internal activity events for distinct failure shapes (#1699)
* feat: emit plugin-internal activity events for distinct failure shapes

Plugins (scm/tracker/workspace/notifier) call recordActivityEvent directly
to surface failure shapes the lifecycle layer can't distinguish from
generic "plugin call failed":

- scm-github: scm.gh_unavailable (gh CLI missing, deduped per-process),
  scm.batch_enrich_pr_failed (one PR fails inside an OK batch),
  scm.ci_summary_failclosed (getCIChecks threw, fell closed to "failing")
- scm-gitlab: scm.ci_summary_failclosed, scm.review_fetch_failed
- workspace-worktree: workspace.post_create_failed (which command failed),
  workspace.branch_collision (concurrent session on same branch),
  workspace.destroy_fell_back (rmSync after git failure → stale metadata)
- workspace-clone: workspace.branch_collision, workspace.corrupt_clone_skipped
- tracker-linear: tracker.dep_missing (Composio SDK not installed,
  deduped per-process), tracker.api_timeout (30s abort)
- notifier-openclaw: notifier.auth_failed (401/403 distinct from 5xx),
  notifier.unreachable (ECONNREFUSED)
- notifier-discord: notifier.rate_limited (429 budget exhausted)
- notifier-composio: notifier.dep_missing (deduped per-process)

Adds "tracker", "workspace", "notifier" to ActivityEventSource and the
13 new kinds to ActivityEventKind. Includes regression tests for the 5
MUST emits.

Closes #1659

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* fix: refine plugin activity event classification

* fix(openclaw): retry transient unreachable errors before logging

* Deduplicate corrupt clone activity events

* Deduplicate poll-path activity events

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Co-authored-by: whoisasx <adil.business4064@gmail.com>
2026-05-18 17:25:23 +05:30
..
src feat: emit plugin-internal activity events for distinct failure shapes (#1699) 2026-05-18 17:25:23 +05:30
CHANGELOG.md fix(agent-plugins,lifecycle): distinguish indeterminate probe from "not found" + bump ps timeout (closes #1838) (#1839) 2026-05-14 21:50:39 +05:30
README.md feat: OpenClaw plugin, AO skill, Discord notifier, and setup wizard 2026-03-23 21:52:28 +05:30
package.json fix(agent-plugins,lifecycle): distinguish indeterminate probe from "not found" + bump ps timeout (closes #1838) (#1839) 2026-05-14 21:50:39 +05:30
tsconfig.json fix: scope node types to node packages 2026-04-13 18:25:21 +05:30

README.md

notifier-discord

Discord webhook notifier plugin for AO. Sends rich embed notifications for session events, PR creation, CI status, and escalations.

Setup

  1. In your Discord server: Server Settings > Integrations > Webhooks > New Webhook
  2. Copy the webhook URL
  3. Add to agent-orchestrator.yaml:
defaults:
  notifiers:
    - desktop
    - discord

notifiers:
  discord:
    plugin: discord
    webhookUrl: https://discord.com/api/webhooks/YOUR_WEBHOOK_ID/YOUR_WEBHOOK_TOKEN

Config options

Option Default Description
webhookUrl (required) Discord webhook URL
username "Agent Orchestrator" Bot display name
avatarUrl (none) Bot avatar image URL
threadId (none) Post to a specific thread
retries 2 Retry attempts on 5xx
retryDelayMs 1000 Base retry delay (exponential backoff)

Features

  • Rich embeds with color-coded priority (red=urgent, blue=action, yellow=warning, green=info)
  • PR links, CI status, and action buttons in embed fields
  • Thread support for organizing notifications by project
  • Retry with exponential backoff on 5xx responses