Skip to content

feat(gateway): per-channel enabled_toolsets on channel_overrides - #88550

Open
sene1337 wants to merge 1 commit into
NousResearch:mainfrom
sene1337:feat/channel-override-toolsets
Open

feat(gateway): per-channel enabled_toolsets on channel_overrides#88550
sene1337 wants to merge 1 commit into
NousResearch:mainfrom
sene1337:feat/channel-override-toolsets

Conversation

@sene1337

Copy link
Copy Markdown

Summary

Family / multi-mode messaging needs different tool surfaces on different chats of the same platform.

Example (BlueBubbles / iMessage):

  • Group capture rooms → narrow tools (skills, todo, kanban, no_mcp) so multiparty traffic cannot drive terminal/files/wiki
  • Private household desk chat → full tools (terminal, file, web, …) so the agent can actually look things up

Today platform_toolsets.<platform> is all-or-nothing for every chat on that platform. channel_overrides already support per-chat model / provider / system_prompt, but not toolsets.

This PR adds:

platforms:
  bluebubbles:
    channel_overrides:
      "any;+;DESK-GUID":
        enabled_toolsets: [terminal, file, web, skills, todo, kanban]
      "any;+;CAPTURE-GUID":
        enabled_toolsets: [skills, todo, kanban, no_mcp]

Behavior

enabled_toolsets Effect
absent / empty platform defaults (platform_toolsets.<platform>)
non-empty list replaces platform toolsets for that chat only
  • Validated through the same _get_platform_tools path as platform config and webhook route toolsets (unknown / platform-restricted names dropped)
  • Resolution order: adapter toolsets_for_source (webhooks) → channel override → platform defaults
  • Participates in agent cache signature (rebuild on mismatch; no silent mid-turn tool schema swap)

Works for any platform that uses channel_overrides (BlueBubbles, Discord, Telegram, …), not only BlueBubbles.

Related

Builds on the multi-mode messaging story in:

#63990 answers "which conversations are admitted."
This PR answers "once admitted, which tools does this conversation get."

They are complementary; neither replaces the other.

Tests

uv run --with pytest --extra dev pytest \
  tests/gateway/test_channel_override_toolsets.py \
  tests/gateway/test_channel_overrides.py \
  tests/gateway/test_webhook_route_toolsets.py -q
# 26 passed

Docs

  • website/docs/user-guide/messaging/index.md — channel override section extended with enabled_toolsets + BlueBubbles example

Allow platforms.<name>.channel_overrides.<chat_id>.enabled_toolsets to
replace platform_toolsets for that chat only (same validation path as
webhook route toolsets). Enables multi-mode BlueBubbles/Discord/etc:
restricted capture groups vs full-tool private desk chats without
widening every conversation on the platform.

Related to NousResearch#63990 (chat GUID admission) as the next layer of multi-mode
messaging isolation.
@sene1337

Copy link
Copy Markdown
Author

Cross-link: builds on multi-mode messaging isolation from #63990 (chat GUID admission). This PR is the per-chat tool surface layer.

@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/gateway Gateway runner, session dispatch, delivery area/config Config system, migrations, profiles sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades labels Aug 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/config Config system, migrations, profiles comp/gateway Gateway runner, session dispatch, delivery P3 Low — cosmetic, nice to have sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants