Skip to content

fix(tools): recognize discovered plugin platforms - #71582

Closed
tachyon-r wants to merge 1 commit into
NousResearch:mainfrom
tachyon-r:tachyon/pr-plugin-platform-20260725
Closed

fix(tools): recognize discovered plugin platforms#71582
tachyon-r wants to merge 1 commit into
NousResearch:mainfrom
tachyon-r:tachyon/pr-plugin-platform-20260725

Conversation

@tachyon-r

Copy link
Copy Markdown
Contributor

Summary

Allow hermes tools to recognize platforms discovered from installed plugins.

Problem

Tool configuration validated --platform only against the built-in platform table. A correctly discovered plugin platform could therefore run in the gateway but fail hermes 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.py
  • 20 passed
  • Ruff passed
  • git diff --check passed
  • manually verified tool listing for a discovered plugin platform.

@alt-glitch alt-glitch added type/bug Something isn't working comp/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have labels Jul 25, 2026
@teknium1

Copy link
Copy Markdown
Contributor

Thanks for addressing a real CLI gap: current main rejects plugin platform names at hermes_cli/tools_config.py:5286-5288.

Problems

  • The new helper calls platform_registry.plugin_entries(). On current main, that method calls _resolve_all() before returning entries (gateway/platform_registry.py:266-269), which loads every deferred platform adapter. Bundled platform plugins are deliberately deferred to avoid importing their SDKs during ordinary CLI use (hermes_cli/plugins.py:1454-1466).

Suggested changes

  • Use a non-materializing registry API that reports concrete plus deferred platform names after discover_plugins().
  • Add coverage for list, enable, and disable that proves deferred loaders are not materialized.

Automated hermes-sweeper review.

@tachyon-r
tachyon-r force-pushed the tachyon/pr-plugin-platform-20260725 branch from 5b6b481 to 3b6864b Compare July 30, 2026 12:04
@teknium1 teknium1 added sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform labels Jul 30, 2026
@tachyon-r
tachyon-r force-pushed the tachyon/pr-plugin-platform-20260725 branch from 3b6864b to 3e76520 Compare July 30, 2026 12:14
@tachyon-r

Copy link
Copy Markdown
Contributor Author

Follow-up verification on the current PR head (3e7652003): the CLI now uses platform_registry.registered_names(), which returns concrete plus deferred names without calling _resolve_all(). Parameterized coverage exercises list, enable, and disable and asserts the deferred loader is not called.

uv run --extra dev pytest -q tests/gateway/test_platform_registry.py tests/hermes_cli/test_tools_disable_enable.py
26 passed in 2.52s

teknium1 added a commit that referenced this pull request Aug 15, 2026
…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.
@teknium1

Copy link
Copy Markdown
Contributor

Heads-up: PR #86660 (#86660) cherry-picked your commit with authorship preserved — registered_names() plus the hermes tools platform-recognition change landed as part of the #81163/#78050 fix (with a follow-up making registered_names() honor profile scope). Closing this as merged via the salvage PR. Thanks!

@teknium1 teknium1 closed this Aug 15, 2026
prmartinow pushed a commit to prmartinow/hermes-agent that referenced this pull request Aug 26, 2026
…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.
bobaba76 pushed a commit to bobaba76/hermes-agent that referenced this pull request Aug 27, 2026
…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.
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 P3 Low — cosmetic, nice to have sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants