Add full Hermes Agent ACP harness support - #12
Open
juanmiret wants to merge 3 commits into
Open
Conversation
Adds Hermes Agent (NousResearch/hermes-agent) as a first-class harness, driven through `hermes acp` — the Agent Client Protocol stdio server Hermes also serves to Zed/VS Code/JetBrains. Because ACP runs the same agent core as the CLI and the Electron desktop app, Comet sessions inherit the device's ~/.hermes config, skills, memory, and session history. Every wire shape here was captured from a live `hermes acp` 0.19.1 session rather than inferred, including the fixtures the tests replay. - crates/harness/src/hermes/: initialize handshake (no client-side fs/terminal capability — Hermes owns its tools), session/new + session/load, prompt, cancel, and the session/update stream. session/load replays the whole prior transcript before responding, so replays are drained concurrently and dropped: Comet's doc already holds those parts, and a long history would otherwise fill the incoming channel and deadlock the response. - Live model catalog: Hermes's models are whatever providers are authenticated on the device, so they come from session/new (cached 5min) instead of a curated snapshot. No per-turn effort knob exists over ACP, so the reasoning ladder is deliberately empty. - Steering: a mid-turn session/prompt is redirected into the running turn by Hermes's core (verified live). Its ack resolves immediately and is NOT a turn end — in-flight state tells them apart — and the "Redirected the active turn…" text Hermes streams as assistant output is swallowed so it can't land in the transcript. - Tool normalization: Hermes omits rawInput for its "polished" tools, so operands come from its deterministic title prefixes, locations[], and content blocks (the `$ cmd` block wins over the title, which truncates at 80 chars). - Permissions bridge session/request_permission to RunControls::request_input; sandbox level + auto_approve map onto Hermes's edit-approval session modes. - codex/rpc.rs → jsonrpc.rs: the stdio JSON-RPC client is now shared by both the Codex app-server and Hermes ACP adapters. - Registry slot, harness picker mark, COMET_HARNESS=hermes, docs. Tests: 12 integration tests against a fake ACP server (tests/fixtures/ fake-hermes.sh) plus unit tests, and an #[ignore]d end-to-end test against a real installed hermes. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
juanmiret
marked this pull request as ready for review
August 3, 2026 17:48
Author
|
@wingleeio let me know if this is something you'd like to have, and what would be required for this PR to get merged. Cheers! |
Contributor
|
hermes support in comet is definitely something i'd like to have right now i'm considering how i want to handle acp, ideally acp would be introduced to comet in a way that it's easy to add other acp compatible harnesses afterwards |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds full Hermes Agent support over ACP/JSON-RPC, including model and mode discovery, streaming events, tool calls, approvals, steering, interruption, resume behavior, and coverage with a fake Hermes fixture.
Why
Allows Comet to use Hermes Agent as a first-class harness alongside Claude and Codex.
Validation
cargo fmt --all -- --checkcargo test -p comet-harnessThe branch is rebased onto
zeronsh/comet:main; the follow-up compatibility fix updates Hermes to the current shared child-PATH helper.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.