(
agentName: string,
modelId: string,
taskId: string,
opts: {
logger: Logger.Instance;
},
)
| 19 | export type Result = Awaited<ReturnType<typeof run>>; |
| 20 | |
| 21 | export async function run( |
| 22 | agentName: string, |
| 23 | modelId: string, |
| 24 | taskId: string, |
| 25 | opts: { |
| 26 | logger: Logger.Instance; |
| 27 | }, |
| 28 | ) { |
| 29 | const timeoutMins = 20; |
| 30 | opts.logger.log(`Starting episode with ${timeoutMins}min timeout...`); |
| 31 | return await withRetries( |
| 32 | () => runOnce(agentName, modelId, taskId, { logger: opts.logger }), |
| 33 | { |
| 34 | retries: 3, |
| 35 | timeoutMs: timeoutMins * 60 * 1000, |
| 36 | logger: opts.logger, |
| 37 | }, |
| 38 | ); |
| 39 | } |
| 40 | |
| 41 | async function runOnce( |
| 42 | agentName: string, |
nothing calls this directly
no test coverage detected