(
task: QueuedTaskRecord,
event: {
type: string;
actorType: Parameters<typeof recordAgentRouterEventSync>[0]["actorType"];
actorId?: string;
attemptId?: string;
runtimeId?: string;
provider?: Parameters<typeof recordAgentRouterEventSync>[0]["provider"];
summary?: string;
data?: Record<string, unknown>;
},
)
| 688 | } |
| 689 | |
| 690 | function recordRouterLifecycleEvent( |
| 691 | task: QueuedTaskRecord, |
| 692 | event: { |
| 693 | type: string; |
| 694 | actorType: Parameters<typeof recordAgentRouterEventSync>[0]["actorType"]; |
| 695 | actorId?: string; |
| 696 | attemptId?: string; |
| 697 | runtimeId?: string; |
| 698 | provider?: Parameters<typeof recordAgentRouterEventSync>[0]["provider"]; |
| 699 | summary?: string; |
| 700 | data?: Record<string, unknown>; |
| 701 | }, |
| 702 | ): void { |
| 703 | if (!task.routerSessionId) { |
| 704 | return; |
| 705 | } |
| 706 | recordAgentRouterEventSync({ |
| 707 | workspaceId: task.workspaceId, |
| 708 | routerSessionId: task.routerSessionId, |
| 709 | taskQueueId: task.id, |
| 710 | attemptId: event.attemptId, |
| 711 | type: event.type, |
| 712 | actorType: event.actorType, |
| 713 | actorId: event.actorId, |
| 714 | runtimeId: event.runtimeId ?? task.runtimeId, |
| 715 | provider: event.provider, |
| 716 | summary: event.summary, |
| 717 | data: event.data, |
| 718 | }); |
| 719 | } |
| 720 | |
| 721 | function recordArtifactEvents(task: QueuedTaskRecord, resultJson: Record<string, unknown> | undefined): void { |
| 722 | if (!resultJson) { |
no test coverage detected