hermes-agent/tools/environments
teknium1 24479625a2 fix: Docker backend fails when docker is not in PATH (macOS gateway)
On macOS, Docker Desktop installs the CLI to /usr/local/bin/docker, but
when Hermes runs as a gateway service (launchd) or in other non-login
contexts, /usr/local/bin is often not in PATH. This causes the Docker
requirements check to fail with 'No such file or directory: docker' even
though docker works fine from the user's terminal.

Add find_docker() helper that uses shutil.which() first, then probes
common Docker Desktop install paths on macOS (/usr/local/bin,
/opt/homebrew/bin, Docker.app bundle). The resolved path is cached and
passed to mini-swe-agent via its 'executable' parameter.

- tools/environments/docker.py: add find_docker(), use it in
  _storage_opt_supported() and pass to _Docker(executable=...)
- tools/terminal_tool.py: use find_docker() in requirements check
- tests/tools/test_docker_find.py: 4 tests (PATH, fallback, not found, cache)

2877 tests pass.
2026-03-10 20:45:13 -07:00
..
__init__.py feat(environments): add Daytona cloud sandbox backend 2026-03-05 10:02:21 -08:00
base.py fix(security): pipe sudo password via stdin instead of shell cmdline 2026-03-10 06:34:59 -07:00
daytona.py fix(security): pipe sudo password via stdin instead of shell cmdline 2026-03-10 06:34:59 -07:00
docker.py fix: Docker backend fails when docker is not in PATH (macOS gateway) 2026-03-10 20:45:13 -07:00
local.py fix(security): pipe sudo password via stdin instead of shell cmdline 2026-03-10 06:34:59 -07:00
modal.py fix(security): pipe sudo password via stdin instead of shell cmdline 2026-03-10 06:34:59 -07:00
singularity.py fix(security): pipe sudo password via stdin instead of shell cmdline 2026-03-10 06:34:59 -07:00
ssh.py fix(security): pipe sudo password via stdin instead of shell cmdline 2026-03-10 06:34:59 -07:00