wolfpack-mcp 1.0.44 → 1.0.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/client.js CHANGED
@@ -509,6 +509,52 @@ export class WolfpackClient {
509
509
  throw error;
510
510
  }
511
511
  }
512
+ // Notification methods
513
+ async listNotifications(options) {
514
+ const params = new URLSearchParams();
515
+ if (options?.unreadOnly)
516
+ params.append('unreadOnly', 'true');
517
+ if (options?.limit)
518
+ params.append('limit', options.limit.toString());
519
+ if (options?.offset)
520
+ params.append('offset', options.offset.toString());
521
+ const query = params.toString();
522
+ return this.api.get(`/notifications${query ? `?${query}` : ''}`);
523
+ }
524
+ async markNotificationRead(notificationId) {
525
+ return this.api.put(`/notifications/${notificationId}/read`, {});
526
+ }
527
+ async markAllNotificationsRead() {
528
+ return this.api.put('/notifications/read-all', {});
529
+ }
530
+ async deleteNotification(notificationId) {
531
+ await this.api.delete(`/notifications/${notificationId}`);
532
+ return { message: 'Notification deleted' };
533
+ }
534
+ // Subscription methods
535
+ async listSubscriptions(options) {
536
+ const params = new URLSearchParams();
537
+ if (options?.documentType)
538
+ params.append('documentType', options.documentType);
539
+ if (options?.isActive !== undefined)
540
+ params.append('isActive', options.isActive.toString());
541
+ const query = params.toString();
542
+ return this.api.get(`/subscriptions${query ? `?${query}` : ''}`);
543
+ }
544
+ async subscribe(data) {
545
+ return this.api.post('/subscriptions', data);
546
+ }
547
+ async unsubscribe(documentType, documentId) {
548
+ return this.api.post(`/subscriptions/${documentType}/${documentId}/unsubscribe`, {});
549
+ }
550
+ async muteSubscription(documentType, documentId, duration) {
551
+ return this.api.post(`/subscriptions/${documentType}/${documentId}/mute`, {
552
+ duration,
553
+ });
554
+ }
555
+ async unmuteSubscription(documentType, documentId) {
556
+ return this.api.post(`/subscriptions/${documentType}/${documentId}/unmute`, {});
557
+ }
512
558
  close() {
513
559
  // No cleanup needed for API client
514
560
  }
package/dist/index.js CHANGED
@@ -469,6 +469,54 @@ const ListTeamMembersSchema = z.object({
469
469
  .optional()
470
470
  .describe('Project slug (required for multi-project users, use list_projects to get slugs)'),
471
471
  });
472
+ // Notification schemas
473
+ const ListNotificationsSchema = z.object({
474
+ unread_only: z.boolean().optional().describe('If true, only return unread notifications'),
475
+ limit: z.number().optional().describe('Maximum number of notifications to return (default 20)'),
476
+ offset: z.number().optional().describe('Number of notifications to skip for pagination'),
477
+ });
478
+ const MarkNotificationReadSchema = z.object({
479
+ notification_id: z.string().describe('The ID of the notification to mark as read'),
480
+ });
481
+ const DeleteNotificationSchema = z.object({
482
+ notification_id: z.string().describe('The ID of the notification to delete'),
483
+ });
484
+ // Subscription schemas
485
+ const VALID_DOCUMENT_TYPES = [
486
+ 'wiki_page',
487
+ 'work_item',
488
+ 'radar_item',
489
+ 'issue',
490
+ 'journal',
491
+ 'discussion',
492
+ ];
493
+ const ListSubscriptionsSchema = z.object({
494
+ document_type: z.enum(VALID_DOCUMENT_TYPES).optional().describe('Filter by document type'),
495
+ is_active: z.boolean().optional().describe('Filter by active status'),
496
+ });
497
+ const SubscribeSchema = z.object({
498
+ document_type: z.enum(VALID_DOCUMENT_TYPES).describe('Type of document to subscribe to'),
499
+ document_id: z.string().describe('The ID of the document to subscribe to'),
500
+ reason: z.string().optional().describe('Reason for subscribing (default: "watched")'),
501
+ notify_on_mentions: z.boolean().optional().describe('Notify when mentioned in this document'),
502
+ notify_on_edits: z.boolean().optional().describe('Notify when the document is edited'),
503
+ notify_on_comments: z.boolean().optional().describe('Notify on new comments'),
504
+ notify_on_status: z.boolean().optional().describe('Notify on status changes'),
505
+ cooldown_minutes: z.number().optional().describe('Minimum minutes between notifications'),
506
+ });
507
+ const UnsubscribeSchema = z.object({
508
+ document_type: z.enum(VALID_DOCUMENT_TYPES).describe('Type of document to unsubscribe from'),
509
+ document_id: z.string().describe('The ID of the document to unsubscribe from'),
510
+ });
511
+ const MuteSubscriptionSchema = z.object({
512
+ document_type: z.enum(VALID_DOCUMENT_TYPES).describe('Type of document'),
513
+ document_id: z.string().describe('The ID of the document'),
514
+ duration: z.number().optional().describe('Duration in minutes to mute (omit for indefinite)'),
515
+ });
516
+ const UnmuteSubscriptionSchema = z.object({
517
+ document_type: z.enum(VALID_DOCUMENT_TYPES).describe('Type of document'),
518
+ document_id: z.string().describe('The ID of the document'),
519
+ });
472
520
  // UUID v4 field names to remove from responses.
