hermes-bsd/tools
Teknium 73dd584995
fix(mcp): propagate HERMES_HOME override onto the MCP event loop (#44220)
* fix(mcp): propagate HERMES_HOME override onto the MCP event loop

Closes the known limit documented in #44007: tasks scheduled via
run_coroutine_threadsafe are created INSIDE the MCP loop thread, so they
copy that thread's context — a per-request profile scope (dashboard
?profile= endpoints, e.g. the MCP 'Test server' probe) silently vanished
for anything resolving get_hermes_home() inside the coroutine. Most
visible symptom: OAuth token-store paths (HERMES_HOME/mcp-tokens/)
resolved against the process home instead of the selected profile, so
testing an OAuth MCP cross-profile read the wrong tokens.

_run_on_mcp_loop now wraps scheduled coroutines with the caller's
context-local override (_wrap_with_home_override): set inside the task's
own context on the loop, reset on completion — task-local, so concurrent
calls carrying different scopes don't interfere, and the loop thread's
default context stays untouched. No-op (coroutine passes through
unwrapped) when no override is active, i.e. every non-dashboard caller.

web_server's probe comment updated from 'known limit' to 'covered'.

Tests: override propagation (direct + factory form), OAuth token-path
resolution on the loop, loop-context cleanliness after scoped calls,
no-op passthrough. 225 green across mcp_tool + unification suites.

* test(mcp): concurrent different-scope calls don't interfere
2026-06-11 04:37:01 -07:00
..
computer_use fix(xai): accept Grok Build code during loopback wait + tiny screenshot guard 2026-06-09 23:21:24 -07:00
environments fix(terminal): complete sane PATH entries on POSIX (salvage of #35614) (#42653) 2026-06-09 02:21:12 -07:00
neutts_samples
__init__.py
ansi_strip.py
approval.py fix(approval): resolve Hermes home at detection time, not import time 2026-06-08 11:55:40 -07:00
binary_extensions.py
browser_camofox.py
browser_camofox_state.py
browser_cdp_tool.py
browser_dialog_tool.py
browser_supervisor.py
browser_tool.py fix(tools): percent-encode non-ascii URL components 2026-06-07 11:42:26 -06:00
budget_config.py
checkpoint_manager.py fix: prevent TUI gateway stdin EOF crash across all TUI-context subprocess calls 2026-06-08 22:46:57 -07:00
clarify_gateway.py
clarify_tool.py
code_execution_tool.py fix: prevent TUI gateway stdin EOF crash across all TUI-context subprocess calls 2026-06-08 22:46:57 -07:00
computer_use_tool.py
credential_files.py refactor(image_gen): delegate cache-path mapping to shared helper 2026-06-06 13:19:07 -07:00
cronjob_tools.py revert(cron): remove per-job profile support (PR #28124) (#43956) 2026-06-10 20:46:17 -07:00
debug_helpers.py
delegate_tool.py fix(delegate): resolve custom-endpoint subagent pools by endpoint identity (#41730) 2026-06-07 22:05:14 -07:00
discord_tool.py
env_passthrough.py
env_probe.py fix: prevent TUI gateway stdin EOF crash across all TUI-context subprocess calls 2026-06-08 22:46:57 -07:00
fal_common.py
feishu_doc_tool.py
feishu_drive_tool.py
file_operations.py fix(file-ops): make rg/grep search error guard reachable and preserve partial matches (#39858) 2026-06-05 17:44:52 -07:00
file_state.py
file_tools.py fix(file-tools): reject sentinel TERMINAL_CWD; anchor worktree edits before live cwd exists (#41861) 2026-06-07 23:58:47 -07:00
fuzzy_match.py
homeassistant_tool.py
image_generation_tool.py refactor(image_gen): delegate cache-path mapping to shared helper 2026-06-06 13:19:07 -07:00
interrupt.py
kanban_tools.py
lazy_deps.py feat(web): Parallel-backed web search & extract — free Search MCP when keyless, v1 REST when keyed 2026-06-10 19:54:38 -07:00
managed_tool_gateway.py
mcp_oauth.py
mcp_oauth_manager.py
mcp_tool.py fix(mcp): propagate HERMES_HOME override onto the MCP event loop (#44220) 2026-06-11 04:37:01 -07:00
memory_tool.py fix(memory,skills): repair write-approval inline prompt, gateway staging, and gateway /skills review (#43452) 2026-06-10 02:57:15 -07:00
microsoft_graph_auth.py
microsoft_graph_client.py
mixture_of_agents_tool.py
neutts_synth.py
openrouter_client.py
osv_check.py fix(osv_check): honor npx --package/-p install target when parsing package arg (#40567) 2026-06-06 18:30:39 -07:00
patch_parser.py
path_security.py
process_registry.py fix: prevent TUI gateway stdin EOF crash across all TUI-context subprocess calls 2026-06-08 22:46:57 -07:00
read_terminal_tool.py feat(desktop): resizable VS Code-themed terminal pane + palette polish (#42521) 2026-06-09 23:15:20 -05:00
registry.py
schema_sanitizer.py
send_message_tool.py fix(photon): support E.164 and DM GUID targets for home channel 2026-06-08 21:03:58 -07:00
session_search_tool.py feat(desktop): drag sessions into chat as @session links + spawn loader 2026-06-04 19:41:51 -05:00
skill_manager_tool.py refactor(memory,skills): replace tri-state write_mode with boolean write_approval (default off) (#43354) 2026-06-09 23:21:14 -07:00
skill_provenance.py
skill_usage.py fix(curator): protect load-bearing built-in skills from archival/consolidation (#41817) 2026-06-07 22:23:29 -07:00
skills_ast_audit.py
skills_guard.py
skills_hub.py fix(skills): bound ClawHub catalog walk to requested page on cold start (#43395) 2026-06-10 01:01:53 -07:00
skills_sync.py
skills_tool.py fix(skills): resolve skill_view by frontmatter name when dir name differs 2026-06-10 10:51:45 +05:30
slash_confirm.py
terminal_tool.py fix(desktop): use sudo callback without interactive env 2026-06-10 14:29:56 -07:00
thread_context.py
threat_patterns.py
tirith_security.py fix: prevent TUI gateway stdin EOF crash across all TUI-context subprocess calls 2026-06-08 22:46:57 -07:00
todo_tool.py hardening(todo): bound TodoStore item content length and count 2026-06-07 18:06:27 -07:00
tool_backend_helpers.py
tool_output_limits.py
tool_result_storage.py
tool_search.py
transcription_tools.py fix: prevent TUI gateway stdin EOF crash across all TUI-context subprocess calls 2026-06-08 22:46:57 -07:00
tts_tool.py feat(tts): add Gemini audio tag rewrite 2026-06-10 02:57:39 -07:00
url_safety.py fix(tools): percent-encode non-ascii URL components 2026-06-07 11:42:26 -06:00
video_generation_tool.py
vision_tools.py fix(deps): force prompt=False on the two mid-session lazy-install tool paths 2026-06-06 18:44:15 -07:00
voice_mode.py fix: prevent TUI gateway stdin EOF crash across all TUI-context subprocess calls 2026-06-08 22:46:57 -07:00
web_tools.py feat(web): Parallel-backed web search & extract — free Search MCP when keyless, v1 REST when keyed 2026-06-10 19:54:38 -07:00
website_policy.py
write_approval.py fix(memory,skills): repair write-approval inline prompt, gateway staging, and gateway /skills review (#43452) 2026-06-10 02:57:15 -07:00
x_search_tool.py
xai_http.py
yuanbao_tools.py