fix: resolve --agent override via config alias before raw command #92
@@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user