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