Skip to content

feat(notification): add task status notification module with DingTalk support#511

Open
p-yf wants to merge 3 commits intospring-ai-alibaba:mainfrom
p-yf:feat-notice
Open

feat(notification): add task status notification module with DingTalk support#511
p-yf wants to merge 3 commits intospring-ai-alibaba:mainfrom
p-yf:feat-notice

Conversation

@p-yf
Copy link
Copy Markdown

@p-yf p-yf commented Apr 21, 2026

Describe what this PR does / why we need it

Add a new notification module that provides an extensible NotifierService interface, allowing developers to implement custom notification channels (e.g., DingTalk, Feishu, WeCom). A default DingTalk implementation DingTalkNotifier is provided with HmacSHA256 signature verification.

Agent tasks can take a long time to execute. When user intervention is required, without a notification mechanism users cannot be notified in time, potentially causing task delays.

Describe how you did it

  1. Added core interface NotifierService defining notification methods
  2. Added NotifierFactory to support fetching notifiers by name or getting the default
  3. Added NotificationInfo containing node name, status, timestamp, etc.
  4. Provided DingTalkNotifier implementation with Webhook + signature authentication

Describe how to verify it

  1. Configure DingTalk robot Webhook URL and Secret Key: spring.ai.alibaba.data-agent.notify.channel: dingtalk
    spring.ai.alibaba.data-agent.notify.dingtalk.webhook-url: https://oapi.dingtalk.com/robot/send?access_token=xxx
    spring.ai.alibaba.data-agent.notify.dingtalk.secret-key: SECxxx
  2. Run NotificationInfoTest and DingTalkNotifierTest unit tests
  3. Integrate into business nodes, call NotifierFactory.getDefault().notify(info) to send notifications

Special notes for reviews

  • Notifiers are auto-registered via @component, developers can implement NotifierService and add @component annotation to extend other channels
  • DingTalkNotifier uses @value to inject configuration. The notify.dingtalk.webhook-url must be configured for messages to be sent; if not configured, notification is skipped

p-yf added 3 commits April 21, 2026 17:34
- Add NotificationInfo and NotifierService interface
- Implement DingTalkNotifier with HmacSHA256 signature
- Add NotifierFactory for extensible notification channels
- Integrate with GraphServiceImpl to notify on completion/error
- Add unit tests for notification components
@p-yf p-yf changed the title Feat notice feat(notification): add task status notification module with DingTalk support Apr 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant