HarnessRouter Community Edition: the self-hosted, Apache-2.0 edition of the unified interface for agent harnesses. Run Codex, Claude Code, Hermes, PI, DSH, and more through one API, with sessions, streaming, files, cancellation, and failure handling. Implements the Unified Harness Protocol (UHP), an open standard. Your keys, your infrastructure.
Python agent-apiagent-frameworkagent-harnessai-agentsai-infrastructurecoding-agentconformance-testingdeepseek-harnessharness-engineeringhermesllmopen-protocolopen-sourceopen-standardpi-coding-agentself-hosteduhpunified-apiunified-harness-protocolunified-interface
dsh finds a setup's and a plugin package's skills, and offers no web search that calls DeepSeek's API with the relay's placeholder key (#605)
github-actions[bot]20d73fe727c8
diff --git a/gateway/app.py b/gateway/app.pyindex 4e1fabbe..f67f39c2 100644--- a/gateway/app.py+++ b/gateway/app.py@@ -18452,9 +18452,11 @@ _BASE_CATALOG: dict[str, dict] = {# on 2026-09-08 (goal, plan, job and agent-messaging internals left out). No per-tool# switch exists on the wire, so disabling is an instruction to the model, the same# standing as codex/hermes.+ # web_search is not offered: dsh's stock provider calls DeepSeek's own API with the relay's placeholder+ # key (401 every time, and off the turn's connection), so the driver turns that row off."tools": [("bash", "Bash"), ("read", "File Read"), ("write", "File Write"),("edit", "Edit"), ("str_replace_editor", "String Replace Editor"),- ("glob", "Glob"), ("grep", "Grep"), ("web_search", "Web Search"),+ ("glob", "Glob"), ("grep", "Grep"),("web_fetch", "Web Fetch"), ("todo_write", "Todo"), ("skill", "Skill"),("subagent", "Subagent"), ("subagent_fork", "Subagent (fork)"),("workflow", "Workflow")],diff --git a/runner/dsh_driver.py b/runner/dsh_driver.pyindex 83c30e57..d4544519 100644--- a/runner/dsh_driver.py+++ b/runner/dsh_driver.py@@ -498,6 +498,16 @@ def _compose_patch(home: pathlib.Path, servers: list[dict], llm: dict | None = Nentries: list = [{"id": "sdk-jsonrpc-server", "disabled": True}]entries += [{"id": rid, "disabled": True}for rid in ("sandbox", "sandbox-policy", "bash-sandbox", "fs-sandbox", "permission")]+ # The stock web_search provider calls DeepSeek's own API (https://api.deepseek.com/anthropic/v1/messages) with+ # the relay's placeholder key: every search answered 401 "Authentication Fails" (measured on the test instance,+ # 2026-10-27, and on the hosted service), and it would send a turn's queries to a provider the turn's+ # connection never named. The provider row is off, and the tool itself is not registered: with the row off+ # alone the model was still offered web_search, and every call failed "the configured web provider is not+ # registered" (measured on the test instance). `search: false` is the web tool's own switch (its config:+ # search, fetch, both default true), merged into the stock `tool-web` row; web_fetch (plain HTTP) stays, and a+ # setup's own search plug is how an agent searches.+ entries.append({"id": "web-search-deepseek", "disabled": True})+ entries.append({"id": "tool-web", "config": {"search": False}})cjs = home / ".dsh" / "hr_dsh_server.mjs"inserted: list = [{"id": "hr-sdk-jsonrpc-server", "name": str(cjs),"inject": ["sdkAppStartup", "loader"],@@ -560,6 +570,32 @@ def _compose_patch(home: pathlib.Path, servers: list[dict], llm: dict | None = Nreturn str(path)+# dsh's skill tool loads only what its skill-filesystem provider found (the runtime's own docs: project roots+# <projectRoot>/.dsh/skills and .agents/skills, Config.customSkillDirs, then <dshHome>/skills and <agentsHome>/skills;+# a root's direct children only, <name>/SKILL.md or <name>.md). The runner writes a setup's skills to .harness/skills+# and a plugin package's to .harness/plugins/<package>/skills, neither of them a root, so every `skill` call answered+# 'Error: skill "<name>" is unknown or no longer available' while AGENTS.md listed the names (measured on the test+# instance, 2026-10-27, 2 of 2 for the built-in officecli; the hosted service saw 29 of 29). Each one is copied+# into <dshHome>/skills, the user root: inside this session's own home under .harness/, so never a produced file,+# and rewritten each turn. A setup's own skill wins a name a package also uses; packages in name order after it.+def _install_skills(home: pathlib.Path, cwd: str) -> list[str]:+ import shutil+ dest = home / ".dsh" / "skills"+ root = pathlib.Path(cwd) / ".harness"+ sources = [root / "skills"] + sorted(p / "skills" for p in (root / "plugins").glob("*") if (p / "skills").is_dir())+ shutil.rmtree(dest, ignore_errors=True)+ installed: list[str] = []+ for src in sources:+ if not src.is_dir():+ continue+ for d in sorted(src.iterdir()):+ if not (d.is_dir() and (d / "SKILL.md").is_file()) or d.name in installed or d.name.startswith("."):+ continue+ shutil.copytree(d, dest / d.name, symlinks=False)+ installed.append(d.name)+ return installed++def main() -> int:global UPSTREAM_BASE, UPSTREAM_KEY, EFFORT, EFFORT_ROUTEjob = json.loads(sys.argv[1])@@ -569,6 +605,10 @@ def main() -> int:EFFORT_ROUTE = os.environ.pop("HR_DSH_REASONING_ROUTE", "")home = pathlib.Path(os.environ.get("HOME") or ".")cwd = job.get("cwd") or os.getcwd()+ try:+ _install_skills(home, cwd)+ except OSError as e: # a turn without its skills still runs, and says why on the runner's log+ print(f"[dsh] skills not installed: {type(e).__name__}: {e}", file=sys.stderr, flush=True)srv = http.server.ThreadingHTTPServer(("127.0.0.1", 0), _Relay)threading.Thread(target=srv.serve_forever, daemon=True).start()diff --git a/runner/server.py b/runner/server.pyindex 7af8831e..c5a4ec05 100644--- a/runner/server.py+++ b/runner/server.py@@ -1675,7 +1675,8 @@ def _write_skills(cwd: str, skills: list[dict], backend: str = "claude") -> listrootrels = [str(_ZEROCLAW_AGENT_WS / "skills")]entryroot = str(_ZEROCLAW_AGENT_WS / "skills")else:- # dsh has no skill loader; the AGENTS.md block below is the only door.+ # dsh's driver copies these into dsh's own skill root each turn (dsh_driver._install_skills), where its+ # `skill` tool finds them; the AGENTS.md block below names them.# aider lands here on purpose too, and for a stronger reason: it has no skill loader AND no# instruction-file discovery, so its turn builder passes every file under this directory to# --read explicitly. Under .harness/ the bundle is excluded from produced files, so a skilldiff --git a/runner/tests/test_dsh_normalize.py b/runner/tests/test_dsh_normalize.pyindex e40eb40b..9ee92925 100644--- a/runner/tests/test_dsh_normalize.py+++ b/runner/tests/test_dsh_normalize.py@@ -226,7 +226,9 @@ def test_compose_patch_swaps_the_server_row_and_inserts_one_mcp_row_per_server(t"headers": {"X-Trace": "1"}},{"name": "nourl"}])disabled = [e["id"] for e in doc if e.get("disabled") is True]- assert disabled == ["sdk-jsonrpc-server", "sandbox", "sandbox-policy", "bash-sandbox", "fs-sandbox", "permission"]+ # web-search-deepseek: the stock search calls DeepSeek's own API with the relay's placeholder key (401)+ assert disabled == ["sdk-jsonrpc-server", "sandbox", "sandbox-policy", "bash-sandbox", "fs-sandbox", "permission",+ "web-search-deepseek"]rows = [e for e in doc if "insert" in e][0]["insert"]assert rows[0]["id"] == "hr-sdk-jsonrpc-server" and rows[0]["name"].endswith("/.dsh/hr_dsh_server.mjs")assert rows[0]["inject"] == ["sdkAppStartup", "loader"] and rows[0]["config"] == {"maxTokensAsSuccess": True}diff --git a/runner/tests/test_dsh_skills_and_search.py b/runner/tests/test_dsh_skills_and_search.pynew file mode 100644index 00000000..8fb3e4bc--- /dev/null+++ b/runner/tests/test_dsh_skills_and_search.py@@ -0,0 +1,54 @@+"""dsh finds a setup's and a plugin package's skills, and offers no web search that calls DeepSeek's own API (2026-10-27).++dsh's skill tool loads only what its skill-filesystem provider found under its roots (<dshHome>/skills among them); the+runner writes skills to .harness/skills and .harness/plugins/<package>/skills, so every `skill` call answered "unknown or+no longer available". Its stock web_search provider posted to https://api.deepseek.com/anthropic/v1/messages with the+relay's placeholder key and was refused 401 on every search."""+import pathlib+import sys++import yaml++sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1]))+import dsh_driver # noqa: E402+++def _skill(root: pathlib.Path, name: str, body: str) -> None:+ (root / name).mkdir(parents=True, exist_ok=True)+ (root / name / "SKILL.md").write_text(f"---\nname: {name}\ndescription: {body}\n---\n{body}\n")+++def test_setup_and_package_skills_land_where_dsh_looks(tmp_path):+ cwd, home = tmp_path / "ws", tmp_path / "home"+ _skill(cwd / ".harness" / "skills", "brand-voice", "the setup's own")+ _skill(cwd / ".harness" / "plugins" / "acme_designer" / "skills", "quality-brand-kit", "from the package")+ _skill(cwd / ".harness" / "plugins" / "acme_designer" / "skills", "brand-voice", "the package's, shadowed")+ _skill(cwd / ".harness" / "plugins" / "aaa_first" / "skills", "tool-knowledge", "another package")+ (cwd / ".harness" / "plugins" / "acme_designer" / "skills" / "not-a-skill").mkdir() # no SKILL.md: skipped+ got = dsh_driver._install_skills(home, str(cwd))+ assert got == ["brand-voice", "tool-knowledge", "quality-brand-kit"] # the setup first, then packages by name+ dest = home / ".dsh" / "skills"+ assert sorted(p.name for p in dest.iterdir()) == ["brand-voice", "quality-brand-kit", "tool-knowledge"]+ assert "the setup's own" in (dest / "brand-voice" / "SKILL.md").read_text() # a setup's skill wins its name+++def test_each_turn_rewrites_the_set(tmp_path):+ cwd, home = tmp_path / "ws", tmp_path / "home"+ _skill(cwd / ".harness" / "skills", "old-one", "x")+ dsh_driver._install_skills(home, str(cwd))+ (cwd / ".harness" / "skills" / "old-one" / "SKILL.md").unlink()+ _skill(cwd / ".harness" / "skills", "new-one", "y")+ assert dsh_driver._install_skills(home, str(cwd)) == ["new-one"]+ assert [p.name for p in (home / ".dsh" / "skills").iterdir()] == ["new-one"] # a removed skill is gone+++def test_no_harness_tree_installs_nothing(tmp_path):+ assert dsh_driver._install_skills(tmp_path / "home", str(tmp_path / "empty")) == []+++def test_the_deepseek_web_search_row_is_off(tmp_path):+ path = dsh_driver._compose_patch(tmp_path / "home", [], cwd=str(tmp_path))+ entries = yaml.safe_load(pathlib.Path(path).read_text())+ assert {"id": "web-search-deepseek", "disabled": True} in entries+ # the tool itself is not registered: the provider row off alone still offered web_search, failing every call+ assert {"id": "tool-web", "config": {"search": False}} in entries