fix(tui_gateway): register shell hooks and plugins on TUI startup#24237
Open
xiaokang wants to merge 1 commit into
Open
fix(tui_gateway): register shell hooks and plugins on TUI startup#24237xiaokang wants to merge 1 commit into
xiaokang wants to merge 1 commit into
Conversation
tui_gateway.entry — the Python backend for `hermes --tui` — never called `register_from_config` or `discover_plugins`. The CLI (`hermes_cli/main.py:11804`) and Gateway (`gateway/run.py:3369,3377`) both bootstrap them at process startup; the TUI was missed. The bug is silent: `tui_gateway/server.py:280` already calls `invoke_hook(event_type, ..., platform="tui")`, but the plugin manager's dispatch table is empty in this process, so every event fires into the void. Shell hooks configured under `hooks:` in `cli-config.yaml` and Python plugins discovered via the standard plugin sources both fail to fire on TUI turns — observability integrations, security guardrails, approval hooks, and custom transforms all silently no-op. Fix by mirroring the gateway's bootstrap (`accept_hooks=False`, letting `register_from_config` resolve consent from `HERMES_ACCEPT_HOOKS` or `hooks_auto_accept: true`).
Collaborator
Author
|
@alt-glitch Thanks for you comment. Should I close this PR or continue to add some testcases? |
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
tui_gateway.entry — the Python backend for
hermes --tui— never calledregister_from_configordiscover_plugins. The CLI (hermes_cli/main.py:11804) and Gateway (gateway/run.py:3369,3377) both bootstrap them at process startup; the TUI was missed.The bug is silent:
tui_gateway/server.py:280already callsinvoke_hook(event_type, ..., platform="tui"), but the plugin manager's dispatch table is empty in this process, so every event fires into the void. Shell hooks configured underhooks:incli-config.yamland Python plugins discovered via the standard plugin sources both fail to fire on TUI turns — observability integrations, security guardrails, approval hooks, and custom transforms all silently no-op.Fix by mirroring the gateway's bootstrap (
accept_hooks=False, lettingregister_from_configresolve consent fromHERMES_ACCEPT_HOOKSorhooks_auto_accept: true).What does this PR do?
Related Issue
Fixes #
Type of Change
Changes Made
How to Test
Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/AFor New Skills
hermes --toolsets skills -q "Use the X skill to do Y"Screenshots / Logs