Skip to content

fix(toolsets): platform plugins without a static bundle silently get zero tools; config set stores list literals as strings - #855

Open
hashbender wants to merge 1 commit into
mainfrom
mirror/pr-57063
Open

fix(toolsets): platform plugins without a static bundle silently get zero tools; config set stores list literals as strings#855
hashbender wants to merge 1 commit into
mainfrom
mirror/pr-57063

Conversation

@hashbender

Copy link
Copy Markdown
Owner

What does this PR do?

Fixes two silent-failure paths that leave a gateway platform running with zero tools while everything looks configured.

1. Eight bundled platform plugins ship without a hermes-<platform> static bundle

_get_platform_tools falls back to hermes-<platform> for any platform missing from config's platform_toolsets, and resolve_toolset returns [] for an unknown name (the NousResearch#38798 shape). The runtime auto-generate in resolve_toolset only fires once gateway.platform_registry has the platform registered, so outside the gateway process (cron delivery, kanban dispatch, hermes tools, doctor) — and in the explicit-config composite expansion, which skips names absent from TOOLSETS — these platforms silently degrade to zero tools:

line, google_chat, teams, irc, ntfy, photon, simplex, raft

LINE shipped this way in NousResearch#23197 ("zero core edits" by design). Real-world impact we hit: a LINE deployment ran for weeks with a zero-tool agent — no read_file, no memory, no MCP servers — so the model could only ask the user for information it was supposed to look up; every turn was api_calls=1 with no diagnostic anywhere.

Fix: add the 8 missing static bundles (core tools, mirroring hermes-telegram / hermes-signal), include them in the hermes-gateway composite, and add a regression test that walks plugins/platforms/ so the next platform plugin cannot ship without a bundle.

2. hermes config set stores list/mapping literals as strings

set_config_value only coerces bool/int/float. A list literal (e.g. hermes config set platform_toolsets.discord '["clarify","file",...]') is stored as a raw string with no warning — and every reader gated on isinstance(..., list) (_get_platform_tools, _get_enabled_set, _get_disabled_set) silently ignores it and falls back to its default. The setting looks saved but never takes effect. We found both a platform_toolsets entry and a plugins.enabled entry in this state in the wild.

Fix: values starting with [ or { are parsed with yaml.safe_load; non-list/dict results and YAML errors warn on stderr and keep the legacy string behavior.

Tests

  • tests/test_toolsets.py::TestBundledPlatformBundles — every plugins/platforms/<name>/ with a plugin.yaml must have a non-empty static bundle (include_registry=False); the 8 new bundles resolve to core tools; gateway composite includes them.
  • tests/hermes_cli/test_config_set_list_values.py — list/mapping literals parse to real lists/dicts, YAML flow lists work, invalid literals warn and keep string behavior, scalars unaffected.
  • Full tests/test_toolsets.py, tests/hermes_cli/test_tools_config.py, tests/hermes_cli/test_managed_scope_writeguard.py, tests/test_toolset_distributions.py: 170 passed.

Related


Mirror-of: NousResearch#57063
NousResearch#57063

…zero tools; config set stores list literals as strings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant