Skip to content

fix(tools): scope google chat toolset to platform - #36027

Closed
aeyeopsdev wants to merge 2 commits into
NousResearch:mainfrom
AeyeOps:fix/google-chat-toolset-scope
Closed

fix(tools): scope google chat toolset to platform#36027
aeyeopsdev wants to merge 2 commits into
NousResearch:mainfrom
AeyeOps:fix/google-chat-toolset-scope

Conversation

@aeyeopsdev

@aeyeopsdev aeyeopsdev commented May 31, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Scopes the bundled google_chat plugin toolset to the Google Chat platform so it does not appear as an opt-in toolset for unrelated platforms.

Related Issue

N/A — small platform-toolset hygiene fix found while preparing Google Chat plugin work.

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✅ Tests (adding or improving test coverage)

Changes Made

  • hermes_cli/tools_config.py: add google_chat to platform-scoped toolset restrictions.
  • hermes_cli/tools_config.py: skip restricted plugin toolsets while resolving default platform tools.
  • tests/hermes_cli/test_tools_config.py: cover Google Chat toolset visibility and save-time stripping on non-Google-Chat platforms.

How to Test

  1. scripts/run_tests.sh tests/hermes_cli/test_tools_config.py
  2. python /root/.codex/skills/hermes-upstream-pr/scripts/pr_preflight.py --base upstream/main

Checklist

Code

  • I've read the Contributing Guide.
  • My commit message follows Conventional Commits.
  • I searched for existing PRs to make sure this isn't a duplicate.
  • My PR contains only changes related to this fix.
  • I've added tests for my changes.
  • I've tested on Linux.

Documentation & Housekeeping

  • Documentation update N/A.
  • cli-config.yaml.example update N/A.
  • CONTRIBUTING.md / AGENTS.md update N/A.
  • Cross-platform impact considered: pure config-resolution logic and tests.
  • Tool descriptions/schemas update N/A.

Related PRs

Screenshots / Logs

Validation passed locally:

scripts/run_tests.sh tests/hermes_cli/test_tools_config.py
90 tests passed, 0 failed

@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/tools Tool registry, model_tools, toolsets comp/plugins Plugin system and bundled plugins labels May 31, 2026
@aeyeopsdev
aeyeopsdev marked this pull request as ready for review May 31, 2026 21:07
@aeyeopsdev
aeyeopsdev force-pushed the fix/google-chat-toolset-scope branch from 0573b01 to 8a4c717 Compare June 30, 2026 12:19
@aeyeopsdev
aeyeopsdev force-pushed the fix/google-chat-toolset-scope branch from e52ac5d to c8f440b Compare July 5, 2026 23:27

@teknium1 teknium1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the focused platform-scope work. The current implementation does not expose the google_chat value as a plugin toolset: plugins/platforms/google_chat/adapter.py:3290 only calls ctx.register_platform(...), while hermes_cli/plugins.py:2422-2462 derives plugin toolsets solely from tools registered through register_tool.

Problems

  • The new _TOOLSET_PLATFORM_RESTRICTIONS["google_chat"] entry has no current runtime target. The proposed skip in hermes_cli/tools_config.py only iterates plugin_ts_keys, which cannot contain Google Chat without registered plugin tools.
  • The new tests validate the generic restriction helper and save filter, but do not cover an actual Google Chat toolset reaching _get_platform_tools().

Suggested changes

  • Defer this scope entry until a Google Chat-specific model toolset exists, and add an integration-level resolution test alongside that toolset.

Automated hermes-sweeper review.

_TOOLSET_PLATFORM_RESTRICTIONS: Dict[str, Set[str]] = {
"discord": {"discord"},
"discord_admin": {"discord"},
"google_chat": {"google_chat"},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

google_chat is currently a platform adapter, not a plugin toolset: plugins/platforms/google_chat/adapter.py:3290 calls register_platform, and get_plugin_toolsets() derives entries only from registered tools (hermes_cli/plugins.py:2422-2462). This restriction has no runtime target until Google Chat-specific model tools are registered.

@teknium1 teknium1 added sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:blast-contained Sweeper blast radius: contained — one narrow path / opt-in / few users labels Jul 13, 2026
@teknium1

Copy link
Copy Markdown
Contributor

Thanks for the PR — closing this one on a wrong-premise basis after verification against main.

There is no google_chat toolset to scope: plugins/platforms/google_chat/ registers a platform adapter only and calls register_tool() zero times, so get_plugin_toolsets() can never yield a google_chat toolset for _TOOLSET_PLATFORM_RESTRICTIONS to restrict. The new config entry guards something that doesn't exist, and none of the sibling PRs in your stack add tools either.

The generic "skip restricted plugin toolsets in _get_platform_tools" hunk is reasonable defensive machinery — if a plugin platform ever does register its own toolset and needs platform-scoping, that change would be welcome as its own PR alongside the toolset that needs it.

(Your other Google Chat PRs are being reviewed on their merits separately.)

@teknium1 teknium1 closed this Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/plugins Plugin system and bundled plugins comp/tools Tool registry, model_tools, toolsets P3 Low — cosmetic, nice to have sweeper:blast-contained Sweeper blast radius: contained — one narrow path / opt-in / few users 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