Skip to content

Commit b5df53c

Browse files
committed
fix(MARSOHS-1935): show Hermes, LangGraph and CrewAI as agent names
doctl showed "agent" for a Hermes session because the agent kind display table had no entry for AGENT_KIND_HERMES. harness-api also reports AGENT_KIND_LANGGRAPH and AGENT_KIND_CREWAI, which fell back the same way. godo has no constants for these kinds yet, so declare them next to the OpenHands one.
1 parent 813301f commit b5df53c

2 files changed

Lines changed: 21 additions & 4 deletions

File tree

‎commands/agents.go‎

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8296,14 +8296,24 @@ var agentKindDisplayNames = map[godo.HostedAgentKind]string{
82968296
godo.HostedAgentKindCursorCLI: "Cursor CLI",
82978297
godo.HostedAgentKindOpenAICodex: "Codex",
82988298
hostedAgentKindOpenHands: "OpenHands",
8299+
hostedAgentKindHermes: "Hermes",
8300+
hostedAgentKindLangGraph: "LangGraph",
8301+
hostedAgentKindCrewAI: "CrewAI",
82998302
godo.HostedAgentKindCustom: "Custom",
83008303
godo.HostedAgentKindNone: "None",
83018304
}
83028305

8303-
// hostedAgentKindOpenHands is the agent kind harness-api reports for sessions
8304-
// running the OpenHands Agent Server (template `openhands`). Declared here
8305-
// until godo adds the constant; the wire value is the one harness-api emits.
8306-
const hostedAgentKindOpenHands godo.HostedAgentKind = "AGENT_KIND_OPENHANDS"
8306+
// The agent kinds harness-api reports for sessions that godo has no constant
8307+
// for yet: the OpenHands Agent Server (template `openhands`), the Hermes
8308+
// gateway (template `coding-hermes`), and the LangGraph and CrewAI framework
8309+
// adapters. Declared here until godo adds them; the wire values are the ones
8310+
// harness-api emits.
8311+
const (
8312+
hostedAgentKindOpenHands godo.HostedAgentKind = "AGENT_KIND_OPENHANDS"
8313+
hostedAgentKindHermes godo.HostedAgentKind = "AGENT_KIND_HERMES"
8314+
hostedAgentKindLangGraph godo.HostedAgentKind = "AGENT_KIND_LANGGRAPH"
8315+
hostedAgentKindCrewAI godo.HostedAgentKind = "AGENT_KIND_CREWAI"
8316+
)
83078317

83088318
// prettyAgentKind turns AGENT_KIND_OPENCODE into the friendly "OpenCode"
83098319
// label. Falls back to the sentinel "agent" for unspecified or unrecognized

‎commands/agents_run_test.go‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,13 @@ func TestPrettyAgentKind_OpenHands(t *testing.T) {
8181
assert.Equal(t, "OpenHands", prettyAgentKind(godo.HostedAgentKind("AGENT_KIND_OPENHANDS")))
8282
}
8383

84+
func TestPrettyAgentKind_GatewayAndFrameworkKinds(t *testing.T) {
85+
assert.Equal(t, "Hermes", prettyAgentKind(godo.HostedAgentKind("AGENT_KIND_HERMES")))
86+
assert.Equal(t, "LangGraph", prettyAgentKind(godo.HostedAgentKind("AGENT_KIND_LANGGRAPH")))
87+
assert.Equal(t, "CrewAI", prettyAgentKind(godo.HostedAgentKind("AGENT_KIND_CREWAI")))
88+
assert.Equal(t, "agent", prettyAgentKind(godo.HostedAgentKind("AGENT_KIND_NOT_A_KIND")), "an unrecognized kind keeps the sentinel")
89+
}
90+
8491
func TestBuildHarnessManifest(t *testing.T) {
8592
t.Run("opencode with repo and prompt", func(t *testing.T) {
8693
raw, err := buildHarnessManifest(harnessManifestOpts{

0 commit comments

Comments
 (0)
⌂ 换网址