Skip to content

feat(plugins): add Telegram callback query hook - #80458

Open
ITMINDSCAPE wants to merge 2 commits into
NousResearch:mainfrom
ITMINDSCAPE:feat/telegram-callback-plugin-hook-v2
Open

feat(plugins): add Telegram callback query hook#80458
ITMINDSCAPE wants to merge 2 commits into
NousResearch:mainfrom
ITMINDSCAPE:feat/telegram-callback-plugin-hook-v2

Conversation

@ITMINDSCAPE

Copy link
Copy Markdown

Summary

  • add a generic telegram_callback_query plugin lifecycle hook for Telegram callbacks not claimed by built-in prefixes
  • pass only authenticated scalar callback metadata and require plugins to validate authorization plus plugin-owned state
  • strictly validate handled/unhandled results and isolate plugin and Telegram API failures
  • support bounded callback answers, message edits, and independent keyboard removal while preserving existing markup on chat-backed edit-only results
  • document the hook contract and security expectations

Tests

  • strict TDD: focused callback tests were added and witnessed failing before the adapter hook implementation, then passing after implementation
  • scripts/run_tests.sh tests/gateway/test_telegram_callback_plugin_hook.py tests/hermes_cli/test_plugins.py — 53 passed
  • scripts/run_tests.sh tests/gateway/test_telegram*.py — 522 passed across 55 files (one unrelated pytest temp-cleanup retry; the affected file then passed cleanly with retries disabled)
  • HERMES_TEST_FILE_RETRIES=0 scripts/run_tests.sh tests/gateway/test_telegram_forum_commands.py — 2 passed
  • git diff --cached --check — clean before commit

Review

Independent staged-diff review: PASS. Reviewed SHA-256 858d10e122d8fe0d12a21df938f5714fdd922e30a1bcf06be2fd9b5dad07c38a; no files modified by reviewer.

@alt-glitch alt-glitch added type/feature New feature or request comp/cli CLI entry point, hermes_cli/, setup wizard comp/plugins Plugin system and bundled plugins platform/telegram Telegram bot adapter P3 Low — cosmetic, nice to have sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades labels Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard comp/plugins Plugin system and bundled plugins P3 Low — cosmetic, nice to have platform/telegram Telegram bot adapter sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants