hermes - 💡(How to fix) Fix DingTalk adapter: support AI Card buttons for command approval prompts

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Fix Action

Fix / Workaround

Local workaround status

A local patch implemented an approval-card path in gateway/platforms/dingtalk.py with approval template config, card callback handler registration, server-side approval card state, and send_exec_approval(...). This should be treated as a feature proposal unless upstream already intended DingTalk approval cards to work.

RAW_BUFFERClick to expand / collapse

Feature description

DingTalk gateway users would benefit from Telegram-like click-button approvals for dangerous terminal commands. DingTalk AI Cards can provide approval buttons, while ordinary bot replies can remain markdown.

Motivation

Today, if a platform does not implement send_exec_approval(...), users may need to type approval commands manually. DingTalk supports card callbacks, so dangerous command approvals can be implemented as approval-only AI Cards with buttons such as:

  • Approve once
  • Approve for session
  • Deny

Proposed solution

Enhance the DingTalk adapter to support:

  • A separate approval card template ID, e.g. approval_card_template_id / DINGTALK_APPROVAL_CARD_TEMPLATE_ID.
  • A send_exec_approval(...) implementation that renders the command preview and description into a card markdown/text variable.
  • Server-side state keyed by card/outTrackId so sensitive session routing details are not embedded in the card.
  • TOPIC_CARD_CALLBACK handling that maps callback actions/params to approve-once, approve-session, or deny.
  • Allowed-user/session validation before resolving approval.

Local workaround status

A local patch implemented an approval-card path in gateway/platforms/dingtalk.py with approval template config, card callback handler registration, server-side approval card state, and send_exec_approval(...). This should be treated as a feature proposal unless upstream already intended DingTalk approval cards to work.

Safety note

Validation should use non-destructive smoke tests or fake approval prompts; examples should avoid rm/rm -rf or destructive-looking commands.

Environment

  • Hermes checkout commit: 9f182bd7b
  • OS: Ubuntu 24.04 / Linux
  • Platform: DingTalk Stream Mode

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - 💡(How to fix) Fix DingTalk adapter: support AI Card buttons for command approval prompts