Skip to content

feat(configure): add OpenAI Codex as a full configure-UI host#346

Merged
hyoshi merged 3 commits into
mainfrom
feat/configure-codex-host
Jun 27, 2026
Merged

feat(configure): add OpenAI Codex as a full configure-UI host#346
hyoshi merged 3 commits into
mainfrom
feat/configure-codex-host

Conversation

@hyoshi

@hyoshi hyoshi commented Jun 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds OpenAI Codex as a third mureo configure host with full parity to
claude-code and claude-desktop: basic setup (MCP server + credential guard
hook + skills), official-provider install/remove, the native↔official disable
toggle, status detection, and bulk clear — all home-aware. Codex stores MCP
servers in ~/.codex/config.toml (TOML, not JSON), so the existing JSON
writers don't apply.

Design

New mureo/web/codex_mcp.py manages mureo-owned [mcp_servers.<id>] blocks as
tagged regions (# >>> mureo-mcp:<id> >>># <<< <id> <<<), the same
philosophy as setup_codex.py: only the bytes between a region's markers are
read or rewritten, so an operator's hand-edits, comments, and unrelated servers
are preserved verbatim — no TOML library, no whole-file round-trip. It renders
minimal TOML for our blocks, parses back only its own regions for the env
toggle, guards against untagged-block duplicate-key conflicts, and writes
atomically. Hosted_http (Meta) has no Codex connector, so it stays
manual_required and native is never auto-disabled (no stranding), exactly as
on the Claude hosts.

Wiring:

  • host_paths / session: "codex" added to SUPPORTED_HOSTS; config.toml
    is both settings_path and mcp_registry_path; skills under
    ~/.codex/skills; credentials stay in the shared ~/.mureo store.
  • setup_actions: a codex branch at every host-dispatch site, plus a
    host-aware _registered_in_registry helper; Codex DOES support PreToolUse
    hooks (unlike Desktop) so install/remove_auth_hook wire the home-aware codex
    guard.
  • status_collector: dispatch on a .toml suffix to read codex
    install/disable state.
  • setup_codex: install_codex_credential_guard gains a hooks_file
    override; new remove_codex_credential_guard (tag-scoped, preserves user
    hooks).
  • Frontend: host picker + dashboard label + i18n (en/ja) for codex; Codex shows
    a "Meta official not available" note instead of a Claude-connector flow; the
    "Claude app" labels generalise to "AI agent".

Test plan

  • New test_web_codex_mcp.py and test_web_setup_actions_codex.py plus
    host_paths / setup_codex extensions cover the TOML writer (incl. a Windows
    backslash-command round-trip and seam-only blank-line collapse), the full
    install/provider/toggle/status/clear flow, and the hook remover.
  • ruff + black clean on mureo/; mypy --strict clean on changed
    modules; node --check on the changed JS; i18n en/ja parity + key coverage.
  • Reviewed by python-reviewer + typescript-reviewer; all findings fixed
    (Python HIGH ×1, JS HIGH ×2 + LOW ×1) with regression tests.

https://claude.ai/code/session_011rAu94b1o1xWYZhARk1VmL

hyoshi added 3 commits June 26, 2026 19:08
Give the `mureo configure` web UI a third host, "codex", with full parity
to "claude-code" and "claude-desktop": basic setup (MCP server + credential
guard hook + skills), official-provider install/remove, the native↔official
disable toggle, status detection, and bulk clear — all home-aware. Codex
stores MCP servers in ~/.codex/config.toml (TOML, not JSON), so the existing
JSON writers do not apply.

New mureo/web/codex_mcp.py manages mureo-owned `[mcp_servers.<id>]` blocks as
tagged regions (`# >>> mureo-mcp:<id> >>>` ... `# <<< <id> <<<`), the same
philosophy as setup_codex.py: only the bytes between a region's markers are
ever read or rewritten, so an operator's hand-edits, comments, and unrelated
servers are preserved verbatim — no TOML library, no whole-file round-trip.
It renders minimal TOML for our blocks, parses back only its own regions for
the env toggle, guards against untagged-block duplicate-key conflicts, and
writes atomically. Hosted_http (Meta) has no Codex connector, so it stays
manual_required and native is never auto-disabled (no stranding), exactly as
on the Claude hosts.

Wiring:
- host_paths/session: "codex" added to SUPPORTED_HOSTS; config.toml is both
  settings_path and mcp_registry_path; skills under ~/.codex/skills;
  credentials stay in the shared ~/.mureo store.
- setup_actions: a codex branch at every host-dispatch site, plus a host-aware
  _registered_in_registry helper; codex DOES support PreToolUse hooks (unlike
  Desktop) so install/remove_auth_hook wire the home-aware codex guard.
- status_collector: dispatch on a .toml suffix to read codex install/disable
  state.
- setup_codex: install_codex_credential_guard gains a hooks_file override;
  new remove_codex_credential_guard (tag-scoped, preserves user hooks).
- frontend: host picker + dashboard label + i18n (en/ja) for codex; Codex
  shows a "Meta official not available" note instead of a Claude-connector
  flow; the "Claude app" labels generalise to "AI agent".

Tests: new test_web_codex_mcp.py and test_web_setup_actions_codex.py plus
host_paths/setup_codex extensions cover the TOML writer (incl. a Windows
backslash-command round-trip and seam-only blank-line collapse), the full
install/provider/toggle/status/clear flow, and the hook remover.

Claude-Session: https://claude.ai/code/session_011rAu94b1o1xWYZhARk1VmL
…disambiguate Claude Code vs Claude Desktop

OpenAI Codex shares ~/.codex/config.toml across the CLI, IDE extension, AND the
Codex desktop app (per OpenAI docs: "These settings also apply to the Codex CLI
and IDE extension because the MCP configuration lives in config.toml"), so one
mureo setup covers all three — the host label now lists "desktop app" too.

Also disambiguate the two Claude hosts whose labels both said "desktop app":
- "Claude Code (CLI, Desktop app)" -> "Claude Code — coding agent (CLI / IDE / app)"
- "Claude Desktop app (Chat, Cowork)" -> "Claude Desktop — chat app (Chat / Cowork)"
The credential-guard "(not available...)" note now names Claude Desktop (the
chat app) explicitly — the hook IS available for Claude Code in every form
(CLI / IDE / its desktop app), only the Claude Desktop chat app lacks a
PreToolUse hook surface.

en + ja; i18n parity + key-coverage verified.

Claude-Session: https://claude.ai/code/session_011rAu94b1o1xWYZhARk1VmL
@hyoshi hyoshi merged commit fdf63f5 into main Jun 27, 2026
9 checks passed
@hyoshi hyoshi deleted the feat/configure-codex-host branch June 27, 2026 00:59
hyoshi added a commit that referenced this pull request Jun 27, 2026
#346 made Codex a full `mureo configure` host (parity with Claude Code /
Desktop), but the user-facing docs still only walked through the Claude hosts.

- getting-started.md: a "D. Auth in OpenAI Codex" walkthrough (setup codex +
  configure, noting the CLI / IDE / desktop app all share ~/.codex/config.toml)
  and a Codex row in the "Skill availability by host" table.
- mcp-server.md: an "OpenAI Codex" client-config section (TOML
  [mcp_servers.mureo] block) alongside Claude Desktop / Cursor.

Docs only.

Claude-Session: https://claude.ai/code/session_011rAu94b1o1xWYZhARk1VmL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant