feat(core): transition sub-agents to XML format and improve definitions (#18555)

This commit is contained in:
N. Taylor Mullen
2026-02-08 18:25:04 -08:00
committed by GitHub
parent 375c104b32
commit cb73fbf384
10 changed files with 638 additions and 116 deletions
-24
View File
@@ -1104,28 +1104,4 @@ describe('AgentRegistry', () => {
expect(getterCalled).toBe(true); // Getter should have been called now
});
});
describe('getDirectoryContext', () => {
it('should return default message when no agents are registered', () => {
expect(registry.getDirectoryContext()).toContain(
'No sub-agents are currently available.',
);
});
it('should return formatted list of agents when agents are available', async () => {
await registry.testRegisterAgent(MOCK_AGENT_V1);
await registry.testRegisterAgent({
...MOCK_AGENT_V2,
name: 'AnotherAgent',
description: 'Another agent description',
});
const description = registry.getDirectoryContext();
expect(description).toContain('Sub-agents are specialized expert agents');
expect(description).toContain('Available Sub-Agents');
expect(description).toContain(`- ${MOCK_AGENT_V1.name}`);
expect(description).toContain(`- AnotherAgent`);
});
});
});