MCPcopy Create free account
hub / github.com/anomalyco/opencode-bench / run

Function run

src/eval.ts:21–39  ·  view source on GitHub ↗
(
    agentName: string,
    modelId: string,
    taskId: string,
    opts: {
      logger: Logger.Instance;
    },
  )

Source from the content-addressed store, hash-verified

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,

Callers

nothing calls this directly

Calls 2

withRetriesFunction · 0.85
runOnceFunction · 0.85

Tested by

no test coverage detected