feat(feishu): add native update prompt cards

This commit is contained in:
heathley 2026-05-08 17:26:26 +03:00 committed by kshitij
parent e3ebaa19ba
commit 7e578f02c8
3 changed files with 433 additions and 3 deletions

View file

@ -249,6 +249,8 @@ When users click buttons or interact with interactive cards sent by the bot, the
- The action's `value` payload from the card definition is included as JSON.
- Card actions are deduplicated with a 15-minute window to prevent double processing.
Gateway-driven update prompts use a native Feishu `Yes` / `No` card instead of falling back to plain text replies. When `hermes update --gateway` needs confirmation, the adapter records the selected answer in Hermes's `.update_response` file and replaces the card inline with a resolved state.
Card action events are dispatched with `MessageType.COMMAND`, so they flow through the normal command processing pipeline.
This is also how **command approval** works — when the agent needs to run a dangerous command, it sends an interactive card with Allow Once / Session / Always / Deny buttons. The user clicks a button, and the card action callback delivers the approval decision back to the agent.