Skip to content

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

Closed
ITMINDSCAPE wants to merge 9 commits into
NousResearch:mainfrom
ITMINDSCAPE:feat/telegram-callback-plugin-hook
Closed

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

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.

@ITMINDSCAPE

Copy link
Copy Markdown
Author

Superseded by #80458, which contains the final independently reviewed bytes on the corrected v2 branch.

@ITMINDSCAPE ITMINDSCAPE closed this Aug 6, 2026
@alt-glitch alt-glitch added type/feature New feature or request comp/cli CLI entry point, hermes_cli/, setup wizard comp/cron Cron scheduler and job management comp/plugins Plugin system and bundled plugins platform/telegram Telegram bot adapter tool/terminal Terminal execution and process management P3 Low — cosmetic, nice to have needs-decision Awaiting maintainer decision before any implementation labels Aug 6, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

Related: #21471 is the earlier pre-dispatch callback-hook implementation. This PR proposes a different callback contract but also bundles unrelated cron, Kanban, and terminal changes; a maintainer should choose the extension contract and request a focused scope.

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/cron Cron scheduler and job management comp/plugins Plugin system and bundled plugins needs-decision Awaiting maintainer decision before any implementation P3 Low — cosmetic, nice to have platform/telegram Telegram bot adapter tool/terminal Terminal execution and process management type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants