(events: readonly Pick<AgentRunEvent, 'type'>[])
| 330 | } |
| 331 | |
| 332 | export function hasTerminalAgentRunEvent(events: readonly Pick<AgentRunEvent, 'type'>[]): boolean { |
| 333 | return events.some( |
| 334 | (event) => |
| 335 | event.type === 'run_completed' || |
| 336 | event.type === 'run_failed' || |
| 337 | event.type === 'run_cancelled', |
| 338 | ); |
| 339 | } |
| 340 | |
| 341 | function terminalAgentRunEventType(status: TerminalAgentRunStatus): AgentRunEventType { |
| 342 | if (status === 'cancelled') return 'run_cancelled'; |
no outgoing calls
no test coverage detected