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

Function executeNotificationHooks

source code/utils/hooks.ts:3572–3594  ·  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

3570 * @returns Promise that resolves when all hooks complete
3571 */
3572export 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
3596export async function executeStopFailureHooks(
3597 lastMessage: AssistantMessage,

Callers 4

sendNotificationFunction · 0.85

Calls 2

createBaseHookInputFunction · 0.85
executeHooksOutsideREPLFunction · 0.85

Tested by

no test coverage detected