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