Skip to content

Commit 2cd8cc9

Browse files
committed
fix(mcp-proxy): keep init next steps privacy bounded
Avoid printing absolute custom home/config paths in human init next-step guidance while still indicating that the same flags should be reused.\n\nImplemented with assistance from Codex.
1 parent 4fcde2d commit 2cd8cc9

2 files changed

Lines changed: 9 additions & 6 deletions

File tree

packages/agentveil-mcp-proxy/agentveil_mcp_proxy/cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2788,9 +2788,9 @@ def _format_init_next_step_commands(
27882788
) -> tuple[str, str]:
27892789
def _with_path_args(parts: list[str]) -> str:
27902790
if home is not None:
2791-
parts.extend(["--home", str(home)])
2791+
parts.extend(["--home", "<same AVP home>"])
27922792
if config_path is not None:
2793-
parts.extend(["--config", str(config_path)])
2793+
parts.extend(["--config", "<same config>"])
27942794
return " ".join(parts)
27952795

27962796
doctor_cmd = _with_path_args(["agentveil-mcp-proxy", "doctor"])

packages/agentveil-mcp-proxy/tests/test_mcp_proxy_cli.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2987,8 +2987,9 @@ def test_init_next_steps_include_home_when_custom_home(tmp_path, capsys):
29872987
])
29882988
assert rc == 0
29892989
text = capsys.readouterr().out
2990-
assert f"doctor --home {home}" in text
2991-
assert f"client-config print --home {home}" in text
2990+
assert "doctor --home <same AVP home>" in text
2991+
assert "client-config print --home <same AVP home>" in text
2992+
assert str(home) not in text
29922993

29932994

29942995
def test_init_next_steps_include_config_when_custom_config(tmp_path, capsys):
@@ -3005,8 +3006,10 @@ def test_init_next_steps_include_config_when_custom_config(tmp_path, capsys):
30053006
])
30063007
assert rc == 0
30073008
text = capsys.readouterr().out
3008-
assert f"doctor --home {home} --config {config}" in text
3009-
assert f"client-config print --home {home} --config {config}" in text
3009+
assert "doctor --home <same AVP home> --config <same config>" in text
3010+
assert "client-config print --home <same AVP home> --config <same config>" in text
3011+
assert str(home) not in text
3012+
assert str(config) not in text
30103013

30113014

30123015
def _assert_demo_managed_approval_center_stopped(home: Path) -> None:

0 commit comments

Comments
 (0)