Skip to content
Merged
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
1 change: 1 addition & 0 deletions .dev/refactor/roadmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ Status:
- Hermes-facing install surfaces exist in three explicit modes: `hermit install --print-hermes-mcp-config`, `hermit install --fix-hermes-mcp`, and `hermit install --test-hermes-mcp`.
- The Hermes-facing fix/test surfaces now also accept `--hermes-home` so registration and smoke can be exercised against an isolated Hermes config directory.
- `hermit doctor` now also accepts `--hermes-home` so the Hermes MCP diagnostic can inspect the same isolated config target before or after repair.
- `hermit doctor --fix --hermes-home ...` now reports the targeted Hermes config directory back in the repair summary so isolated repair runs are easier to verify in logs.
- Live runtime delivery remains the existing Hermit MCP server path; the Hermes wrapper is a setup/health adapter, not a second runtime.
- Release smoke has already verified npm and PyPI packages can print, register, and test the Hermes-facing MCP configuration without requiring OpenAI API-key onboarding.

Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
- Added `hermit install --fix-hermes-mcp` as an explicit Hermes Agent MCP registration path that calls `hermes mcp add hermit-channel --command hermit --args mcp-server` only when requested.
- Added `hermit install --test-hermes-mcp` as an explicit live MCP wiring smoke that runs `hermes mcp test hermit-channel` without mutating Hermes config.
- Added optional `--hermes-home` targeting for `hermit doctor`, `hermit install --fix-hermes-mcp`, and `hermit install --test-hermes-mcp` so isolated Hermes config directories can be diagnosed, repaired, and smoke-tested without touching the operator's default `~/.hermes`.
- `hermit doctor --fix --hermes-home ...` now echoes the targeted Hermes config directory in its repair summary so operators can verify which isolated config was just modified.
- Tightened the Hermes MCP smoke so it treats `hermes mcp test hermit-channel` output such as `Server 'hermit-channel' not found in config` as a failure even when the Hermes CLI exits with status 0.
- Tightened `hermit install --fix-hermes-mcp` so it answers Hermes Agent's tool-enable prompt, rejects `Cancelled` output even with exit code 0, and verifies the registration is visible in `hermes mcp list` before reporting success.
- Added an optional `Hermes MCP` doctor diagnostic that checks for `hermit-channel -> hermit mcp-server` registration and tolerates current `hermes mcp list` text-only output.
Expand Down
5 changes: 4 additions & 1 deletion docs/hermes-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,13 @@ If you want an isolated Hermes config during registration, smoke, or doctor chec

```bash
hermit install --fix-hermes-mcp --hermes-home /tmp/hermes-home
hermit install --test-hermes-mcp --hermes-home /tmp/hermes-home
hermit doctor --fix --hermes-home /tmp/hermes-home
hermit doctor --hermes-home /tmp/hermes-home
hermit install --test-hermes-mcp --hermes-home /tmp/hermes-home
```

When you use `doctor --fix --hermes-home`, the repair summary now echoes `Hermes target: ...` so logs make the isolated target explicit.

Under the hood this executes Hermes Agent's live MCP check for `hermit-channel` without mutating config beyond the explicit `--fix-hermes-mcp` path.

You can also inspect Hermes directly:
Expand Down
5 changes: 4 additions & 1 deletion hermit_agent/doctor.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,10 @@ def format_doctor_fix_summary(*, cwd: str, hermes_home: str | None = None) -> st
hermes_home=hermes_home,
)

lines = ["Hermit doctor --fix complete.", "", "Repairs:"]
lines = ["Hermit doctor --fix complete."]
if hermes_home:
lines.extend(["", f"Hermes target: {hermes_home}"])
lines.extend(["", "Repairs:"])
lines.append(f"- startup heal: gateway={startup.gateway_status}, mcp={startup.mcp_registration_status}, codex={startup.codex_runtime_status}")
lines.append(f"- install flow: gateway={install.gateway_status}, mcp={install.mcp_registration_status}, codex={install.codex_install_status}, agent-learner={install.agent_learner_status}")
lines.append("- codex-facing surface remains: hermit-channel MCP")
Expand Down
9 changes: 7 additions & 2 deletions tests/test_cli_defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,11 +282,16 @@ def test_main_dispatches_doctor_fix(monkeypatch, capsys):

monkeypatch.setattr(main_mod.sys, "argv", ["hermit-agent", "doctor", "--cwd", "/tmp/demo", "--fix", "--hermes-home", "/tmp/hermes-home"])
seen = []
monkeypatch.setattr("hermit_agent.doctor.format_doctor_fix_summary", lambda **kwargs: seen.append(kwargs) or "Hermit doctor --fix complete.")
monkeypatch.setattr(
"hermit_agent.doctor.format_doctor_fix_summary",
lambda **kwargs: seen.append(kwargs) or "Hermit doctor --fix complete.\nHermes target: /tmp/hermes-home",
)

main_mod.main()

assert "Hermit doctor --fix complete." in capsys.readouterr().out
out = capsys.readouterr().out
assert "Hermit doctor --fix complete." in out
assert "Hermes target: /tmp/hermes-home" in out
assert seen == [{"cwd": "/tmp/demo", "hermes_home": "/tmp/hermes-home"}]


Expand Down
1 change: 1 addition & 0 deletions tests/test_doctor_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def fake_run_install(**kwargs):
text = format_doctor_fix_summary(cwd="/tmp/demo", hermes_home="/tmp/hermes-home")

assert "Hermit doctor --fix complete." in text
assert "Hermes target: /tmp/hermes-home" in text
assert "gateway=started" in text
assert "mcp=registered" in text
assert "codex=installed" in text
Expand Down