Skip to content

feat(notification): Enhance notificationTools.js with notify_user and history #40

@coderooz

Description

@coderooz

Summary

Enhance the existing notification tools to support urgency-based notifications and history tracking.

Acceptance Criteria

  • Add
    otifyUser({ urgency, message, sound?, repeat? })\ handler
  • Add \getNotificationHistory({ limit?, urgency?, since? })\ handler
  • Urgency levels: info (1x), warning (2x), critical (5x repeat)
  • Optional custom sound path override (validated)
  • Store each notification in notification_history collection
  • Validate urgency values: ['info', 'warning', 'critical']
  • Max repeat: 5 (existing limit)

Tool Definitions

\\js
// notify_user
{
name: 'notify_user',
description: 'Send a notification to the user with urgency level. Use when agent needs user attention.',
inputSchema: {
type: 'object',
properties: {
urgency: { type: 'string', enum: ['info', 'warning', 'critical'], description: 'Notification urgency' },
message: { type: 'string', description: 'Message to display with the notification' },
sound: { type: 'string', description: 'Optional custom sound file path' },
repeat: { type: 'integer', description: 'Repeat count 1-5 (default: urgency-based)' }
},
required: ['urgency', 'message']
}
}

// get_notification_history
{
name: 'get_notification_history',
description: 'Fetch recent notification history for the current project.',
inputSchema: {
type: 'object',
properties: {
limit: { type: 'number', description: 'Max results (default: 20)' },
urgency: { type: 'string', description: 'Filter by urgency level' },
since: { type: 'string', description: 'ISO timestamp filter' }
}
}
}
\\

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions