fix(hermes): register the Omnigent MCP server for the headless harness - #2216
Conversation
|
@dosenr This PR is a Bug fix, Feature, or UI / frontend change but the Demo section is missing or only contains a placeholder. These change types require a screenshot or screen recording so reviewers can see the new behaviour without checking out the branch. Please update the Demo section with:
Use |
The headless hermes harness populated a private tempdir HERMES_HOME with only the policy hook config, so a headless Hermes agent had zero Omnigent builtin tools (sys_*, web_*, load_skill). The native twin already writes an mcp_servers.omnigent entry via write_policy_hook_config. Point the executor's HERMES_HOME at the session's deterministic bridge dir and reuse write_policy_hook_config, which writes the hook config, bridge.json, and the mcp_servers.omnigent (serve-mcp) entry together. Start the runner-hosted tool relay for hermes turns alongside the existing native branches so tool_relay.json lands in the same dir and serve-mcp can dispatch the builtin tools. The executor-local _populate_hermes_home duplicate becomes dead and is removed. Signed-off-by: rdosen <robert.dosen@gmail.com>
bba0abe to
693437c
Compare
|
Headless/server-side change with no UI surface; the terminal transcript in the Demo section is the demonstration. |
|
Coordination note (same author): #2211 layers hermes-acp on the same per-session home plumbing this PR refactors - it currently imports (#2220, now merged - thanks! - is what keeps ASK policies from double-carding once a hermes home carries relay tools.) |
|
/review |
|
|
🏷️ Doc impact: Internal refactor of the headless Hermes executor's per-session HERMES_HOME/bridge-dir plumbing (moving credentials to a private tempdir and sharing serve-mcp config); no user-facing setup, CLI flag, integration, or documented default changed. Auto-classified on merge. Set the label manually before merging to override. · run |
|
omnigent-ai#2216) The headless hermes harness populated a private tempdir HERMES_HOME with only the policy hook config, so a headless Hermes agent had zero Omnigent builtin tools (sys_*, web_*, load_skill). The native twin already writes an mcp_servers.omnigent entry via write_policy_hook_config. Point the executor's HERMES_HOME at the session's deterministic bridge dir and reuse write_policy_hook_config, which writes the hook config, bridge.json, and the mcp_servers.omnigent (serve-mcp) entry together. Start the runner-hosted tool relay for hermes turns alongside the existing native branches so tool_relay.json lands in the same dir and serve-mcp can dispatch the builtin tools. The executor-local _populate_hermes_home duplicate becomes dead and is removed. Signed-off-by: rdosen <robert.dosen@gmail.com> Signed-off-by: Aditya Devarapalli <adityareddyd2@gmail.com>
Related issue
Closes #1926
Summary
The headless
hermesharness writes a per-sessionHERMES_HOMEwith only the policy-hookconfig, so a headless Hermes agent has zero Omnigent builtin tools (
sys_*,web_*,load_skill). The native twinhermes-nativealready registers anmcp_servers.omnigententry via
hermes_native_bridge.write_policy_hook_config; the headless side never did._setup_hermes_homenow writes anmcp_servers.omnigent(serve-mcp --bridge-dir <dir>)entry into
config.yamland starts the runner-hosted tool relay forhermesturns(
runner/app.py, alongside the existing native branches) soserve-mcpcan dispatch thebuiltin tools via
tool_relay.json. The executor-local_populate_hermes_homeduplicate isremoved in favor of the shared
write_policy_hook_config.write_policy_hook_configgains an optionalhermes_homeparameter. The headless path passesa private
tempfile.mkdtemp()(0700) so the copied.env/auth.jsoncredentials stay offthe predictable bridge path; only the runner<->
serve-mcpcoordination files (bridge.json,tool_relay.json) live in the deterministic bridge dir.hermes-nativekeeps its existingdefault (
bridge_dir/hermes_home), so that path is unchanged.No new auth or server infrastructure:
serve-mcp, the relay, and the bridge-dir layout allexist for
hermes-nativealready.Test plan
tests/inner/test_hermes_executor.py::TestSetupHermesHomebuilds the headless executor with afake session and asserts the generated
config.yamlregistersmcp_servers.omnigentpointedat the bridge dir, that the credential-bearing
HERMES_HOMEis a private tempdir (not underthe bridge dir), and that
bridge.jsonlands in the bridge dir. Themcp_serversassertionfails before the change (
KeyError— nomcp_serverskey) and passes after. Fulltests/inner/test_hermes_executor.py+tests/test_hermes_native_bridge.py+tests/runner/test_comment_relay.pygreen;scripts/backend-smoke.shgreen.Demo
Live web UI run of the headless
hermesharness with the Omnigent MCP serverregistered. The agent calls
sys_session_get_info(an Omnigent-only tool -before this change the headless harness had no Omnigent tools at all); a demo
ASK policy gates it, one approval card parks, Approve runs it:
(The single approval card also depends on #2220 - without the hook skip the
same call would be policy-evaluated twice and park two cards. Captured with
both PRs applied.)
Terminal transcript (tool list, original demo)
A headless
hermesturn (no UI — the demo is the transcript). Before this change theagent had no Omnigent tools; here it lists them and calls one:
Type of change
Test coverage
Coverage notes
Live integration (a headless hermes turn actually invoking an Omnigent tool) needs a running
runner, the hermes CLI, and provider credentials; verified manually against a live deployment.
The added unit tests cover the config-generation and bridge-dir wiring that was the defect.
Changelog
Fixed the headless Hermes harness registering no Omnigent MCP server (agent had no builtin tools).