(
notificationData: {
message: string
title?: string
notificationType: string
},
timeoutMs: number = TOOL_HOOK_EXECUTION_TIMEOUT_MS,
)
| 3712 | * @returns Promise that resolves when all hooks complete |
| 3713 | */ |
| 3714 | export async function executeNotificationHooks( |
| 3715 | notificationData: { |
| 3716 | message: string |
| 3717 | title?: string |
| 3718 | notificationType: string |
| 3719 | }, |
| 3720 | timeoutMs: number = TOOL_HOOK_EXECUTION_TIMEOUT_MS, |
| 3721 | ): Promise<void> { |
| 3722 | const { message, title, notificationType } = notificationData |
| 3723 | const hookInput: NotificationHookInput = { |
| 3724 | ...createBaseHookInput(undefined), |
| 3725 | hook_event_name: 'Notification', |
| 3726 | message, |
| 3727 | title, |
| 3728 | notification_type: notificationType, |
| 3729 | } |
| 3730 | |
| 3731 | await executeHooksOutsideREPL({ |
| 3732 | hookInput, |
| 3733 | timeoutMs, |
| 3734 | matchQuery: notificationType, |
| 3735 | }) |
| 3736 | } |
| 3737 | |
| 3738 | export async function executeStopFailureHooks( |
| 3739 | lastMessage: AssistantMessage, |
no test coverage detected