(
notificationData: {
message: string
title?: string
notificationType: string
},
timeoutMs: number = TOOL_HOOK_EXECUTION_TIMEOUT_MS,
)
| 3654 | * @returns Promise that resolves when all hooks complete |
| 3655 | */ |
| 3656 | export async function executeNotificationHooks( |
| 3657 | notificationData: { |
| 3658 | message: string |
| 3659 | title?: string |
| 3660 | notificationType: string |
| 3661 | }, |
| 3662 | timeoutMs: number = TOOL_HOOK_EXECUTION_TIMEOUT_MS, |
| 3663 | ): Promise<void> { |
| 3664 | const { message, title, notificationType } = notificationData |
| 3665 | const hookInput: NotificationHookInput = { |
| 3666 | ...createBaseHookInput(undefined), |
| 3667 | hook_event_name: 'Notification', |
| 3668 | message, |
| 3669 | title, |
| 3670 | notification_type: notificationType, |
| 3671 | } |
| 3672 | |
| 3673 | await executeHooksOutsideREPL({ |
| 3674 | hookInput, |
| 3675 | timeoutMs, |
| 3676 | matchQuery: notificationType, |
| 3677 | }) |
| 3678 | } |
| 3679 | |
| 3680 | export async function executeStopFailureHooks( |
| 3681 | lastMessage: AssistantMessage, |
no test coverage detected