Skip to content

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.

feat(backend): add Oh My Pi (omp) harness support (#68)

Bobby Ivanovdeca7f05a57d
diff --git a/Dockerfile b/Dockerfile
index a7039849..f8e68c44 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -17,7 +17,7 @@
# They land in the data volume, so the cost is paid once per volume rather than once per start.
# Choose backends at RUN time:
#
-# docker run -e HR_BACKENDS=claude,codex,hermes,pi,dsh,opencode,qwen,gemini,cline ... # the default
+# docker run -e HR_BACKENDS=claude,codex,hermes,pi,dsh,opencode,qwen,gemini,cline,omp ... # the default
# docker run -e HR_BACKENDS=opencode ... # lean
#
# WITH_BROWSER is still a build arg because Chromium and its system libraries genuinely belong
diff --git a/README.md b/README.md
index 12d27664..19574a3d 100644
--- a/README.md
+++ b/README.md
@@ -578,7 +578,7 @@ Backends are installed into your data volume rather than baked into the image, s
want is a run-time setting:
```bash
-docker run -e HR_BACKENDS=claude,codex,hermes,pi,dsh,opencode,qwen,gemini,cline ... # the default
+docker run -e HR_BACKENDS=claude,codex,hermes,pi,dsh,opencode,qwen,gemini,cline,omp ... # the default
docker run -e HR_BACKENDS=opencode ... # lean
```
diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh
index decf62ca..41ac0dbf 100644
--- a/docker/entrypoint.sh
+++ b/docker/entrypoint.sh
@@ -172,7 +172,7 @@ export HOSTNAME=0.0.0.0
TOOLS="$DATA_DIR/agent-tools"
export PATH="$TOOLS/bin:$PATH"
export NODE_PATH="$TOOLS/lib/node_modules"
-export HR_BACKENDS="${HR_BACKENDS:-claude,codex,hermes,pi,dsh,opencode,qwen,gemini,cline}"
+export HR_BACKENDS="${HR_BACKENDS:-claude,codex,hermes,pi,dsh,opencode,qwen,gemini,cline,omp}"
wanted() { [[ ",$HR_BACKENDS," == *",$1,"* ]]; }
# The executable IS the definition of "installed" — an installer that exits 0 without producing
@@ -189,6 +189,7 @@ backend_bin() {
qwen) echo "$TOOLS/bin/qwen" ;;
gemini) echo "$TOOLS/bin/gemini" ;;
cline) echo "$TOOLS/bin/cline" ;;
+ omp) echo "$TOOLS/bin/omp" ;;
esac
}
@@ -217,6 +218,30 @@ install_opencode() {
rm -rf "$oc_tmp"
}
+# omp (Oh My Pi, MIT) ships standalone prebuilt binaries on GitHub releases, with a SHA256SUMS.txt
+# beside them. Pinned EXACTLY, like every other backend here: upstream releases almost daily
+# (18.1.8 through 18.1.13 in five days), and 18.1.13 is the release the runner's omp code was
+# measured against (flags, the JSON event stream, the agent-dir env, resume by id, --tools). A
+# silent `latest` re-gambles all of it; the checksum makes the download the release's own bytes.
+install_omp() {
+ case "$(uname -m)" in
+ x86_64) omp_arch="x64" ;;
+ aarch64|arm64) omp_arch="arm64" ;;
+ *) echo "unsupported architecture $(uname -m) for omp"; return 1 ;;
+ esac
+ omp_ver="${HR_OMP_VERSION:-18.1.13}"; omp_ver="${omp_ver#v}"
+ omp_base="https://github.com/can1357/oh-my-pi/releases/download/v${omp_ver}"
+ omp_tmp="$(mktemp -d)"
+ curl -fsSL "$omp_base/omp-linux-$omp_arch" -o "$omp_tmp/omp" || { rm -rf "$omp_tmp"; return 1; }
+ curl -fsSL "$omp_base/SHA256SUMS.txt" -o "$omp_tmp/SHA256SUMS.txt" || { rm -rf "$omp_tmp"; return 1; }
+ want="$(grep " omp-linux-$omp_arch\$" "$omp_tmp/SHA256SUMS.txt" | awk '{print $1}')"
+ have="$(sha256sum "$omp_tmp/omp" | awk '{print $1}')"
+ if [ -z "$want" ] || [ "$want" != "$have" ]; then
+ echo "omp $omp_ver: checksum mismatch for omp-linux-$omp_arch (want ${want:-none}, have $have)"; rm -rf "$omp_tmp"; return 1
+ fi
+ mkdir -p "$TOOLS/bin" && install -m 755 "$omp_tmp/omp" "$TOOLS/bin/omp"; rm -rf "$omp_tmp"
+}
+
# Run an install and, if it fails, SAY WHY.
#
# This was `>/dev/null 2>&1 || true`, and the silence cost a day of someone's life: a root-owned
@@ -288,6 +313,11 @@ install_backends() {
@earendil-works/pi-coding-agent pi-mcp-adapter || true
fi
+ if wanted omp && [ ! -x "$(backend_bin omp)" ]; then
+ echo "[harnessrouter] installing Oh My Pi (MIT)…"
+ try_install "Oh My Pi" install_omp || true
+ fi
+
if wanted dsh && [ ! -x "$(backend_bin dsh)" ]; then
echo "[harnessrouter] installing DeepSeek Harness (MIT, developer preview — version-pinned)…"
# Pinned EXACTLY, not 'latest': upstream is a developer preview that warns of breaking
diff --git a/docs/support-matrix-notes.md b/docs/support-matrix-notes.md
index a8df20bf..770547d4 100644
--- a/docs/support-matrix-notes.md
+++ b/docs/support-matrix-notes.md
@@ -126,3 +126,14 @@ model the CLI calls in a turn is the one asked for; the gemini backend takes the
gateway and the relay names it for the provider on the native path (TokenRouter's google/<id>); and a
failed turn's reason is the runner's error before its result.
+## The omp backend (Oh My Pi), pi's lineage (2026-09-07)
+
+Oh My Pi is pi's lineage: it speaks pi's `--mode json` event stream unchanged (measured on 18.1.13:
+session, message_update, message_end, tool_execution_start/end, agent_end, the same fields) and
+shares pi's normaliser; its OpenAI-shape turns ride the loopback relay as pi's do, so it reaches what
+pi reaches and its list is pi's. Every assistant message names the model omp ran, which is the
+served model on the record; a turn omp ran on another model than the one asked for fails with the
+reason, never completes. The binary is pinned to 18.1.13 and verified against the release's
+SHA256SUMS. Per-provider columns follow below as they are measured, one integration on the org at a
+time, the served-model rule as judge.
+
diff --git a/gateway/app.py b/gateway/app.py
index 6220bcc0..23f77403 100644
--- a/gateway/app.py
+++ b/gateway/app.py
@@ -1029,6 +1029,11 @@ _INTEGRATION_WIRING: dict[tuple[str, str], str] = {
("openrouter", "pi"): "openai-api",
("tokenrouter", "pi"): "tokenrouter", ("vercel", "pi"): "tokenrouter",
("llmtr", "pi"): "tokenrouter",
+ ("anthropic", "omp"): "anthropic", ("openai", "omp"): "openai",
+ ("azure-foundry", "omp"): "azure",
+ ("openrouter", "omp"): "openai-api",
+ ("tokenrouter", "omp"): "tokenrouter", ("vercel", "omp"): "tokenrouter",
+ ("llmtr", "omp"): "tokenrouter",
# dsh (DeepSeek Harness) is multi-family via dsh-llm-pi-ai — pi's unified LLM library as
# a Cordis plugin — so its wiring mirrors pi's: 'deepseek' on the runner is the launch
# adapter for the deepseek family, 'tokenrouter' again means "OpenAI/Anthropic-compatible,
@@ -1066,6 +1071,7 @@ _INTEGRATION_WIRING: dict[tuple[str, str], str] = {
("custom", "claude"): "tokenrouter",
("custom", "hermes"): "openai-api", ("custom", "opencode"): "tokenrouter",
("custom", "pi"): "tokenrouter", ("custom", "dsh"): "tokenrouter",
+ ("custom", "omp"): "tokenrouter",
("custom", "qwen"): "openai-api",
("custom", "cline"): "openai-api",
# Google AI Studio: one key, Gemini's OpenAI-compatible chat-completions surface. Every
@@ -1074,6 +1080,7 @@ _INTEGRATION_WIRING: dict[tuple[str, str], str] = {
("google", "hermes"): "openai-api", ("google", "pi"): "openai-api",
("google", "dsh"): "openai-api", ("google", "opencode"): "openai-api",
("google", "qwen"): "openai-api", ("google", "cline"): "openai-api",
+ ("google", "omp"): "openai-api", # pi's lineage, pi's reach
# gemini (Gemini CLI) speaks Google's native API, not the OpenAI shape the rows above reach
# through a base_url, so it is wired to the google provider as itself: the runner gets the
# raw key (owner trust only; see _NATIVE_ONLY_BACKENDS). No ("custom", "gemini") row, for the
@@ -4410,8 +4417,8 @@ def _provider_backends(provider: str) -> list[str]:
_CUSTOM_FORMAT_BACKENDS = {
# qwen-code is a pure OPENAI_BASE_URL/OPENAI_API_KEY client (0.22.1, verified), so a custom
# OpenAI endpoint drives it directly; it speaks nothing else, so it stays off the anthropic set.
- "openai": {"hermes", "opencode", "pi", "dsh", "qwen", "cline"},
- "anthropic": {"claude", "opencode", "pi", "dsh"},
+ "openai": {"hermes", "opencode", "pi", "dsh", "qwen", "cline", "omp"},
+ "anthropic": {"claude", "opencode", "pi", "dsh", "omp"},
}
@@ -5379,7 +5386,7 @@ def _map_model(conn: dict, friendly: str) -> str | None:
table = _vendor_models(provider)
if friendly and friendly in table:
return table[friendly]
- if backend == "claude" or (backend in ("hermes", "pi", "dsh") and provider in ("anthropic", "bedrock")):
+ if backend == "claude" or (backend in ("hermes", "pi", "dsh", "omp") and provider in ("anthropic", "bedrock")):
# Older claude ids the catalog no longer lists still map, and a caller may pass a
# provider-native id directly; _LEGACY_CLAUDE_IDS carries both, keyed bare (opus-4.5).
legacy = _BEDROCK_CLAUDE if provider == "bedrock" else _ANTHROPIC_CLAUDE
@@ -5572,8 +5579,13 @@ _MODEL_CATALOG: dict[str, dict] = {
"models": ["gemini-3.5-flash", "gemini-3.8-flash", "gemini-3.7-flash", "gemini-3.6-flash",
"gemini-3.5-flash-lite", "gemini-3.1-flash-lite", "gemini-3.1-pro-preview",
"gemini-3-flash-preview", "gemini-2.5-pro", "gemini-2.5-flash", "gemini-2.5-flash-lite"]},
+ # omp (Oh My Pi) is pi's lineage and speaks the OpenAI and Anthropic shapes through the same
+ # loopback relay, so it reaches what pi reaches; the list is pi's, and the support matrix
+ # measures each provider column with the served-model rule as judge (2026-09-07).
+ "omp": {"default": "gpt-5.4", "models": []},
}
-_BARE_MODELS = {"", "claude", "codex", "anthropic", "bedrock", "openai", "hermes", "pi", "dsh", "deepseek"}
+_MODEL_CATALOG["omp"]["models"] = list(_MODEL_CATALOG["pi"]["models"]) # pi's reach, see the omp entry
+_BARE_MODELS = {"", "claude", "codex", "anthropic", "bedrock", "openai", "hermes", "pi", "dsh", "deepseek", "omp"}
# Models whose serving CHANNEL refuses image input outright. Measured, not assumed — probed
# 2026-08-19 on the TokenRouter connection with a data-URI image in a user message:
# qwen3.7-max -> 400 InvalidParameter "Unexpected item type in content" (rejects the TYPE)
@@ -5704,9 +5716,9 @@ def _model_authorized(requested: str, backend: str) -> bool:
return False
if r in {m.lower() for m in _MODEL_CATALOG.get(backend, {}).get("models", [])}:
return True
- if backend in ("claude", "hermes", "pi", "dsh") and r in _PROVIDER_CLAUDE_IDS:
+ if backend in ("claude", "hermes", "pi", "dsh", "omp") and r in _PROVIDER_CLAUDE_IDS:
return True # power users may pass a provider-native claude id (claude-opus-4-8 / us.anthropic...)
- if backend in ("codex", "hermes", "pi", "dsh") and r.startswith("gpt-"):
+ if backend in ("codex", "hermes", "pi", "dsh", "omp") and r.startswith("gpt-"):
return True # gpt-* family; Azure deployment names vary
if backend == "dsh" and r.startswith(("deepseek", "deepseek/")):
return True # deepseek family; aggregator slugs vary (deepseek/deepseek-v4-pro)
@@ -6805,7 +6817,7 @@ async def create_response(body: CreateResponseBody, request: Request):
# explicitly selected — that's not a valid provider id. Treat it as "unset" and inherit, in order:
# previous round's model -> the harness default_model -> connection default (in _map_model).
# This keeps a conversation on the user's chosen model and never ships the bare backend to Bedrock.
- _BARE = {"claude", "codex", "anthropic", "bedrock", "openai", "hermes", "pi", "dsh", "deepseek", ""}
+ _BARE = {"claude", "codex", "anthropic", "bedrock", "openai", "hermes", "pi", "dsh", "deepseek", "omp", ""}
if model_req.lower() in _BARE:
inherited = ""
if body.previous_response_id:
@@ -12535,6 +12547,18 @@ _BASE_CATALOG: dict[str, dict] = {
("edit", "Edit")],
"tool_enforcement": "hard",
},
+ "omp": {
+ "label": "Oh My Pi", "backend": "omp", "status": "ready",
+ "system_prompt": ("You are Oh My Pi (OMP), an autonomous coding agent. You operate on "
+ "a real git workspace with shell, file access, LSP, Python, browser, "
+ "and subagents to complete engineering tasks end to end."),
+ "tools": [("bash", "Bash"), ("read", "File Read"), ("write", "File Write"),
+ ("edit", "Edit"), ("glob", "Glob"), ("grep", "Grep"),
+ ("lsp", "LSP"), ("python", "Python"), ("todo", "Todo"),
+ ("task", "Task (subagents)"), ("browser", "Browser"),
+ ("web_search", "Web Search")],
+ "tool_enforcement": "hard",
+ },
"dsh": {
"label": "DeepSeek Harness", "backend": "dsh", "status": "ready",
# MCP note: the pinned runtime wheel (0.1.0rc7) does not bundle dsh's MCP client yet,
diff --git a/gateway/tests/test_backend_of_harness.py b/gateway/tests/test_backend_of_harness.py
index bfb2c5ca..e623b296 100644
--- a/gateway/tests/test_backend_of_harness.py
+++ b/gateway/tests/test_backend_of_harness.py
@@ -27,8 +27,15 @@ def test_the_stored_aliases_still_resolve():
assert A._backend_of_harness({"base": "claude"}) == "claude"
assert A._backend_of_harness({"base": "claude-code"}) == "claude"
assert A._backend_of_harness({"base": "deepseek-harness"}) == "dsh"
+ assert A._backend_of_harness({"base": "omp"}) == "omp"
def test_unknown_base_stays_empty_for_the_caller_to_infer():
assert A._backend_of_harness({"base": "not-a-base"}) == ""
assert A._backend_of_harness(None) == ""
+
+
+def test_omp_reaches_what_pi_reaches():
+ assert A._MODEL_CATALOG["omp"]["models"] == A._MODEL_CATALOG["pi"]["models"]
+ assert A._INTEGRATION_WIRING[("google", "omp")] == "openai-api"
+ assert "claude-fable-5-1" in A._MODEL_CATALOG["omp"]["models"]
diff --git a/gateway/tests/test_hid_prefix.py b/gateway/tests/test_hid_prefix.py
index ed5aa6d0..c144866b 100644
--- a/gateway/tests/test_hid_prefix.py
+++ b/gateway/tests/test_hid_prefix.py
@@ -22,6 +22,8 @@ def test_the_stored_alias_and_chrn_ids_route_too():
assert "claude" in _SUPPORTED_BASES
assert _HID_PREFIX_RE.match("/claude/v1/responses")
assert _HID_PREFIX_RE.match("/chrn_" + "a" * 32 + "/v1/responses")
+ assert "omp" in _SUPPORTED_BASES
+ assert _HID_PREFIX_RE.match("/omp/v1/responses")
def test_a_non_base_prefix_does_not_match():
diff --git a/runner/server.py b/runner/server.py
index a309a678..5bfcb2db 100644
--- a/runner/server.py
+++ b/runner/server.py
@@ -341,6 +341,10 @@ CHECKPOINT_EXCLUDE = ["./tmp", "./.gcp-sa.json", "./.codex", "./.credentials.jso
# key for custom providers — neither may travel in a checkpoint tarball.
"./.harness/home/.pi/agent/auth.json",
"./.harness/home/.pi/agent/models.json",
+ # omp models / auth
+ "./.harness/home/.omp/agent/auth.json",
+ "./.harness/home/.omp/agent/models.json",
+ "./.harness/home/.omp/agent/models.yml",
# dsh: the MCP cordis overlay can carry auth headers (same standing as
# claude's .mcp.json); the provider KEY itself never lands anywhere —
# it lives only in the driver process (see dsh_driver.py's relay).
@@ -363,6 +367,7 @@ QWEN_DEFAULT_MODEL = os.environ.get("QWEN_DEFAULT_MODEL", "qwen3.7-max")
GEMINI_DEFAULT_MODEL = os.environ.get("GEMINI_DEFAULT_MODEL", "gemini-3.8-flash")
CLINE_DEFAULT_MODEL = os.environ.get("CLINE_DEFAULT_MODEL", "gpt-5.4")
DSH_DEFAULT_MODEL = os.environ.get("DSH_DEFAULT_MODEL", "deepseek-v4-pro")
+OMP_DEFAULT_MODEL = os.environ.get("OMP_DEFAULT_MODEL", "gpt-5.4")
CODEX_REASONING_EFFORT = os.environ.get("CODEX_REASONING_EFFORT", "medium")
# The window Codex plans compaction against. Its own catalog says 272k for every gpt-5.x; a larger
# number here made it compact late and let a long thread overflow the real window first.
@@ -640,6 +645,9 @@ def _write_skills(cwd: str, skills: list[dict], backend: str = "claude") -> list
elif backend == "pi":
rootrels = [".harness/home/.pi/agent/skills"]
entryroot = ".harness/home/.pi/agent/skills"
+ elif backend == "omp":
+ rootrels = [".harness/home/.omp/agent/skills"]
+ entryroot = ".harness/home/.omp/agent/skills"
elif backend == "codex":
# $CODEX_HOME/skills/<name>/SKILL.md, and CODEX_HOME is redirected into the workspace
rootrels = [".harness/home/.codex/skills"]
@@ -795,7 +803,7 @@ def _agent_doc_path(cwd: str, backend: str) -> pathlib.Path:
if backend == "gemini":
return pathlib.Path(cwd) / "GEMINI.md" # gemini-cli's own context.fileName default
return pathlib.Path(cwd) / (
- "AGENTS.md" if backend in ("codex", "hermes", "pi", "dsh", "opencode", "cline")
+ "AGENTS.md" if backend in ("codex", "hermes", "pi", "dsh", "opencode", "cline", "omp")
else "CLAUDE.md")
@@ -1914,6 +1922,9 @@ def _pi_to_claude(obj: dict, state: dict) -> list[dict]:
if msg.get("role") != "assistant":
return []
_pi_usage_add(state, msg.get("usage"))
+ if msg.get("model"):
+ # the model the CLI ran this message on (pi and omp name it on every assistant message)
+ state.setdefault("_served", []).append(str(msg["model"]))
if msg.get("stopReason") == "error":
state["_pi_error"] = str(msg.get("errorMessage") or "pi provider error")
return []
@@ -1958,14 +1969,149 @@ def _pi_to_claude(obj: dict, state: dict) -> list[dict]:
err = state.get("_pi_error")
usage = dict(state.get("_pi_usage") or {})
usage = {k: v for k, v in usage.items() if v}
- if err:
- return [{"type": "result", "subtype": "error", "is_error": True,
- "result": err, "usage": usage}]
- return [{"type": "result", "subtype": "success", "is_error": False,
- "result": state.get("final", ""), "usage": usage}]
+ served = sorted(set(state.get("_served") or []))
+ requested = str(state.get("model") or "")
+ other = [m for m in served if requested and m != requested]
+ if other and not err:
+ # the models are honest, no fallback: a turn the CLI ran on another model than the one
+ # asked for fails with the reason on the record, never completes (the served-model rule
+ # the support matrix judges by, enforced for the user)
+ err = f"the CLI ran {', '.join(other)} instead of {requested}"
+ ev = {"type": "result", "subtype": "error" if err else "success", "is_error": bool(err),
+ "result": err or state.get("final", ""), "usage": usage}
+ if served:
+ ev["model"] = ",".join(served)
+ return [ev]
return []
+# ── omp (Oh My Pi, can1357/oh-my-pi CLI) ─────────────────────────────────────────
+# OMP is built on the Pi lineage and shares its JSON event stream contract (--mode json), so it
+# shares _pi_to_claude too. Unlike raw Pi, OMP has native MCP support via <agent_dir>/mcp.json and
+# a richer built-in tool set (bash, read, write, edit, glob, grep, lsp, python, todo, task, etc.).
+# Measured on 18.1.13 (2026-09-07): -p --mode json --model --auto-approve --no-extensions --resume
+# --tools/--no-tools are its flags, PI_CODING_AGENT_DIR is honoured, sessions land under
+# <agent_dir>/sessions/<cwd slug>/<ts>_<id>.jsonl, -r <id> recalls the first message, --tools=read
+# leaves a write unwritten, and every assistant message names the model it ran.
+OMP_PROVIDERS = {"anthropic", "openai", "azure", "openrouter", "tokenrouter", "openai-api"}
+ALL_OMP_TOOLS = {"bash", "read", "write", "edit", "glob", "grep", "lsp", "python", "todo", "task", "browser", "web_search"}
+
+
+def _omp_has_session(agent_dir: pathlib.Path, session_id: str) -> bool:
+ """Is this session actually in this agent directory?
+
+ OMP writes session logs under <agent_dir>/sessions/ as *.jsonl files named with
+ the session id. If the session is missing, passing --resume would exit with an error.
+ """
+ if not session_id or not agent_dir.exists():
+ return False
+ sess_dir = agent_dir / "sessions"
+ if not sess_dir.exists():
+ return False
+ try:
+ for path in sess_dir.rglob(f"*{session_id}*.jsonl"):
+ if path.is_file():
+ return True
+ except Exception: # noqa: BLE001
+ return False
+ return False
+
+
+def _omp_write_mcp(agent_dir: pathlib.Path, servers: list[dict] | None) -> bool:
+ """Write <agent_dir>/mcp.json for OMP native MCP support.
+
+ OMP supports native project and user MCP configurations with the standard
+ mcpServers schema. Returns whether any server was written.
+ """
+ entries: dict = {}
+ for s in servers or []:
+ url = (s or {}).get("url")
+ if not url:
+ continue
+ name = _mcp_name((s or {}).get("name") or (s or {}).get("id") or "mcp")
+ entry: dict = {"url": url}
+ auth = (s or {}).get("auth")
+ if auth:
+ hdr = auth if str(auth).lower().startswith("bearer ") else f"Bearer {auth}"
+ entry["headers"] = {"Authorization": hdr}
+ if isinstance((s or {}).get("headers"), dict):
+ entry.setdefault("headers", {}).update({str(k): str(v) for k, v in s["headers"].items()
+ if k and v is not None})
+ entries[name] = entry
+ if not entries:
+ return False
+ path = agent_dir / "mcp.json"
+ path.parent.mkdir(parents=True, exist_ok=True)
+ path.write_text(json.dumps({"mcpServers": entries}, indent=2))
+ return True
+
+
+def _build_omp(provider: str, auth: Auth, model: str, prompt: str, cwd: str, env: dict,
+ resume_session_id: str | None = None, mcp_servers: list[dict] | None = None,
+ tools_disabled: list[str] | None = None, vision: bool = True) -> list[str]:
+ pr = provider or "anthropic"
+ if pr not in OMP_PROVIDERS:
+ raise HTTPException(400, f"unknown omp provider '{pr}' (one of {sorted(OMP_PROVIDERS)})")
+ home = pathlib.Path(env.get("HOME") or cwd)
+ omp_agent_dir = home / ".omp" / "agent"
+ omp_agent_dir.mkdir(parents=True, exist_ok=True)
+ env["PI_CODING_AGENT_DIR"] = str(omp_agent_dir)
+ env.pop("OMP_PROFILE", None)
+ env.pop("PI_PROFILE", None)
+
+ use_custom = bool(auth.base_url) or pr in ("azure", "openai-api", "tokenrouter")
+ if use_custom:
+ if not auth.base_url:
+ raise HTTPException(400, f"omp provider '{pr}' needs a base_url (none configured)")
+ if auth.api_format == "anthropic":
+ api = "anthropic-messages"
+ elif auth.api_format == "openai":
+ api = "openai-completions"
+ elif pr == "anthropic" or (pr == "tokenrouter" and _PI_CLAUDE_MODEL.search(model or "")):
+ api = "anthropic-messages"
+ elif pr == "azure" or _HERMES_RESPONSES_API_MODEL.search(model or ""):
+ api = "openai-responses"
+ else:
+ api = "openai-completions"
+ if api in ("openai-completions", "openai-responses") and auth.api_key and not auth.api_format:
+ # An OpenAI-shape turn rides the loopback relay, as pi's and qwen's do: the relay repairs
+ # the request shape in flight (Gemini 3's thought signatures, TokenRouter's schema subset,
+ # Azure's max_tokens), and the real key never lands in the workspace's models.yml. A
+ # custom endpoint keeps its own URL.
+ relay_base, relay_tok = _hermes_relay_route(auth.base_url, auth.api_key)
+ auth = auth.model_copy(update={"base_url": relay_base, "api_key": relay_tok})
+ models_content = _pi_models_json(api, auth.base_url, auth.api_key or "", model, vision=vision,
+ custom_openai=bool(auth.api_format))
+ # omp reads custom providers from models.yml (its README's file; YAML takes the JSON as is);
+ # models.json is kept beside it for the pi-lineage census
+ (omp_agent_dir / "models.json").write_text(models_content)
+ (omp_agent_dir / "models.yml").write_text(models_content)
+ pname = "hr"
+ else:
+ pname = pr
+ if pr == "anthropic" and auth.api_key:
+ env["ANTHROPIC_API_KEY"] = auth.api_key
+ elif pr == "openai" and auth.api_key:
+ env["OPENAI_API_KEY"] = auth.api_key
+
+ cmd = ["omp", "-p", "--mode", "json",
+ "--model", f"{pname}/{model}" if pname == "hr" else model,
+ "--auto-approve",
+ "--no-extensions"]
+ if resume_session_id and _omp_has_session(omp_agent_dir, resume_session_id):
+ cmd += ["--resume", resume_session_id]
+ if tools_disabled:
+ disabled = {x.split(" (")[0].strip().lower() for x in tools_disabled if x and x.strip()}
+ enabled = [t for t in sorted(ALL_OMP_TOOLS) if t not in disabled]
+ if not enabled:
+ cmd += ["--no-tools"]
+ else:
+ cmd += [f"--tools={','.join(enabled)}"]
+ _omp_write_mcp(omp_agent_dir, mcp_servers)
+ cmd.append(prompt)
+ return cmd
+
+
# ── hermes (NousResearch hermes-agent CLI) ──────────────────────────────────────────
# One-shot turns run `hermes -z` (auto-approves, prints ONLY the final text on stdout, writes a
# JSON usage report via --usage-file); follow-up turns run `hermes chat -q -r <sid>` because the
@@ -3784,6 +3930,11 @@ BACKENDS = {
"normalize": _gemini_to_claude},
"cline": {"providers": sorted(CLINE_PROVIDERS), "default_model": CLINE_DEFAULT_MODEL,
"normalize": _cline_to_claude},
+ # omp is pi's lineage and speaks pi's `--mode json` event stream unchanged (measured on 18.1.13:
+ # session, message_update, message_end, tool_execution_start/end, agent_end, with the same
+ # fields), so it shares pi's normaliser rather than carrying a copy.
+ "omp": {"providers": sorted(OMP_PROVIDERS), "default_model": OMP_DEFAULT_MODEL,
+ "normalize": _pi_to_claude},
}
@@ -4893,6 +5044,11 @@ def turn(req: TurnReq, identifier: str = "") -> dict:
cmd = _build_pi(req.provider, auth, model, req.prompt, cwd, env,
resume_session_id=req.resume_session_id, mcp_servers=req.mcp_servers,
tools_disabled=req.tools_disabled, vision=bool(req.vision))
+ elif backend == "omp":
+ model = model or OMP_DEFAULT_MODEL
+ cmd = _build_omp(req.provider, auth, model, req.prompt, cwd, env,
+ resume_session_id=req.resume_session_id, mcp_servers=req.mcp_servers,
+ tools_disabled=req.tools_disabled, vision=bool(req.vision))
elif backend == "qwen":
model = model or QWEN_DEFAULT_MODEL
cmd = _build_qwen(req.provider, auth, model, req.prompt, cwd, env,
diff --git a/runner/tests/test_omp_backend.py b/runner/tests/test_omp_backend.py
new file mode 100644
index 00000000..ad255aea
--- /dev/null
+++ b/runner/tests/test_omp_backend.py
@@ -0,0 +1,355 @@
+"""Tests for the Oh My Pi (OMP) runner backend."""
+import json
+import pathlib
+import sys
+import tempfile
+
+sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1]))
+from server import ( # noqa: E402
+ _agent_doc_path,
+ _build_omp,
+ _pi_to_claude,
+ _write_skills,
+ Auth,
+ BACKENDS,
+)
+
+
+def _flat(chunks):
+ return [e for evs in chunks for e in evs]
+
+
+def _run_omp_events(events, model="gpt-5.4"):
+ state = {"model": model, "final": ""}
+ out = []
+ for ev in events:
+ out.append(_pi_to_claude(ev, state))
+ return out, state
+
+
+# ── argv construction and configuration ──────────────────────────────────────────
+
+
+def test_omp_argv_native_provider():
+ d = tempfile.mkdtemp()
+ env = {"HOME": d}
+ auth = Auth(api_key="sk-ant-test")
+ cmd = _build_omp("anthropic", auth, "claude-sonnet-4.6", "hello world", d, env)
+
+ assert cmd[:3] == ["omp", "-p", "--mode"]
+ assert cmd[3] == "json"
+ assert "--model" in cmd and "claude-sonnet-4.6" in cmd
+ assert "--auto-approve" in cmd
+ assert "--no-extensions" in cmd
+ assert cmd[-1] == "hello world"
+ assert env.get("ANTHROPIC_API_KEY") == "sk-ant-test"
+ assert env.get("PI_CODING_AGENT_DIR") == str(pathlib.Path(d) / ".omp" / "agent")
+
+
+def test_omp_shares_pis_normaliser():
+ assert BACKENDS["omp"]["normalize"] is _pi_to_claude
+
+
+def test_an_openai_shape_turn_rides_the_loopback_relay_and_a_custom_endpoint_keeps_its_url():
+ d = tempfile.mkdtemp()
+ env = {"HOME": d}
+ _build_omp("tokenrouter", Auth(api_key="real", base_url="https://api.tokenrouter.com/v1"), "gpt-5.4", "do work", d, env)
+ cfg = json.loads((pathlib.Path(d) / ".omp" / "agent" / "models.yml").read_text())
+ assert cfg["providers"]["hr"]["baseUrl"].startswith("http://127.0.0.1:") # the relay, as pi
+ assert "real" not in (pathlib.Path(d) / ".omp" / "agent" / "models.yml").read_text() # the key stays in the runner
+ d2 = tempfile.mkdtemp()
+ _build_omp("openai-api", Auth(api_key="sk-test", base_url="https://relay.example/v1", api_format="openai"), "gpt-5.4", "do work", d2, {"HOME": d2})
+ cfg2 = json.loads((pathlib.Path(d2) / ".omp" / "agent" / "models.yml").read_text())
+ assert cfg2["providers"]["hr"]["baseUrl"] == "https://relay.example/v1"
+
+
+def test_the_served_model_rides_the_result_and_a_substitution_fails_the_turn():
+ """omp names the model it ran on every assistant message (measured on 18.1.13). Richard's rule:
+ the models are honest, no fallback; a turn run on another model fails with the reason."""
+ ok = [{"type": "session", "id": "s"}, {"type": "message_end", "message": {"role": "assistant", "model": "gemini-3.8-flash", "provider": "hr",
+ "content": [{"type": "text", "text": "PONG"}], "usage": {"input": 5, "output": 1}, "stopReason": "stop"}}, {"type": "agent_end"}]
+ chunks, _ = _run_omp_events(ok, model="gemini-3.8-flash")
+ res = [e for e in _flat(chunks) if e.get("type") == "result"][0]
+ assert res["is_error"] is False and res["model"] == "gemini-3.8-flash" and res["result"] == "PONG"
+ swapped = [{"type": "session", "id": "s"}, {"type": "message_end", "message": {"role": "assistant", "model": "gemini-3.5-flash", "provider": "hr",
+ "content": [{"type": "text", "text": "PONG"}], "usage": {"input": 5, "output": 1}, "stopReason": "stop"}}, {"type": "agent_end"}]
+ chunks, _ = _run_omp_events(swapped, model="gemini-3.8-flash")
+ res = [e for e in _flat(chunks) if e.get("type") == "result"][0]
+ assert res["is_error"] is True and res["result"] == "the CLI ran gemini-3.5-flash instead of gemini-3.8-flash" and res["model"] == "gemini-3.5-flash"
+
+
+def test_omp_argv_custom_provider_writes_models_json():
+ d = tempfile.mkdtemp()
+ env = {"HOME": d}
+ auth = Auth(api_key="sk-test", base_url="https://relay.example/v1", api_format="openai")
+ cmd = _build_omp("openai-api", auth, "gpt-5.4", "do work", d, env)
+
+ assert "--model" in cmd
+ idx = cmd.index("--model")
+ assert cmd[idx + 1] == "hr/gpt-5.4"
+
+ cfg_path = pathlib.Path(d) / ".omp" / "agent" / "models.json"
+ assert cfg_path.exists()
+ cfg = json.loads(cfg_path.read_text())
+ assert "hr" in cfg["providers"]
+ assert cfg["providers"]["hr"]["baseUrl"] == "https://relay.example/v1"
+ assert cfg["providers"]["hr"]["api"] == "openai-completions"
+ assert cfg["providers"]["hr"]["models"][0]["id"] == "gpt-5.4"
+
+
+def test_omp_resume_skipped_when_session_missing():
+ d = tempfile.mkdtemp()
+ env = {"HOME": d}
+ auth = Auth(api_key="sk-test")
+ cmd = _build_omp("openai", auth, "gpt-5.4", "continue", d, env, resume_session_id="missing_sid")
+ assert "--resume" not in cmd
+
+
+def test_omp_resume_included_when_session_file_exists():
+ d = tempfile.mkdtemp()
+ env = {"HOME": d}
+ sess_dir = pathlib.Path(d) / ".omp" / "agent" / "sessions" / "proj"
+ sess_dir.mkdir(parents=True, exist_ok=True)
+ (sess_dir / "2026-09-05_present_sid_123.jsonl").write_text('{"type":"session"}\n')
+
+ auth = Auth(api_key="sk-test")
+ cmd = _build_omp("openai", auth, "gpt-5.4", "continue", d, env, resume_session_id="present_sid_123")
+ assert "--resume" in cmd
+ idx = cmd.index("--resume")
+ assert cmd[idx + 1] == "present_sid_123"
+
+
+def test_omp_disabled_tools_generates_tools_flag():
+ d = tempfile.mkdtemp()
+ env = {"HOME": d}
+ auth = Auth(api_key="sk-test")
+ cmd = _build_omp("openai", auth, "gpt-5.4", "do task", d, env, tools_disabled=["bash", "browser"])
+
+ tools_flags = [x for x in cmd if x.startswith("--tools=")]
+ assert len(tools_flags) == 1
+ enabled = tools_flags[0].split("=")[1].split(",")
+ assert "bash" not in enabled
+ assert "browser" not in enabled
+ assert "read" in enabled
+ assert "edit" in enabled
+
+
+def test_omp_all_tools_disabled_passes_no_tools():
+ d = tempfile.mkdtemp()
+ env = {"HOME": d}
+ auth = Auth(api_key="sk-test")
+ all_tools = ["bash", "read", "write", "edit", "glob", "grep", "lsp", "python", "todo", "task", "browser", "web_search"]
+ cmd = _build_omp("openai", auth, "gpt-5.4", "do task", d, env, tools_disabled=all_tools)
+ assert "--no-tools" in cmd
+
+
+def test_omp_mcp_config_written():
+ d = tempfile.mkdtemp()
+ env = {"HOME": d}
+ auth = Auth(api_key="sk-test")
+ mcp_servers = [
+ {"name": "fetcher", "url": "https://mcp.example/sse", "auth": "bearer token123"},
+ {"name": "db", "url": "https://db.example/mcp", "headers": {"X-Custom": "val"}},
+ ]
+ _build_omp("openai", auth, "gpt-5.4", "task", d, env, mcp_servers=mcp_servers)
+
+ mcp_path = pathlib.Path(d) / ".omp" / "agent" / "mcp.json"
+ assert mcp_path.exists()
+ mcp_data = json.loads(mcp_path.read_text())
+ assert "fetcher" in mcp_data["mcpServers"]
+ assert mcp_data["mcpServers"]["fetcher"]["url"] == "https://mcp.example/sse"
+ assert mcp_data["mcpServers"]["fetcher"]["headers"]["Authorization"] == "bearer token123"
+ assert mcp_data["mcpServers"]["db"]["headers"]["X-Custom"] == "val"
+
+
+def test_omp_doc_and_skills_paths():
+ assert _agent_doc_path("/workspace", "omp").name == "AGENTS.md"
+
+ d = tempfile.mkdtemp()
+ skills = [{"name": "test-skill", "content": "# Test Skill"}]
+ installed = _write_skills(d, skills, backend="omp")
+ assert len(installed) == 1
+ assert installed[0]["entry"] == ".harness/home/.omp/agent/skills/test-skill/SKILL.md"
+ assert (pathlib.Path(d) / ".harness" / "home" / ".omp" / "agent" / "skills" / "test-skill" / "SKILL.md").exists()
+
+
+# ── event stream normalization ───────────────────────────────────────────────────
+
+
+def test_omp_normalizer_session_init():
+ stream = [
+ {"type": "session", "version": 3, "id": "omp_sess_999", "timestamp": "2026-09-05T08:00:00.000Z", "cwd": "/ws"},
+ {"type": "agent_end", "messages": [], "isTerminal": True},
+ ]
+ chunks, _ = _run_omp_events(stream, model="gpt-5.4")
+ evs = _flat(chunks)
+ assert evs[0]["type"] == "system"
+ assert evs[0]["subtype"] == "init"
+ assert evs[0]["session_id"] == "omp_sess_999"
+ assert evs[0]["model"] == "gpt-5.4"
+
+
+def test_omp_normalizer_streaming_text_and_usage():
+ stream = [
+ {"type": "session", "version": 3, "id": "s1", "cwd": "/ws"},
+ {"type": "message_update", "assistantMessageEvent": {"type": "text_delta", "delta": "Hello"}},
+ {"type": "message_update", "assistantMessageEvent": {"type": "text_delta", "delta": " world!"}},
+ {"type": "message_end", "message": {
+ "role": "assistant",
+ "content": [{"type": "text", "text": "Hello world!"}],
+ "usage": {"input": 1500, "output": 25, "cacheRead": 300, "cacheWrite": 0},
+ "stopReason": "stop",
+ }},
+ {"type": "agent_end", "messages": [], "isTerminal": True},
+ ]
+ chunks, state = _run_omp_events(stream)
+ evs = _flat(chunks)
+
+ deltas = [e for e in evs if e.get("type") == "assistant"]
+ assert len(deltas) == 2
+ assert deltas[0]["message"]["content"][0]["text"] == "Hello"
+ assert deltas[1]["message"]["content"][0]["text"] == " world!"
+
+ results = [e for e in evs if e.get("type") == "result"]
+ assert len(results) == 1
+ assert results[0]["subtype"] == "success"
+ assert results[0]["is_error"] is False
+ assert results[0]["result"] == "Hello world!"
+ assert results[0]["usage"]["input_tokens"] == 1500
+ assert results[0]["usage"]["output_tokens"] == 25
+ assert results[0]["usage"]["cache_read_tokens"] == 300
+
+
+def test_omp_normalizer_tool_calls():
+ stream = [
+ {"type": "session", "version": 3, "id": "s2", "cwd": "/ws"},
+ {"type": "tool_execution_start", "toolCallId": "call_123", "toolName": "bash", "args": {"command": "ls -la"}},
+ {"type": "tool_execution_end", "toolCallId": "call_123", "toolName": "bash",
+ "result": {"content": [{"type": "text", "text": "total 0\n"}]}, "isError": False},
+ {"type": "message_end", "message": {
+ "role": "assistant", "content": [{"type": "text", "text": "Listed files."}],
+ "usage": {"input": 50, "output": 10}, "stopReason": "stop"}},
+ {"type": "agent_end", "messages": [], "isTerminal": True},
+ ]
+ chunks, _ = _run_omp_events(stream)
+ evs = _flat(chunks)
+
+ tool_use = [e for e in evs if e.get("type") == "assistant" and e["message"]["content"][0].get("type") == "tool_use"]
+ assert len(tool_use) == 1
+ assert tool_use[0]["message"]["content"][0]["id"] == "call_123"
+ assert tool_use[0]["message"]["content"][0]["name"] == "bash"
+ assert tool_use[0]["message"]["content"][0]["input"] == {"command": "ls -la"}
+
+ tool_res = [e for e in evs if e.get("type") == "user" and e["message"]["content"][0].get("type") == "tool_result"]
+ assert len(tool_res) == 1
+ assert tool_res[0]["message"]["content"][0]["tool_use_id"] == "call_123"
+ assert tool_res[0]["message"]["content"][0]["is_error"] is False
+ assert "total 0" in tool_res[0]["message"]["content"][0]["content"]
+
+
+def test_omp_normalizer_error_propagation():
+ stream = [
+ {"type": "session", "version": 3, "id": "s_err", "cwd": "/ws"},
+ {"type": "message_end", "message": {
+ "role": "assistant",
+ "content": [],
+ "usage": {"input": 0, "output": 0},
+ "stopReason": "error",
+ "errorMessage": "401 Invalid API key for provider",
+ }},
+ {"type": "agent_end", "messages": [], "isTerminal": True},
+ ]
+ chunks, _ = _run_omp_events(stream)
+ evs = _flat(chunks)
+
+ results = [e for e in evs if e.get("type") == "result"]
+ assert len(results) == 1
+ assert results[0]["subtype"] == "error"
+ assert results[0]["is_error"] is True
+ assert "401 Invalid API key" in results[0]["result"]
+
+
+# ── live end-to-end turn test with mock LLM (skipped if omp not installed) ─────
+import http.server
+import shutil
+import threading
+import time
+import pytest
+from fastapi.testclient import TestClient
+import server
+
+
+class _MockLLM(http.server.BaseHTTPRequestHandler):
+ def do_POST(self):
+ length = int(self.headers.get("content-length", 0))
+ self.rfile.read(length)
+ self.send_response(200)
+ self.send_header("Content-Type", "text/event-stream")
+ self.send_header("Cache-Control", "no-cache")
+ self.end_headers()
+
+ chunk1 = {
+ "id": "chatcmpl-e2e", "object": "chat.completion.chunk", "created": int(time.time()),
+ "model": "gpt-4o", "choices": [{"index": 0, "delta": {"role": "assistant", "content": "OMP "}, "finish_reason": None}],
+ }
+ self.wfile.write(f"data: {json.dumps(chunk1)}\n\n".encode("utf-8"))
+ self.wfile.flush()
+
+ chunk2 = {
+ "id": "chatcmpl-e2e", "object": "chat.completion.chunk", "created": int(time.time()),
+ "model": "gpt-4o", "choices": [{"index": 0, "delta": {"content": "works!"}, "finish_reason": None}],
+ }
+ self.wfile.write(f"data: {json.dumps(chunk2)}\n\n".encode("utf-8"))
+ self.wfile.flush()
+
+ chunk3 = {
+ "id": "chatcmpl-e2e", "object": "chat.completion.chunk", "created": int(time.time()),
+ "model": "gpt-4o", "choices": [{"index": 0, "delta": {}, "finish_reason": "stop"}],
+ "usage": {"prompt_tokens": 10, "completion_tokens": 4, "total_tokens": 14},
+ }
+ self.wfile.write(f"data: {json.dumps(chunk3)}\n\n".encode("utf-8"))
+ self.wfile.write(b"data: [DONE]\n\n")
+ self.wfile.flush()
+
+ def log_message(self, *args):
+ pass
+
+
[email protected](shutil.which("omp") is None, reason="omp binary not installed on host")
+def test_omp_turn_e2e_with_mock_llm():
+ mock_server = http.server.HTTPServer(("127.0.0.1", 0), _MockLLM)
+ port = mock_server.server_address[1]
+ t = threading.Thread(target=mock_server.serve_forever, daemon=True)
+ t.start()
+
+ client = TestClient(server.app)
+ d = tempfile.mkdtemp()
+ req_body = {
+ "provider": "openai-api",
+ "backend": "omp",
+ "model": "gpt-5.4",
+ "prompt": "Say OMP works",
+ "cwd": d,
+ "auth": {
+ "api_key": "sk-mock",
+ "base_url": f"http://127.0.0.1:{port}/v1",
+ "api_format": "openai",
+ },
+ }
+
+ resp = client.post("/turn", json=req_body)
+ assert resp.status_code == 200
+ turn_id = resp.json()["turn_id"]
+
+ data = {}
+ for _ in range(60):
+ time.sleep(0.3)
+ t_resp = client.get(f"/turn/{turn_id}")
+ data = t_resp.json()
+ if data.get("done"):
+ break
+
+ mock_server.shutdown()
+ assert data.get("done") is True
+ assert data.get("status") == "done"
+ assert "OMP works!" in data.get("result", "")
diff --git a/ui/public/logos/omp.png b/ui/public/logos/omp.png
new file mode 100644
index 00000000..ec418da1
Binary files /dev/null and b/ui/public/logos/omp.png differ
diff --git a/ui/src/app/(app)/harnesses/page.tsx b/ui/src/app/(app)/harnesses/page.tsx
index 2be01dd1..6fab1050 100644
--- a/ui/src/app/(app)/harnesses/page.tsx
+++ b/ui/src/app/(app)/harnesses/page.tsx
@@ -492,6 +492,7 @@ function AddHarness({ onClose, onCreated, existing }: { onClose: () => void; onC
}
const blurb = (id: string) => id === 'codex' ? 'Repository work, code changes, shell commands, generated files.'
: id === 'hermes' ? 'Self-improving agent that builds memory and skills across tasks.'
+ : id === 'omp' ? 'Full tool harness with hash-anchored edits, LSP, Python, browser, and subagents.'
: 'Long-context analysis, document workflows, structured review.';
return (
<div className="ak-scrim" onMouseDown={() => { if (!busy) onClose(); }}>
diff --git a/ui/src/components/HarnessLogo.tsx b/ui/src/components/HarnessLogo.tsx
index 861059b0..14ab0279 100644
--- a/ui/src/components/HarnessLogo.tsx
+++ b/ui/src/components/HarnessLogo.tsx
@@ -14,7 +14,7 @@ const LOGO: Record<string, string> = {
qwen: '/logos/qwen.png',
cline: '/logos/cline.png',
gemini: '/logos/gemini.png',
-
+ omp: '/logos/omp.png',
};
export function HarnessLogo({ id, size = 26 }: { id: string; size?: number }) {
diff --git a/ui/src/components/HarnessSettings.tsx b/ui/src/components/HarnessSettings.tsx
index 1a48a66e..0eca9cff 100644
--- a/ui/src/components/HarnessSettings.tsx
+++ b/ui/src/components/HarnessSettings.tsx
@@ -190,7 +190,7 @@ export function HarnessSettings({ id, embedded = false, onNavigate }: {
<section className="form-section">
<div><h3>Agent instructions</h3><p>Persistent role, conventions, constraints, and output contract loaded on every Task.</p></div>
<div className="field-stack">
- <div className="field"><label htmlFor="hsInstructions">{['codex', 'hermes'].includes(base?.id || draft?.base || '') ? 'AGENTS.md' : 'CLAUDE.md'}</label>
+ <div className="field"><label htmlFor="hsInstructions">{['codex', 'hermes', 'omp', 'pi', 'opencode', 'dsh', 'qwen', 'cline'].includes(base?.id || draft?.base || '') ? 'AGENTS.md' : 'CLAUDE.md'}</label>
<textarea id="hsInstructions" rows={7} disabled={readOnly}
value={oob ? oob.systemPrompt : (draft?.systemPrompt || '')}
onChange={(e) => upd({ systemPrompt: e.target.value })} />
diff --git a/ui/src/components/TaskChat.tsx b/ui/src/components/TaskChat.tsx
index 710921be..8bae5bd2 100644
--- a/ui/src/components/TaskChat.tsx
+++ b/ui/src/components/TaskChat.tsx
@@ -103,7 +103,7 @@ function makeWbMarkdown(getSid: () => string | null, getHarness?: () => string |
// Each base harness gets a stable assigned accent so the badge reads at a glance.
const BASE_TINT: Record<string, string> = {
- codex: '#0E8C6A', 'claude-code': '#C2613D', pi: '#6E55FF', hermes: '#2563EB',
+ codex: '#0E8C6A', 'claude-code': '#C2613D', pi: '#6E55FF', hermes: '#2563EB', omp: '#FF6B00',
};
function baseTint(id: string): string {
if (BASE_TINT[id]) return BASE_TINT[id];
diff --git a/ui/src/lib/harness.ts b/ui/src/lib/harness.ts
index 3e3b1e01..229d90df 100644
--- a/ui/src/lib/harness.ts
+++ b/ui/src/lib/harness.ts
@@ -20,7 +20,7 @@ export interface OobHarness {
defaultModel?: string; // the backend default, NOT necessarily models[0]
moreModels?: number; // "+N" pill
status: 'ready' | 'soon';
- backend: 'claude' | 'codex' | 'hermes' | 'pi' | 'dsh' | 'opencode' | 'qwen' | 'gemini' | 'cline' | null; // gateway backend; null = coming soon
+ backend: 'claude' | 'codex' | 'hermes' | 'pi' | 'dsh' | 'opencode' | 'qwen' | 'gemini' | 'cline' | 'omp' | null; // gateway backend; null = coming soon
systemPrompt: string; // the harness's built-in system prompt (shown read-only)
tools: string[]; // built-in tools (read-only)
skills: string[]; // built-in skills (read-only)
@@ -103,6 +103,11 @@ export const OOB: OobHarness[] = [
models: ['gpt-5.4', 'gpt-5.6-sol', 'gpt-5.6-terra', 'gpt-5.6-luna', 'gpt-5.5', 'gpt-5.4-mini', 'gpt-5.2', 'claude-opus-5', 'claude-fable-5', 'claude-opus-4.8', 'claude-sonnet-5', 'claude-opus-4.7', 'claude-sonnet-4.6', 'claude-haiku-4.5', 'deepseek-v4-pro', 'deepseek-v4-flash', 'kimi-k3', 'kimi-k2.7-code', 'qwen3.7-max', 'qwen3.8-max', 'mistral-medium-3.5', 'step-3.7-flash', 'gemini-3.8-flash', 'gemini-3.7-flash', 'gemini-3.5-flash', 'gemini-3.5-flash-lite', 'gemini-3.1-flash-lite', 'gemini-3.1-pro-preview', 'gemini-3-flash-preview', 'gemini-2.5-pro', 'gemini-2.5-flash', 'gemini-2.5-flash-lite'], defaultModel: 'gpt-5.4', moreModels: 0,
systemPrompt: 'You are Cline, an autonomous coding agent. You work on a real git workspace with shell and file access, reading and editing files and running commands to complete the task end to end.',
tools: [], skills: [] },
+ { id: 'omp', name: 'Oh My Pi', version: 'v18.1.13', backend: 'omp', status: 'ready',
+ // pi's lineage, pi's reach: the placeholder is pi's list; the gateway's catalog wins once fetched
+ models: ['gpt-5.4', 'gpt-5.6-sol', 'gpt-5.6-terra', 'gpt-5.6-luna', 'gpt-5.5', 'gpt-5.4-mini', 'gpt-5.2', 'claude-opus-5', 'claude-fable-5', 'claude-opus-4.8', 'claude-sonnet-5', 'claude-opus-4.7', 'claude-sonnet-4.6', 'claude-haiku-4.5', 'gemini-3.6-flash', 'gemini-3.8-flash', 'gemini-3.7-flash', 'gemini-3.5-flash', 'gemini-3.5-flash-lite', 'gemini-3.1-flash-lite', 'gemini-3.1-pro-preview', 'gemini-3-flash-preview', 'gemini-2.5-pro', 'gemini-2.5-flash', 'gemini-2.5-flash-lite', 'deepseek-v4-pro', 'kimi-k3', 'qwen3.7-max'], defaultModel: 'gpt-5.4', moreModels: 0,
+ systemPrompt: 'You are Oh My Pi (OMP), an autonomous coding agent. You operate on a real git workspace with shell, file access, LSP, Python, browser, and subagents to complete engineering tasks end to end.',
+ tools: [], skills: [] },
];
export const oobById = (id: string) => OOB.find((o) => o.id === id) || null;