Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Unity Gateway (`ug`)

Unity Gateway runs coding agents through Databricks AI Gateway. It configures
Codex, Claude Code, Gemini CLI, OpenCode, GitHub Copilot CLI, and Pi, and can
register Databricks MCP servers for Cursor Agent.
Codex, Claude Code, Gemini CLI, OpenCode, GitHub Copilot CLI, Pi, and Oh My
Pi, and can register Databricks MCP servers for Cursor Agent.

The command is `ug`. Existing `ucode` commands remain supported, and the Python
package is still named `ucode` for compatibility.
Expand Down Expand Up @@ -52,6 +52,7 @@ ug gemini
ug opencode
ug copilot
ug pi
ug omp
ug cursor # Cursor Agent, MCP-only
```

Expand Down Expand Up @@ -118,7 +119,8 @@ ug configure --profile DEFAULT --agents claude,codex
```

Available coding agents are `codex`, `claude`, `gemini`, `opencode`,
`copilot`, and `pi`. `cursor` can be included in `--agents` for MCP-only setup;
`copilot`, `pi`, and `omp`. `cursor` can be included in `--agents` for MCP-only
setup;
Cursor models still run through your Cursor account.

`UG_WORKSPACE` can provide the default workspace. An explicit `--workspace` or
Expand Down Expand Up @@ -399,6 +401,7 @@ preferences are ignored and their files are left untouched. See the bundled
| OpenCode | `~/.ucode/opencode-xdg/opencode/opencode.json`, `~/.ucode/opencode-xdg/opencode/plugin/ucode-auth.js` |
| GitHub Copilot CLI | `~/.copilot/ucode.env`, `~/.copilot/ucode-mcp-config.json` |
| Pi | `~/.ucode/pi-home/.pi/agent/models.json`, `~/.ucode/pi-home/.pi/agent/settings.json` |
| Oh My Pi | `~/.ucode/omp-home/.omp/agent/models.yml`, `~/.ucode/omp-home/.omp/agent/config.yml`, `~/.ucode/omp-home/.omp/agent/mcp.json` |
| Cursor Agent | `~/.cursor/mcp.json` |
| Unity Gateway | `~/.ucode/managed-state.json`, `~/.ucode/managed-backups/` |

Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ dependencies = [
# request, via the SDK's stdio server + streamable-HTTP client. Works against
# both mcp 1.x (httpx) and mcp 2.x (httpx2) — see mcp_proxy for the shared path.
"mcp>=1.28.0",
"pyyaml>=6.0.0",
"questionary>=2.0.0",
"tomlkit>=0.13.0",
"typer>=0.26.0",
Expand Down
22 changes: 17 additions & 5 deletions src/ucode/agents/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,15 @@
status_subprocess_stdout,
)

from . import claude, codex, copilot, gemini, kilo, opencode, pi
from . import claude, codex, copilot, gemini, kilo, omp, opencode, pi
from .args import LaunchOptions as LaunchOptions
from .args import explicit_model_arg_value as explicit_model_arg_value

_MODULES = {
"codex": codex,
"claude": claude,
"gemini": gemini,
"omp": omp,
"opencode": opencode,
"kilo": kilo,
"copilot": copilot,
Expand All @@ -75,6 +76,8 @@
"kilocode": "kilo",
"copilot": "copilot",
"pi": "pi",
"omp": "omp",
"oh-my-pi": "omp",
}

DEFAULT_TOOL = "codex"
Expand All @@ -88,7 +91,7 @@
# required-upgrade confirmation; declining it would only fail the launch.
AUTO_UPGRADE_AGENT_ENV = "UG_AUTO_UPGRADE_AGENT"

# ucode tool -> `databricks aitools` agent id. gemini/pi aren't supported.
# ucode tool -> `databricks aitools` agent id. gemini/pi/omp aren't supported.
AITOOLS_AGENT_TOKENS = {
"claude": "claude-code",
"codex": "codex",
Expand All @@ -102,7 +105,7 @@ def install_databricks_ai_tools_for_agents(
) -> None:
"""Install Databricks AI Tools for supported agents.

Gemini and Pi have no ``aitools`` support and are dropped.
Gemini, Pi, and Oh My Pi have no ``aitools`` support and are dropped.

This runs only during ``ug configure``. ``force_refresh`` reads the managed config fresh; a
caller that already refreshed this launch (the main configure path) leaves it False so the gate
Expand All @@ -124,7 +127,7 @@ def normalize_tool(tool: str) -> str:
normalized = TOOL_ALIASES.get(tool.strip().lower())
if not normalized:
raise RuntimeError(
f"Unsupported tool '{tool}'. Use one of: codex, claude, gemini, opencode, kilo, copilot, pi."
f"Unsupported tool '{tool}'. Use one of: codex, claude, gemini, opencode, kilo, copilot, pi, omp."
)
return normalized

Expand Down Expand Up @@ -462,9 +465,11 @@ def configure_tool(
result = pi.write_tool_config(state, model)
elif tool == "kilo":
result = kilo.write_tool_config(state, model)
elif tool == "omp":
result = omp.write_tool_config(state, model)
else:
result = opencode.write_tool_config(state, model)
# gemini/opencode/kilo/pi return (state, token); codex/claude/copilot return state
# gemini/opencode/kilo/pi/omp return (state, token); codex/claude/copilot return state
if isinstance(result, tuple):
return result[0]
return result
Expand Down Expand Up @@ -517,6 +522,12 @@ def check_gateway_endpoint(state: dict, tool: str) -> bool:
or bool(state.get("codex_models"))
or bool(state.get("gemini_models"))
)
if tool == "omp":
return (
bool(state.get("claude_models"))
or bool(state.get("codex_models"))
or bool(state.get("gemini_models"))
)
return False


Expand All @@ -528,6 +539,7 @@ def check_gateway_endpoint(state: dict, tool: str) -> bool:
"gemini": ("gemini",),
"copilot": ("claude", "codex"),
"pi": ("claude", "codex", "gemini"),
"omp": ("claude", "codex", "gemini"),
}


Expand Down
Loading