Repository navigation
fix(cli): validate plugin toolsets against persisted plugin-key cache - #109938
Closed
iskandarsulaili wants to merge 1 commit into
Closed
iskandarsulaili wants to merge 1 commit into
iskandarsulaili wants to merge 1 commit into
Conversation
_init_toolsets validated names only against the live tool registry, but plugins register their toolsets in a background discovery thread that may not have joined yet. Every enabled plugin toolset (agents, lsp, vault, searxng, ...) was therefore falsely printed as 'Warning: Unknown toolsets' while the tools themselves still loaded. Match the pattern already used by oneshot.py and tui_gateway: also accept the persisted plugin-toolset-key cache so the warning is silent for valid plugin names.
Author
|
Closing as a duplicate. Superseded by #89345 (adamkrawczyk), which applies the same get_plugin_toolset_keys_nowait() fix in cli.py plus the subagent_lifecycle.py validation path and regression tests. No further action needed on this PR. |
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.
What
HermesCLI._init_toolsetsvalidated toolset names only against the live tool registry, but plugins register their toolsets in a background discovery thread that may not have joined by the time init runs. Every enabled plugin toolset (e.g.agents,lsp,vault,searxng,orchestra) was therefore falsely printed as:while the tools themselves still loaded fine — pure warning noise on every CLI start.
Fix
Also accept the persisted plugin-toolset-key cache (
get_plugin_toolset_keys_nowait()) when validating, matching the exact pattern already used byhermes_cli/oneshot.py(_validate_explicit_toolsets) andtui_gateway/server.py(_resolve_explicit_toolsets). Import is tolerant; on any exception the set is empty and behavior falls back to today's code.Why this is safe
get_plugin_toolset_keys_nowait()returns the persisted cache while background discovery is in flight (never blocks), and self-heals on the next scan.validate_toolset()are unchanged (static + plugin-registered + MCP names still validate as before).Reproduction