test: update assertions for display name agent keys

- config-handler.test: look up agents by display name keys
- agent-key-remapper.test: new tests for key remapping function
- Rebuild schema asset
This commit is contained in:
YeonGyu-Kim
2026-02-16 20:43:18 +09:00
parent 560d13dc70
commit be2e45b4cb
3 changed files with 248 additions and 26 deletions
@@ -0,0 +1,60 @@
import { describe, it, expect } from "bun:test"
import { remapAgentKeysToDisplayNames } from "./agent-key-remapper"
describe("remapAgentKeysToDisplayNames", () => {
it("remaps known agent keys to display names", () => {
// given agents with lowercase keys
const agents = {
sisyphus: { prompt: "test", mode: "primary" },
oracle: { prompt: "test", mode: "subagent" },
}
// when remapping
const result = remapAgentKeysToDisplayNames(agents)
// then known agents get display name keys
expect(result["Sisyphus (Ultraworker)"]).toBeDefined()
expect(result["oracle"]).toBeDefined()
expect(result["sisyphus"]).toBeUndefined()
})
it("preserves unknown agent keys unchanged", () => {
// given agents with a custom key
const agents = {
"custom-agent": { prompt: "custom" },
}
// when remapping
const result = remapAgentKeysToDisplayNames(agents)
// then custom key is unchanged
expect(result["custom-agent"]).toBeDefined()
})
it("remaps all core agents", () => {
// given all core agents
const agents = {
sisyphus: {},
hephaestus: {},
prometheus: {},
atlas: {},
metis: {},
momus: {},
"sisyphus-junior": {},
}
// when remapping
const result = remapAgentKeysToDisplayNames(agents)
// then all get display name keys
expect(Object.keys(result)).toEqual([
"Sisyphus (Ultraworker)",
"Hephaestus (Deep Agent)",
"Prometheus (Plan Builder)",
"Atlas (Plan Executor)",
"Metis (Plan Consultant)",
"Momus (Plan Critic)",
"Sisyphus-Junior",
])
})
})