mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
macOS sets TMPDIR to /var/folders/xx/.../T/ (~51 chars). Combined with agent-browser session names, socket paths reach 121 chars — exceeding the 104-byte macOS AF_UNIX limit. This causes 'Screenshot file was not created' errors and silent browser_vision failures on macOS. Fix: use /tmp/ on macOS (symlink to /private/tmp, sticky-bit protected). On Linux, tempfile.gettempdir() already returns /tmp — no behavior change. Changes in browser_tool.py: - Add _socket_safe_tmpdir() helper — returns /tmp on macOS, gettempdir() elsewhere - Replace all 3 tempfile.gettempdir() calls for socket dirs - Set mode=0o700 on socket dirs for privacy (was using default umask) - Guard vision/text client init with try/except — a broken auxiliary config no longer prevents the entire browser_tool module from importing (which would disable all 10 browser tools, not just vision) - Improve screenshot error messages with mode info and diagnostic hints - Don't delete screenshots when LLM analysis fails — the capture was valid, only the vision API call failed. Screenshots are still cleaned up by the existing 24-hour _cleanup_old_screenshots mechanism. Changes in code_execution_tool.py: - Same /tmp fix for RPC socket path (was 103 chars on macOS — one char from the 104-byte limit) |
||
|---|---|---|
| .. | ||
| environments | ||
| __init__.py | ||
| approval.py | ||
| browser_tool.py | ||
| clarify_tool.py | ||
| code_execution_tool.py | ||
| cronjob_tools.py | ||
| debug_helpers.py | ||
| delegate_tool.py | ||
| file_operations.py | ||
| file_tools.py | ||
| fuzzy_match.py | ||
| homeassistant_tool.py | ||
| honcho_tools.py | ||
| image_generation_tool.py | ||
| interrupt.py | ||
| mcp_tool.py | ||
| memory_tool.py | ||
| mixture_of_agents_tool.py | ||
| openrouter_client.py | ||
| patch_parser.py | ||
| process_registry.py | ||
| registry.py | ||
| rl_training_tool.py | ||
| send_message_tool.py | ||
| session_search_tool.py | ||
| skill_manager_tool.py | ||
| skills_guard.py | ||
| skills_hub.py | ||
| skills_sync.py | ||
| skills_tool.py | ||
| terminal_tool.py | ||
| todo_tool.py | ||
| transcription_tools.py | ||
| tts_tool.py | ||
| vision_tools.py | ||
| web_tools.py | ||