(
notificationData: {
message: string
title?: string
notificationType: string
},
timeoutMs: number = TOOL_HOOK_EXECUTION_TIMEOUT_MS,
)
| 3568 | * @returns Promise that resolves when all hooks complete |
| 3569 | */ |
| 3570 | export async function executeNotificationHooks( |
| 3571 | notificationData: { |
| 3572 | message: string |
| 3573 | title?: string |
| 3574 | notificationType: string |
| 3575 | }, |
| 3576 | timeoutMs: number = TOOL_HOOK_EXECUTION_TIMEOUT_MS, |
| 3577 | ): Promise<void> { |
| 3578 | const { message, title, notificationType } = notificationData |
| 3579 | const hookInput: NotificationHookInput = { |
| 3580 | ...createBaseHookInput(undefined), |
| 3581 | hook_event_name: 'Notification', |
| 3582 | message, |
| 3583 | title, |
| 3584 | notification_type: notificationType, |
| 3585 | } |
| 3586 | |
| 3587 | await executeHooksOutsideREPL({ |
| 3588 | hookInput, |
| 3589 | timeoutMs, |
| 3590 | matchQuery: notificationType, |
| 3591 | }) |
| 3592 | } |
| 3593 | |
| 3594 | export async function executeStopFailureHooks( |
| 3595 | lastMessage: AssistantMessage, |
no test coverage detected