mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-06-13 09:01:54 +00:00
Plugins that post Block Kit messages with interactive elements (buttons, overflow menus, datepickers, etc.) had no documented way to receive the resulting click events. The plugin API exposed register_tool, register_hook, register_command, register_platform, and register_context_engine, but nothing for slack_bolt action handlers. The only workaround was to monkey-patch SlackAdapter.connect from inside register(), which is fragile and breaks on every Hermes update. This change adds: * PluginContext.register_slack_action_handler(action_id, callback) — validates inputs and queues the handler on the PluginManager. action_id accepts whatever slack_bolt.App.action() accepts (literal string, compiled re.Pattern, or constraint dict). * PluginManager.get_slack_action_handlers() — accessor used by the Slack adapter at connect time. * SlackAdapter.connect — after wiring its built-in approval and slash-confirm buttons, iterates the plugin-registered handlers and registers each via self._app.action(matcher)(callback). Each callback is wrapped defensively so a misbehaving plugin cannot crash slack_bolt's dispatch loop, with a best-effort ack on exception so Slack stops retrying the click. * Defensive fallback when the plugin layer is unhealthy: a RuntimeError from get_plugin_manager() is logged and swallowed rather than blocking the gateway from starting. * Test coverage in tests/gateway/test_slack_plugin_action_handlers.py for input validation, multi-plugin registration, the connect-time wiring, defensive exception handling, and the plugin-loader- failure fallback path. * Documentation in website/docs/guides/build-a-hermes-plugin.md describing the new API alongside the existing register_command / dispatch_tool documentation. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| _category_.json | ||
| automate-with-cron.md | ||
| automation-blueprints.md | ||
| aws-bedrock.md | ||
| azure-foundry.md | ||
| build-a-hermes-plugin.md | ||
| cron-script-only.md | ||
| cron-troubleshooting.md | ||
| daily-briefing-bot.md | ||
| delegation-patterns.md | ||
| github-pr-review-agent.md | ||
| google-gemini.md | ||
| local-llm-on-mac.md | ||
| local-ollama-setup.md | ||
| microsoft-graph-app-registration.md | ||
| migrate-from-openclaw.md | ||
| minimax-oauth.md | ||
| oauth-over-ssh.md | ||
| operate-teams-meeting-pipeline.md | ||
| pipe-script-output.md | ||
| python-library.md | ||
| run-hermes-with-nous-portal.md | ||
| run-nemotron-3-ultra-free.md | ||
| team-telegram-assistant.md | ||
| tips.md | ||
| use-mcp-with-hermes.md | ||
| use-soul-with-hermes.md | ||
| use-voice-mode-with-hermes.md | ||
| webhook-github-pr-review.md | ||
| work-with-skills.md | ||
| xai-grok-oauth.md | ||