(agentType: AgentType)
| 119 | // Helper to create task that runs agent in a worker process with tracing |
| 120 | export 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) |
| 129 | export const createTask = |
no test coverage detected