fix(agents): enforce Sisyphus->Hephaestus->Prometheus->Atlas assembly order
Extract hephaestus into agentConfig before prometheus so the config handler naturally assembles agents in the canonical order instead of relying solely on reorderAgentsByPriority to fix the wrong intermediate order. Also fix test data that had atlas/prometheus swapped and add missing hephaestus to agent-config-integration test lists.
This commit is contained in:
@@ -163,10 +163,15 @@ export async function applyAgentConfig(params: {
|
||||
getAgentDisplayName("sisyphus");
|
||||
}
|
||||
|
||||
// Assembly order: Sisyphus -> Hephaestus -> Prometheus -> Atlas
|
||||
const agentConfig: Record<string, unknown> = {
|
||||
sisyphus: builtinAgents.sisyphus,
|
||||
};
|
||||
|
||||
if (builtinAgents.hephaestus) {
|
||||
agentConfig["hephaestus"] = builtinAgents.hephaestus;
|
||||
}
|
||||
|
||||
agentConfig["sisyphus-junior"] = createSisyphusJuniorAgentWithOverrides(
|
||||
params.pluginConfig.agents?.["sisyphus-junior"],
|
||||
(builtinAgents.atlas as { model?: string } | undefined)?.model,
|
||||
@@ -248,7 +253,7 @@ export async function applyAgentConfig(params: {
|
||||
params.config.agent = {
|
||||
...agentConfig,
|
||||
...Object.fromEntries(
|
||||
Object.entries(builtinAgents).filter(([key]) => key !== "sisyphus"),
|
||||
Object.entries(builtinAgents).filter(([key]) => key !== "sisyphus" && key !== "hephaestus"),
|
||||
),
|
||||
...filterDisabledAgents(filteredUserAgents),
|
||||
...filterDisabledAgents(filteredProjectAgents),
|
||||
|
||||
Reference in New Issue
Block a user