Use host_root chroot for Tentativa 3 fallback so it can reach the host hermes binary

This commit is contained in:
Antigravity
2026-05-10 01:11:50 -03:00
parent a84f51bf17
commit 636e7772c8

View File

@@ -519,7 +519,10 @@ def delegate_to_hermes(task: str) -> str:
if "not found" not in res.lower() and "no such file" not in res.lower(): if "not found" not in res.lower() and "no such file" not in res.lower():
return res return res
# Tentativa 3: Fallback para o CLI antigo do host (Antigravity original) # Tentativa 3: Fallback para o CLI antigo do host (Antigravity original via chroot)
if os.path.exists("/host_root"):
return run_bash(f"chroot /host_root /bin/bash -c \"hermes -z {safe_task}\"", timeout=300)
else:
return run_bash(f"hermes -z {safe_task}", timeout=300) return run_bash(f"hermes -z {safe_task}", timeout=300)
# ============================================================ # ============================================================