Skip to content

feat(tools): recover non-configurable toolsets, split discord tool, wire feishu - #15613

Merged
teknium1 merged 3 commits into
mainfrom
salvage/pr-15457-tools-fixes
Apr 25, 2026
Merged

feat(tools): recover non-configurable toolsets, split discord tool, wire feishu#15613
teknium1 merged 3 commits into
mainfrom
salvage/pr-15457-tools-fixes

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Salvage of #15457 by @alt-glitch onto current main.

Summary

Three independent fixes cleaning up tool/toolset wiring from the last 3 weeks:

  1. _get_platform_tools silently dropped non-configurable toolsets (discord, feishu_doc, feishu_drive) once the user saved via hermes tools. A second-pass recovery loop now adds them back in both code branches. Skip rules prevent noise (composites, plugins, already-claimed tools, other platforms' default-off toolsets).
  2. Splits discord_serverdiscord (fetch_messages, search_members, create_thread) and discord_admin (server management; default-off). Shared schema/handler builders, backward-compat get_dynamic_schema() kept.
  3. Wires feishu_doc_read + four feishu_drive_* tools into the hermes-feishu composite (landed in tools/ but never added to the toolset).

Credit

Original PR: #15457 by @alt-glitch — all three commits cherry-picked with authorship preserved.

Test plan

  • tests/hermes_cli/test_tools_config.py tests/tools/test_discord_tool.py tests/test_toolsets.py — 153 passed

Note

Tool rename discord_serverdiscord is a breaking schema change for any user with discord_server pinned in their platform_toolsets. Unlikely in practice (it's only ~5 days old and always sat under hermes-discord implicitly), but worth calling out.

The reverse-mapping loop in _get_platform_tools only checked
CONFIGURABLE_TOOLSETS, silently dropping platform-specific toolsets
like discord and feishu_doc whose tools were in the composite but
had no configurable key. Add a second pass over TOOLSETS that picks
up unclaimed toolsets whose tools are present in the resolved
composite.
Split the monolithic discord_server tool (14 actions) into two:

- discord: core actions (fetch_messages, search_members, create_thread)
  that are useful for the agent's normal operation. Auto-enabled on
  the discord platform via the pipeline fix.

- discord_admin: server management actions (list channels/roles, pins,
  role assignment) that require explicit opt-in via hermes tools.
  Added to CONFIGURABLE_TOOLSETS and _DEFAULT_OFF_TOOLSETS.
The feishu_doc and feishu_drive tools were registered in the tool
registry but never added to the hermes-feishu composite toolset.
The pipeline fix from the prior commit now recovers them automatically
once they are in the composite.
@teknium1
teknium1 force-pushed the salvage/pr-15457-tools-fixes branch from 60248f8 to 03a195b Compare April 25, 2026 11:50
@teknium1
teknium1 merged commit db09477 into main Apr 25, 2026
4 checks passed
@teknium1
teknium1 deleted the salvage/pr-15457-tools-fixes branch April 25, 2026 11:50
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/tools Tool registry, model_tools, toolsets platform/discord Discord bot adapter platform/feishu Feishu / Lark adapter labels Apr 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/tools Tool registry, model_tools, toolsets P2 Medium — degraded but workaround exists platform/discord Discord bot adapter platform/feishu Feishu / Lark adapter type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants