(options: {
client: CodebuffClient
commit: EvalDataV2['evalCommits'][0]
agents: string[]
repoUrl: string
initCommand?: string
env?: Record<string, string>
logsDir: string
index: number
totalTasks: number
analyzerContext: {
agentDefinitions: any[]
agentTypeDefinition: string
testedAgentIds: string[]
}
localAgentDefinitions: any[]
extractLessons: boolean
printEvents: boolean
finalCheckCommands?: string[]
disableAnalysis?: boolean
saveTraces?: boolean
})
| 42 | } |
| 43 | |
| 44 | async function runTask(options: { |
| 45 | client: CodebuffClient |
| 46 | commit: EvalDataV2['evalCommits'][0] |
| 47 | agents: string[] |
| 48 | repoUrl: string |
| 49 | initCommand?: string |
| 50 | env?: Record<string, string> |
| 51 | logsDir: string |
| 52 | index: number |
| 53 | totalTasks: number |
| 54 | analyzerContext: { |
| 55 | agentDefinitions: any[] |
| 56 | agentTypeDefinition: string |
| 57 | testedAgentIds: string[] |
| 58 | } |
| 59 | localAgentDefinitions: any[] |
| 60 | extractLessons: boolean |
| 61 | printEvents: boolean |
| 62 | finalCheckCommands?: string[] |
| 63 | disableAnalysis?: boolean |
| 64 | saveTraces?: boolean |
| 65 | }) { |
| 66 | const { |
| 67 | client, |
| 68 | commit, |
| 69 | agents, |
| 70 | repoUrl, |
| 71 | initCommand, |
| 72 | env, |
| 73 | logsDir, |
| 74 | index, |
| 75 | totalTasks, |
| 76 | analyzerContext, |
| 77 | localAgentDefinitions, |
| 78 | extractLessons, |
| 79 | printEvents, |
| 80 | finalCheckCommands, |
| 81 | disableAnalysis, |
| 82 | saveTraces = false, |
| 83 | } = options |
| 84 | |
| 85 | console.log( |
| 86 | `\n=== Task ${index + 1}/${totalTasks}: ${commit.id} (${commit.sha.slice(0, 7)}) ===`, |
| 87 | ) |
| 88 | |
| 89 | // Store trace data for this commit to analyze later |
| 90 | const commitTraces: AgentTraceData[] = [] |
| 91 | |
| 92 | const agentPromises = agents.map(async (agent) => { |
| 93 | const { agentId, externalAgentType } = parseAgentId(agent) |
| 94 | |
| 95 | const agentResult = await runAgentOnCommit({ |
| 96 | client, |
| 97 | agentId, |
| 98 | commit, |
| 99 | repoUrl, |
| 100 | initCommand, |
| 101 | env, |
no test coverage detected