(
agentId: string,
options?: {
idleReason?: IdleNotificationMessage['idleReason']
summary?: string
completedTaskId?: string
completedStatus?: 'resolved' | 'blocked' | 'failed'
failureReason?: string
},
)
| 408 | * Creates an idle notification message to send to the team leader |
| 409 | */ |
| 410 | export function createIdleNotification( |
| 411 | agentId: string, |
| 412 | options?: { |
| 413 | idleReason?: IdleNotificationMessage['idleReason'] |
| 414 | summary?: string |
| 415 | completedTaskId?: string |
| 416 | completedStatus?: 'resolved' | 'blocked' | 'failed' |
| 417 | failureReason?: string |
| 418 | }, |
| 419 | ): IdleNotificationMessage { |
| 420 | return { |
| 421 | type: 'idle_notification', |
| 422 | from: agentId, |
| 423 | timestamp: new Date().toISOString(), |
| 424 | idleReason: options?.idleReason, |
| 425 | summary: options?.summary, |
| 426 | completedTaskId: options?.completedTaskId, |
| 427 | completedStatus: options?.completedStatus, |
| 428 | failureReason: options?.failureReason, |
| 429 | } |
| 430 | } |
| 431 | |
| 432 | /** |
| 433 | * Checks if a message text contains an idle notification |
no outgoing calls
no test coverage detected