From 7729533106f642a5b24473e963baec5283fbca98 Mon Sep 17 00:00:00 2001 From: fastfinge Date: Sun, 6 Sep 2026 09:39:31 -0400 Subject: [PATCH] fix(delegate): use tools.delegate_tool_toolsets.DEFAULT_TOOLSETS Hermes 2026-09 moved DEFAULT_TOOLSETS out of tools.delegate_tool into tools.delegate_tool_toolsets. Reading dt.DEFAULT_TOOLSETS now goes through the plugin-compat shim and emits HermesPluginCompatWarning on every load; the shim is removed on 2026-09-14, after which the old path raises AttributeError and the code_intel force-append would silently stop working (swallowed by the surrounding try/except). Import the new module directly, falling back to the old location so the plugin keeps working on pre-2026-09 Hermes builds. --- __init__.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/__init__.py b/__init__.py index 1f2d65b..811b9f2 100644 --- a/__init__.py +++ b/__init__.py @@ -398,8 +398,15 @@ def _transform_tool_result_nudge(**kwargs: Any) -> Optional[str]: # ── FORCE code_intel into every subagent + inject steering ── # Renato's rule: code_intel must be DEFAULT for ALL agents, and # subagents must KNOW which tools exist and how to use them. - if "code_intel" not in dt.DEFAULT_TOOLSETS: - dt.DEFAULT_TOOLSETS.append("code_intel") + # Hermes 2026-09 moved DEFAULT_TOOLSETS from tools.delegate_tool to + # tools.delegate_tool_toolsets (old path is a plugin-compat shim, + # removed 2026-09-14). Fall back to the old location for older builds. + try: + import tools.delegate_tool_toolsets as dtt + except ImportError: + dtt = dt + if "code_intel" not in dtt.DEFAULT_TOOLSETS: + dtt.DEFAULT_TOOLSETS.append("code_intel") _CODE_INTEL_STEERING = ( "\n\n## 🧠 Code Intelligence Tools (PREFER over read_file/grep/patch)\n"