fix(app): MCP discovery never blocks a turn; secrets masked as lines are written; TTS child gets no MCP secrets
- Discovery runs outside the MCP tool cache's lock (one at a time), so a turn reading the cached tools never waits for a slow server; a new conversation refreshes in the background. - The log hub masks secrets before a line is kept or written, so a key replaced or removed later stays hidden on the screen, in copies, files and exports, also after a restart. - The worker takes JARVIS_MCP_ENV out of its environment at start, before MeloTTS runs, and hands it to the brain. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1188,13 +1188,14 @@ def run_reply_engine(db: "Database", cfg, tts: Optional[Any],
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
# Refresh MCP tools on new conversation (memory expired)
|
||||
# Refresh MCP tools on new conversation (memory expired), in the background: starting the
|
||||
# servers can be slow, and this turn uses the tools already cached.
|
||||
if is_new_conversation and getattr(cfg, "mcps", {}):
|
||||
try:
|
||||
from ..tools.registry import refresh_mcp_tools, is_mcp_cache_initialized
|
||||
from ..tools.registry import refresh_mcp_tools_in_background, is_mcp_cache_initialized
|
||||
if is_mcp_cache_initialized():
|
||||
debug_log("New conversation detected, refreshing MCP tools", "mcp")
|
||||
_tools, _errors = refresh_mcp_tools(verbose=False)
|
||||
debug_log("New conversation detected, refreshing MCP tools in the background", "mcp")
|
||||
refresh_mcp_tools_in_background()
|
||||
except Exception as e:
|
||||
debug_log(f"MCP refresh on new conversation failed: {e}", "mcp")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user