mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-03-19 10:43:08 +00:00
Improve auto-loop event emission and add ntfy notifications (#821)
This commit is contained in:
@@ -47,6 +47,8 @@ describe('running-agents routes', () => {
|
||||
projectPath: '/home/user/project',
|
||||
projectName: 'project',
|
||||
isAutoMode: true,
|
||||
model: 'claude-sonnet-4-20250514',
|
||||
provider: 'claude',
|
||||
title: 'Implement login feature',
|
||||
description: 'Add user authentication with OAuth',
|
||||
},
|
||||
@@ -55,6 +57,8 @@ describe('running-agents routes', () => {
|
||||
projectPath: '/home/user/other-project',
|
||||
projectName: 'other-project',
|
||||
isAutoMode: false,
|
||||
model: 'codex-gpt-5.1',
|
||||
provider: 'codex',
|
||||
title: 'Fix navigation bug',
|
||||
description: undefined,
|
||||
},
|
||||
@@ -82,6 +86,8 @@ describe('running-agents routes', () => {
|
||||
projectPath: '/project',
|
||||
projectName: 'project',
|
||||
isAutoMode: true,
|
||||
model: undefined,
|
||||
provider: undefined,
|
||||
title: undefined,
|
||||
description: undefined,
|
||||
},
|
||||
@@ -141,6 +147,8 @@ describe('running-agents routes', () => {
|
||||
projectPath: `/project-${i}`,
|
||||
projectName: `project-${i}`,
|
||||
isAutoMode: i % 2 === 0,
|
||||
model: i % 3 === 0 ? 'claude-sonnet-4-20250514' : 'claude-haiku-4-5',
|
||||
provider: 'claude',
|
||||
title: `Feature ${i}`,
|
||||
description: `Description ${i}`,
|
||||
}));
|
||||
@@ -167,6 +175,8 @@ describe('running-agents routes', () => {
|
||||
projectPath: '/workspace/project-alpha',
|
||||
projectName: 'project-alpha',
|
||||
isAutoMode: true,
|
||||
model: 'claude-sonnet-4-20250514',
|
||||
provider: 'claude',
|
||||
title: 'Feature A',
|
||||
description: 'In project alpha',
|
||||
},
|
||||
@@ -175,6 +185,8 @@ describe('running-agents routes', () => {
|
||||
projectPath: '/workspace/project-beta',
|
||||
projectName: 'project-beta',
|
||||
isAutoMode: false,
|
||||
model: 'codex-gpt-5.1',
|
||||
provider: 'codex',
|
||||
title: 'Feature B',
|
||||
description: 'In project beta',
|
||||
},
|
||||
@@ -191,5 +203,56 @@ describe('running-agents routes', () => {
|
||||
expect(response.runningAgents[0].projectPath).toBe('/workspace/project-alpha');
|
||||
expect(response.runningAgents[1].projectPath).toBe('/workspace/project-beta');
|
||||
});
|
||||
|
||||
it('should include model and provider information for running agents', async () => {
|
||||
// Arrange
|
||||
const runningAgents = [
|
||||
{
|
||||
featureId: 'feature-claude',
|
||||
projectPath: '/project',
|
||||
projectName: 'project',
|
||||
isAutoMode: true,
|
||||
model: 'claude-sonnet-4-20250514',
|
||||
provider: 'claude',
|
||||
title: 'Claude Feature',
|
||||
description: 'Using Claude model',
|
||||
},
|
||||
{
|
||||
featureId: 'feature-codex',
|
||||
projectPath: '/project',
|
||||
projectName: 'project',
|
||||
isAutoMode: false,
|
||||
model: 'codex-gpt-5.1',
|
||||
provider: 'codex',
|
||||
title: 'Codex Feature',
|
||||
description: 'Using Codex model',
|
||||
},
|
||||
{
|
||||
featureId: 'feature-cursor',
|
||||
projectPath: '/project',
|
||||
projectName: 'project',
|
||||
isAutoMode: false,
|
||||
model: 'cursor-auto',
|
||||
provider: 'cursor',
|
||||
title: 'Cursor Feature',
|
||||
description: 'Using Cursor model',
|
||||
},
|
||||
];
|
||||
|
||||
vi.mocked(mockAutoModeService.getRunningAgents!).mockResolvedValue(runningAgents);
|
||||
|
||||
// Act
|
||||
const handler = createIndexHandler(mockAutoModeService as AutoModeService);
|
||||
await handler(req, res);
|
||||
|
||||
// Assert
|
||||
const response = vi.mocked(res.json).mock.calls[0][0];
|
||||
expect(response.runningAgents[0].model).toBe('claude-sonnet-4-20250514');
|
||||
expect(response.runningAgents[0].provider).toBe('claude');
|
||||
expect(response.runningAgents[1].model).toBe('codex-gpt-5.1');
|
||||
expect(response.runningAgents[1].provider).toBe('codex');
|
||||
expect(response.runningAgents[2].model).toBe('cursor-auto');
|
||||
expect(response.runningAgents[2].provider).toBe('cursor');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user