fix: update codex supervise mcp registration
lint / lint (push) Successful in 1m54s
test / unit (pull_request) Successful in 38s
test / integration (pull_request) Successful in 22s

This commit is contained in:
2026-06-23 04:06:21 +00:00
parent 7c6ab62e26
commit 3ea35ba5d2
2 changed files with 7 additions and 7 deletions
+3 -3
View File
@@ -261,8 +261,8 @@ class CodexAgentProvider(AgentProvider):
return return
info(f"registering supervise MCP server in agent codex config → {supervise_url}") info(f"registering supervise MCP server in agent codex config → {supervise_url}")
r = bottle.exec( r = bottle.exec(
f"codex mcp add --transport http " f"codex mcp add {_SUPERVISE_MCP_NAME} --url "
f"{_SUPERVISE_MCP_NAME} {supervise_url}", f"{shlex.quote(supervise_url)}",
user="node", user="node",
) )
if r.returncode != 0: if r.returncode != 0:
@@ -270,7 +270,7 @@ class CodexAgentProvider(AgentProvider):
f"`codex mcp add supervise` failed (exit {r.returncode}): " f"`codex mcp add supervise` failed (exit {r.returncode}): "
f"{(r.stderr or r.stdout or '').strip()}. Inside the bottle, " f"{(r.stderr or r.stdout or '').strip()}. Inside the bottle, "
f"register manually with: " f"register manually with: "
f"codex mcp add --transport http supervise {supervise_url}" f"codex mcp add supervise --url {shlex.quote(supervise_url)}"
) )
+4 -4
View File
@@ -292,10 +292,10 @@ class TestCodexSuperviseMcp(unittest.TestCase):
bottle.exec.assert_called_once() bottle.exec.assert_called_once()
script = bottle.exec.call_args.args[0] script = bottle.exec.call_args.args[0]
self.assertEqual("node", bottle.exec.call_args.kwargs.get("user")) self.assertEqual("node", bottle.exec.call_args.kwargs.get("user"))
self.assertIn("codex mcp add", script) self.assertEqual(
self.assertIn("--transport http", script) f"codex mcp add supervise --url {_URL}",
self.assertIn("supervise", script) script,
self.assertIn(_URL, script) )
def test_logs_warning_on_failure_but_does_not_raise(self): def test_logs_warning_on_failure_but_does_not_raise(self):
bottle = _make_bottle( bottle = _make_bottle(