MCPcopy Create free account
hub / github.com/WJX20/claude-code / executeNotificationHooks

Function executeNotificationHooks

src/utils/hooks.ts:3656–3678  ·  view source on GitHub ↗
(
  notificationData: {
    message: string
    title?: string
    notificationType: string
  },
  timeoutMs: number = TOOL_HOOK_EXECUTION_TIMEOUT_MS,
)

Source from the content-addressed store, hash-verified

3654 * @returns Promise that resolves when all hooks complete
3655 */
3656export 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
3680export async function executeStopFailureHooks(
3681 lastMessage: AssistantMessage,

Callers 4

sendNotificationFunction · 0.85

Calls 2

createBaseHookInputFunction · 0.85
executeHooksOutsideREPLFunction · 0.85

Tested by

no test coverage detected