473
521
  // These are internal database IDs that agents should not use.
474
522
  // Agents should use refId (sequential int) or slug instead.
@@ -1497,6 +1545,195 @@ class WolfpackMCPServer {
1497
1545
  required: ['skill_name', 'resource_name'],
1498
1546
  },
1499
1547
  },
1548
+ // Notification tools
1549
+ {
1550
+ name: 'list_notifications',
1551
+ description: 'List your notifications. Returns notifications with type, title, message, read status, and linked items (work items, issues). ' +
1552
+ 'Notification types include: mention, assignment, comment, status_change, team_invite, page_update, nomination, reaction. ' +
1553
+ 'Use unread_only=true to see only unread notifications. Supports pagination with limit/offset.',
1554
+ inputSchema: {
1555
+ type: 'object',
1556
+ properties: {
1557
+ unread_only: {
1558
+ type: 'boolean',
1559
+ description: 'If true, only return unread notifications',
1560
+ },
1561
+ limit: {
1562
+ type: 'number',
1563
+ description: 'Maximum number of notifications to return (default 20)',
1564
+ },
1565
+ offset: {
1566
+ type: 'number',
1567
+ description: 'Number of notifications to skip for pagination',
1568
+ },
1569
+ },
1570
+ },
1571
+ },
1572
+ {
1573
+ name: 'mark_notification_read',
1574
+ description: 'Mark a specific notification as read. Use this after processing a notification to prevent re-processing.',
1575
+ inputSchema: {
1576
+ type: 'object',
1577
+ properties: {
1578
+ notification_id: {
1579
+ type: 'string',
1580
+ description: 'The ID of the notification to mark as read',
1581
+ },
1582
+ },
1583
+ required: ['notification_id'],
1584
+ },
1585
+ },
1586
+ {
1587
+ name: 'mark_all_notifications_read',
1588
+ description: 'Mark all of your unread notifications as read.',
1589
+ inputSchema: {
1590
+ type: 'object',
1591
+ properties: {},
1592
+ },
1593
+ },
1594
+ {
1595
+ name: 'delete_notification',
1596
+ description: 'Delete a specific notification permanently.',
1597
+ inputSchema: {
1598
+ type: 'object',
1599
+ properties: {
1600
+ notification_id: {
1601
+ type: 'string',
1602
+ description: 'The ID of the notification to delete',
1603
+ },
1604
+ },
1605
+ required: ['notification_id'],
1606
+ },
1607
+ },
1608
+ // Subscription tools
1609
+ {
1610
+ name: 'list_subscriptions',
1611
+ description: 'List your document subscriptions. Subscriptions control which documents you receive notifications for. ' +
1612
+ 'Each subscription shows the document type, notification preferences (mentions, edits, comments, status), mute status, and reason for subscribing. ' +
1613
+ 'Filter by document_type to see subscriptions for a specific type (e.g. "work_item", "issue", "wiki_page").',
1614
+ inputSchema: {
1615
+ type: 'object',
1616
+ properties: {
1617
+ document_type: {
1618
+ type: 'string',
1619
+ enum: ['wiki_page', 'work_item', 'radar_item', 'issue', 'journal', 'discussion'],
1620
+ description: 'Filter by document type',
1621
+ },
1622
+ is_active: {
1623
+ type: 'boolean',
1624
+ description: 'Filter by active status',
1625
+ },
1626
+ },
1627
+ },
1628
+ },
1629
+ {
1630
+ name: 'subscribe',
1631
+ description: 'Subscribe to a document to receive notifications about it. ' +
1632
+ 'You can configure which notification types to receive: mentions, edits, comments, and status changes. ' +
1633
+ 'Supported document types: wiki_page, work_item, radar_item, issue, journal, discussion.',
1634
+ inputSchema: {
1635
+ type: 'object',
1636
+ properties: {
1637
+ document_type: {
1638
+ type: 'string',
1639
+ enum: ['wiki_page', 'work_item', 'radar_item', 'issue', 'journal', 'discussion'],
1640
+ description: 'Type of document to subscribe to',
1641
+ },
1642
+ document_id: {
1643
+ type: 'string',
1644
+ description: 'The ID of the document to subscribe to',
1645
+ },
1646
+ reason: {
1647
+ type: 'string',
1648
+ description: 'Reason for subscribing (default: "watched")',
1649
+ },
1650
+ notify_on_mentions: {
1651
+ type: 'boolean',
1652
+ description: 'Notify when mentioned in this document',
1653
+ },
1654
+ notify_on_edits: {
1655
+ type: 'boolean',
1656
+ description: 'Notify when the document is edited',
1657
+ },
1658
+ notify_on_comments: {
1659
+ type: 'boolean',
1660
+ description: 'Notify on new comments',
1661
+ },
1662
+ notify_on_status: {
1663
+ type: 'boolean',
1664
+ description: 'Notify on status changes',
1665
+ },
1666
+ cooldown_minutes: {
1667
+ type: 'number',
1668
+ description: 'Minimum minutes between notifications',
1669
+ },
1670
+ },
1671
+ required: ['document_type', 'document_id'],
1672
+ },
1673
+ },
1674
+ {
1675
+ name: 'unsubscribe',
1676
+ description: 'Unsubscribe from a document (soft delete). Stops notifications but keeps the subscription record. ' +
1677
+ 'The subscription can be reactivated by subscribing again.',
1678
+ inputSchema: {
1679
+ type: 'object',
1680
+ properties: {
1681
+ document_type: {
1682
+ type: 'string',
1683
+ enum: ['wiki_page', 'work_item', 'radar_item', 'issue', 'journal', 'discussion'],
1684
+ description: 'Type of document to unsubscribe from',
1685
+ },
1686
+ document_id: {
1687
+ type: 'string',
1688
+ description: 'The ID of the document to unsubscribe from',
1689
+ },
1690
+ },
1691
+ required: ['document_type', 'document_id'],
1692
+ },
1693
+ },
1694
+ {
1695
+ name: 'mute_subscription',
1696
+ description: 'Temporarily mute notifications from a subscription. The subscription remains active but notifications are silenced. ' +
1697
+ 'Specify duration in minutes, or omit for indefinite mute. Use unmute_subscription to resume.',
1698
+ inputSchema: {
1699
+ type: 'object',
1700
+ properties: {
1701
+ document_type: {
1702
+ type: 'string',
1703
+ enum: ['wiki_page', 'work_item', 'radar_item', 'issue', 'journal', 'discussion'],
1704
+ description: 'Type of document',
1705
+ },
1706
+ document_id: {
1707
+ type: 'string',
1708
+ description: 'The ID of the document',
1709
+ },
1710
+ duration: {
1711
+ type: 'number',
1712
+ description: 'Duration in minutes to mute (omit for indefinite)',
1713
+ },
1714
+ },
1715
+ required: ['document_type', 'document_id'],
1716
+ },
1717
+ },
1718
+ {
1719
+ name: 'unmute_subscription',
1720
+ description: 'Unmute a subscription to resume receiving notifications.',
1721
+ inputSchema: {
1722
+ type: 'object',
1723
+ properties: {
1724
+ document_type: {
1725
+ type: 'string',
1726
+ enum: ['wiki_page', 'work_item', 'radar_item', 'issue', 'journal', 'discussion'],
1727
+ description: 'Type of document',
1728
+ },
1729
+ document_id: {
1730
+ type: 'string',
1731
+ description: 'The ID of the document',
1732
+ },
1733
+ },
1734
+ required: ['document_type', 'document_id'],
1735
+ },
1736
+ },
1500
1737
  ],
