fix: resolve --agent override via config alias before raw command #92

Merged
xiaomo merged 1 commits from fix/agent-override-alias into main 2026-06-05 04:31:51 +00:00
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) => {