github-issue-tower-defence-management 1.166.5 → 1.167.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/bin/adapter/entry-points/cli/index.js +1 -0
- package/bin/adapter/entry-points/cli/index.js.map +1 -1
- package/bin/domain/usecases/HandleScheduledEventUseCase.js +1 -0
- package/bin/domain/usecases/HandleScheduledEventUseCase.js.map +1 -1
- package/bin/domain/usecases/NotifyFinishedIssuePreparationUseCase.js +2 -26
- package/bin/domain/usecases/NotifyFinishedIssuePreparationUseCase.js.map +1 -1
- package/bin/domain/usecases/StartPreparationUseCase.js +28 -4
- package/bin/domain/usecases/StartPreparationUseCase.js.map +1 -1
- package/bin/domain/usecases/ensureAgentOptionAndGetId.js +31 -0
- package/bin/domain/usecases/ensureAgentOptionAndGetId.js.map +1 -0
- package/package.json +1 -1
- package/src/adapter/entry-points/cli/index.test.ts +33 -0
- package/src/adapter/entry-points/cli/index.ts +1 -0
- package/src/domain/usecases/HandleScheduledEventUseCase.ts +1 -0
- package/src/domain/usecases/NotifyFinishedIssuePreparationUseCase.ts +4 -38
- package/src/domain/usecases/StartPreparationUseCase.test.ts +223 -4
- package/src/domain/usecases/StartPreparationUseCase.ts +59 -4
- package/src/domain/usecases/ensureAgentOptionAndGetId.ts +47 -0
- package/types/adapter/entry-points/cli/index.d.ts.map +1 -1
- package/types/domain/usecases/HandleScheduledEventUseCase.d.ts.map +1 -1
- package/types/domain/usecases/NotifyFinishedIssuePreparationUseCase.d.ts.map +1 -1
- package/types/domain/usecases/StartPreparationUseCase.d.ts +4 -1
- package/types/domain/usecases/StartPreparationUseCase.d.ts.map +1 -1
- package/types/domain/usecases/ensureAgentOptionAndGetId.d.ts +4 -0
- package/types/domain/usecases/ensureAgentOptionAndGetId.d.ts.map +1 -0
|
@@ -472,6 +472,7 @@ program
|
|
|
472
472
|
manager,
|
|
473
473
|
codexHomeCandidates,
|
|
474
474
|
labelsAsLlmAgentName: config.labelsAsLlmAgentName ?? null,
|
|
475
|
+
agents: config.agents ?? null,
|
|
475
476
|
});
|
|
476
477
|
if (preparationResult.rotationOrder !== null) {
|
|
477
478
|
writeRotationOrderFile(preparationResult.rotationOrder);
|
|
@@ -471,6 +471,7 @@ ${JSON.stringify(e)}
|
|
|
471
471
|
manager: input.manager,
|
|
472
472
|
codexHomeCandidates: input.startPreparation.codexHomeCandidates ?? null,
|
|
473
473
|
labelsAsLlmAgentName,
|
|
474
|
+
agents: input.agents ?? null,
|
|
474
475
|
});
|
|
475
476
|
return { rotationOrder: preparationResult.rotationOrder };
|
|
476
477
|
}
|
|
@@ -25,9 +25,8 @@ import {
|
|
|
25
25
|
ConsoleTabName,
|
|
26
26
|
} from './console/GenerateConsoleListsUseCase';
|
|
27
27
|
import { Issue } from '../entities/Issue';
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import { AGENT_FIELD_NAME } from '../entities/RequiredProjectField';
|
|
28
|
+
import { Project } from '../entities/Project';
|
|
29
|
+
import { ensureAgentOptionAndGetId } from './ensureAgentOptionAndGetId';
|
|
31
30
|
|
|
32
31
|
export class IssueNotFoundError extends Error {
|
|
33
32
|
constructor(issueUrl: string) {
|
|
@@ -566,41 +565,8 @@ export class NotifyFinishedIssuePreparationUseCase {
|
|
|
566
565
|
private ensureAgentOptionAndGetId = async (
|
|
567
566
|
project: Project,
|
|
568
567
|
agentName: string,
|
|
569
|
-
): Promise<string | null> =>
|
|
570
|
-
|
|
571
|
-
if (!project.agent) {
|
|
572
|
-
await this.projectRepository.createField(project, {
|
|
573
|
-
name: AGENT_FIELD_NAME,
|
|
574
|
-
dataType: 'SINGLE_SELECT',
|
|
575
|
-
options: [{ name: agentName, color: 'GRAY' as const, description: '' }],
|
|
576
|
-
});
|
|
577
|
-
const refreshed = await this.projectRepository.getByUrl(project.url);
|
|
578
|
-
const created = refreshed.agent?.options.find(
|
|
579
|
-
(o) => normalizeProjectFieldName(o.name) === normalizedTarget,
|
|
580
|
-
);
|
|
581
|
-
return created?.id ?? null;
|
|
582
|
-
}
|
|
583
|
-
const existing = project.agent.options.find(
|
|
584
|
-
(o) => normalizeProjectFieldName(o.name) === normalizedTarget,
|
|
585
|
-
);
|
|
586
|
-
if (existing) {
|
|
587
|
-
return existing.id;
|
|
588
|
-
}
|
|
589
|
-
const mergedOptions: (Omit<FieldOption, 'id'> & {
|
|
590
|
-
id: FieldOption['id'] | null;
|
|
591
|
-
})[] = [
|
|
592
|
-
...project.agent.options.map((o) => ({ ...o })),
|
|
593
|
-
{ id: null, name: agentName, color: 'GRAY' as const, description: '' },
|
|
594
|
-
];
|
|
595
|
-
const updatedOptions = await this.projectRepository.updateAgentList(
|
|
596
|
-
project,
|
|
597
|
-
mergedOptions,
|
|
598
|
-
);
|
|
599
|
-
const added = updatedOptions.find(
|
|
600
|
-
(o) => normalizeProjectFieldName(o.name) === normalizedTarget,
|
|
601
|
-
);
|
|
602
|
-
return added?.id ?? null;
|
|
603
|
-
};
|
|
568
|
+
): Promise<string | null> =>
|
|
569
|
+
ensureAgentOptionAndGetId(this.projectRepository, project, agentName);
|
|
604
570
|
|
|
605
571
|
private patchConsoleTab = async (issue: Issue): Promise<void> => {
|
|
606
572
|
if (!this.consoleTabsRepository) return;
|
|
@@ -9,7 +9,7 @@ import { ClaudeTokenUsageRepository } from './adapter-interfaces/ClaudeTokenUsag
|
|
|
9
9
|
import { TakeOwnershipSpawnRepository } from './adapter-interfaces/TakeOwnershipSpawnRepository';
|
|
10
10
|
import { ClaudeTokenUsage } from '../entities/ClaudeTokenUsage';
|
|
11
11
|
import { Issue } from '../entities/Issue';
|
|
12
|
-
import { Project } from '../entities/Project';
|
|
12
|
+
import { FieldOption, Project } from '../entities/Project';
|
|
13
13
|
import { StoryObjectMap } from '../entities/StoryObjectMap';
|
|
14
14
|
type Mocked<T> = jest.Mocked<T> & jest.MockedObject<T>;
|
|
15
15
|
|
|
@@ -82,7 +82,9 @@ const createMockProject = (): Project => ({
|
|
|
82
82
|
|
|
83
83
|
describe('StartPreparationUseCase', () => {
|
|
84
84
|
let useCase: StartPreparationUseCase;
|
|
85
|
-
let mockProjectRepository: Mocked<
|
|
85
|
+
let mockProjectRepository: Mocked<
|
|
86
|
+
Pick<ProjectRepository, 'getByUrl' | 'createField' | 'updateAgentList'>
|
|
87
|
+
>;
|
|
86
88
|
let mockIssueRepository: Mocked<
|
|
87
89
|
Pick<
|
|
88
90
|
IssueRepository,
|
|
@@ -94,6 +96,8 @@ describe('StartPreparationUseCase', () => {
|
|
|
94
96
|
| 'closePullRequest'
|
|
95
97
|
| 'deletePullRequestBranch'
|
|
96
98
|
| 'createCommentByUrl'
|
|
99
|
+
| 'setIssueAgentField'
|
|
100
|
+
| 'removeLabel'
|
|
97
101
|
>
|
|
98
102
|
>;
|
|
99
103
|
let mockLocalCommandRunner: Mocked<LocalCommandRunner>;
|
|
@@ -105,6 +109,8 @@ describe('StartPreparationUseCase', () => {
|
|
|
105
109
|
mockProject = createMockProject();
|
|
106
110
|
mockProjectRepository = {
|
|
107
111
|
getByUrl: jest.fn(),
|
|
112
|
+
createField: jest.fn().mockResolvedValue(undefined),
|
|
113
|
+
updateAgentList: jest.fn().mockResolvedValue([]),
|
|
108
114
|
};
|
|
109
115
|
mockIssueRepository = {
|
|
110
116
|
getStoryObjectMap: jest.fn().mockResolvedValue(new Map()),
|
|
@@ -115,6 +121,8 @@ describe('StartPreparationUseCase', () => {
|
|
|
115
121
|
closePullRequest: jest.fn().mockResolvedValue(undefined),
|
|
116
122
|
deletePullRequestBranch: jest.fn().mockResolvedValue(undefined),
|
|
117
123
|
createCommentByUrl: jest.fn().mockResolvedValue(undefined),
|
|
124
|
+
setIssueAgentField: jest.fn().mockResolvedValue(undefined),
|
|
125
|
+
removeLabel: jest.fn().mockResolvedValue(undefined),
|
|
118
126
|
};
|
|
119
127
|
mockLocalCommandRunner = {
|
|
120
128
|
runCommand: jest.fn(),
|
|
@@ -191,6 +199,181 @@ describe('StartPreparationUseCase', () => {
|
|
|
191
199
|
]);
|
|
192
200
|
});
|
|
193
201
|
|
|
202
|
+
describe('agent designation label migration to the Agent project field', () => {
|
|
203
|
+
const projectWithAgentField = (options: FieldOption[]): Project => ({
|
|
204
|
+
...createMockProject(),
|
|
205
|
+
agent: { name: 'Agent', fieldId: 'agent-field-id', options },
|
|
206
|
+
});
|
|
207
|
+
const runWithAgents = async (agents: string[] | null): Promise<void> => {
|
|
208
|
+
await useCase.run({
|
|
209
|
+
projectUrl: 'https://github.com/user/repo',
|
|
210
|
+
defaultAgentName: 'agent1',
|
|
211
|
+
defaultLlmModelName: 'claude-opus',
|
|
212
|
+
fallbackLlmModelName: null,
|
|
213
|
+
defaultLlmAgentName: null,
|
|
214
|
+
configFilePath: '/path/to/config.yml',
|
|
215
|
+
maximumPreparingIssuesCount: null,
|
|
216
|
+
utilizationPercentageThreshold: 90,
|
|
217
|
+
allowedIssueAuthors: ['testuser'],
|
|
218
|
+
manager: 'manager-user',
|
|
219
|
+
codexHomeCandidates: null,
|
|
220
|
+
labelsAsLlmAgentName: null,
|
|
221
|
+
agents,
|
|
222
|
+
});
|
|
223
|
+
};
|
|
224
|
+
const arrangeIssue = (project: Project, labels: string[]): void => {
|
|
225
|
+
mockProjectRepository.getByUrl.mockResolvedValue(project);
|
|
226
|
+
mockIssueRepository.getStoryObjectMap.mockResolvedValue(
|
|
227
|
+
createMockStoryObjectMap([
|
|
228
|
+
createMockIssue({
|
|
229
|
+
url: 'url1',
|
|
230
|
+
title: 'Issue 1',
|
|
231
|
+
labels,
|
|
232
|
+
status: 'Awaiting Workspace',
|
|
233
|
+
}),
|
|
234
|
+
]),
|
|
235
|
+
);
|
|
236
|
+
mockLocalCommandRunner.runCommand.mockResolvedValue({
|
|
237
|
+
stdout: '',
|
|
238
|
+
stderr: '',
|
|
239
|
+
exitCode: 0,
|
|
240
|
+
});
|
|
241
|
+
};
|
|
242
|
+
|
|
243
|
+
it('sets the existing Agent field option and removes the label when a label matches a configured agent definition', async () => {
|
|
244
|
+
const project = projectWithAgentField([
|
|
245
|
+
{
|
|
246
|
+
id: 'agent-option-impl',
|
|
247
|
+
name: 'impl',
|
|
248
|
+
color: 'GRAY',
|
|
249
|
+
description: '',
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
id: 'agent-option-chore',
|
|
253
|
+
name: 'chore',
|
|
254
|
+
color: 'GRAY',
|
|
255
|
+
description: '',
|
|
256
|
+
},
|
|
257
|
+
]);
|
|
258
|
+
arrangeIssue(project, ['chore']);
|
|
259
|
+
|
|
260
|
+
await runWithAgents(['impl', 'chore', 'accounting']);
|
|
261
|
+
|
|
262
|
+
expect(mockProjectRepository.updateAgentList.mock.calls).toHaveLength(0);
|
|
263
|
+
expect(mockIssueRepository.setIssueAgentField.mock.calls).toEqual([
|
|
264
|
+
['url1', project, 'agent-option-chore'],
|
|
265
|
+
]);
|
|
266
|
+
expect(mockIssueRepository.removeLabel.mock.calls).toHaveLength(1);
|
|
267
|
+
expect(mockIssueRepository.removeLabel.mock.calls[0][0]).toMatchObject({
|
|
268
|
+
url: 'url1',
|
|
269
|
+
});
|
|
270
|
+
expect(mockIssueRepository.removeLabel.mock.calls[0][1]).toBe('chore');
|
|
271
|
+
expect(mockLocalCommandRunner.runCommand.mock.calls[0][1][1]).toBe(
|
|
272
|
+
'chore',
|
|
273
|
+
);
|
|
274
|
+
});
|
|
275
|
+
|
|
276
|
+
it('creates the missing Agent field option before setting it on the issue', async () => {
|
|
277
|
+
const project = projectWithAgentField([]);
|
|
278
|
+
arrangeIssue(project, ['impl']);
|
|
279
|
+
mockProjectRepository.updateAgentList.mockResolvedValue([
|
|
280
|
+
{
|
|
281
|
+
id: 'agent-option-impl',
|
|
282
|
+
name: 'impl',
|
|
283
|
+
color: 'GRAY',
|
|
284
|
+
description: '',
|
|
285
|
+
},
|
|
286
|
+
]);
|
|
287
|
+
|
|
288
|
+
await runWithAgents(['impl']);
|
|
289
|
+
|
|
290
|
+
expect(mockProjectRepository.updateAgentList.mock.calls).toHaveLength(1);
|
|
291
|
+
expect(mockProjectRepository.updateAgentList.mock.calls[0][1]).toEqual([
|
|
292
|
+
{ id: null, name: 'impl', color: 'GRAY', description: '' },
|
|
293
|
+
]);
|
|
294
|
+
expect(mockIssueRepository.setIssueAgentField.mock.calls).toEqual([
|
|
295
|
+
['url1', project, 'agent-option-impl'],
|
|
296
|
+
]);
|
|
297
|
+
expect(mockIssueRepository.removeLabel.mock.calls).toHaveLength(1);
|
|
298
|
+
});
|
|
299
|
+
|
|
300
|
+
it('creates the Agent field when the project has none, then sets it and removes the label', async () => {
|
|
301
|
+
const project = createMockProject();
|
|
302
|
+
arrangeIssue(project, ['chore']);
|
|
303
|
+
mockProjectRepository.getByUrl.mockResolvedValueOnce(project);
|
|
304
|
+
mockProjectRepository.getByUrl.mockResolvedValueOnce(
|
|
305
|
+
projectWithAgentField([
|
|
306
|
+
{
|
|
307
|
+
id: 'agent-option-chore',
|
|
308
|
+
name: 'chore',
|
|
309
|
+
color: 'GRAY',
|
|
310
|
+
description: '',
|
|
311
|
+
},
|
|
312
|
+
]),
|
|
313
|
+
);
|
|
314
|
+
|
|
315
|
+
await runWithAgents(['chore']);
|
|
316
|
+
|
|
317
|
+
expect(mockProjectRepository.createField.mock.calls).toHaveLength(1);
|
|
318
|
+
expect(mockProjectRepository.createField.mock.calls[0][1]).toEqual({
|
|
319
|
+
name: 'Agent',
|
|
320
|
+
dataType: 'SINGLE_SELECT',
|
|
321
|
+
options: [{ name: 'chore', color: 'GRAY', description: '' }],
|
|
322
|
+
});
|
|
323
|
+
expect(mockIssueRepository.setIssueAgentField.mock.calls).toEqual([
|
|
324
|
+
['url1', project, 'agent-option-chore'],
|
|
325
|
+
]);
|
|
326
|
+
expect(mockIssueRepository.removeLabel.mock.calls).toHaveLength(1);
|
|
327
|
+
expect(mockLocalCommandRunner.runCommand.mock.calls[0][1][1]).toBe(
|
|
328
|
+
'chore',
|
|
329
|
+
);
|
|
330
|
+
});
|
|
331
|
+
|
|
332
|
+
it('keeps the label and still uses it as the agent when the Agent field option cannot be resolved', async () => {
|
|
333
|
+
const project = createMockProject();
|
|
334
|
+
arrangeIssue(project, ['chore']);
|
|
335
|
+
mockProjectRepository.getByUrl.mockResolvedValue(project);
|
|
336
|
+
|
|
337
|
+
await runWithAgents(['chore']);
|
|
338
|
+
|
|
339
|
+
expect(mockIssueRepository.setIssueAgentField.mock.calls).toHaveLength(0);
|
|
340
|
+
expect(mockIssueRepository.removeLabel.mock.calls).toHaveLength(0);
|
|
341
|
+
expect(mockLocalCommandRunner.runCommand.mock.calls[0][1][1]).toBe(
|
|
342
|
+
'chore',
|
|
343
|
+
);
|
|
344
|
+
});
|
|
345
|
+
|
|
346
|
+
it('leaves the labels untouched when no label matches a configured agent definition', async () => {
|
|
347
|
+
const project = projectWithAgentField([
|
|
348
|
+
{
|
|
349
|
+
id: 'agent-option-impl',
|
|
350
|
+
name: 'impl',
|
|
351
|
+
color: 'GRAY',
|
|
352
|
+
description: '',
|
|
353
|
+
},
|
|
354
|
+
]);
|
|
355
|
+
arrangeIssue(project, ['category:triager']);
|
|
356
|
+
|
|
357
|
+
await runWithAgents(['impl']);
|
|
358
|
+
|
|
359
|
+
expect(mockIssueRepository.setIssueAgentField.mock.calls).toHaveLength(0);
|
|
360
|
+
expect(mockIssueRepository.removeLabel.mock.calls).toHaveLength(0);
|
|
361
|
+
expect(mockLocalCommandRunner.runCommand.mock.calls[0][1][1]).toBe(
|
|
362
|
+
'triager',
|
|
363
|
+
);
|
|
364
|
+
});
|
|
365
|
+
|
|
366
|
+
it('leaves the labels untouched when no agent definition is configured', async () => {
|
|
367
|
+
const project = projectWithAgentField([]);
|
|
368
|
+
arrangeIssue(project, ['chore']);
|
|
369
|
+
|
|
370
|
+
await runWithAgents(null);
|
|
371
|
+
|
|
372
|
+
expect(mockIssueRepository.setIssueAgentField.mock.calls).toHaveLength(0);
|
|
373
|
+
expect(mockIssueRepository.removeLabel.mock.calls).toHaveLength(0);
|
|
374
|
+
});
|
|
375
|
+
});
|
|
376
|
+
|
|
194
377
|
it('keeps an issue out of Preparation when the aw command exits non-zero', async () => {
|
|
195
378
|
const awaitingIssues: Issue[] = [
|
|
196
379
|
createMockIssue({
|
|
@@ -4957,6 +5140,7 @@ describe('StartPreparationUseCase', () => {
|
|
|
4957
5140
|
defaultAgentName: string;
|
|
4958
5141
|
defaultLlmAgentName: string | null;
|
|
4959
5142
|
labelsAsLlmAgentName: string[] | null;
|
|
5143
|
+
agent?: string | null;
|
|
4960
5144
|
}): Promise<string> => {
|
|
4961
5145
|
const awaitingIssues: Issue[] = [
|
|
4962
5146
|
createMockIssue({
|
|
@@ -4964,6 +5148,7 @@ describe('StartPreparationUseCase', () => {
|
|
|
4964
5148
|
title: 'Issue 1',
|
|
4965
5149
|
labels: params.labels,
|
|
4966
5150
|
status: 'Awaiting Workspace',
|
|
5151
|
+
agent: params.agent ?? null,
|
|
4967
5152
|
}),
|
|
4968
5153
|
];
|
|
4969
5154
|
mockProjectRepository.getByUrl.mockResolvedValue(mockProject);
|
|
@@ -4994,6 +5179,28 @@ describe('StartPreparationUseCase', () => {
|
|
|
4994
5179
|
return awArgs[1];
|
|
4995
5180
|
};
|
|
4996
5181
|
|
|
5182
|
+
it('strips the llm-agent: prefix from the project agent field value', async () => {
|
|
5183
|
+
const selectedAgent = await runWithIssueLabels({
|
|
5184
|
+
agent: 'llm-agent:impl',
|
|
5185
|
+
labels: [],
|
|
5186
|
+
defaultAgentName: 'default-agent',
|
|
5187
|
+
defaultLlmAgentName: 'default-llm-agent',
|
|
5188
|
+
labelsAsLlmAgentName: null,
|
|
5189
|
+
});
|
|
5190
|
+
expect(selectedAgent).toBe('impl');
|
|
5191
|
+
});
|
|
5192
|
+
|
|
5193
|
+
it('keeps a project agent field value that carries no llm-agent: prefix', async () => {
|
|
5194
|
+
const selectedAgent = await runWithIssueLabels({
|
|
5195
|
+
agent: 'developer',
|
|
5196
|
+
labels: [],
|
|
5197
|
+
defaultAgentName: 'default-agent',
|
|
5198
|
+
defaultLlmAgentName: 'default-llm-agent',
|
|
5199
|
+
labelsAsLlmAgentName: null,
|
|
5200
|
+
});
|
|
5201
|
+
expect(selectedAgent).toBe('developer');
|
|
5202
|
+
});
|
|
5203
|
+
|
|
4997
5204
|
it('selects explicit llm-agent: label over labelsAsLlmAgentName mapping', async () => {
|
|
4998
5205
|
const selectedAgent = await runWithIssueLabels({
|
|
4999
5206
|
labels: ['llm-agent:explicit-agent', 'story', 'category:impl'],
|
|
@@ -6325,9 +6532,11 @@ describe('StartPreparationUseCase', () => {
|
|
|
6325
6532
|
|
|
6326
6533
|
describe('StartPreparationUseCase.buildRotationOrder', () => {
|
|
6327
6534
|
const mockProjectRepositoryForRotation: Mocked<
|
|
6328
|
-
Pick<ProjectRepository, 'getByUrl'>
|
|
6535
|
+
Pick<ProjectRepository, 'getByUrl' | 'createField' | 'updateAgentList'>
|
|
6329
6536
|
> = {
|
|
6330
6537
|
getByUrl: jest.fn(),
|
|
6538
|
+
createField: jest.fn(),
|
|
6539
|
+
updateAgentList: jest.fn(),
|
|
6331
6540
|
};
|
|
6332
6541
|
const mockIssueRepositoryForRotation: Mocked<
|
|
6333
6542
|
Pick<
|
|
@@ -6340,6 +6549,8 @@ describe('StartPreparationUseCase.buildRotationOrder', () => {
|
|
|
6340
6549
|
| 'closePullRequest'
|
|
6341
6550
|
| 'deletePullRequestBranch'
|
|
6342
6551
|
| 'createCommentByUrl'
|
|
6552
|
+
| 'setIssueAgentField'
|
|
6553
|
+
| 'removeLabel'
|
|
6343
6554
|
>
|
|
6344
6555
|
> = {
|
|
6345
6556
|
getStoryObjectMap: jest.fn(),
|
|
@@ -6350,6 +6561,8 @@ describe('StartPreparationUseCase.buildRotationOrder', () => {
|
|
|
6350
6561
|
closePullRequest: jest.fn(),
|
|
6351
6562
|
deletePullRequestBranch: jest.fn(),
|
|
6352
6563
|
createCommentByUrl: jest.fn(),
|
|
6564
|
+
setIssueAgentField: jest.fn(),
|
|
6565
|
+
removeLabel: jest.fn(),
|
|
6353
6566
|
};
|
|
6354
6567
|
const mockLocalCommandRunnerForRotation: Mocked<LocalCommandRunner> = {
|
|
6355
6568
|
runCommand: jest.fn(),
|
|
@@ -6642,7 +6855,11 @@ describe('StartPreparationUseCase.getTokenConcurrentLimit', () => {
|
|
|
6642
6855
|
let useCase: StartPreparationUseCase;
|
|
6643
6856
|
beforeEach(() => {
|
|
6644
6857
|
useCase = new StartPreparationUseCase(
|
|
6645
|
-
{
|
|
6858
|
+
{
|
|
6859
|
+
getByUrl: jest.fn(),
|
|
6860
|
+
createField: jest.fn(),
|
|
6861
|
+
updateAgentList: jest.fn(),
|
|
6862
|
+
},
|
|
6646
6863
|
{
|
|
6647
6864
|
getStoryObjectMap: jest.fn(),
|
|
6648
6865
|
getAllOpened: jest.fn(),
|
|
@@ -6652,6 +6869,8 @@ describe('StartPreparationUseCase.getTokenConcurrentLimit', () => {
|
|
|
6652
6869
|
closePullRequest: jest.fn(),
|
|
6653
6870
|
deletePullRequestBranch: jest.fn(),
|
|
6654
6871
|
createCommentByUrl: jest.fn(),
|
|
6872
|
+
setIssueAgentField: jest.fn(),
|
|
6873
|
+
removeLabel: jest.fn(),
|
|
6655
6874
|
},
|
|
6656
6875
|
{ runCommand: jest.fn() },
|
|
6657
6876
|
{
|
|
@@ -9,11 +9,20 @@ import {
|
|
|
9
9
|
AWAITING_WORKSPACE_STATUS_NAME,
|
|
10
10
|
PREPARATION_STATUS_NAME,
|
|
11
11
|
} from '../entities/WorkflowStatus';
|
|
12
|
+
import { ensureAgentOptionAndGetId } from './ensureAgentOptionAndGetId';
|
|
13
|
+
import { Issue } from '../entities/Issue';
|
|
14
|
+
import { Project } from '../entities/Project';
|
|
12
15
|
|
|
13
16
|
const NORMAL_CONCURRENT_LIMIT = 6;
|
|
14
17
|
const SEVEN_DAY_THROTTLE_START_THRESHOLD = 0.8;
|
|
15
18
|
const FIVE_HOUR_THROTTLE_START_THRESHOLD = 0.8;
|
|
16
19
|
export const DEFAULT_FALLBACK_LLM_MODEL_NAME = 'claude-opus-4-8';
|
|
20
|
+
const LLM_AGENT_LABEL_PREFIX = 'llm-agent:';
|
|
21
|
+
|
|
22
|
+
export const agentNameFromDesignation = (designation: string): string =>
|
|
23
|
+
designation.startsWith(LLM_AGENT_LABEL_PREFIX)
|
|
24
|
+
? designation.slice(LLM_AGENT_LABEL_PREFIX.length).trim()
|
|
25
|
+
: designation.trim();
|
|
17
26
|
|
|
18
27
|
export type RotationOrderEntry = {
|
|
19
28
|
name: string;
|
|
@@ -26,7 +35,10 @@ export type RotationOrderEntry = {
|
|
|
26
35
|
|
|
27
36
|
export class StartPreparationUseCase {
|
|
28
37
|
constructor(
|
|
29
|
-
private readonly projectRepository: Pick<
|
|
38
|
+
private readonly projectRepository: Pick<
|
|
39
|
+
ProjectRepository,
|
|
40
|
+
'getByUrl' | 'createField' | 'updateAgentList'
|
|
41
|
+
>,
|
|
30
42
|
private readonly issueRepository: Pick<
|
|
31
43
|
IssueRepository,
|
|
32
44
|
| 'getStoryObjectMap'
|
|
@@ -37,6 +49,8 @@ export class StartPreparationUseCase {
|
|
|
37
49
|
| 'closePullRequest'
|
|
38
50
|
| 'deletePullRequestBranch'
|
|
39
51
|
| 'createCommentByUrl'
|
|
52
|
+
| 'setIssueAgentField'
|
|
53
|
+
| 'removeLabel'
|
|
40
54
|
>,
|
|
41
55
|
private readonly localCommandRunner: LocalCommandRunner,
|
|
42
56
|
private readonly claudeTokenUsageRepository: ClaudeTokenUsageRepository,
|
|
@@ -296,6 +310,41 @@ export class StartPreparationUseCase {
|
|
|
296
310
|
return [...selectedEntries, ...excluded];
|
|
297
311
|
};
|
|
298
312
|
|
|
313
|
+
private migrateAgentDesignationLabelToProjectField = async (
|
|
314
|
+
issue: Issue,
|
|
315
|
+
project: Project,
|
|
316
|
+
configuredAgentNames: string[] | null,
|
|
317
|
+
): Promise<void> => {
|
|
318
|
+
const agentLabel =
|
|
319
|
+
configuredAgentNames === null
|
|
320
|
+
? undefined
|
|
321
|
+
: issue.labels.find((label: string) =>
|
|
322
|
+
configuredAgentNames.includes(label),
|
|
323
|
+
);
|
|
324
|
+
if (agentLabel === undefined) {
|
|
325
|
+
return;
|
|
326
|
+
}
|
|
327
|
+
issue.agent = agentLabel;
|
|
328
|
+
const agentOptionId = await ensureAgentOptionAndGetId(
|
|
329
|
+
this.projectRepository,
|
|
330
|
+
project,
|
|
331
|
+
agentLabel,
|
|
332
|
+
);
|
|
333
|
+
if (agentOptionId === null) {
|
|
334
|
+
console.warn(
|
|
335
|
+
`Agent field option '${agentLabel}' could not be resolved for ${issue.url}. Keeping the label as the agent designation.`,
|
|
336
|
+
);
|
|
337
|
+
return;
|
|
338
|
+
}
|
|
339
|
+
await this.issueRepository.setIssueAgentField(
|
|
340
|
+
issue.url,
|
|
341
|
+
project,
|
|
342
|
+
agentOptionId,
|
|
343
|
+
);
|
|
344
|
+
await this.issueRepository.removeLabel(issue, agentLabel);
|
|
345
|
+
issue.labels = issue.labels.filter((label) => label !== agentLabel);
|
|
346
|
+
};
|
|
347
|
+
|
|
299
348
|
run = async (params: {
|
|
300
349
|
projectUrl: string;
|
|
301
350
|
defaultAgentName: string;
|
|
@@ -309,6 +358,7 @@ export class StartPreparationUseCase {
|
|
|
309
358
|
manager: string;
|
|
310
359
|
codexHomeCandidates: string[] | null;
|
|
311
360
|
labelsAsLlmAgentName: string[] | null;
|
|
361
|
+
agents?: string[] | null;
|
|
312
362
|
}): Promise<{ rotationOrder: RotationOrderEntry[] | null }> => {
|
|
313
363
|
const tokenUsages =
|
|
314
364
|
await this.claudeTokenUsageRepository.getAvailableTokenUsages();
|
|
@@ -470,6 +520,11 @@ export class StartPreparationUseCase {
|
|
|
470
520
|
exclusionCounts.notAssignedToManager++;
|
|
471
521
|
continue;
|
|
472
522
|
}
|
|
523
|
+
await this.migrateAgentDesignationLabelToProjectField(
|
|
524
|
+
issue,
|
|
525
|
+
project,
|
|
526
|
+
params.agents ?? null,
|
|
527
|
+
);
|
|
473
528
|
const mappedAgentFromLabel =
|
|
474
529
|
params.labelsAsLlmAgentName !== null
|
|
475
530
|
? issue.labels.find((label: string) =>
|
|
@@ -479,10 +534,10 @@ export class StartPreparationUseCase {
|
|
|
479
534
|
)
|
|
480
535
|
: undefined;
|
|
481
536
|
const agent =
|
|
482
|
-
issue.agent ||
|
|
537
|
+
(issue.agent === null ? null : agentNameFromDesignation(issue.agent)) ||
|
|
483
538
|
issue.labels
|
|
484
|
-
.find((label: string) => label.startsWith(
|
|
485
|
-
?.replace(
|
|
539
|
+
.find((label: string) => label.startsWith(LLM_AGENT_LABEL_PREFIX))
|
|
540
|
+
?.replace(LLM_AGENT_LABEL_PREFIX, '')
|
|
486
541
|
.trim() ||
|
|
487
542
|
mappedAgentFromLabel ||
|
|
488
543
|
issue.labels
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { FieldOption, Project } from '../entities/Project';
|
|
2
|
+
import { normalizeProjectFieldName } from '../entities/ProjectFieldName';
|
|
3
|
+
import { AGENT_FIELD_NAME } from '../entities/RequiredProjectField';
|
|
4
|
+
import { ProjectRepository } from './adapter-interfaces/ProjectRepository';
|
|
5
|
+
|
|
6
|
+
export const ensureAgentOptionAndGetId = async (
|
|
7
|
+
projectRepository: Pick<
|
|
8
|
+
ProjectRepository,
|
|
9
|
+
'createField' | 'getByUrl' | 'updateAgentList'
|
|
10
|
+
>,
|
|
11
|
+
project: Project,
|
|
12
|
+
agentName: string,
|
|
13
|
+
): Promise<string | null> => {
|
|
14
|
+
const normalizedTarget = normalizeProjectFieldName(agentName);
|
|
15
|
+
if (!project.agent) {
|
|
16
|
+
await projectRepository.createField(project, {
|
|
17
|
+
name: AGENT_FIELD_NAME,
|
|
18
|
+
dataType: 'SINGLE_SELECT',
|
|
19
|
+
options: [{ name: agentName, color: 'GRAY' as const, description: '' }],
|
|
20
|
+
});
|
|
21
|
+
const refreshed = await projectRepository.getByUrl(project.url);
|
|
22
|
+
const created = refreshed.agent?.options.find(
|
|
23
|
+
(option) => normalizeProjectFieldName(option.name) === normalizedTarget,
|
|
24
|
+
);
|
|
25
|
+
return created?.id ?? null;
|
|
26
|
+
}
|
|
27
|
+
const existing = project.agent.options.find(
|
|
28
|
+
(option) => normalizeProjectFieldName(option.name) === normalizedTarget,
|
|
29
|
+
);
|
|
30
|
+
if (existing) {
|
|
31
|
+
return existing.id;
|
|
32
|
+
}
|
|
33
|
+
const mergedOptions: (Omit<FieldOption, 'id'> & {
|
|
34
|
+
id: FieldOption['id'] | null;
|
|
35
|
+
})[] = [
|
|
36
|
+
...project.agent.options.map((option) => ({ ...option })),
|
|
37
|
+
{ id: null, name: agentName, color: 'GRAY' as const, description: '' },
|
|
38
|
+
];
|
|
39
|
+
const updatedOptions = await projectRepository.updateAgentList(
|
|
40
|
+
project,
|
|
41
|
+
mergedOptions,
|
|
42
|
+
);
|
|
43
|
+
const created = updatedOptions.find(
|
|
44
|
+
(option) => normalizeProjectFieldName(option.name) === normalizedTarget,
|
|
45
|
+
);
|
|
46
|
+
return created?.id ?? null;
|
|
47
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/adapter/entry-points/cli/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EACL,UAAU,EACV,cAAc,EACd,wBAAwB,EACxB,YAAY,EACZ,kBAAkB,GACnB,MAAM,iBAAiB,CAAC;AA8LzB,eAAO,MAAM,OAAO,SAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/adapter/entry-points/cli/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EACL,UAAU,EACV,cAAc,EACd,wBAAwB,EACxB,YAAY,EACZ,kBAAkB,GACnB,MAAM,iBAAiB,CAAC;AA8LzB,eAAO,MAA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AiB,IAAI,EAAE,EACvB,gBAAgB,cAAc,KAC7B,OAAO,CAAC,IAAI,CAAC,CAmGd;IACF,MAAM,CAAC,qBAAqB,GAAI,MAAM,IAAI,EAAE,IAAI,IAAI,KAAG,IAAI,EAAE,CAoB3D;IACF,uBAAuB,GAAU,CAAC,EAChC,WAAW,MAAM,GAAG,OAAO,EAC3B,gBAAgB,MAAM,EACtB,KAAK,MAAM,EACX,MAAM,MAAM,EACZ,SAAS,MAAM,CAAC,MAAM,CAAC,EACvB,QAAQ,MAAM,OAAO,CAAC,CAAC,CAAC,KACvB,OAAO,CAAC,CAAC,CAAC,CAkCX;IACF,4CAA4C,GAC1C,gBAAgB,MAAM,EACtB,KAAK,IAAI,EACT,KAAK,MAAM,EACX,MAAM,MAAM,EACZ,SAAS,MAAM,CAAC,MAAM,CAAC,KACtB,OAAO,CAAC,IAAI,EAAE,CAAC,CA4DhB;IACF,kBAAkB,GAChB,gBAAgB,MAAM,EACtB,KAAK,IAAI,EACT,KAAK,MAAM,EACX,MAAM,MAAM,EACZ,SAAS,MAAM,CAAC,MAAM,CAAC,KACtB,OAAO,CAAC,OAAO,CAAC,CAsDjB;IACF,WAAW,GAAU,OAAO;QAC1B,OAAO,EAAE,OAAO,CAAC;QACjB,MAAM,EAAE,KAAK,EAAE,CAAC;KACjB,KAAG,OAAO,CAAC,cAAc,CAAC,CAoBzB;CACH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotifyFinishedIssuePreparationUseCase.d.ts","sourceRoot":"","sources":["../../../src/domain/usecases/NotifyFinishedIssuePreparationUseCase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAC3E,OAAO,EAAE,sBAAsB,EAAE,MAAM,6CAA6C,CAAC;AACrF,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAC3E,OAAO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pawnRepository';
|
|
6
6
|
import { ClaudeTokenUsage } from '../entities/ClaudeTokenUsage';
|
|
7
7
|
export declare const DEFAULT_FALLBACK_LLM_MODEL_NAME = "claude-opus-4-8";
|
|
8
|
+
export declare const agentNameFromDesignation: (designation: string) => string;
|
|
8
9
|
export type RotationOrderEntry = {
|
|
9
10
|
name: string;
|
|
10
11
|
fiveHourUtilization: number;
|
|
@@ -19,7 +20,7 @@ export declare class StartPreparationUseCase {
|
|
|
19
20
|
private readonly localCommandRunner;
|
|
20
21
|
private readonly claudeTokenUsageRepository;
|
|
21
22
|
private readonly takeOwnershipSpawnRepository;
|
|
22
|
-
constructor(projectRepository: Pick<ProjectRepository, 'getByUrl'>, issueRepository: Pick<IssueRepository, 'getStoryObjectMap' | 'getAllOpened' | 'updateStatus' | 'findRelatedOpenPRs' | 'getOpenPullRequest' | 'closePullRequest' | 'deletePullRequestBranch' | 'createCommentByUrl'>, localCommandRunner: LocalCommandRunner, claudeTokenUsageRepository: ClaudeTokenUsageRepository, takeOwnershipSpawnRepository: TakeOwnershipSpawnRepository);
|
|
23
|
+
constructor(projectRepository: Pick<ProjectRepository, 'getByUrl' | 'createField' | 'updateAgentList'>, issueRepository: Pick<IssueRepository, 'getStoryObjectMap' | 'getAllOpened' | 'updateStatus' | 'findRelatedOpenPRs' | 'getOpenPullRequest' | 'closePullRequest' | 'deletePullRequestBranch' | 'createCommentByUrl' | 'setIssueAgentField' | 'removeLabel'>, localCommandRunner: LocalCommandRunner, claudeTokenUsageRepository: ClaudeTokenUsageRepository, takeOwnershipSpawnRepository: TakeOwnershipSpawnRepository);
|
|
23
24
|
private weeklyLimitTypeForModel;
|
|
24
25
|
private isWithinCooldown;
|
|
25
26
|
private isModelWeeklyLimitRejected;
|
|
@@ -30,6 +31,7 @@ export declare class StartPreparationUseCase {
|
|
|
30
31
|
getTokenConcurrentLimit: (fiveHourUtilization: number, sevenDayUtilization: number, selectionWeight?: number) => number;
|
|
31
32
|
private selectRotationTokens;
|
|
32
33
|
buildRotationOrder: (tokenUsages: ClaudeTokenUsage[], utilizationPercentageThreshold: number, modelName: string | null) => RotationOrderEntry[];
|
|
34
|
+
private migrateAgentDesignationLabelToProjectField;
|
|
33
35
|
run: (params: {
|
|
34
36
|
projectUrl: string;
|
|
35
37
|
defaultAgentName: string;
|
|
@@ -43,6 +45,7 @@ export declare class StartPreparationUseCase {
|
|
|
43
45
|
manager: string;
|
|
44
46
|
codexHomeCandidates: string[] | null;
|
|
45
47
|
labelsAsLlmAgentName: string[] | null;
|
|
48
|
+
agents?: string[] | null;
|
|
46
49
|
}) => Promise<{
|
|
47
50
|
rotationOrder: RotationOrderEntry[] | null;
|
|
48
51
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StartPreparationUseCase.d.ts","sourceRoot":"","sources":["../../../src/domain/usecases/StartPreparationUseCase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,0BAA0B,EAAE,MAAM,iDAAiD,CAAC;AAC7F,OAAO,EAAE,4BAA4B,EAAE,MAAM,mDAAmD,CAAC;AACjG,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"StartPreparationUseCase.d.ts","sourceRoot":"","sources":["../../../src/domain/usecases/StartPreparationUseCase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,0BAA0B,EAAE,MAAM,iDAAiD,CAAC;AAC7F,OAAO,EAAE,4BAA4B,EAAE,MAAM,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BAAuB,GACrB,qBAAqB,MAAM,EAC3B,qBAAqB,MAAM,EAC3B,kBAAkB,MAAM,KACvB,MAAM,CAcP;IAEF,OAAO,CAAC,oBAAoB,CA6E1B;IAEF,kBAAkB,GAChB,aAAa,gBAAgB,EAAE,EAC/B,gCAAgC,MAAM,EACtC,WAAW,MAAM,GAAG,IAAI,KACvB,kBAAkB,EAAE,CAqDrB;IAEF,OAAO,CAAC,0CAA0C,CAiChD;IAEF,GAAG,GAAU,QAAQ;QACnB,UAAU,EAAE,MAAM,CAAC;QACnB,gBAAgB,EAAE,MAAM,CAAC;QACzB,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;QACnC,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;QACpC,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;QACnC,cAAc,EAAE,MAAM,CAAC;QACvB,2BAA2B,EAAE,MAAM,GAAG,IAAI,CAAC;QAC3C,8BAA8B,EAAE,MAAM,CAAC;QACvC,mBAAmB,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;QACrC,OAAO,EAAE,MAAM,CAAC;QAChB,mBAAmB,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;QACrC,oBAAoB,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;QACtC,MAAM,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;KAC1B,KAAG,OAAO,CAAC;QAAE,aAAa,EAAE,kBAAkB,EAAE,GAAG,IAAI,CAAA;KAAE,CAAC,CA+XzD;CACH"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Project } from '../entities/Project';
|
|
2
|
+
import { ProjectRepository } from './adapter-interfaces/ProjectRepository';
|
|
3
|
+
export declare const ensureAgentOptionAndGetId: (projectRepository: Pick<ProjectRepository, "createField" | "getByUrl" | "updateAgentList">, project: Project, agentName: string) => Promise<string | null>;
|
|
4
|
+
//# sourceMappingURL=ensureAgentOptionAndGetId.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ensureAgentOptionAndGetId.d.ts","sourceRoot":"","sources":["../../../src/domain/usecases/ensureAgentOptionAndGetId.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAG3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAE3E,eAAO,MAAM,yBAAyB,GACpC,mBAAmB,IAAI,CACrB,iBAAiB,EACjB,aAAa,GAAG,UAAU,GAAG,iBAAiB,CAC/C,EACD,SAAS,OAAO,EAChB,WAAW,MAAM,KAChB,OAAO,CAAC,MAAM,GAAG,IAAI,CAkCvB,CAAC"}
|