feat(agents): add native Hermes ACP runtime and model selection#2656
feat(agents): add native Hermes ACP runtime and model selection#2656amanning3390 wants to merge 2 commits into
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
354281f to
f07b225
Compare
|
Hey @amanning3390 — this is a thoughtful Hermes integration (catalog entry, YAML bridge with real parse tests, readiness/ One intentional correctness gap (high confidence): Wire
|
Co-authored-by: amanning3390 <adam.manning@pro-serveinc.com> Signed-off-by: amanning3390 <adam.manning@pro-serveinc.com>
The Hermes runtime helpers were defined but never reached a real code path: both carried #[allow(dead_code)] and were only exercised by their own unit tests. As a result Hermes could appear in onboarding and then fail model discovery on the shared 10s budget, and the paired Hermes change (NousResearch/hermes-agent#70405) stayed inert because Buzz never set the marker it reads. - Apply acp_env_for_agent() on the AcpClient::spawn command so every spawn path (probes and managed sessions) gets runtime-specific env. Operator precedence is preserved: an exported value is not overwritten. - Resolve the probe budget with model_probe_timeout_for_agent() at all three initialize/session sites, and report the budget actually used in the timeout messages instead of a hardcoded 10s. - Drop both #[allow(dead_code)] attributes so the compiler enforces the wiring. - Move the helpers next to the spawn they serve. Non-Hermes runtimes are unchanged: no extra env and the existing MODELS_TIMEOUT fast-fail. Co-authored-by: amanning3390 <adam.manning@pro-serveinc.com> Signed-off-by: amanning3390 <adam.manning@pro-serveinc.com>
f07b225 to
bd96c2c
Compare
|
Thanks @Bartok9 — you were right on the correctness gap, and it was the important one. Both items are addressed. 1) Helpers are now wired into the real spawn/probe pathI confirmed your read before changing anything: both helpers carried What changed in
Non-Hermes runtimes are unchanged: no extra env, and the existing Tests ( The timeout test asserts the contract ( Gates on this branch:
2) Process-group kill — verified, no leak, no trap addedI reproduced the exact supervisor shape (
Worth noting: my first version of that probe printed "NO LEAK" while its 3) DCOGreen on both this PR and #2655. Signoff added via One scope note: the paired Hermes side is #70405, where I also documented the marker for host authors (ACP guide + env reference) so the contract isn't only discoverable by reading the adapter source. With this PR applying it on spawn, both halves are now live. Happy to split the env-at-spawn change into its own commit if you'd prefer a finer-grained review. Thanks for catching this — a runtime that appears in onboarding and then times out would have been a rough first impression. |
Bartok9
left a comment
There was a problem hiding this comment.
Verified the diff — this is exactly right on all three:
1) Wiring (the important one). acp_env_for_agent applied in AcpClient::spawn right after Command::from(build_agent_spawn_command(...)) covers every spawn path (probes + managed sessions), and operator precedence is preserved. model_probe_timeout_for_agent now resolves at all three probe sites (run_auth_methods/run_authenticate/run_models) with the message printing the real budget, and both #[allow(dead_code)] are gone so the compiler enforces it. Non-Hermes stays on the 10s fast-fail. 600 passed / fmt / clippy clean.
2) Process-group kill. The before/after killpg probe (with the false-pass catch on the zero-member filter) is a cleaner verification than I asked for. Agreed: killpg + kill_on_drop + shutdown() covers the grandchildren; a signal-forwarding trap would be speculative code for a non-reproducing leak. Right call not to add it.
3) DCO green on both this and #2655, additive commits keeping the diff readable, and documenting the marker on the paired hermes side (#70405) so the contract is discoverable — appreciate that both halves are live.
No need to split env-at-spawn into its own commit for me; the diff reads fine. LGTM. Thanks for taking this seriously — nice integration.
|
This is a complete fix — thank you for taking the correctness gap seriously. Wiring The process-group verification is excellent and above the bar I asked for: reproducing the real supervisor shape, observing the group populated before DCO green on both, paired Hermes side (#70405) documenting the marker for host authors so the contract isn't source-only. Both halves live. Ready from my side; deferring to maintainers on merge. |
|
This is the correctness gap closed properly — thank you. Wiring the env in |
|
Flagging an overlap before a maintainer has to untangle it: I've got #2633 open on the same three files in Yours does runtime registration, the config bridge, readiness probing and the model-selection UX, and in So the proposal: land yours first, then I rebase #2633 down to just the session-store and pool work on top of it. Everything in mine that duplicates yours gets dropped. That way both halves land and neither of us is sitting on a branch that conflicts. Happy the other way round too if you'd prefer, or whatever the maintainers would rather review first. On the Hermes side your #70404 and #70405 are already in and they don't collide with my #70326 - tool policy is a different concern to model choice, and I re-checked that it still merges clean on current main. Also worth saying the packaged release and the install scripts are the bit I hadn't gone near. Good to see someone else landed on the same idea for getting Hermes into Buzz natively. |
|
Thanks for the heads-up @joelbrilliant — and for reading both diffs before flagging it. Agreed the two are complementary: mine is runtime registration + config bridge + readiness probing + model-selection UX (plus the Hermes cold-start budget and Your proposed order works well for me: land this first, then you rebase #2633 down to just the session-store + pool work on top, dropping anything that overlaps. That keeps both halves landing cleanly with no branch sitting in conflict. I'm equally happy the other way round if maintainers prefer to review yours first — whatever's easiest for them. Good confirmation too that the Hermes side is clean: #70404/#70405 in and not colliding with your #70326 (tool policy vs model choice are separate concerns). Deferring to maintainers on final merge + order. |
|
We're going to feature Hermes in Buzz by name and with it's icon. We'll have it set atop generic machinery that any agent harness can use, though. It'll probably look like #2773 Hermes will be in tier 2 there, hard coded into Buzz and with art featured. Thanks for the contributions here! I think we can close this out and use it as a reference for the wider-reaching implementation |
|
Sounds great @tlongwell-block — a generic seam with Hermes featured in tier 2 is the right shape, and I'm glad this was useful as a reference. Happy to have it closed in favor of the wider-reaching #2773. One small ask: if any of the runtime-registration / config-bridge / readiness-probing / model-selection approach here carries over into #2773, a person-level nod (a |
Problem
Buzz supports ACP-compliant agent runtimes (Claude Code, Codex, Goose) but not Hermes Agent, which implements ACP natively via
hermes acp. Users who prefer Hermes as their agent need a way to select it as a managed runtime.What This Changes
Registers native Hermes ACP as a first-class managed agent runtime:
Rust (crates/buzz-acp + desktop/src-tauri)
KNOWN_ACP_RUNTIMESwith install commands, auth probe, login hint, config file pathexecs its Python entry point, which stops servicing stdio when made process-group leader. A non-execing/bin/shsupervisor keeps Hermes as a child sokillpgstill cleans up descendantsHERMES_ACP_SKIP_CONFIGURED_MCP=1for Hermes probes and managed sessions (Buzz provides MCP servers viasession/new)~/.hermes/config.yamlfor model, provider, reasoning effort, and MCP server inventoryCliLoginrequirement with "runhermes model" hintFrontend (desktop/src)
Assets
desktop/public/runtime-icons/hermes.png— official Hermes Agent iconScope
15 files across Rust, TypeScript, and assets. No changes to existing runtime behavior.
Verification
Dependencies
This PR is independently reviewable. It links two pending Hermes Agent PRs that enhance the ACP experience:
Both are optional — this PR works against current Hermes main. The enhanced features activate when those PRs land.