The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(lsp): strip credentials from installer env
dsadea2dae4f4e84
diff --git a/agent/lsp/install.py b/agent/lsp/install.pyindex 4a658a62db6..76f9bccaac3 100644--- a/agent/lsp/install.py+++ b/agent/lsp/install.py@@ -262,7 +262,9 @@ def _install_npm(pkg: str, bin_name: str, extra_pkgs: Optional[list] = None) ->install_targets = [pkg] + list(extra_pkgs or [])cmd = [pm_bin, *_NODE_PM_ARGV[pm](str(staging)), *install_targets]logger.info("[install] %s %s", pm, " ".join(cmd[1:]))- if not _run_installer(pm, pkg, cmd, timeout=300, env=with_hermes_node_path()):+ from tools.environments.local import hermes_subprocess_env+ # Package install scripts are third-party code: scrubbed env, never Hermes' credentials.+ if not _run_installer(pm, pkg, cmd, timeout=300, env=with_hermes_node_path(hermes_subprocess_env())):return Nonefound = _first_existing(staging / "node_modules" / ".bin" / bin_name)if found is not None:@@ -281,7 +283,9 @@ def _install_go(pkg: str, bin_name: str) -> Optional[str]:return Nonestaging = hermes_lsp_bin_dir()logger.info("[install] go install %s (GOBIN=%s)", pkg, staging)- if not _run_installer("go", pkg, [go, "install", pkg], timeout=600, env={**os.environ, "GOBIN": str(staging)}):+ from tools.environments.local import hermes_subprocess_env+ env = {**hermes_subprocess_env(), "GOBIN": str(staging)}+ if not _run_installer("go", pkg, [go, "install", pkg], timeout=600, env=env):return Nonebin_path = (staging / bin_name).with_suffix(".exe") if _is_windows() else staging / bin_nameif bin_path.exists():