Skip to content

Commit 133b0d8

Browse files
author
Kandev Agent
committed
fix(backend): tighten Hermes ACP detection and correct install comment
Address PR #1117 review feedback: - IsInstalled now matches the Nous Research version banner ("Hermes Agent v…") via WithCommandOutput instead of a bare LookPath, so a stray `hermes-engine` (Meta's Hermes JS engine, common in React Native setups) on PATH no longer falsely reports the ACP agent as available. - Struct comment now describes the multi-step Python/uv install flow that matches what InstallScript returns, instead of the stale curl|bash line.
1 parent 254cee4 commit 133b0d8

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

apps/backend/internal/agent/agents/hermes_acp.go

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ var (
2525
)
2626

2727
// HermesACP implements Agent for Nous Research's Hermes CLI using ACP.
28-
// Not on npm — users install via the upstream curl|bash script which puts
29-
// the `hermes` Python entry point on PATH.
28+
// Not on npm — installation is a multi-step Python/uv flow documented
29+
// upstream, so InstallScript() points at the docs rather than offering
30+
// a one-shot install button.
3031
type HermesACP struct {
3132
StandardPassthrough
3233
}
@@ -65,7 +66,13 @@ func (a *HermesACP) Logo(v LogoVariant) []byte {
6566
}
6667

6768
func (a *HermesACP) IsInstalled(ctx context.Context) (*DiscoveryResult, error) {
68-
result, err := Detect(ctx, WithCommand(hermesACPBin))
69+
// The `hermes` binary name collides with Meta's Hermes JavaScript engine
70+
// (distributed via `hermes-engine` npm; occasionally globally installed in
71+
// React Native setups). A bare LookPath would report Available=true for
72+
// that stray binary, then `hermes acp` would fail and surface a misleading
73+
// auth_required state. Match the Nous Research version banner
74+
// ("Hermes Agent v…", emitted by cli.py) so detection is specific.
75+
result, err := Detect(ctx, WithCommandOutput(`(?i)hermes\s+agent`, hermesACPBin, "--version"))
6976
if err != nil {
7077
return result, err
7178
}

0 commit comments

Comments
 (0)