From 3f8461d9eb582f1166fff77d6d51409d1dd1ec8c Mon Sep 17 00:00:00 2001 From: ekko <152005280+EKKOLearnAI@users.noreply.github.com> Date: Sat, 16 May 2026 08:31:18 +0800 Subject: [PATCH] suppress bridge CLI platform hint (#776) --- .../hermes/agent-bridge/hermes_bridge.py | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/packages/server/src/services/hermes/agent-bridge/hermes_bridge.py b/packages/server/src/services/hermes/agent-bridge/hermes_bridge.py index dbf5c72..e67fb78 100644 --- a/packages/server/src/services/hermes/agent-bridge/hermes_bridge.py +++ b/packages/server/src/services/hermes/agent-bridge/hermes_bridge.py @@ -36,6 +36,28 @@ def _bridge_platform() -> str: return os.environ.get("HERMES_AGENT_BRIDGE_PLATFORM", "cli").strip() or "cli" +def _suppress_bridge_platform_hint() -> None: + raw = os.environ.get("HERMES_BRIDGE_SUPPRESS_PLATFORM_HINT", "cli").strip() + if raw.lower() in {"0", "false", "no", "off"}: + return + targets = {part.strip().lower() for part in raw.split(",") if part.strip()} + if not targets: + return + try: + from agent import prompt_builder + + for target in targets: + prompt_builder.PLATFORM_HINTS.pop(target, None) + except Exception: + pass + + run_agent_module = sys.modules.get("run_agent") + hints = getattr(run_agent_module, "PLATFORM_HINTS", None) + if isinstance(hints, dict): + for target in targets: + hints.pop(target, None) + + def _candidate_agent_roots(raw: str | None = None) -> list[Path]: candidates: list[Path] = [] if raw: @@ -379,6 +401,7 @@ class AgentPool: return existing _ensure_agent_imports() + _suppress_bridge_platform_hint() from run_agent import AIAgent original_home = _apply_profile_env(profile)