Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/shared/agent-display-names.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,11 @@ describe("getAgentConfigKey", () => {
})

describe("getAgentListDisplayName", () => {
it("applies invisible stable-sort prefixes to the core agent list", () => {
expect(getAgentListDisplayName("sisyphus")).toBe("\u200BSisyphus - Ultraworker")
expect(getAgentListDisplayName("hephaestus")).toBe("\u200B\u200BHephaestus - Deep Agent")
expect(getAgentListDisplayName("prometheus")).toBe("\u200B\u200B\u200BPrometheus - Plan Builder")
expect(getAgentListDisplayName("atlas")).toBe("\u200B\u200B\u200B\u200BAtlas - Plan Executor")
it("returns display names without invisible sort prefixes", () => {
expect(getAgentListDisplayName("sisyphus")).toBe("Sisyphus - Ultraworker")
expect(getAgentListDisplayName("hephaestus")).toBe("Hephaestus - Deep Agent")
expect(getAgentListDisplayName("prometheus")).toBe("Prometheus - Plan Builder")
expect(getAgentListDisplayName("atlas")).toBe("Atlas - Plan Executor")
})

it("keeps non-core agents unprefixed for list display", () => {
Expand Down
8 changes: 4 additions & 4 deletions src/shared/agent-display-names.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ export const AGENT_DISPLAY_NAMES: Record<string, string> = {
}

const AGENT_LIST_SORT_PREFIXES: Record<string, string> = {
sisyphus: "\u200B",
hephaestus: "\u200B\u200B",
prometheus: "\u200B\u200B\u200B",
atlas: "\u200B\u200B\u200B\u200B",
sisyphus: "",
hephaestus: "",
prometheus: "",
atlas: "",
Comment on lines +30 to +33
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Restore non-visible runtime prefixes for core agent ordering

Setting all core entries in AGENT_LIST_SORT_PREFIXES to empty strings removes the only runtime signal used to keep Sisyphus/Hephaestus/Prometheus/Atlas in canonical order when consumers sort by name (src/plugin-handlers/AGENTS.md documents Agent.list() using localeCompare on name). With these values empty, getAgentRuntimeName() now emits plain display names, so any name-based sort will reorder core agents alphabetically (Atlas first) instead of the required sisyphus → hephaestus → prometheus → atlas order.

Useful? React with 👍 / 👎.

}

const INVISIBLE_AGENT_CHARACTERS_REGEX = /[\u200B\u200C\u200D\uFEFF]/g
Expand Down
Loading