@kononenko-e/email-mcp 0.2.3
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/LICENSE +155 -0
- package/README.md +820 -0
- package/dist/cli/account-commands.d.ts +10 -0
- package/dist/cli/account-commands.d.ts.map +1 -0
- package/dist/cli/account-commands.js +703 -0
- package/dist/cli/account-commands.js.map +1 -0
- package/dist/cli/config-commands.d.ts +9 -0
- package/dist/cli/config-commands.d.ts.map +1 -0
- package/dist/cli/config-commands.js +156 -0
- package/dist/cli/config-commands.js.map +1 -0
- package/dist/cli/guard.d.ts +11 -0
- package/dist/cli/guard.d.ts.map +1 -0
- package/dist/cli/guard.js +18 -0
- package/dist/cli/guard.js.map +1 -0
- package/dist/cli/install-commands.d.ts +12 -0
- package/dist/cli/install-commands.d.ts.map +1 -0
- package/dist/cli/install-commands.js +320 -0
- package/dist/cli/install-commands.js.map +1 -0
- package/dist/cli/notify.d.ts +8 -0
- package/dist/cli/notify.d.ts.map +1 -0
- package/dist/cli/notify.js +143 -0
- package/dist/cli/notify.js.map +1 -0
- package/dist/cli/providers.d.ts +13 -0
- package/dist/cli/providers.d.ts.map +1 -0
- package/dist/cli/providers.js +180 -0
- package/dist/cli/providers.js.map +1 -0
- package/dist/cli/scheduler.d.ts +8 -0
- package/dist/cli/scheduler.d.ts.map +1 -0
- package/dist/cli/scheduler.js +268 -0
- package/dist/cli/scheduler.js.map +1 -0
- package/dist/cli/setup.d.ts +12 -0
- package/dist/cli/setup.d.ts.map +1 -0
- package/dist/cli/setup.js +15 -0
- package/dist/cli/setup.js.map +1 -0
- package/dist/cli/test.d.ts +7 -0
- package/dist/cli/test.d.ts.map +1 -0
- package/dist/cli/test.js +67 -0
- package/dist/cli/test.js.map +1 -0
- package/dist/config/loader.d.ts +36 -0
- package/dist/config/loader.d.ts.map +1 -0
- package/dist/config/loader.js +372 -0
- package/dist/config/loader.js.map +1 -0
- package/dist/config/schema.d.ts +351 -0
- package/dist/config/schema.d.ts.map +1 -0
- package/dist/config/schema.js +165 -0
- package/dist/config/schema.js.map +1 -0
- package/dist/config/xdg.d.ts +27 -0
- package/dist/config/xdg.d.ts.map +1 -0
- package/dist/config/xdg.js +30 -0
- package/dist/config/xdg.js.map +1 -0
- package/dist/connections/manager.d.ts +43 -0
- package/dist/connections/manager.d.ts.map +1 -0
- package/dist/connections/manager.js +272 -0
- package/dist/connections/manager.js.map +1 -0
- package/dist/connections/types.d.ts +13 -0
- package/dist/connections/types.d.ts.map +1 -0
- package/dist/connections/types.js +2 -0
- package/dist/connections/types.js.map +1 -0
- package/dist/logging.d.ts +46 -0
- package/dist/logging.d.ts.map +1 -0
- package/dist/logging.js +63 -0
- package/dist/logging.js.map +1 -0
- package/dist/main.d.ts +14 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/main.js +381 -0
- package/dist/main.js.map +1 -0
- package/dist/prompts/actions.prompt.d.ts +9 -0
- package/dist/prompts/actions.prompt.d.ts.map +1 -0
- package/dist/prompts/actions.prompt.js +64 -0
- package/dist/prompts/actions.prompt.js.map +1 -0
- package/dist/prompts/calendar.prompt.d.ts +9 -0
- package/dist/prompts/calendar.prompt.d.ts.map +1 -0
- package/dist/prompts/calendar.prompt.js +55 -0
- package/dist/prompts/calendar.prompt.js.map +1 -0
- package/dist/prompts/cleanup.prompt.d.ts +9 -0
- package/dist/prompts/cleanup.prompt.d.ts.map +1 -0
- package/dist/prompts/cleanup.prompt.js +78 -0
- package/dist/prompts/cleanup.prompt.js.map +1 -0
- package/dist/prompts/compose.prompt.d.ts +8 -0
- package/dist/prompts/compose.prompt.d.ts.map +1 -0
- package/dist/prompts/compose.prompt.js +116 -0
- package/dist/prompts/compose.prompt.js.map +1 -0
- package/dist/prompts/register.d.ts +8 -0
- package/dist/prompts/register.d.ts.map +1 -0
- package/dist/prompts/register.js +20 -0
- package/dist/prompts/register.js.map +1 -0
- package/dist/prompts/thread.prompt.d.ts +9 -0
- package/dist/prompts/thread.prompt.d.ts.map +1 -0
- package/dist/prompts/thread.prompt.js +58 -0
- package/dist/prompts/thread.prompt.js.map +1 -0
- package/dist/prompts/triage.prompt.d.ts +9 -0
- package/dist/prompts/triage.prompt.d.ts.map +1 -0
- package/dist/prompts/triage.prompt.js +64 -0
- package/dist/prompts/triage.prompt.js.map +1 -0
- package/dist/resources/accounts.resource.d.ts +9 -0
- package/dist/resources/accounts.resource.d.ts.map +1 -0
- package/dist/resources/accounts.resource.js +26 -0
- package/dist/resources/accounts.resource.js.map +1 -0
- package/dist/resources/mailboxes.resource.d.ts +10 -0
- package/dist/resources/mailboxes.resource.d.ts.map +1 -0
- package/dist/resources/mailboxes.resource.js +33 -0
- package/dist/resources/mailboxes.resource.js.map +1 -0
- package/dist/resources/register.d.ts +12 -0
- package/dist/resources/register.d.ts.map +1 -0
- package/dist/resources/register.js +20 -0
- package/dist/resources/register.js.map +1 -0
- package/dist/resources/scheduled.resource.d.ts +9 -0
- package/dist/resources/scheduled.resource.d.ts.map +1 -0
- package/dist/resources/scheduled.resource.js +31 -0
- package/dist/resources/scheduled.resource.js.map +1 -0
- package/dist/resources/stats.resource.d.ts +10 -0
- package/dist/resources/stats.resource.d.ts.map +1 -0
- package/dist/resources/stats.resource.js +45 -0
- package/dist/resources/stats.resource.js.map +1 -0
- package/dist/resources/templates.resource.d.ts +9 -0
- package/dist/resources/templates.resource.d.ts.map +1 -0
- package/dist/resources/templates.resource.js +34 -0
- package/dist/resources/templates.resource.js.map +1 -0
- package/dist/resources/unread.resource.d.ts +11 -0
- package/dist/resources/unread.resource.d.ts.map +1 -0
- package/dist/resources/unread.resource.js +46 -0
- package/dist/resources/unread.resource.js.map +1 -0
- package/dist/safety/audit.d.ts +17 -0
- package/dist/safety/audit.d.ts.map +1 -0
- package/dist/safety/audit.js +50 -0
- package/dist/safety/audit.js.map +1 -0
- package/dist/safety/rate-limiter.d.ts +22 -0
- package/dist/safety/rate-limiter.d.ts.map +1 -0
- package/dist/safety/rate-limiter.js +52 -0
- package/dist/safety/rate-limiter.js.map +1 -0
- package/dist/safety/validation.d.ts +44 -0
- package/dist/safety/validation.d.ts.map +1 -0
- package/dist/safety/validation.js +113 -0
- package/dist/safety/validation.js.map +1 -0
- package/dist/server.d.ts +10 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +25 -0
- package/dist/server.js.map +1 -0
- package/dist/services/calendar.service.d.ts +22 -0
- package/dist/services/calendar.service.d.ts.map +1 -0
- package/dist/services/calendar.service.js +115 -0
- package/dist/services/calendar.service.js.map +1 -0
- package/dist/services/event-bus.d.ts +28 -0
- package/dist/services/event-bus.d.ts.map +1 -0
- package/dist/services/event-bus.js +16 -0
- package/dist/services/event-bus.js.map +1 -0
- package/dist/services/hooks.service.d.ts +78 -0
- package/dist/services/hooks.service.d.ts.map +1 -0
- package/dist/services/hooks.service.js +497 -0
- package/dist/services/hooks.service.js.map +1 -0
- package/dist/services/imap.service.d.ts +133 -0
- package/dist/services/imap.service.d.ts.map +1 -0
- package/dist/services/imap.service.js +1393 -0
- package/dist/services/imap.service.js.map +1 -0
- package/dist/services/label-strategy.d.ts +20 -0
- package/dist/services/label-strategy.d.ts.map +1 -0
- package/dist/services/label-strategy.js +237 -0
- package/dist/services/label-strategy.js.map +1 -0
- package/dist/services/local-calendar.service.d.ts +126 -0
- package/dist/services/local-calendar.service.d.ts.map +1 -0
- package/dist/services/local-calendar.service.js +428 -0
- package/dist/services/local-calendar.service.js.map +1 -0
- package/dist/services/notifier.service.d.ts +66 -0
- package/dist/services/notifier.service.d.ts.map +1 -0
- package/dist/services/notifier.service.js +316 -0
- package/dist/services/notifier.service.js.map +1 -0
- package/dist/services/oauth.service.d.ts +47 -0
- package/dist/services/oauth.service.d.ts.map +1 -0
- package/dist/services/oauth.service.js +140 -0
- package/dist/services/oauth.service.js.map +1 -0
- package/dist/services/presets.d.ts +36 -0
- package/dist/services/presets.d.ts.map +1 -0
- package/dist/services/presets.js +173 -0
- package/dist/services/presets.js.map +1 -0
- package/dist/services/reminders.service.d.ts +63 -0
- package/dist/services/reminders.service.d.ts.map +1 -0
- package/dist/services/reminders.service.js +281 -0
- package/dist/services/reminders.service.js.map +1 -0
- package/dist/services/scheduler.service.d.ts +42 -0
- package/dist/services/scheduler.service.d.ts.map +1 -0
- package/dist/services/scheduler.service.js +260 -0
- package/dist/services/scheduler.service.js.map +1 -0
- package/dist/services/smtp.service.d.ts +40 -0
- package/dist/services/smtp.service.d.ts.map +1 -0
- package/dist/services/smtp.service.js +151 -0
- package/dist/services/smtp.service.js.map +1 -0
- package/dist/services/template.service.d.ts +33 -0
- package/dist/services/template.service.d.ts.map +1 -0
- package/dist/services/template.service.js +123 -0
- package/dist/services/template.service.js.map +1 -0
- package/dist/services/watcher.service.d.ts +37 -0
- package/dist/services/watcher.service.d.ts.map +1 -0
- package/dist/services/watcher.service.js +244 -0
- package/dist/services/watcher.service.js.map +1 -0
- package/dist/tools/account-config.tool.d.ts +14 -0
- package/dist/tools/account-config.tool.d.ts.map +1 -0
- package/dist/tools/account-config.tool.js +245 -0
- package/dist/tools/account-config.tool.js.map +1 -0
- package/dist/tools/accounts.tool.d.ts +7 -0
- package/dist/tools/accounts.tool.d.ts.map +1 -0
- package/dist/tools/accounts.tool.js +29 -0
- package/dist/tools/accounts.tool.js.map +1 -0
- package/dist/tools/analytics.tool.d.ts +9 -0
- package/dist/tools/analytics.tool.d.ts.map +1 -0
- package/dist/tools/analytics.tool.js +27 -0
- package/dist/tools/analytics.tool.js.map +1 -0
- package/dist/tools/attachments.tool.d.ts +7 -0
- package/dist/tools/attachments.tool.d.ts.map +1 -0
- package/dist/tools/attachments.tool.js +45 -0
- package/dist/tools/attachments.tool.js.map +1 -0
- package/dist/tools/bulk.tool.d.ts +7 -0
- package/dist/tools/bulk.tool.d.ts.map +1 -0
- package/dist/tools/bulk.tool.js +75 -0
- package/dist/tools/bulk.tool.js.map +1 -0
- package/dist/tools/calendar.tool.d.ts +19 -0
- package/dist/tools/calendar.tool.d.ts.map +1 -0
- package/dist/tools/calendar.tool.js +538 -0
- package/dist/tools/calendar.tool.js.map +1 -0
- package/dist/tools/contacts.tool.d.ts +7 -0
- package/dist/tools/contacts.tool.d.ts.map +1 -0
- package/dist/tools/contacts.tool.js +44 -0
- package/dist/tools/contacts.tool.js.map +1 -0
- package/dist/tools/drafts.tool.d.ts +8 -0
- package/dist/tools/drafts.tool.d.ts.map +1 -0
- package/dist/tools/drafts.tool.js +92 -0
- package/dist/tools/drafts.tool.js.map +1 -0
- package/dist/tools/emails.tool.d.ts +7 -0
- package/dist/tools/emails.tool.d.ts.map +1 -0
- package/dist/tools/emails.tool.js +400 -0
- package/dist/tools/emails.tool.js.map +1 -0
- package/dist/tools/folders.tool.d.ts +7 -0
- package/dist/tools/folders.tool.d.ts.map +1 -0
- package/dist/tools/folders.tool.js +111 -0
- package/dist/tools/folders.tool.js.map +1 -0
- package/dist/tools/health.tool.d.ts +10 -0
- package/dist/tools/health.tool.d.ts.map +1 -0
- package/dist/tools/health.tool.js +78 -0
- package/dist/tools/health.tool.js.map +1 -0
- package/dist/tools/label.tool.d.ts +11 -0
- package/dist/tools/label.tool.d.ts.map +1 -0
- package/dist/tools/label.tool.js +165 -0
- package/dist/tools/label.tool.js.map +1 -0
- package/dist/tools/locate.tool.d.ts +11 -0
- package/dist/tools/locate.tool.d.ts.map +1 -0
- package/dist/tools/locate.tool.js +59 -0
- package/dist/tools/locate.tool.js.map +1 -0
- package/dist/tools/mailboxes.tool.d.ts +7 -0
- package/dist/tools/mailboxes.tool.d.ts.map +1 -0
- package/dist/tools/mailboxes.tool.js +38 -0
- package/dist/tools/mailboxes.tool.js.map +1 -0
- package/dist/tools/manage.tool.d.ts +7 -0
- package/dist/tools/manage.tool.d.ts.map +1 -0
- package/dist/tools/manage.tool.js +125 -0
- package/dist/tools/manage.tool.js.map +1 -0
- package/dist/tools/register.d.ts +21 -0
- package/dist/tools/register.d.ts.map +1 -0
- package/dist/tools/register.js +55 -0
- package/dist/tools/register.js.map +1 -0
- package/dist/tools/scheduler.tool.d.ts +9 -0
- package/dist/tools/scheduler.tool.d.ts.map +1 -0
- package/dist/tools/scheduler.tool.js +104 -0
- package/dist/tools/scheduler.tool.js.map +1 -0
- package/dist/tools/send.tool.d.ts +7 -0
- package/dist/tools/send.tool.d.ts.map +1 -0
- package/dist/tools/send.tool.js +123 -0
- package/dist/tools/send.tool.js.map +1 -0
- package/dist/tools/templates.tool.d.ts +12 -0
- package/dist/tools/templates.tool.d.ts.map +1 -0
- package/dist/tools/templates.tool.js +140 -0
- package/dist/tools/templates.tool.js.map +1 -0
- package/dist/tools/thread.tool.d.ts +10 -0
- package/dist/tools/thread.tool.d.ts.map +1 -0
- package/dist/tools/thread.tool.js +146 -0
- package/dist/tools/thread.tool.js.map +1 -0
- package/dist/tools/watcher.tool.d.ts +9 -0
- package/dist/tools/watcher.tool.d.ts.map +1 -0
- package/dist/tools/watcher.tool.js +282 -0
- package/dist/tools/watcher.tool.js.map +1 -0
- package/dist/types/index.d.ts +271 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +5 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utils/calendar-notes.d.ts +31 -0
- package/dist/utils/calendar-notes.d.ts.map +1 -0
- package/dist/utils/calendar-notes.js +99 -0
- package/dist/utils/calendar-notes.js.map +1 -0
- package/dist/utils/calendar-state.d.ts +27 -0
- package/dist/utils/calendar-state.d.ts.map +1 -0
- package/dist/utils/calendar-state.js +85 -0
- package/dist/utils/calendar-state.js.map +1 -0
- package/dist/utils/conference-details.d.ts +12 -0
- package/dist/utils/conference-details.d.ts.map +1 -0
- package/dist/utils/conference-details.js +71 -0
- package/dist/utils/conference-details.js.map +1 -0
- package/dist/utils/meeting-url.d.ts +10 -0
- package/dist/utils/meeting-url.d.ts.map +1 -0
- package/dist/utils/meeting-url.js +30 -0
- package/dist/utils/meeting-url.js.map +1 -0
- package/package.json +103 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Prompts: compose_reply, draft_from_context
|
|
3
|
+
*
|
|
4
|
+
* AI-assisted email composition with tone control and context awareness.
|
|
5
|
+
*/
|
|
6
|
+
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
7
|
+
export default function registerComposePrompts(server: McpServer): void;
|
|
8
|
+
//# sourceMappingURL=compose.prompt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compose.prompt.d.ts","sourceRoot":"","sources":["../../src/prompts/compose.prompt.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGzE,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CA2HtE"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Prompts: compose_reply, draft_from_context
|
|
3
|
+
*
|
|
4
|
+
* AI-assisted email composition with tone control and context awareness.
|
|
5
|
+
*/
|
|
6
|
+
import { z } from 'zod';
|
|
7
|
+
export default function registerComposePrompts(server) {
|
|
8
|
+
// ---------------------------------------------------------------------------
|
|
9
|
+
// compose_reply
|
|
10
|
+
// ---------------------------------------------------------------------------
|
|
11
|
+
server.prompt('compose_reply', 'Draft a professional reply to an email with tone control. Fetches the original email and optionally the full thread for context.', {
|
|
12
|
+
account: z.string().describe('Account name'),
|
|
13
|
+
email_id: z.string().describe('Email ID to reply to (from list_emails)'),
|
|
14
|
+
mailbox: z.string().default('INBOX').describe('Mailbox path (default: INBOX)'),
|
|
15
|
+
intent: z
|
|
16
|
+
.string()
|
|
17
|
+
.describe('What you want to communicate, e.g., "accept the meeting", "decline politely", "request more details"'),
|
|
18
|
+
tone: z
|
|
19
|
+
.enum(['formal', 'friendly', 'brief'])
|
|
20
|
+
.default('friendly')
|
|
21
|
+
.describe('Tone of the reply'),
|
|
22
|
+
}, async ({ account, email_id: emailId, mailbox, intent, tone }) => ({
|
|
23
|
+
messages: [
|
|
24
|
+
{
|
|
25
|
+
role: 'user',
|
|
26
|
+
content: {
|
|
27
|
+
type: 'text',
|
|
28
|
+
text: `Draft a reply to email ID ${emailId} in the "${account}" account.
|
|
29
|
+
|
|
30
|
+
Follow these steps:
|
|
31
|
+
1. Call get_email with account="${account}", emailId="${emailId}", mailbox="${mailbox}" to read the original email.
|
|
32
|
+
2. If the email has an inReplyTo or references, optionally call get_thread to understand the full conversation context.
|
|
33
|
+
3. Draft a reply with:
|
|
34
|
+
- **Intent:** ${intent}
|
|
35
|
+
- **Tone:** ${tone}
|
|
36
|
+
${tone === 'formal' ? ' Use professional language, proper salutations, and sign-off.' : ''}
|
|
37
|
+
${tone === 'friendly' ? ' Use warm but professional language, conversational style.' : ''}
|
|
38
|
+
${tone === 'brief' ? ' Keep it concise — 2-3 sentences maximum. No unnecessary pleasantries.' : ''}
|
|
39
|
+
|
|
40
|
+
Output the draft in this format:
|
|
41
|
+
|
|
42
|
+
## ✉️ Draft Reply
|
|
43
|
+
|
|
44
|
+
**To:** [Original sender]
|
|
45
|
+
**Subject:** Re: [Original subject]
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
[Draft reply body]
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
**Actions:**
|
|
54
|
+
- To send this reply, call reply_email with the appropriate parameters.
|
|
55
|
+
- To save as draft first, call save_draft.
|
|
56
|
+
- If you'd like me to adjust the tone or content, let me know.`,
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
],
|
|
60
|
+
}));
|
|
61
|
+
// ---------------------------------------------------------------------------
|
|
62
|
+
// draft_from_context
|
|
63
|
+
// ---------------------------------------------------------------------------
|
|
64
|
+
server.prompt('draft_from_context', 'Compose a new email about a topic, searching past emails for relevant context to reference naturally.', {
|
|
65
|
+
account: z.string().describe('Account name'),
|
|
66
|
+
topic: z
|
|
67
|
+
.string()
|
|
68
|
+
.describe('Topic or purpose of the email, e.g., "project status update", "schedule a meeting"'),
|
|
69
|
+
to: z.string().describe('Recipient email address(es), comma-separated'),
|
|
70
|
+
tone: z
|
|
71
|
+
.enum(['formal', 'friendly', 'brief'])
|
|
72
|
+
.default('friendly')
|
|
73
|
+
.describe('Tone of the email'),
|
|
74
|
+
}, async ({ account, topic, to, tone }) => ({
|
|
75
|
+
messages: [
|
|
76
|
+
{
|
|
77
|
+
role: 'user',
|
|
78
|
+
content: {
|
|
79
|
+
type: 'text',
|
|
80
|
+
text: `Compose a new email about "${topic}" to ${to} from the "${account}" account.
|
|
81
|
+
|
|
82
|
+
Follow these steps:
|
|
83
|
+
1. Call search_emails with account="${account}", query="${topic}" to find relevant past emails.
|
|
84
|
+
2. If relevant emails are found, call get_email on the most relevant 1-2 to understand the context.
|
|
85
|
+
3. Draft a new email that:
|
|
86
|
+
- Addresses the topic: ${topic}
|
|
87
|
+
- References past conversations naturally (if found), e.g., "Following up on our discussion about..."
|
|
88
|
+
- Uses a ${tone} tone
|
|
89
|
+
- Is well-structured with clear purpose and any necessary call-to-action
|
|
90
|
+
|
|
91
|
+
Output the draft in this format:
|
|
92
|
+
|
|
93
|
+
## ✉️ New Email Draft
|
|
94
|
+
|
|
95
|
+
**To:** ${to}
|
|
96
|
+
**Subject:** [Suggested subject line]
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
[Draft email body]
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
**Context Used:**
|
|
105
|
+
- [Brief note about which past emails were referenced, if any]
|
|
106
|
+
|
|
107
|
+
**Actions:**
|
|
108
|
+
- To send: call send_email with the draft content.
|
|
109
|
+
- To save as draft: call save_draft.
|
|
110
|
+
- To adjust: let me know what to change.`,
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
],
|
|
114
|
+
}));
|
|
115
|
+
}
|
|
116
|
+
//# sourceMappingURL=compose.prompt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compose.prompt.js","sourceRoot":"","sources":["../../src/prompts/compose.prompt.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAAC,MAAiB;IAC9D,8EAA8E;IAC9E,gBAAgB;IAChB,8EAA8E;IAC9E,MAAM,CAAC,MAAM,CACX,eAAe,EACf,kIAAkI,EAClI;QACE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,cAAc,CAAC;QAC5C,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,yCAAyC,CAAC;QACxE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,+BAA+B,CAAC;QAC9E,MAAM,EAAE,CAAC;aACN,MAAM,EAAE;aACR,QAAQ,CACP,sGAAsG,CACvG;QACH,IAAI,EAAE,CAAC;aACJ,IAAI,CAAC,CAAC,QAAQ,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;aACrC,OAAO,CAAC,UAAU,CAAC;aACnB,QAAQ,CAAC,mBAAmB,CAAC;KACjC,EACD,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;QAChE,QAAQ,EAAE;YACR;gBACE,IAAI,EAAE,MAAe;gBACrB,OAAO,EAAE;oBACP,IAAI,EAAE,MAAe;oBACrB,IAAI,EAAE,6BAA6B,OAAO,YAAY,OAAO;;;kCAGvC,OAAO,eAAe,OAAO,eAAe,OAAO;;;mBAGlE,MAAM;iBACR,IAAI;KAChB,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,iEAAiE,CAAC,CAAC,CAAC,EAAE;KAC1F,IAAI,KAAK,UAAU,CAAC,CAAC,CAAC,8DAA8D,CAAC,CAAC,CAAC,EAAE;KACzF,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,0EAA0E,CAAC,CAAC,CAAC,EAAE;;;;;;;;;;;;;;;;;;+DAkBxC;iBACpD;aACF;SACF;KACF,CAAC,CACH,CAAC;IAEF,8EAA8E;IAC9E,qBAAqB;IACrB,8EAA8E;IAC9E,MAAM,CAAC,MAAM,CACX,oBAAoB,EACpB,uGAAuG,EACvG;QACE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,cAAc,CAAC;QAC5C,KAAK,EAAE,CAAC;aACL,MAAM,EAAE;aACR,QAAQ,CACP,oFAAoF,CACrF;QACH,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,8CAA8C,CAAC;QACvE,IAAI,EAAE,CAAC;aACJ,IAAI,CAAC,CAAC,QAAQ,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;aACrC,OAAO,CAAC,UAAU,CAAC;aACnB,QAAQ,CAAC,mBAAmB,CAAC;KACjC,EACD,KAAK,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;QACvC,QAAQ,EAAE;YACR;gBACE,IAAI,EAAE,MAAe;gBACrB,OAAO,EAAE;oBACP,IAAI,EAAE,MAAe;oBACrB,IAAI,EAAE,8BAA8B,KAAK,QAAQ,EAAE,cAAc,OAAO;;;sCAG9C,OAAO,aAAa,KAAK;;;4BAGnC,KAAK;;cAEnB,IAAI;;;;;;;UAOR,EAAE;;;;;;;;;;;;;;;yCAe6B;iBAC9B;aACF;SACF;KACF,CAAC,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Prompt registration — single wiring point.
|
|
3
|
+
*
|
|
4
|
+
* Registers all MCP prompts with the server instance.
|
|
5
|
+
*/
|
|
6
|
+
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
7
|
+
export default function registerAllPrompts(server: McpServer): void;
|
|
8
|
+
//# sourceMappingURL=register.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../src/prompts/register.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAQzE,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAOlE"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Prompt registration — single wiring point.
|
|
3
|
+
*
|
|
4
|
+
* Registers all MCP prompts with the server instance.
|
|
5
|
+
*/
|
|
6
|
+
import registerActionsPrompt from './actions.prompt.js';
|
|
7
|
+
import registerCalendarPrompt from './calendar.prompt.js';
|
|
8
|
+
import registerCleanupPrompt from './cleanup.prompt.js';
|
|
9
|
+
import registerComposePrompts from './compose.prompt.js';
|
|
10
|
+
import registerThreadPrompt from './thread.prompt.js';
|
|
11
|
+
import registerTriagePrompt from './triage.prompt.js';
|
|
12
|
+
export default function registerAllPrompts(server) {
|
|
13
|
+
registerTriagePrompt(server);
|
|
14
|
+
registerThreadPrompt(server);
|
|
15
|
+
registerComposePrompts(server);
|
|
16
|
+
registerActionsPrompt(server);
|
|
17
|
+
registerCalendarPrompt(server);
|
|
18
|
+
registerCleanupPrompt(server);
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=register.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"register.js","sourceRoot":"","sources":["../../src/prompts/register.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,qBAAqB,MAAM,qBAAqB,CAAC;AACxD,OAAO,sBAAsB,MAAM,sBAAsB,CAAC;AAC1D,OAAO,qBAAqB,MAAM,qBAAqB,CAAC;AACxD,OAAO,sBAAsB,MAAM,qBAAqB,CAAC;AACzD,OAAO,oBAAoB,MAAM,oBAAoB,CAAC;AACtD,OAAO,oBAAoB,MAAM,oBAAoB,CAAC;AAEtD,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,MAAiB;IAC1D,oBAAoB,CAAC,MAAM,CAAC,CAAC;IAC7B,oBAAoB,CAAC,MAAM,CAAC,CAAC;IAC7B,sBAAsB,CAAC,MAAM,CAAC,CAAC;IAC/B,qBAAqB,CAAC,MAAM,CAAC,CAAC;IAC9B,sBAAsB,CAAC,MAAM,CAAC,CAAC;IAC/B,qBAAqB,CAAC,MAAM,CAAC,CAAC;AAChC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Prompt: summarize_thread
|
|
3
|
+
*
|
|
4
|
+
* Instructs the LLM to fetch and summarize an email conversation thread
|
|
5
|
+
* with structured output including participants, decisions, and action items.
|
|
6
|
+
*/
|
|
7
|
+
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
8
|
+
export default function registerThreadPrompt(server: McpServer): void;
|
|
9
|
+
//# sourceMappingURL=thread.prompt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"thread.prompt.d.ts","sourceRoot":"","sources":["../../src/prompts/thread.prompt.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGzE,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAsDpE"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Prompt: summarize_thread
|
|
3
|
+
*
|
|
4
|
+
* Instructs the LLM to fetch and summarize an email conversation thread
|
|
5
|
+
* with structured output including participants, decisions, and action items.
|
|
6
|
+
*/
|
|
7
|
+
import { z } from 'zod';
|
|
8
|
+
export default function registerThreadPrompt(server) {
|
|
9
|
+
server.prompt('summarize_thread', 'Summarize an email conversation thread. Produces a structured report with participants, timeline, decisions, and action items.', {
|
|
10
|
+
account: z.string().describe('Account name'),
|
|
11
|
+
message_id: z.string().describe('Message-ID of any email in the thread (from get_email)'),
|
|
12
|
+
mailbox: z.string().default('INBOX').describe('Mailbox to search (default: INBOX)'),
|
|
13
|
+
}, async ({ account, message_id: messageId, mailbox }) => ({
|
|
14
|
+
messages: [
|
|
15
|
+
{
|
|
16
|
+
role: 'user',
|
|
17
|
+
content: {
|
|
18
|
+
type: 'text',
|
|
19
|
+
text: `Summarize the email thread containing Message-ID: ${messageId}
|
|
20
|
+
|
|
21
|
+
Follow these steps:
|
|
22
|
+
1. Call get_thread with account="${account}", message_id="${messageId}", mailbox="${mailbox}" to fetch the full conversation.
|
|
23
|
+
2. Read through all messages in chronological order.
|
|
24
|
+
3. Identify key information across the thread.
|
|
25
|
+
|
|
26
|
+
Output a structured summary in this format:
|
|
27
|
+
|
|
28
|
+
## 🧵 Thread Summary
|
|
29
|
+
|
|
30
|
+
**Subject:** [Thread subject]
|
|
31
|
+
**Date Range:** [First message date] → [Last message date]
|
|
32
|
+
**Messages:** [Count]
|
|
33
|
+
|
|
34
|
+
### 👥 Participants
|
|
35
|
+
- [Name/Email] — [Role in the conversation, e.g., "initiated request", "provided update"]
|
|
36
|
+
|
|
37
|
+
### 📋 Timeline
|
|
38
|
+
1. **[Date]** — [Sender]: [One-line summary of this message's contribution]
|
|
39
|
+
2. **[Date]** — [Sender]: [One-line summary]
|
|
40
|
+
...
|
|
41
|
+
|
|
42
|
+
### 🎯 Key Decisions
|
|
43
|
+
- [Decision made and by whom]
|
|
44
|
+
|
|
45
|
+
### ❓ Open Questions
|
|
46
|
+
- [Unresolved questions from the thread]
|
|
47
|
+
|
|
48
|
+
### ✅ Action Items
|
|
49
|
+
- [ ] [Action] — assigned to [Person], deadline: [if mentioned]
|
|
50
|
+
|
|
51
|
+
### 📝 Summary
|
|
52
|
+
[2-3 sentence narrative summary of the entire conversation]`,
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
],
|
|
56
|
+
}));
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=thread.prompt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"thread.prompt.js","sourceRoot":"","sources":["../../src/prompts/thread.prompt.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,MAAiB;IAC5D,MAAM,CAAC,MAAM,CACX,kBAAkB,EAClB,gIAAgI,EAChI;QACE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,cAAc,CAAC;QAC5C,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,wDAAwD,CAAC;QACzF,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,oCAAoC,CAAC;KACpF,EACD,KAAK,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CAAC;QACtD,QAAQ,EAAE;YACR;gBACE,IAAI,EAAE,MAAe;gBACrB,OAAO,EAAE;oBACP,IAAI,EAAE,MAAe;oBACrB,IAAI,EAAE,qDAAqD,SAAS;;;mCAG7C,OAAO,kBAAkB,SAAS,eAAe,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4DA8B/B;iBACjD;aACF;SACF;KACF,CAAC,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Prompt: triage_inbox
|
|
3
|
+
*
|
|
4
|
+
* Instructs the LLM to analyze unread emails and categorize them by
|
|
5
|
+
* urgency and action needed.
|
|
6
|
+
*/
|
|
7
|
+
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
8
|
+
export default function registerTriagePrompt(server: McpServer): void;
|
|
9
|
+
//# sourceMappingURL=triage.prompt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"triage.prompt.d.ts","sourceRoot":"","sources":["../../src/prompts/triage.prompt.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGzE,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CA4DpE"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Prompt: triage_inbox
|
|
3
|
+
*
|
|
4
|
+
* Instructs the LLM to analyze unread emails and categorize them by
|
|
5
|
+
* urgency and action needed.
|
|
6
|
+
*/
|
|
7
|
+
import { z } from 'zod';
|
|
8
|
+
export default function registerTriagePrompt(server) {
|
|
9
|
+
server.prompt('triage_inbox', 'Analyze unread emails and categorize by urgency. Produces a structured triage report with recommended actions.', {
|
|
10
|
+
account: z.string().describe('Account name to triage'),
|
|
11
|
+
mailbox: z.string().default('INBOX').describe('Mailbox to triage (default: INBOX)'),
|
|
12
|
+
limit: z
|
|
13
|
+
.string()
|
|
14
|
+
.default('20')
|
|
15
|
+
.describe('Maximum number of unread emails to analyze (default: 20)'),
|
|
16
|
+
}, async ({ account, mailbox, limit }) => {
|
|
17
|
+
const limitNum = Math.min(Math.max(parseInt(limit, 10) || 20, 1), 50);
|
|
18
|
+
return {
|
|
19
|
+
messages: [
|
|
20
|
+
{
|
|
21
|
+
role: 'user',
|
|
22
|
+
content: {
|
|
23
|
+
type: 'text',
|
|
24
|
+
text: `Triage the unread emails in the "${mailbox}" mailbox of the "${account}" account.
|
|
25
|
+
|
|
26
|
+
Follow these steps:
|
|
27
|
+
1. Call list_emails with account="${account}", mailbox="${mailbox}", seen=false, pageSize=${limitNum} to get unread emails.
|
|
28
|
+
2. For each email, read the subject, sender, and preview to classify it into ONE of these categories:
|
|
29
|
+
🔴 **Urgent** — Requires immediate attention (time-sensitive, from important contacts, contains deadlines)
|
|
30
|
+
🟡 **Needs Response** — Requires a reply but not time-critical
|
|
31
|
+
🔵 **FYI** — Informational, no action needed (newsletters, notifications, CC'd emails)
|
|
32
|
+
⚪ **Promotional** — Marketing, spam, or low-priority automated emails
|
|
33
|
+
3. For emails that need more context, use get_email to read the full body.
|
|
34
|
+
|
|
35
|
+
Output a triage report in this format:
|
|
36
|
+
|
|
37
|
+
## 📬 Inbox Triage — ${account}
|
|
38
|
+
**${mailbox}** | Analyzed: [count] unread emails
|
|
39
|
+
|
|
40
|
+
### 🔴 Urgent ([count])
|
|
41
|
+
- **[Subject]** from [Sender] — [Brief reason why urgent] → [Recommended action]
|
|
42
|
+
|
|
43
|
+
### 🟡 Needs Response ([count])
|
|
44
|
+
- **[Subject]** from [Sender] — [Brief summary] → [Suggested response approach]
|
|
45
|
+
|
|
46
|
+
### 🔵 FYI ([count])
|
|
47
|
+
- **[Subject]** from [Sender] — [One-line summary]
|
|
48
|
+
|
|
49
|
+
### ⚪ Promotional ([count])
|
|
50
|
+
- **[Subject]** from [Sender]
|
|
51
|
+
|
|
52
|
+
### Recommended Actions
|
|
53
|
+
1. [Most important action first]
|
|
54
|
+
2. [Second priority]
|
|
55
|
+
...
|
|
56
|
+
|
|
57
|
+
Suggest which emails to mark as read, flag for follow-up, or archive.`,
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
],
|
|
61
|
+
};
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=triage.prompt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"triage.prompt.js","sourceRoot":"","sources":["../../src/prompts/triage.prompt.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,MAAiB;IAC5D,MAAM,CAAC,MAAM,CACX,cAAc,EACd,gHAAgH,EAChH;QACE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,wBAAwB,CAAC;QACtD,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,oCAAoC,CAAC;QACnF,KAAK,EAAE,CAAC;aACL,MAAM,EAAE;aACR,OAAO,CAAC,IAAI,CAAC;aACb,QAAQ,CAAC,0DAA0D,CAAC;KACxE,EACD,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE;QACpC,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACtE,OAAO;YACL,QAAQ,EAAE;gBACR;oBACE,IAAI,EAAE,MAAe;oBACrB,OAAO,EAAE;wBACP,IAAI,EAAE,MAAe;wBACrB,IAAI,EAAE,oCAAoC,OAAO,qBAAqB,OAAO;;;oCAGvD,OAAO,eAAe,OAAO,2BAA2B,QAAQ;;;;;;;;;;uBAU7E,OAAO;IAC1B,OAAO;;;;;;;;;;;;;;;;;;;sEAmB2D;qBACzD;iBACF;aACF;SACF,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Resource: email://accounts
|
|
3
|
+
*
|
|
4
|
+
* Static resource listing all configured email accounts.
|
|
5
|
+
*/
|
|
6
|
+
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
7
|
+
import type ConnectionManager from '../connections/manager.js';
|
|
8
|
+
export default function registerAccountsResource(server: McpServer, connections: ConnectionManager): void;
|
|
9
|
+
//# sourceMappingURL=accounts.resource.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accounts.resource.d.ts","sourceRoot":"","sources":["../../src/resources/accounts.resource.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEzE,OAAO,KAAK,iBAAiB,MAAM,2BAA2B,CAAC;AAE/D,MAAM,CAAC,OAAO,UAAU,wBAAwB,CAC9C,MAAM,EAAE,SAAS,EACjB,WAAW,EAAE,iBAAiB,GAC7B,IAAI,CAyBN"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Resource: email://accounts
|
|
3
|
+
*
|
|
4
|
+
* Static resource listing all configured email accounts.
|
|
5
|
+
*/
|
|
6
|
+
export default function registerAccountsResource(server, connections) {
|
|
7
|
+
const names = connections.getAccountNames();
|
|
8
|
+
const accounts = names.map((name) => {
|
|
9
|
+
const cfg = connections.getAccount(name);
|
|
10
|
+
return {
|
|
11
|
+
name: cfg.name,
|
|
12
|
+
email: cfg.email,
|
|
13
|
+
fullName: cfg.fullName ?? undefined,
|
|
14
|
+
};
|
|
15
|
+
});
|
|
16
|
+
server.resource('accounts', 'email://accounts', { description: 'List of all configured email accounts' }, async () => ({
|
|
17
|
+
contents: [
|
|
18
|
+
{
|
|
19
|
+
uri: 'email://accounts',
|
|
20
|
+
mimeType: 'application/json',
|
|
21
|
+
text: JSON.stringify(accounts, null, 2),
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
}));
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=accounts.resource.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accounts.resource.js","sourceRoot":"","sources":["../../src/resources/accounts.resource.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,MAAM,CAAC,OAAO,UAAU,wBAAwB,CAC9C,MAAiB,EACjB,WAA8B;IAE9B,MAAM,KAAK,GAAG,WAAW,CAAC,eAAe,EAAE,CAAC;IAC5C,MAAM,QAAQ,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QAClC,MAAM,GAAG,GAAG,WAAW,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QACzC,OAAO;YACL,IAAI,EAAE,GAAG,CAAC,IAAI;YACd,KAAK,EAAE,GAAG,CAAC,KAAK;YAChB,QAAQ,EAAE,GAAG,CAAC,QAAQ,IAAI,SAAS;SACpC,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,MAAM,CAAC,QAAQ,CACb,UAAU,EACV,kBAAkB,EAClB,EAAE,WAAW,EAAE,uCAAuC,EAAE,EACxD,KAAK,IAAI,EAAE,CAAC,CAAC;QACX,QAAQ,EAAE;YACR;gBACE,GAAG,EAAE,kBAAkB;gBACvB,QAAQ,EAAE,kBAAkB;gBAC5B,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;aACxC;SACF;KACF,CAAC,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Resource: email://{account}/mailboxes
|
|
3
|
+
*
|
|
4
|
+
* Dynamic resource providing the mailbox folder tree with message counts.
|
|
5
|
+
*/
|
|
6
|
+
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
7
|
+
import type ConnectionManager from '../connections/manager.js';
|
|
8
|
+
import type ImapService from '../services/imap.service.js';
|
|
9
|
+
export default function registerMailboxesResource(server: McpServer, connections: ConnectionManager, imapService: ImapService): void;
|
|
10
|
+
//# sourceMappingURL=mailboxes.resource.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mailboxes.resource.d.ts","sourceRoot":"","sources":["../../src/resources/mailboxes.resource.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGzE,OAAO,KAAK,iBAAiB,MAAM,2BAA2B,CAAC;AAC/D,OAAO,KAAK,WAAW,MAAM,6BAA6B,CAAC;AAE3D,MAAM,CAAC,OAAO,UAAU,yBAAyB,CAC/C,MAAM,EAAE,SAAS,EACjB,WAAW,EAAE,iBAAiB,EAC9B,WAAW,EAAE,WAAW,GACvB,IAAI,CAgCN"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Resource: email://{account}/mailboxes
|
|
3
|
+
*
|
|
4
|
+
* Dynamic resource providing the mailbox folder tree with message counts.
|
|
5
|
+
*/
|
|
6
|
+
import { ResourceTemplate } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
7
|
+
export default function registerMailboxesResource(server, connections, imapService) {
|
|
8
|
+
const names = connections.getAccountNames();
|
|
9
|
+
const accounts = names.map((name) => connections.getAccount(name));
|
|
10
|
+
server.resource('mailboxes', new ResourceTemplate('email://{account}/mailboxes', {
|
|
11
|
+
list: async () => ({
|
|
12
|
+
resources: accounts.map((a) => ({
|
|
13
|
+
uri: `email://${a.name}/mailboxes`,
|
|
14
|
+
name: `${a.name} — Mailbox tree`,
|
|
15
|
+
description: `Folder structure and message counts for ${a.email}`,
|
|
16
|
+
mimeType: 'application/json',
|
|
17
|
+
})),
|
|
18
|
+
}),
|
|
19
|
+
}), { description: 'Mailbox folder tree with message counts for an account' }, async (uri, { account }) => {
|
|
20
|
+
const accountName = account;
|
|
21
|
+
const mailboxes = await imapService.listMailboxes(accountName);
|
|
22
|
+
return {
|
|
23
|
+
contents: [
|
|
24
|
+
{
|
|
25
|
+
uri: uri.href,
|
|
26
|
+
mimeType: 'application/json',
|
|
27
|
+
text: JSON.stringify(mailboxes, null, 2),
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
};
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=mailboxes.resource.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mailboxes.resource.js","sourceRoot":"","sources":["../../src/resources/mailboxes.resource.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAK3E,MAAM,CAAC,OAAO,UAAU,yBAAyB,CAC/C,MAAiB,EACjB,WAA8B,EAC9B,WAAwB;IAExB,MAAM,KAAK,GAAG,WAAW,CAAC,eAAe,EAAE,CAAC;IAC5C,MAAM,QAAQ,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,WAAW,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;IAEnE,MAAM,CAAC,QAAQ,CACb,WAAW,EACX,IAAI,gBAAgB,CAAC,6BAA6B,EAAE;QAClD,IAAI,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC;YACjB,SAAS,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;gBAC9B,GAAG,EAAE,WAAW,CAAC,CAAC,IAAI,YAAY;gBAClC,IAAI,EAAE,GAAG,CAAC,CAAC,IAAI,iBAAiB;gBAChC,WAAW,EAAE,2CAA2C,CAAC,CAAC,KAAK,EAAE;gBACjE,QAAQ,EAAE,kBAAkB;aAC7B,CAAC,CAAC;SACJ,CAAC;KACH,CAAC,EACF,EAAE,WAAW,EAAE,wDAAwD,EAAE,EACzE,KAAK,EAAE,GAAG,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QACzB,MAAM,WAAW,GAAG,OAAiB,CAAC;QACtC,MAAM,SAAS,GAAG,MAAM,WAAW,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;QAE/D,OAAO;YACL,QAAQ,EAAE;gBACR;oBACE,GAAG,EAAE,GAAG,CAAC,IAAI;oBACb,QAAQ,EAAE,kBAAkB;oBAC5B,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;iBACzC;aACF;SACF,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resource registration — single wiring point.
|
|
3
|
+
*
|
|
4
|
+
* Registers all MCP resources with the server instance.
|
|
5
|
+
*/
|
|
6
|
+
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
7
|
+
import type ConnectionManager from '../connections/manager.js';
|
|
8
|
+
import type ImapService from '../services/imap.service.js';
|
|
9
|
+
import type SchedulerService from '../services/scheduler.service.js';
|
|
10
|
+
import type TemplateService from '../services/template.service.js';
|
|
11
|
+
export default function registerAllResources(server: McpServer, connections: ConnectionManager, imapService: ImapService, templateService: TemplateService, schedulerService: SchedulerService): void;
|
|
12
|
+
//# sourceMappingURL=register.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../src/resources/register.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,iBAAiB,MAAM,2BAA2B,CAAC;AAC/D,OAAO,KAAK,WAAW,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,gBAAgB,MAAM,kCAAkC,CAAC;AACrE,OAAO,KAAK,eAAe,MAAM,iCAAiC,CAAC;AAQnE,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAC1C,MAAM,EAAE,SAAS,EACjB,WAAW,EAAE,iBAAiB,EAC9B,WAAW,EAAE,WAAW,EACxB,eAAe,EAAE,eAAe,EAChC,gBAAgB,EAAE,gBAAgB,GACjC,IAAI,CAON"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resource registration — single wiring point.
|
|
3
|
+
*
|
|
4
|
+
* Registers all MCP resources with the server instance.
|
|
5
|
+
*/
|
|
6
|
+
import registerAccountsResource from './accounts.resource.js';
|
|
7
|
+
import registerMailboxesResource from './mailboxes.resource.js';
|
|
8
|
+
import registerScheduledResource from './scheduled.resource.js';
|
|
9
|
+
import registerStatsResource from './stats.resource.js';
|
|
10
|
+
import registerTemplatesResource from './templates.resource.js';
|
|
11
|
+
import registerUnreadResource from './unread.resource.js';
|
|
12
|
+
export default function registerAllResources(server, connections, imapService, templateService, schedulerService) {
|
|
13
|
+
registerAccountsResource(server, connections);
|
|
14
|
+
registerMailboxesResource(server, connections, imapService);
|
|
15
|
+
registerUnreadResource(server, connections, imapService);
|
|
16
|
+
registerTemplatesResource(server, templateService);
|
|
17
|
+
registerStatsResource(server, connections, imapService);
|
|
18
|
+
registerScheduledResource(server, schedulerService);
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=register.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"register.js","sourceRoot":"","sources":["../../src/resources/register.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH,OAAO,wBAAwB,MAAM,wBAAwB,CAAC;AAC9D,OAAO,yBAAyB,MAAM,yBAAyB,CAAC;AAChE,OAAO,yBAAyB,MAAM,yBAAyB,CAAC;AAChE,OAAO,qBAAqB,MAAM,qBAAqB,CAAC;AACxD,OAAO,yBAAyB,MAAM,yBAAyB,CAAC;AAChE,OAAO,sBAAsB,MAAM,sBAAsB,CAAC;AAE1D,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAC1C,MAAiB,EACjB,WAA8B,EAC9B,WAAwB,EACxB,eAAgC,EAChC,gBAAkC;IAElC,wBAAwB,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IAC9C,yBAAyB,CAAC,MAAM,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC;IAC5D,sBAAsB,CAAC,MAAM,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC;IACzD,yBAAyB,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IACnD,qBAAqB,CAAC,MAAM,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC;IACxD,yBAAyB,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;AACtD,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Resource: email://scheduled
|
|
3
|
+
*
|
|
4
|
+
* Static resource listing pending scheduled emails.
|
|
5
|
+
*/
|
|
6
|
+
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
7
|
+
import type SchedulerService from '../services/scheduler.service.js';
|
|
8
|
+
export default function registerScheduledResource(server: McpServer, schedulerService: SchedulerService): void;
|
|
9
|
+
//# sourceMappingURL=scheduled.resource.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scheduled.resource.d.ts","sourceRoot":"","sources":["../../src/resources/scheduled.resource.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEzE,OAAO,KAAK,gBAAgB,MAAM,kCAAkC,CAAC;AAErE,MAAM,CAAC,OAAO,UAAU,yBAAyB,CAC/C,MAAM,EAAE,SAAS,EACjB,gBAAgB,EAAE,gBAAgB,GACjC,IAAI,CA+BN"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Resource: email://scheduled
|
|
3
|
+
*
|
|
4
|
+
* Static resource listing pending scheduled emails.
|
|
5
|
+
*/
|
|
6
|
+
export default function registerScheduledResource(server, schedulerService) {
|
|
7
|
+
server.resource('scheduled', 'email://scheduled', { description: 'List of pending scheduled emails' }, async () => {
|
|
8
|
+
const emails = await schedulerService.list({
|
|
9
|
+
status: 'pending',
|
|
10
|
+
});
|
|
11
|
+
const summary = emails.map((e) => ({
|
|
12
|
+
id: e.id,
|
|
13
|
+
account: e.account,
|
|
14
|
+
to: e.to.join(', '),
|
|
15
|
+
subject: e.subject,
|
|
16
|
+
send_at: e.sendAt,
|
|
17
|
+
created_at: e.createdAt,
|
|
18
|
+
overdue: new Date(e.sendAt).getTime() < Date.now(),
|
|
19
|
+
}));
|
|
20
|
+
return {
|
|
21
|
+
contents: [
|
|
22
|
+
{
|
|
23
|
+
uri: 'email://scheduled',
|
|
24
|
+
mimeType: 'application/json',
|
|
25
|
+
text: JSON.stringify({ pending: summary, count: summary.length }, null, 2),
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
};
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=scheduled.resource.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scheduled.resource.js","sourceRoot":"","sources":["../../src/resources/scheduled.resource.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,MAAM,CAAC,OAAO,UAAU,yBAAyB,CAC/C,MAAiB,EACjB,gBAAkC;IAElC,MAAM,CAAC,QAAQ,CACb,WAAW,EACX,mBAAmB,EACnB,EAAE,WAAW,EAAE,kCAAkC,EAAE,EACnD,KAAK,IAAI,EAAE;QACT,MAAM,MAAM,GAAG,MAAM,gBAAgB,CAAC,IAAI,CAAC;YACzC,MAAM,EAAE,SAAS;SAClB,CAAC,CAAC;QAEH,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;YACjC,EAAE,EAAE,CAAC,CAAC,EAAE;YACR,OAAO,EAAE,CAAC,CAAC,OAAO;YAClB,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC;YACnB,OAAO,EAAE,CAAC,CAAC,OAAO;YAClB,OAAO,EAAE,CAAC,CAAC,MAAM;YACjB,UAAU,EAAE,CAAC,CAAC,SAAS;YACvB,OAAO,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,GAAG,EAAE;SACnD,CAAC,CAAC,CAAC;QAEJ,OAAO;YACL,QAAQ,EAAE;gBACR;oBACE,GAAG,EAAE,mBAAmB;oBACxB,QAAQ,EAAE,kBAAkB;oBAC5B,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;iBAC3E;aACF;SACF,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Resource: email://{account}/stats
|
|
3
|
+
*
|
|
4
|
+
* Dynamic resource providing lightweight daily inbox statistics.
|
|
5
|
+
*/
|
|
6
|
+
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
7
|
+
import type ConnectionManager from '../connections/manager.js';
|
|
8
|
+
import type ImapService from '../services/imap.service.js';
|
|
9
|
+
export default function registerStatsResource(server: McpServer, connections: ConnectionManager, imapService: ImapService): void;
|
|
10
|
+
//# sourceMappingURL=stats.resource.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stats.resource.d.ts","sourceRoot":"","sources":["../../src/resources/stats.resource.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGzE,OAAO,KAAK,iBAAiB,MAAM,2BAA2B,CAAC;AAC/D,OAAO,KAAK,WAAW,MAAM,6BAA6B,CAAC;AAE3D,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAC3C,MAAM,EAAE,SAAS,EACjB,WAAW,EAAE,iBAAiB,EAC9B,WAAW,EAAE,WAAW,GACvB,IAAI,CA+CN"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Resource: email://{account}/stats
|
|
3
|
+
*
|
|
4
|
+
* Dynamic resource providing lightweight daily inbox statistics.
|
|
5
|
+
*/
|
|
6
|
+
import { ResourceTemplate } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
7
|
+
export default function registerStatsResource(server, connections, imapService) {
|
|
8
|
+
const names = connections.getAccountNames();
|
|
9
|
+
const accounts = names.map((name) => connections.getAccount(name));
|
|
10
|
+
server.resource('stats', new ResourceTemplate('email://{account}/stats', {
|
|
11
|
+
list: async () => ({
|
|
12
|
+
resources: accounts.map((a) => ({
|
|
13
|
+
uri: `email://${a.name}/stats`,
|
|
14
|
+
name: `${a.name} — Inbox Stats`,
|
|
15
|
+
description: `Email statistics snapshot for ${a.email}`,
|
|
16
|
+
mimeType: 'application/json',
|
|
17
|
+
})),
|
|
18
|
+
}),
|
|
19
|
+
}), {
|
|
20
|
+
description: 'Daily inbox statistics snapshot with unread count and quota',
|
|
21
|
+
}, async (uri, { account }) => {
|
|
22
|
+
const accountName = account;
|
|
23
|
+
// Lightweight STATUS query (fast, no envelope fetch)
|
|
24
|
+
const stats = await imapService.getEmailStats(accountName, 'INBOX', 'day');
|
|
25
|
+
const quota = await imapService.getQuota(accountName);
|
|
26
|
+
const snapshot = {
|
|
27
|
+
account: accountName,
|
|
28
|
+
date: new Date().toISOString().split('T')[0],
|
|
29
|
+
inbox_total: stats.totalReceived,
|
|
30
|
+
inbox_unread: stats.unreadCount,
|
|
31
|
+
inbox_today: stats.totalReceived,
|
|
32
|
+
quota: quota ?? undefined,
|
|
33
|
+
};
|
|
34
|
+
return {
|
|
35
|
+
contents: [
|
|
36
|
+
{
|
|
37
|
+
uri: uri.href,
|
|
38
|
+
mimeType: 'application/json',
|
|
39
|
+
text: JSON.stringify(snapshot, null, 2),
|
|
40
|
+
},
|
|
41
|
+
],
|
|
42
|
+
};
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=stats.resource.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stats.resource.js","sourceRoot":"","sources":["../../src/resources/stats.resource.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAK3E,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAC3C,MAAiB,EACjB,WAA8B,EAC9B,WAAwB;IAExB,MAAM,KAAK,GAAG,WAAW,CAAC,eAAe,EAAE,CAAC;IAC5C,MAAM,QAAQ,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,WAAW,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;IAEnE,MAAM,CAAC,QAAQ,CACb,OAAO,EACP,IAAI,gBAAgB,CAAC,yBAAyB,EAAE;QAC9C,IAAI,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC;YACjB,SAAS,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;gBAC9B,GAAG,EAAE,WAAW,CAAC,CAAC,IAAI,QAAQ;gBAC9B,IAAI,EAAE,GAAG,CAAC,CAAC,IAAI,gBAAgB;gBAC/B,WAAW,EAAE,iCAAiC,CAAC,CAAC,KAAK,EAAE;gBACvD,QAAQ,EAAE,kBAAkB;aAC7B,CAAC,CAAC;SACJ,CAAC;KACH,CAAC,EACF;QACE,WAAW,EAAE,6DAA6D;KAC3E,EACD,KAAK,EAAE,GAAG,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QACzB,MAAM,WAAW,GAAG,OAAiB,CAAC;QAEtC,qDAAqD;QACrD,MAAM,KAAK,GAAG,MAAM,WAAW,CAAC,aAAa,CAAC,WAAW,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;QAE3E,MAAM,KAAK,GAAG,MAAM,WAAW,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;QAEtD,MAAM,QAAQ,GAAG;YACf,OAAO,EAAE,WAAW;YACpB,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YAC5C,WAAW,EAAE,KAAK,CAAC,aAAa;YAChC,YAAY,EAAE,KAAK,CAAC,WAAW;YAC/B,WAAW,EAAE,KAAK,CAAC,aAAa;YAChC,KAAK,EAAE,KAAK,IAAI,SAAS;SAC1B,CAAC;QAEF,OAAO;YACL,QAAQ,EAAE;gBACR;oBACE,GAAG,EAAE,GAAG,CAAC,IAAI;oBACb,QAAQ,EAAE,kBAAkB;oBAC5B,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;iBACxC;aACF;SACF,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Resource: email://templates/{name}
|
|
3
|
+
*
|
|
4
|
+
* Dynamic resource exposing user-defined email templates.
|
|
5
|
+
*/
|
|
6
|
+
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
7
|
+
import type TemplateService from '../services/template.service.js';
|
|
8
|
+
export default function registerTemplatesResource(server: McpServer, templateService: TemplateService): void;
|
|
9
|
+
//# sourceMappingURL=templates.resource.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"templates.resource.d.ts","sourceRoot":"","sources":["../../src/resources/templates.resource.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGzE,OAAO,KAAK,eAAe,MAAM,iCAAiC,CAAC;AAEnE,MAAM,CAAC,OAAO,UAAU,yBAAyB,CAC/C,MAAM,EAAE,SAAS,EACjB,eAAe,EAAE,eAAe,GAC/B,IAAI,CAgCN"}
|