Skip to content

Add a Discord notification channel adapter #3

@jstuart0

Description

@jstuart0

Goal

Deliver HITL requests to a Discord channel via webhook + interactive buttons, mirroring the Slack/Telegram flows.

Background

Channel adapter interface: src/server/services/channels/types.ts. Reference impl: telegram.ts. Discord's webhook API is the simplest send path; for interactive buttons you need a bot user and interaction endpoints with ed25519 signature verification.

Scope

  • src/server/services/channels/discord.ts — send via webhook, format proposal as an embed with two button components.
  • src/server/routes/channels.ts — POST /api/v1/channels/discord/interactions with ed25519 verification (Discord sends X-Signature-Ed25519 + X-Signature-Timestamp). Route the button press to resolveHitlRequest.
  • Credential storage: encrypted JSON with {webhookUrl, publicKey, botToken?} in notification_channels.credential_ciphertext.
  • UI: SlackChannelPanel.tsx equivalent for Discord (paste webhook, paste public key, enroll + test).

Acceptance criteria

  • Settings wizard accepts a Discord webhook URL and application public key.
  • HITL proposal delivered to Discord renders as an embed with Approve / Decline buttons that resolve the proposal.
  • Ed25519 signature verification rejects replay + forged requests.
  • Test coverage for signature verification + interaction payload handling.

Metadata

Metadata

Assignees

No one assigned

    Labels

    channelNotification channels (Telegram, Slack, webhook, etc.)enhancementNew feature or requestgood first issueGood for newcomers

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions