This is an automated email from the ASF dual-hosted git repository.
hsluoyz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/casbin-gateway.git
The following commit(s) were added to refs/heads/master by this push:
new 2719c66 fix(agent): give Hermes a fingerprint and drop the
unreachable Codex ids
2719c66 is described below
commit 2719c66789a9a2623f30a08e38473b3761490dc1
Author: Yang Luo <[email protected]>
AuthorDate: Fri Sep 4 01:27:52 2026 +0800
fix(agent): give Hermes a fingerprint and drop the unreachable Codex ids
---
agent/fingerprint.go | 5 +++++
agent/fingerprint_load.go | 2 +-
agent/fingerprint_load_test.go | 4 ++--
agent/fingerprints/hermes-agent.json | 7 +++++++
agent/scan_common.go | 2 +-
agentconfig/layout.go | 2 --
agentpatch/codex.go | 4 ----
agentprovider/codex.go | 4 ----
internal/hermes/inspect.go | 1 -
9 files changed, 16 insertions(+), 15 deletions(-)
diff --git a/agent/fingerprint.go b/agent/fingerprint.go
index dbfca0d..0ae67e1 100644
--- a/agent/fingerprint.go
+++ b/agent/fingerprint.go
@@ -33,6 +33,11 @@ type Fingerprint struct {
// Sandboxed marks an agent that runs its sessions in a sandbox of its
own,
// where 127.0.0.1 is the sandbox rather than this host.
Sandboxed bool `json:"sandboxed,omitempty"`
+ // CustomScan marks an agent the scan locates in code rather than from
the
+ // layout fields below: one installed by cloning its own repository,
which
+ // no package layout describes. The fingerprint still carries the
identity
+ // every lookup by agent id goes through.
+ CustomScan bool `json:"customScan,omitempty"`
// InstanceArg is the flag a private state directory is passed on the
command
// line with, for an app that takes one - Chromium's --user-data-dir.
diff --git a/agent/fingerprint_load.go b/agent/fingerprint_load.go
index 97fce18..5d971ae 100644
--- a/agent/fingerprint_load.go
+++ b/agent/fingerprint_load.go
@@ -122,7 +122,7 @@ func validateFingerprint(f Fingerprint, name string) error {
}
func hasScanSource(f Fingerprint) bool {
- if f.LocalServer != nil {
+ if f.LocalServer != nil || f.CustomScan {
return true
}
if f.ExecName == "" {
diff --git a/agent/fingerprint_load_test.go b/agent/fingerprint_load_test.go
index 0156710..a016a5a 100644
--- a/agent/fingerprint_load_test.go
+++ b/agent/fingerprint_load_test.go
@@ -23,8 +23,8 @@ import (
func TestFingerprintsLoad(t *testing.T) {
want := []string{
"claude-code", "claude-desktop", "codex-cli", "codex",
"cursor-agent",
- "cursor", "dsh", "gemini-cli", "openagent", "openclaw",
"opencode-desktop",
- "opencode",
+ "cursor", "dsh", "gemini-cli", "hermes-agent", "openagent",
"openclaw",
+ "opencode-desktop", "opencode",
"windsurf",
}
diff --git a/agent/fingerprints/hermes-agent.json
b/agent/fingerprints/hermes-agent.json
new file mode 100644
index 0000000..c3abab8
--- /dev/null
+++ b/agent/fingerprints/hermes-agent.json
@@ -0,0 +1,7 @@
+{
+ "id": "hermes-agent",
+ "displayName": "Hermes Agent",
+ "installUrl":
"https://hermes-agent.nousresearch.com/docs/getting-started/installation",
+ "execName": "hermes",
+ "customScan": true
+}
diff --git a/agent/scan_common.go b/agent/scan_common.go
index dd78532..58f3d20 100644
--- a/agent/scan_common.go
+++ b/agent/scan_common.go
@@ -306,7 +306,7 @@ func hermesInstallation(launcher, owner string,
officialRoots ...string) []Insta
}
}
return []Installation{{
- AgentId: hermes.AgentID, Name: hermes.DisplayName, Version:
project.Version,
+ AgentId: hermes.AgentID, Name: DisplayNameOf(hermes.AgentID),
Version: project.Version,
Path: launcher, InstallMethod: method, Owner: owner,
}}
}
diff --git a/agentconfig/layout.go b/agentconfig/layout.go
index 77473c1..4327240 100644
--- a/agentconfig/layout.go
+++ b/agentconfig/layout.go
@@ -167,8 +167,6 @@ var layouts = map[string]layout{
},
"codex": codexLayout,
"codex-cli": codexLayout,
- "codex-vscode": codexLayout,
- "codex_vscode": codexLayout,
"cursor": cursorLayout,
"cursor-agent": cursorLayout,
// The Gemini CLI reads the shared ~/.agents skills too, and prefers
them
diff --git a/agentpatch/codex.go b/agentpatch/codex.go
index c76d7c0..d7e2c48 100644
--- a/agentpatch/codex.go
+++ b/agentpatch/codex.go
@@ -25,10 +25,6 @@ type codexPatcher struct {
func init() {
register(codexPatcher{id: "codex"})
register(codexPatcher{id: "codex-cli"})
- // VS Code rollout files are emitted by the Codex CLI integration and
share
- // its monitor claim and parser.
- register(codexPatcher{id: "codex_vscode"})
- register(codexPatcher{id: "codex-vscode"})
}
func (p codexPatcher) AgentId() string { return p.id }
diff --git a/agentprovider/codex.go b/agentprovider/codex.go
index df21686..1a0443d 100644
--- a/agentprovider/codex.go
+++ b/agentprovider/codex.go
@@ -75,10 +75,6 @@ type codexWriter struct {
func init() {
register(codexWriter{id: "codex"})
register(codexWriter{id: "codex-cli"})
- // The VS Code integration drives the same CLI, and with it the same
- // ~/.codex directory.
- register(codexWriter{id: "codex_vscode"})
- register(codexWriter{id: "codex-vscode"})
}
func (w codexWriter) AgentId() string { return w.id }
diff --git a/internal/hermes/inspect.go b/internal/hermes/inspect.go
index 88ce619..7528fc2 100644
--- a/internal/hermes/inspect.go
+++ b/internal/hermes/inspect.go
@@ -25,7 +25,6 @@ import (
const (
AgentID = "hermes-agent"
- DisplayName = "Hermes Agent"
ExecName = "hermes"
ProjectDir = "hermes-agent"
ProjectName = "hermes-agent"
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]