fix: unify agent display names and strip invisible sort prefixes
- Replace getAgentRuntimeName with getAgentDisplayName for consistency - Add stripAgentListSortPrefix helper to normalize agent names - Strip sort prefixes in subagent-resolver and sync-executor - Backfill canonical names for core agents when builtin configs omit name - Update tests to match new behavior
This commit is contained in:
@@ -201,7 +201,10 @@ describe("applyAgentConfig builtin override protection", () => {
|
||||
})
|
||||
|
||||
// then
|
||||
expect(result[BUILTIN_SISYPHUS_DISPLAY_NAME]).toEqual(builtinSisyphusConfig)
|
||||
expect(result[BUILTIN_SISYPHUS_DISPLAY_NAME]).toEqual({
|
||||
...builtinSisyphusConfig,
|
||||
name: getAgentDisplayName("sisyphus"),
|
||||
})
|
||||
})
|
||||
|
||||
test("filters user agents whose key differs from a builtin key only by case", async () => {
|
||||
@@ -223,7 +226,10 @@ describe("applyAgentConfig builtin override protection", () => {
|
||||
})
|
||||
|
||||
// then
|
||||
expect(result[BUILTIN_SISYPHUS_DISPLAY_NAME]).toEqual(builtinSisyphusConfig)
|
||||
expect(result[BUILTIN_SISYPHUS_DISPLAY_NAME]).toEqual({
|
||||
...builtinSisyphusConfig,
|
||||
name: getAgentDisplayName("sisyphus"),
|
||||
})
|
||||
expect(result.SiSyPhUs).toBeUndefined()
|
||||
})
|
||||
|
||||
@@ -247,7 +253,10 @@ describe("applyAgentConfig builtin override protection", () => {
|
||||
})
|
||||
|
||||
// then
|
||||
expect(result[BUILTIN_SISYPHUS_DISPLAY_NAME]).toEqual(builtinSisyphusConfig)
|
||||
expect(result[BUILTIN_SISYPHUS_DISPLAY_NAME]).toEqual({
|
||||
...builtinSisyphusConfig,
|
||||
name: getAgentDisplayName("sisyphus"),
|
||||
})
|
||||
})
|
||||
|
||||
describe("#given protected builtin agents use hyphenated names", () => {
|
||||
|
||||
Reference in New Issue
Block a user