Skip to content

feat(feishu): wire clarify tool with interactive card buttons#29719

Open
bladeJumper wants to merge 1 commit into
NousResearch:mainfrom
bladeJumper:feat/feishu-clarify-buttons
Open

feat(feishu): wire clarify tool with interactive card buttons#29719
bladeJumper wants to merge 1 commit into
NousResearch:mainfrom
bladeJumper:feat/feishu-clarify-buttons

Conversation

@bladeJumper

Copy link
Copy Markdown

Implements the clarify tool on Feishu with interactive card buttons, mirroring the Telegram pattern from #24199.

Changes

  • send_clarify: renders question + choice buttons as Feishu interactive card
  • _handle_clarify_card_action: route button callbacks via hermes_clarify_action
    • choice: resolves immediately with choice text
    • other: flips to text-capture mode via mark_awaiting_text
  • Already-resolved guard prevents double-click / stale-button issues
  • Authorization check reuses _is_interactive_operator_authorized
  • Choice text lookup: stored state → clarify entry → fallback index

Known limitation

Feishu shows both the tool-progress bubble (❓ clarify: ...) and the interactive card because Feishu lacks delete_message support. This can be revisited once Feishu implements message deletion.

Testing

  • 10 new tests in tests/gateway/test_feishu_clarify_buttons.py
  • All existing Feishu tests pass (407/407)

Closes #12573
Closes #21032
Supersedes #23740
Related #24199, #21893, #503

Implements the clarify tool on Feishu with interactive card buttons,
mirroring the Telegram pattern from NousResearch#24199.

- send_clarify: renders question + choice buttons as Feishu interactive card
- _handle_clarify_card_action: routes button callbacks via hermes_clarify_action
  - choice: resolves immediately with choice text
  - other: flips to text-capture mode via mark_awaiting_text
- Already-resolved guard prevents double-click / stale-button issues
- Authorization check reuses _is_interactive_operator_authorized
- Choice text lookup: stored state → clarify entry → fallback index

Known limitation: Feishu shows both the tool-progress bubble (❓ clarify: ...)
and the interactive card because Feishu lacks delete_message support.
This can be revisited once Feishu implements message deletion.

Closes NousResearch#12573
Closes NousResearch#21032
Supersedes NousResearch#23740 (which included framework code now merged in NousResearch#24199)
Related NousResearch#24199, NousResearch#21893, NousResearch#503
@alt-glitch alt-glitch added type/feature New feature or request comp/gateway Gateway runner, session dispatch, delivery platform/feishu Feishu / Lark adapter P3 Low — cosmetic, nice to have labels May 21, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This competes with open PR #11981 (Feishu clarify card, depends on #11977) and overlaps with #26332. Supersedes closed #23740. Closes #12573 and #21032. Related: Telegram clarify pattern from #24199.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/gateway Gateway runner, session dispatch, delivery P3 Low — cosmetic, nice to have platform/feishu Feishu / Lark adapter type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: gateway sessions expose clarify tool but never wire clarify_callback Clarify tool breaks in gateway/Telegram mode — missing callback wiring

2 participants