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:
@@ -37,6 +37,11 @@ def main() -> int:
|
||||
print("JARVIS_VOICE_TOKEN is not set", file=sys.stderr)
|
||||
return 2
|
||||
|
||||
# The MCP servers' secrets leave the environment before any child process (MeloTTS) starts;
|
||||
# only the brain gets them (voice_worker.spec.md, "Tools").
|
||||
from .brain import take_mcp_env
|
||||
mcp_env = take_mcp_env()
|
||||
|
||||
from .server import VoiceWorker, is_loopback
|
||||
from .stt_whisper import WhisperTranscriber
|
||||
from .vad import SileroVad
|
||||
@@ -59,7 +64,8 @@ def main() -> int:
|
||||
history = HistoryStore(args.history)
|
||||
if args.brain:
|
||||
from .brain import JarvisBrain
|
||||
brain = JarvisBrain(language=args.tool_language or None, reply_language=args.reply_language or None)
|
||||
brain = JarvisBrain(language=args.tool_language or None, reply_language=args.reply_language or None,
|
||||
mcp_env=mcp_env)
|
||||
|
||||
async def run() -> None:
|
||||
worker = VoiceWorker(token, transcriber, vad.stream, tts, history=history, brain=brain)
|
||||
|
||||
Reference in New Issue
Block a user