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
@@ -1,15 +1,15 @@
import { describe, expect, test } from "bun:test"
import { reorderAgentsByPriority } from "./agent-priority-order"
import { getAgentDisplayName } from "../shared/agent-display-names"
import { getAgentDisplayName, getAgentListDisplayName } from "../shared/agent-display-names"
describe("reorderAgentsByPriority", () => {
test("moves core agents to canonical order and injects runtime order fields", () => {
// given
const sisyphus = getAgentDisplayName("sisyphus")
const hephaestus = getAgentDisplayName("hephaestus")
const prometheus = getAgentDisplayName("prometheus")
const atlas = getAgentDisplayName("atlas")
const sisyphus = getAgentListDisplayName("sisyphus")
const hephaestus = getAgentListDisplayName("hephaestus")
const prometheus = getAgentListDisplayName("prometheus")
const atlas = getAgentListDisplayName("atlas")
const oracle = getAgentDisplayName("oracle")
const agents: Record<string, unknown> = {
@@ -59,8 +59,8 @@ describe("reorderAgentsByPriority", () => {
test("leaves non-object agent configs untouched while still reordering keys", () => {
// given
const sisyphus = getAgentDisplayName("sisyphus")
const atlas = getAgentDisplayName("atlas")
const sisyphus = getAgentListDisplayName("sisyphus")
const atlas = getAgentListDisplayName("atlas")
const agents: Record<string, unknown> = {
[atlas]: "atlas-config",