1501
1738
  }));
1502
1739
  this.server.setRequestHandler(CallToolRequestSchema, async (request) => {
@@ -2190,6 +2427,111 @@ class WolfpackMCPServer {
2190
2427
  ],
2191
2428
  };
2192
2429
  }
2430
+ // Notification handlers
2431
+ case 'list_notifications': {
2432
+ const parsed = ListNotificationsSchema.parse(args);
2433
+ const result = await this.client.listNotifications({
2434
+ unreadOnly: parsed.unread_only,
2435
+ limit: parsed.limit,
2436
+ offset: parsed.offset,
2437
+ });
2438
+ return {
2439
+ content: [
2440
+ {
2441
+ type: 'text',
2442
+ text: JSON.stringify(stripUuids(result), null, 2),
2443
+ },
2444
+ ],
2445
+ };
2446
+ }
2447
+ case 'mark_notification_read': {
2448
+ const parsed = MarkNotificationReadSchema.parse(args);
2449
+ const result = await this.client.markNotificationRead(parsed.notification_id);
2450
+ return {
2451
+ content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
2452
+ };
2453
+ }
2454
+ case 'mark_all_notifications_read': {
2455
+ const result = await this.client.markAllNotificationsRead();
2456
+ return {
2457
+ content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
2458
+ };
2459
+ }
2460
+ case 'delete_notification': {
2461
+ const parsed = DeleteNotificationSchema.parse(args);
2462
+ const result = await this.client.deleteNotification(parsed.notification_id);
2463
+ return {
2464
+ content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
2465
+ };
2466
+ }
2467
+ // Subscription handlers
2468
+ case 'list_subscriptions': {
2469
+ const parsed = ListSubscriptionsSchema.parse(args);
2470
+ const result = await this.client.listSubscriptions({
2471
+ documentType: parsed.document_type,
2472
+ isActive: parsed.is_active,
2473
+ });
2474
+ return {
2475
+ content: [
2476
+ {
2477
+ type: 'text',
2478
+ text: JSON.stringify(stripUuids(result), null, 2),
2479
+ },
2480
+ ],
2481
+ };
2482
+ }
2483
+ case 'subscribe': {
2484
+ const parsed = SubscribeSchema.parse(args);
2485
+ const result = await this.client.subscribe({
2486
+ documentType: parsed.document_type,
2487
+ documentId: parsed.document_id,
2488
+ reason: parsed.reason,
2489
+ notifyOnMentions: parsed.notify_on_mentions,
2490
+ notifyOnEdits: parsed.notify_on_edits,
2491
+ notifyOnComments: parsed.notify_on_comments,
2492
+ notifyOnStatus: parsed.notify_on_status,
2493
+ cooldownMinutes: parsed.cooldown_minutes,
2494
+ });
2495
+ return {
2496
+ content: [
2497
+ {
2498
+ type: 'text',
2499
+ text: JSON.stringify(stripUuids(result), null, 2),
2500
+ },
2501
+ ],
2502
+ };
2503
+ }
2504
+ case 'unsubscribe': {
2505
+ const parsed = UnsubscribeSchema.parse(args);
2506
+ const result = await this.client.unsubscribe(parsed.document_type, parsed.document_id);
2507
+ return {
2508
+ content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
2509
+ };
2510
+ }
2511
+ case 'mute_subscription': {
2512
+ const parsed = MuteSubscriptionSchema.parse(args);
2513
+ const result = await this.client.muteSubscription(parsed.document_type, parsed.document_id, parsed.duration);
2514
+ return {
2515
+ content: [
2516
+ {
2517
+ type: 'text',
2518
+ text: JSON.stringify(stripUuids(result), null, 2),
2519
+ },
2520
+ ],
2521
+ };
2522
+ }
2523
+ case 'unmute_subscription': {
2524
+ const parsed = UnmuteSubscriptionSchema.parse(args);
2525
+ const result = await this.client.unmuteSubscription(parsed.document_type, parsed.document_id);
2526
+ return {
2527
+ content: [
2528
+ {
2529
+ type: 'text',
2530
+ text: JSON.stringify(stripUuids(result), null, 2),
2531
+ },
2532
+ ],
2533
+ };
2534
+ }
2193
2535
  default:
2194
2536
  throw new Error(`Unknown tool: ${name}`);
2195
2537
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wolfpack-mcp",
3
- "version": "1.0.44",
3
+ "version": "1.0.46",
4
4
  "description": "MCP server for Wolfpack AI-enhanced software delivery tools",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",