fix: resolve --agent override via config alias before raw command
CI / check (pull_request) Successful in 3m37s

When --agent is passed to uwf thread exec, try config.agents[alias]
first (e.g. 'hermes' → config.agents.hermes = {command: 'uwf-hermes'}),
then fall back to parseAgentOverride for raw command names.

Also change eval CLI default --agent from 'hermes' to 'uwf-hermes'
so it works without config alias lookup.

Refs #91
This commit is contained in:
2026-06-05 04:20:09 +00:00
parent 81bbe1178f
commit 825f0c641a
2 changed files with 7 additions and 1 deletions
+6
View File
@@ -961,6 +961,12 @@ function resolveAgentConfig(
agentOverride: string | null, agentOverride: string | null,
): AgentConfig { ): AgentConfig {
if (agentOverride !== null) { if (agentOverride !== null) {
// Try config alias first (e.g. "hermes" → config.agents.hermes),
// then fall back to raw command name (e.g. "uwf-hermes" or "/usr/bin/agent").
const fromAlias = config.agents[agentOverride as AgentAlias];
if (fromAlias !== undefined) {
return fromAlias;
}
return parseAgentOverride(agentOverride); return parseAgentOverride(agentOverride);
} }
+1 -1
View File
@@ -52,7 +52,7 @@ export function registerRunCommand(program: Command): void {
program program
.command("run <task>") .command("run <task>")
.description("Run eval on a task directory or tarball") .description("Run eval on a task directory or tarball")
.option("--agent <name>", "agent adapter to use", "hermes") .option("--agent <name>", "agent adapter to use", "uwf-hermes")
.option("--model <model>", "model override") .option("--model <model>", "model override")
.option("--count <n>", "number of eval runs", "1") .option("--count <n>", "number of eval runs", "1")
.action(async (task: string, opts: RunCliOptions) => { .action(async (task: string, opts: RunCliOptions) => {