MCPcopy Create free account
hub / github.com/Noumena-Network/code / executeNotificationHooks

Function executeNotificationHooks

src/utils/hooks.ts:3574–3596  ·  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

3572 * @returns Promise that resolves when all hooks complete
3573 */
3574export 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
3598export async function executeStopFailureHooks(
3599 lastMessage: AssistantMessage,

Callers 4

sendNotificationFunction · 0.85

Calls 2

createBaseHookInputFunction · 0.85
executeHooksOutsideREPLFunction · 0.85

Tested by

no test coverage detected