fix(agents): keep prometheus and atlas in canonical core order
This commit is contained in:
@@ -172,6 +172,24 @@ export async function applyAgentConfig(params: {
|
||||
agentConfig["hephaestus"] = builtinAgents.hephaestus;
|
||||
}
|
||||
|
||||
if (plannerEnabled) {
|
||||
const prometheusOverride = params.pluginConfig.agents?.["prometheus"] as
|
||||
| (Record<string, unknown> & { prompt_append?: string })
|
||||
| undefined;
|
||||
|
||||
agentConfig["prometheus"] = await buildPrometheusAgentConfig({
|
||||
configAgentPlan: configAgent?.plan,
|
||||
pluginPrometheusOverride: prometheusOverride,
|
||||
userCategories: params.pluginConfig.categories,
|
||||
currentModel,
|
||||
disabledTools: params.pluginConfig.disabled_tools,
|
||||
});
|
||||
}
|
||||
|
||||
if (builtinAgents.atlas) {
|
||||
agentConfig["atlas"] = builtinAgents.atlas;
|
||||
}
|
||||
|
||||
agentConfig["sisyphus-junior"] = createSisyphusJuniorAgentWithOverrides(
|
||||
params.pluginConfig.agents?.["sisyphus-junior"],
|
||||
(builtinAgents.atlas as { model?: string } | undefined)?.model,
|
||||
@@ -192,20 +210,6 @@ export async function applyAgentConfig(params: {
|
||||
agentConfig["OpenCode-Builder"] = override ? { ...base, ...override } : base;
|
||||
}
|
||||
|
||||
if (plannerEnabled) {
|
||||
const prometheusOverride = params.pluginConfig.agents?.["prometheus"] as
|
||||
| (Record<string, unknown> & { prompt_append?: string })
|
||||
| undefined;
|
||||
|
||||
agentConfig["prometheus"] = await buildPrometheusAgentConfig({
|
||||
configAgentPlan: configAgent?.plan,
|
||||
pluginPrometheusOverride: prometheusOverride,
|
||||
userCategories: params.pluginConfig.categories,
|
||||
currentModel,
|
||||
disabledTools: params.pluginConfig.disabled_tools,
|
||||
});
|
||||
}
|
||||
|
||||
const filteredConfigAgents = configAgent
|
||||
? Object.fromEntries(
|
||||
Object.entries(configAgent)
|
||||
@@ -253,7 +257,9 @@ export async function applyAgentConfig(params: {
|
||||
params.config.agent = {
|
||||
...agentConfig,
|
||||
...Object.fromEntries(
|
||||
Object.entries(builtinAgents).filter(([key]) => key !== "sisyphus" && key !== "hephaestus"),
|
||||
Object.entries(builtinAgents).filter(
|
||||
([key]) => key !== "sisyphus" && key !== "hephaestus" && key !== "atlas",
|
||||
),
|
||||
),
|
||||
...filterDisabledAgents(filteredUserAgents),
|
||||
...filterDisabledAgents(filteredProjectAgents),
|
||||
|
||||
Reference in New Issue
Block a user