MCPcopy Index your code
hub / github.com/braintrustdata/bash-agent-evals / createWorkerTask

Function createWorkerTask

evals/shared.ts:121–126  ·  view source on GitHub ↗
(agentType: AgentType)

Source from the content-addressed store, hash-verified

119// Helper to create task that runs agent in a worker process with tracing
120export const createWorkerTask =
121 (agentType: AgentType) =>
122 async (input: string, { span }: { span: Span }) => {
123 const parentSpanContext = await span.export();
124 const result = await runAgentInWorker(agentType, input, { parentSpanContext });
125 return result.answer;
126 };
127
128// Legacy: Helper to create task with model (direct call, no worker)
129export const createTask =

Callers 6

sql.eval.tsFile · 0.85
fs.eval.tsFile · 0.85
bash.eval.tsFile · 0.85
codemode.eval.tsFile · 0.85
embedding.eval.tsFile · 0.85

Calls 1

runAgentInWorkerFunction · 0.85

Tested by

no test coverage detected