fix(agents): restore canonical core agent ordering

Remap the core agent keys, default agent, and command routing back to\nlist display names so OpenCode's name-based sorting keeps the\ncanonical Sisyphus -> Hephaestus -> Prometheus -> Atlas order.\n\nAlso teach tool config lookups to resolve the prefixed list keys and\nadd regression tests that exercise the real ordering and routing path.
This commit is contained in:
YeonGyu-Kim
2026-04-09 12:42:48 +09:00
parent 132a994cfc
commit 4f88e0f4e1
11 changed files with 107 additions and 68 deletions
+3 -2
View File
@@ -24,6 +24,7 @@ import {
} from "./agent-override-protection";
import { buildPrometheusAgentConfig } from "./prometheus-agent-config-builder";
import { buildPlanDemoteConfig } from "./plan-model-inheritance";
import { getAgentListDisplayName } from "../shared/agent-display-names";
type AgentConfigRecord = Record<string, Record<string, unknown> | undefined> & {
build?: Record<string, unknown>;
@@ -159,10 +160,10 @@ export async function applyAgentConfig(params: {
if (isSisyphusEnabled && builtinAgents.sisyphus) {
if (configuredDefaultAgent) {
(params.config as { default_agent?: string }).default_agent =
getAgentDisplayName(configuredDefaultAgent);
getAgentListDisplayName(configuredDefaultAgent);
} else {
(params.config as { default_agent?: string }).default_agent =
getAgentDisplayName("sisyphus");
getAgentListDisplayName("sisyphus");
}
// Assembly order: Sisyphus -> Hephaestus -> Prometheus -> Atlas