Prometheus: keep planner primary-only

This commit is contained in:
YeonGyu-Kim
2026-04-13 10:57:01 +09:00
parent 84f980c95e
commit 680d05a28b
7 changed files with 35 additions and 22 deletions
@@ -108,7 +108,7 @@ describe("remapAgentKeysToDisplayNames", () => {
const agents = {
sisyphus: { name: "sisyphus", prompt: "test", mode: "primary" },
hephaestus: { name: "hephaestus", prompt: "test", mode: "primary" },
prometheus: { name: "prometheus", prompt: "test", mode: "all" },
prometheus: { name: "prometheus", prompt: "test", mode: "primary" },
atlas: { name: "atlas", prompt: "test", mode: "primary" },
oracle: { name: "oracle", prompt: "test", mode: "subagent" },
}
@@ -136,7 +136,7 @@ describe("remapAgentKeysToDisplayNames", () => {
expect(result[getAgentListDisplayName("prometheus")]).toEqual({
name: getAgentRuntimeName("prometheus"),
prompt: "test",
mode: "all",
mode: "primary",
})
expect(result[getAgentListDisplayName("atlas")]).toEqual({
name: getAgentRuntimeName("atlas"),
@@ -151,7 +151,7 @@ describe("remapAgentKeysToDisplayNames", () => {
const agents = {
sisyphus: { prompt: "test", mode: "primary" },
hephaestus: { prompt: "test", mode: "primary" },
prometheus: { prompt: "test", mode: "all" },
prometheus: { prompt: "test", mode: "primary" },
atlas: { prompt: "test", mode: "primary" },
}
@@ -172,7 +172,7 @@ describe("remapAgentKeysToDisplayNames", () => {
expect(result[getAgentListDisplayName("prometheus")]).toEqual({
name: getAgentRuntimeName("prometheus"),
prompt: "test",
mode: "all",
mode: "primary",
})
expect(result[getAgentListDisplayName("atlas")]).toEqual({
name: getAgentRuntimeName("atlas"),
@@ -185,7 +185,7 @@ describe("agent-priority-order", () => {
const agents: Record<string, unknown> = {
[sisyphus]: { name: "sisyphus", mode: "primary" },
[hephaestus]: { name: "hephaestus", mode: "primary" },
[prometheus]: { name: "prometheus", mode: "all" },
[prometheus]: { name: "prometheus", mode: "primary" },
[atlas]: { name: "atlas", mode: "primary" },
}
@@ -195,7 +195,7 @@ describe("agent-priority-order", () => {
// then
expect(result[sisyphus]).toEqual({ name: "sisyphus", mode: "primary", order: 1 })
expect(result[hephaestus]).toEqual({ name: "hephaestus", mode: "primary", order: 2 })
expect(result[prometheus]).toEqual({ name: "prometheus", mode: "all", order: 3 })
expect(result[prometheus]).toEqual({ name: "prometheus", mode: "primary", order: 3 })
expect(result[atlas]).toEqual({ name: "atlas", mode: "primary", order: 4 })
})
+3 -3
View File
@@ -447,7 +447,7 @@ describe("Plan agent demote behavior", () => {
expect(agents.plan.prompt).toBe("original plan prompt")
})
test("prometheus should have mode 'all' to be callable via task", async () => {
test("prometheus should have mode 'primary' like the other core agents", async () => {
// given
const pluginConfig = createPluginConfig({
sisyphus_agent: {
@@ -474,7 +474,7 @@ describe("Plan agent demote behavior", () => {
const agents = config.agent as Record<string, { mode?: string }>
const prometheusKey = getAgentListDisplayName("prometheus")
expect(agents[prometheusKey]).toBeDefined()
expect(agents[prometheusKey].mode).toBe("all")
expect(agents[prometheusKey].mode).toBe("primary")
})
})
@@ -1007,7 +1007,7 @@ describe("Plan agent model inheritance from prometheus", () => {
spyOn(prometheusAgentConfigBuilder, "buildPrometheusAgentConfig").mockResolvedValue({
model: "anthropic/claude-opus-4-6",
variant: "max",
mode: "all",
mode: "primary",
prompt: "prometheus prompt",
})
const pluginConfig = createPluginConfig({
@@ -20,7 +20,7 @@ describe("buildPlanDemoteConfig", () => {
name: "prometheus",
model: "anthropic/claude-opus-4-6",
variant: "max",
mode: "all",
mode: "primary",
prompt: "You are Prometheus...",
permission: { edit: "allow" },
description: "Plan agent (Prometheus)",
@@ -267,4 +267,19 @@ describe("buildPrometheusAgentConfig", () => {
expect(result.model).toBe("anthropic/claude-opus-4-6");
});
});
test("returns Prometheus as a primary agent", async () => {
// given
// when
const result = await buildPrometheusAgentConfig({
configAgentPlan: undefined,
pluginPrometheusOverride: undefined,
userCategories: undefined,
currentModel: undefined,
});
// then
expect(result.mode).toBe("primary");
});
});
@@ -97,7 +97,7 @@ export async function buildPrometheusAgentConfig(params: {
const base: Record<string, unknown> = {
...(resolvedModel ? { model: resolvedModel } : {}),
...(variantToUse ? { variant: variantToUse } : {}),
mode: "all",
mode: "primary",
prompt: getPrometheusPrompt(resolvedModel, params.disabledTools),
permission: PROMETHEUS_PERMISSION,
description: `${(params.configAgentPlan?.description as string) ?? "Plan agent"} (Prometheus - OhMyOpenCode)`,