fix(tools): recognize discovered plugin platforms - #71582
Conversation
|
Thanks for addressing a real CLI gap: current Problems
Suggested changes
Automated hermes-sweeper review. |
5b6b481 to
3b6864b
Compare
3b6864b to
3e76520
Compare
|
Follow-up verification on the current PR head ( |
…red() The salvaged registered_names() from PR #71582 predates the scoped platform registry: it read only the process-global _entries/_deferred maps, but plugin platforms register their deferred loaders under a profile scope. Result: `hermes tools enable a2a --platform a2a` still rejected the platform. Union the current-scope maps with the global ones, mirroring is_registered()'s semantics, under the registry lock.
|
Heads-up: PR #86660 (#86660) cherry-picked your commit with authorship preserved — |
…red() The salvaged registered_names() from PR NousResearch#71582 predates the scoped platform registry: it read only the process-global _entries/_deferred maps, but plugin platforms register their deferred loaders under a profile scope. Result: `hermes tools enable a2a --platform a2a` still rejected the platform. Union the current-scope maps with the global ones, mirroring is_registered()'s semantics, under the registry lock.
…red() The salvaged registered_names() from PR NousResearch#71582 predates the scoped platform registry: it read only the process-global _entries/_deferred maps, but plugin platforms register their deferred loaders under a profile scope. Result: `hermes tools enable a2a --platform a2a` still rejected the platform. Union the current-scope maps with the global ones, mirroring is_registered()'s semantics, under the registry lock.
Summary
Allow
hermes toolsto recognize platforms discovered from installed plugins.Problem
Tool configuration validated
--platformonly against the built-in platform table. A correctly discovered plugin platform could therefore run in the gateway but failhermes tools list/enable/disable --platform <plugin>as an unknown platform.Fix
Resolve the accepted platform set from built-ins plus plugin discovery, while preserving current behavior when plugin loading fails.
Validation
scripts/run_tests.sh tests/hermes_cli/test_tools_disable_enable.pygit diff --checkpassed