diff --git a/runner/server.py b/runner/server.py index 21607424..84d2eb3f 100644 --- a/runner/server.py +++ b/runner/server.py @@ -1855,7 +1855,8 @@ def _build_dsh(provider: str, auth: Auth, model: str, prompt: str, cwd: str, env # its dsh-agent-instructions loader), same mechanism as codex/hermes/pi. job = {"prompt": prompt, "model": model, "cwd": cwd, "session_id": resume_session_id or "", - "mcp_servers": [s for s in (mcp_servers or []) if (s or {}).get("url")]} + # a server is a url or, for a plugin's stdio server, the launcher the runner wrote + "mcp_servers": [s for s in (mcp_servers or []) if (s or {}).get("url") or (s or {}).get("command")]} if not _DSH_DEEPSEEK_MODEL.search(model or ""): # Family decides the route, not the integration's name: deepseek models keep the # verified dsh-llm-deepseek launch path whichever endpoint serves them; every other diff --git a/runner/tests/test_uhp_plugins.py b/runner/tests/test_uhp_plugins.py index 03ae4d28..c2f09c83 100644 --- a/runner/tests/test_uhp_plugins.py +++ b/runner/tests/test_uhp_plugins.py @@ -200,3 +200,15 @@ def test_clients_without_an_sse_transport_leave_the_server_out(tmp_path): names = [r["config"]["serverName"] for e in yaml.safe_load(out.read_text()) if isinstance(e, dict) for r in (e.get("insert") or []) if r.get("name") == "@deepseek-ai/dsh-mcp-client"] assert names == ["probe_http"] + + +def test_dsh_job_keeps_a_stdio_server(tmp_path): + """_build_dsh hands the driver a job whose server list kept only urls, from before plugins: + the stdio row the driver knows how to write never saw the server (hosted, 2026-09-15, the + compose patch held the http row alone).""" + env = {"HOME": str(tmp_path)} + servers = [{"name": "probe", "command": "/ws/.launch-probe.sh", "args": ["--data", "/d"], "plugin": "hr-probe"}, + {"name": "remote", "url": "https://mcp.example.invalid/mcp"}] + cmd = rn._build_dsh("deepseek", rn.Auth(api_key="k", base_url="https://api.deepseek.com"), "deepseek-v4-pro", "x", str(tmp_path), env, mcp_servers=servers) + job = json.loads(cmd[2]) + assert [s["name"] for s in job["mcp_servers"]] == ["probe", "remote"]