@mcp-z/mcp-outlook 2.2.1 → 2.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.
Files changed (94) hide show
  1. package/dist/cjs/constants.js.map +1 -1
  2. package/dist/cjs/email/composition/outlook-message-builder.js.map +1 -1
  3. package/dist/cjs/email/messages/messages.js.map +1 -1
  4. package/dist/cjs/email/parsing/header-parsing.js.map +1 -1
  5. package/dist/cjs/email/parsing/message-extraction.js.map +1 -1
  6. package/dist/cjs/email/parsing/message-mapping.js.map +1 -1
  7. package/dist/cjs/email/querying/client-filter.js.map +1 -1
  8. package/dist/cjs/email/querying/execute-query.js.map +1 -1
  9. package/dist/cjs/email/querying/pagination-token.js.map +1 -1
  10. package/dist/cjs/email/querying/query-builder.js.map +1 -1
  11. package/dist/cjs/email/querying/search-execution.js.map +1 -1
  12. package/dist/cjs/index.js.map +1 -1
  13. package/dist/cjs/lib/create-store.js.map +1 -1
  14. package/dist/cjs/lib/messages-to-row.js.map +1 -1
  15. package/dist/cjs/lib/outlook/index.js.map +1 -1
  16. package/dist/cjs/lib/outlook/types.js.map +1 -1
  17. package/dist/cjs/mcp/index.js.map +1 -1
  18. package/dist/cjs/mcp/prompts/draft-email.js.map +1 -1
  19. package/dist/cjs/mcp/prompts/index.js.map +1 -1
  20. package/dist/cjs/mcp/prompts/query-syntax.js.map +1 -1
  21. package/dist/cjs/mcp/resources/email.js.map +1 -1
  22. package/dist/cjs/mcp/resources/index.js.map +1 -1
  23. package/dist/cjs/mcp/tools/categories-list.js.map +1 -1
  24. package/dist/cjs/mcp/tools/index.js.map +1 -1
  25. package/dist/cjs/mcp/tools/label-add.js.map +1 -1
  26. package/dist/cjs/mcp/tools/label-delete.js.map +1 -1
  27. package/dist/cjs/mcp/tools/labels-list.js.map +1 -1
  28. package/dist/cjs/mcp/tools/message-get.js.map +1 -1
  29. package/dist/cjs/mcp/tools/message-mark-read.js.map +1 -1
  30. package/dist/cjs/mcp/tools/message-move-to-trash.js.map +1 -1
  31. package/dist/cjs/mcp/tools/message-respond.js.map +1 -1
  32. package/dist/cjs/mcp/tools/message-search.js.map +1 -1
  33. package/dist/cjs/mcp/tools/message-send.js.map +1 -1
  34. package/dist/cjs/mcp/tools/messages-export-csv.js.map +1 -1
  35. package/dist/cjs/schemas/index.js.map +1 -1
  36. package/dist/cjs/schemas/outlook-query-schema.js.map +1 -1
  37. package/dist/cjs/schemas/outlook-validation.js.map +1 -1
  38. package/dist/cjs/setup/config.js +5 -4
  39. package/dist/cjs/setup/config.js.map +1 -1
  40. package/dist/cjs/setup/http.js.map +1 -1
  41. package/dist/cjs/setup/index.js.map +1 -1
  42. package/dist/cjs/setup/oauth-microsoft.js.map +1 -1
  43. package/dist/cjs/setup/runtime.js +3 -2
  44. package/dist/cjs/setup/runtime.js.map +1 -1
  45. package/dist/cjs/setup/stdio.js.map +1 -1
  46. package/dist/cjs/setup/version-help.js.map +1 -1
  47. package/dist/esm/constants.js.map +1 -1
  48. package/dist/esm/email/composition/outlook-message-builder.js.map +1 -1
  49. package/dist/esm/email/messages/messages.js.map +1 -1
  50. package/dist/esm/email/parsing/header-parsing.js.map +1 -1
  51. package/dist/esm/email/parsing/message-extraction.js.map +1 -1
  52. package/dist/esm/email/parsing/message-mapping.js.map +1 -1
  53. package/dist/esm/email/querying/client-filter.js.map +1 -1
  54. package/dist/esm/email/querying/execute-query.js.map +1 -1
  55. package/dist/esm/email/querying/pagination-token.js.map +1 -1
  56. package/dist/esm/email/querying/query-builder.js.map +1 -1
  57. package/dist/esm/email/querying/search-execution.js.map +1 -1
  58. package/dist/esm/index.js.map +1 -1
  59. package/dist/esm/lib/create-store.js.map +1 -1
  60. package/dist/esm/lib/messages-to-row.js.map +1 -1
  61. package/dist/esm/lib/outlook/index.js.map +1 -1
  62. package/dist/esm/lib/outlook/types.js.map +1 -1
  63. package/dist/esm/mcp/index.js.map +1 -1
  64. package/dist/esm/mcp/prompts/draft-email.js.map +1 -1
  65. package/dist/esm/mcp/prompts/index.js.map +1 -1
  66. package/dist/esm/mcp/prompts/query-syntax.js.map +1 -1
  67. package/dist/esm/mcp/resources/email.js.map +1 -1
  68. package/dist/esm/mcp/resources/index.js.map +1 -1
  69. package/dist/esm/mcp/tools/categories-list.js.map +1 -1
  70. package/dist/esm/mcp/tools/index.js.map +1 -1
  71. package/dist/esm/mcp/tools/label-add.js.map +1 -1
  72. package/dist/esm/mcp/tools/label-delete.js.map +1 -1
  73. package/dist/esm/mcp/tools/labels-list.js.map +1 -1
  74. package/dist/esm/mcp/tools/message-get.js.map +1 -1
  75. package/dist/esm/mcp/tools/message-mark-read.js.map +1 -1
  76. package/dist/esm/mcp/tools/message-move-to-trash.js.map +1 -1
  77. package/dist/esm/mcp/tools/message-respond.js.map +1 -1
  78. package/dist/esm/mcp/tools/message-search.js.map +1 -1
  79. package/dist/esm/mcp/tools/message-send.js.map +1 -1
  80. package/dist/esm/mcp/tools/messages-export-csv.js.map +1 -1
  81. package/dist/esm/schemas/index.js.map +1 -1
  82. package/dist/esm/schemas/outlook-query-schema.js.map +1 -1
  83. package/dist/esm/schemas/outlook-validation.js.map +1 -1
  84. package/dist/esm/setup/config.js +4 -3
  85. package/dist/esm/setup/config.js.map +1 -1
  86. package/dist/esm/setup/http.js.map +1 -1
  87. package/dist/esm/setup/index.js.map +1 -1
  88. package/dist/esm/setup/oauth-microsoft.js.map +1 -1
  89. package/dist/esm/setup/runtime.js +3 -2
  90. package/dist/esm/setup/runtime.js.map +1 -1
  91. package/dist/esm/setup/stdio.js.map +1 -1
  92. package/dist/esm/setup/version-help.js.map +1 -1
  93. package/dist/esm/types.js.map +1 -1
  94. package/package.json +6 -3
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/kevin/Dev/OpenSource/ai/mcp-z/mcp-outlook/src/schemas/outlook-validation.ts"],"sourcesContent":["import { z } from 'zod';\n\n// Base schemas for common Microsoft types\nexport const EmailAddressSchema = z.object({\n name: z.string().optional().describe('Display name of the recipient'),\n address: z.string().email().describe('Email address'),\n});\n\nexport const RecipientSchema = z.object({\n emailAddress: EmailAddressSchema,\n});\n\n// Outlook Message schema based on Microsoft Graph API\nexport const OutlookMessageSchema = z.object({\n id: z.string().optional().describe('Unique identifier for the message'),\n subject: z.string().optional().describe('Subject of the email message'),\n body: z\n .object({\n contentType: z.enum(['text', 'html']).optional().describe('Content type of the body'),\n content: z.string().optional().describe('Body content of the message'),\n })\n .optional(),\n bodyPreview: z.string().optional().describe('First 255 characters of the message body'),\n importance: z.enum(['low', 'normal', 'high']).optional().describe('Importance level of the message'),\n hasAttachments: z.boolean().optional().describe('Indicates whether the message has attachments'),\n parentFolderId: z.string().optional().describe('ID of the parent folder'),\n sender: RecipientSchema.optional().describe('Account used to send the message'),\n from: RecipientSchema.optional().describe('Sender of the message'),\n toRecipients: z.array(RecipientSchema).optional().describe('To recipients of the message'),\n ccRecipients: z.array(RecipientSchema).optional().describe('CC recipients of the message'),\n bccRecipients: z.array(RecipientSchema).optional().describe('BCC recipients of the message'),\n replyTo: z.array(RecipientSchema).optional().describe('Reply-to recipients'),\n conversationId: z.string().optional().describe('ID of the conversation the email belongs to'),\n conversationIndex: z.string().optional().describe('Index for conversation threading'),\n receivedDateTime: z.string().optional().describe('ISO datetime when message was received'),\n sentDateTime: z.string().optional().describe('ISO datetime when message was sent'),\n createdDateTime: z.string().optional().describe('ISO datetime when message was created'),\n lastModifiedDateTime: z.string().optional().describe('ISO datetime when message was last modified'),\n changeKey: z.string().optional().describe('Version of the message'),\n categories: z.array(z.string()).optional().describe('Categories associated with the message'),\n isDeliveryReceiptRequested: z.boolean().optional().describe('Whether delivery receipt is requested'),\n isReadReceiptRequested: z.boolean().optional().describe('Whether read receipt is requested'),\n isRead: z.boolean().optional().describe('Whether the message has been read'),\n isDraft: z.boolean().optional().describe('Whether the message is a draft'),\n webLink: z.string().optional().describe('URL to open the message in Outlook on the web'),\n inferenceClassification: z.enum(['focused', 'other']).optional().describe('Classification for focused inbox'),\n flag: z\n .object({\n flagStatus: z.enum(['notFlagged', 'complete', 'flagged']).describe('Status of the flag'),\n startDateTime: z.string().optional().describe('Start date for the flag'),\n dueDateTime: z.string().optional().describe('Due date for the flag'),\n })\n .optional()\n .describe('Flag information for the message'),\n});\n\n// Outlook Folder schema\nexport const OutlookFolderSchema = z.object({\n id: z.string().optional().describe('Unique identifier for the folder'),\n displayName: z.string().optional().describe('Display name of the folder'),\n parentFolderId: z.string().optional().describe('ID of the parent folder'),\n childFolderCount: z.number().optional().describe('Number of immediate child folders'),\n unreadItemCount: z.number().optional().describe('Number of unread items in the folder'),\n totalItemCount: z.number().optional().describe('Total number of items in the folder'),\n sizeInBytes: z.number().optional().describe('Size of the folder in bytes'),\n isHidden: z.boolean().optional().describe('Whether the folder is hidden'),\n wellKnownName: z\n .enum(['archive', 'clutter', 'conflicts', 'conversationhistory', 'deleteditems', 'drafts', 'inbox', 'junkemail', 'localfailures', 'msgfolderroot', 'outbox', 'recoverableitemsdeletions', 'scheduled', 'searchfolders', 'sentitems', 'serverfailures', 'syncissues'])\n .optional()\n .describe('Well-known folder name if applicable'),\n});\n\n// Outlook Attachment schema\nexport const OutlookAttachmentSchema = z.object({\n id: z.string().optional().describe('Unique identifier for the attachment'),\n name: z.string().optional().describe('Name of the attachment'),\n contentType: z.string().optional().describe('MIME type of the attachment'),\n size: z.number().optional().describe('Size of the attachment in bytes'),\n isInline: z.boolean().optional().describe('Whether the attachment is inline'),\n lastModifiedDateTime: z.string().optional().describe('ISO datetime when attachment was last modified'),\n contentId: z.string().optional().describe('Content ID for inline attachments'),\n contentLocation: z.string().optional().describe('Content location for inline attachments'),\n contentBytes: z.string().optional().describe('Base64-encoded content of the attachment'),\n});\n\n// OneDrive file schema (subset of Microsoft Graph DriveItem)\nexport const OneDriveFileSchema = z.object({\n id: z.string().optional().describe('Unique identifier for the file'),\n name: z.string().optional().describe('Name of the file'),\n size: z.number().optional().describe('Size of the file in bytes'),\n createdDateTime: z.string().optional().describe('ISO datetime when file was created'),\n lastModifiedDateTime: z.string().optional().describe('ISO datetime when file was last modified'),\n webUrl: z.string().optional().describe('URL to view the file in OneDrive'),\n downloadUrl: z.string().optional().describe('Direct download URL for the file'),\n parentReference: z\n .object({\n driveId: z.string().optional().describe('ID of the drive containing the file'),\n driveType: z.enum(['personal', 'business', 'documentLibrary']).optional().describe('Type of drive'),\n id: z.string().optional().describe('ID of the parent folder'),\n name: z.string().optional().describe('Name of the parent folder'),\n path: z.string().optional().describe('Path to the parent folder'),\n })\n .optional()\n .describe('Reference to the parent folder'),\n file: z\n .object({\n mimeType: z.string().optional().describe('MIME type of the file'),\n hashes: z\n .object({\n quickXorHash: z.string().optional().describe('QuickXorHash of the file'),\n sha1Hash: z.string().optional().describe('SHA1 hash of the file'),\n sha256Hash: z.string().optional().describe('SHA256 hash of the file'),\n })\n .optional()\n .describe('Hash values for the file'),\n })\n .optional()\n .describe('File-specific properties'),\n folder: z\n .object({\n childCount: z.number().optional().describe('Number of children in the folder'),\n })\n .optional()\n .describe('Folder-specific properties (present if item is a folder)'),\n shared: z\n .object({\n scope: z.enum(['anonymous', 'organization', 'users']).optional().describe('Scope of sharing'),\n owner: z\n .object({\n user: z\n .object({\n displayName: z.string().optional(),\n id: z.string().optional(),\n })\n .optional(),\n })\n .optional(),\n })\n .optional()\n .describe('Sharing information'),\n createdBy: z\n .object({\n user: z\n .object({\n displayName: z.string().optional(),\n id: z.string().optional(),\n })\n .optional(),\n })\n .optional()\n .describe('User who created the file'),\n lastModifiedBy: z\n .object({\n user: z\n .object({\n displayName: z.string().optional(),\n id: z.string().optional(),\n })\n .optional(),\n })\n .optional()\n .describe('User who last modified the file'),\n});\n\n// Microsoft Calendar Event schema\nexport const OutlookCalendarEventSchema = z.object({\n id: z.string().optional().describe('Unique identifier for the event'),\n subject: z.string().optional().describe('Subject of the event'),\n body: z\n .object({\n contentType: z.enum(['text', 'html']).optional().describe('Content type of the body'),\n content: z.string().optional().describe('Body content of the event'),\n })\n .optional(),\n start: z\n .object({\n dateTime: z.string().describe('Start date and time in ISO format'),\n timeZone: z.string().optional().describe('Time zone for the start time'),\n })\n .optional()\n .describe('Start time of the event'),\n end: z\n .object({\n dateTime: z.string().describe('End date and time in ISO format'),\n timeZone: z.string().optional().describe('Time zone for the end time'),\n })\n .optional()\n .describe('End time of the event'),\n location: z\n .object({\n displayName: z.string().optional().describe('Display name of the location'),\n address: z\n .object({\n street: z.string().optional(),\n city: z.string().optional(),\n state: z.string().optional(),\n countryOrRegion: z.string().optional(),\n postalCode: z.string().optional(),\n })\n .optional(),\n coordinates: z\n .object({\n latitude: z.number().optional(),\n longitude: z.number().optional(),\n })\n .optional(),\n })\n .optional()\n .describe('Location of the event'),\n attendees: z\n .array(\n z.object({\n type: z.enum(['required', 'optional', 'resource']).optional().describe('Type of attendee'),\n status: z\n .object({\n response: z.enum(['none', 'organizer', 'tentativelyAccepted', 'accepted', 'declined', 'notResponded']).optional(),\n time: z.string().optional().describe('Time when response was given'),\n })\n .optional(),\n emailAddress: EmailAddressSchema.optional(),\n })\n )\n .optional()\n .describe('Attendees of the event'),\n organizer: z\n .object({\n emailAddress: EmailAddressSchema.optional(),\n })\n .optional()\n .describe('Organizer of the event'),\n recurrence: z\n .object({\n pattern: z\n .object({\n type: z.enum(['daily', 'weekly', 'absoluteMonthly', 'relativeMonthly', 'absoluteYearly', 'relativeYearly']).describe('Recurrence pattern type'),\n interval: z.number().describe('Interval between occurrences'),\n month: z.number().optional().describe('Month for yearly recurrence'),\n dayOfMonth: z.number().optional().describe('Day of month for monthly recurrence'),\n daysOfWeek: z.array(z.enum(['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday'])).optional(),\n firstDayOfWeek: z.enum(['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday']).optional(),\n index: z.enum(['first', 'second', 'third', 'fourth', 'last']).optional(),\n })\n .describe('Recurrence pattern'),\n range: z\n .object({\n type: z.enum(['endDate', 'noEnd', 'numbered']).describe('Type of recurrence range'),\n startDate: z.string().describe('Start date for recurrence'),\n endDate: z.string().optional().describe('End date for recurrence'),\n numberOfOccurrences: z.number().optional().describe('Number of occurrences'),\n })\n .describe('Recurrence range'),\n })\n .optional()\n .describe('Recurrence pattern for the event'),\n isAllDay: z.boolean().optional().describe('Whether the event is an all-day event'),\n showAs: z.enum(['free', 'tentative', 'busy', 'oof', 'workingElsewhere', 'unknown']).optional().describe('Show as status'),\n sensitivity: z.enum(['normal', 'personal', 'private', 'confidential']).optional().describe('Sensitivity level'),\n importance: z.enum(['low', 'normal', 'high']).optional().describe('Importance level'),\n reminderMinutesBeforeStart: z.number().optional().describe('Minutes before start to show reminder'),\n isReminderOn: z.boolean().optional().describe('Whether reminder is enabled'),\n hasAttachments: z.boolean().optional().describe('Whether the event has attachments'),\n webLink: z.string().optional().describe('URL to open the event in Outlook on the web'),\n onlineMeetingUrl: z.string().optional().describe('URL for online meeting'),\n isOnlineMeeting: z.boolean().optional().describe('Whether the event is an online meeting'),\n onlineMeetingProvider: z.enum(['unknown', 'skypeForBusiness', 'skypeForConsumer', 'teamsForBusiness']).optional(),\n allowNewTimeProposals: z.boolean().optional().describe('Whether attendees can propose new times'),\n hideAttendees: z.boolean().optional().describe('Whether to hide attendee list'),\n responseRequested: z.boolean().optional().describe('Whether response is requested'),\n seriesMasterId: z.string().optional().describe('ID of recurring series master'),\n isCancelled: z.boolean().optional().describe('Whether the event is cancelled'),\n isDraft: z.boolean().optional().describe('Whether the event is a draft'),\n isOrganizer: z.boolean().optional().describe('Whether current user is the organizer'),\n createdDateTime: z.string().optional().describe('ISO datetime when event was created'),\n lastModifiedDateTime: z.string().optional().describe('ISO datetime when event was last modified'),\n});\n\n// Outlook Category schema based on Microsoft Graph API\nexport const OutlookCategorySchema = z.object({\n id: z.string().describe('Unique identifier for the category'),\n displayName: z.string().describe('Display name of the category'),\n color: z\n .enum(['preset0', 'preset1', 'preset2', 'preset3', 'preset4', 'preset5', 'preset6', 'preset7', 'preset8', 'preset9', 'preset10', 'preset11', 'preset12', 'preset13', 'preset14', 'preset15', 'preset16', 'preset17', 'preset18', 'preset19', 'preset20', 'preset21', 'preset22', 'preset23', 'preset24'])\n .describe('Color preset for the category'),\n});\n\n// Microsoft Contact schema\nexport const OutlookContactSchema = z.object({\n id: z.string().optional().describe('Unique identifier for the contact'),\n displayName: z.string().optional().describe('Display name of the contact'),\n givenName: z.string().optional().describe('First name'),\n surname: z.string().optional().describe('Last name'),\n middleName: z.string().optional().describe('Middle name'),\n nickName: z.string().optional().describe('Nickname'),\n title: z.string().optional().describe('Job title'),\n companyName: z.string().optional().describe('Company name'),\n department: z.string().optional().describe('Department'),\n officeLocation: z.string().optional().describe('Office location'),\n profession: z.string().optional().describe('Profession'),\n businessPhones: z.array(z.string()).optional().describe('Business phone numbers'),\n homePhones: z.array(z.string()).optional().describe('Home phone numbers'),\n mobilePhone: z.string().optional().describe('Mobile phone number'),\n emailAddresses: z\n .array(\n z.object({\n name: z.string().optional().describe('Name for the email address'),\n address: z.string().email().describe('Email address'),\n })\n )\n .optional()\n .describe('Email addresses'),\n homeAddress: z\n .object({\n street: z.string().optional(),\n city: z.string().optional(),\n state: z.string().optional(),\n countryOrRegion: z.string().optional(),\n postalCode: z.string().optional(),\n })\n .optional()\n .describe('Home address'),\n businessAddress: z\n .object({\n street: z.string().optional(),\n city: z.string().optional(),\n state: z.string().optional(),\n countryOrRegion: z.string().optional(),\n postalCode: z.string().optional(),\n })\n .optional()\n .describe('Business address'),\n otherAddress: z\n .object({\n street: z.string().optional(),\n city: z.string().optional(),\n state: z.string().optional(),\n countryOrRegion: z.string().optional(),\n postalCode: z.string().optional(),\n })\n .optional()\n .describe('Other address'),\n birthday: z.string().optional().describe('Birthday in ISO date format'),\n personalNotes: z.string().optional().describe('Personal notes about the contact'),\n categories: z.array(z.string()).optional().describe('Categories assigned to the contact'),\n createdDateTime: z.string().optional().describe('ISO datetime when contact was created'),\n lastModifiedDateTime: z.string().optional().describe('ISO datetime when contact was last modified'),\n changeKey: z.string().optional().describe('Version of the contact'),\n parentFolderId: z.string().optional().describe('ID of the parent folder'),\n});\n\n// Export TypeScript types inferred from schemas\nexport type EmailAddress = z.infer<typeof EmailAddressSchema>;\nexport type Recipient = z.infer<typeof RecipientSchema>;\nexport type OutlookMessage = z.infer<typeof OutlookMessageSchema>;\nexport type OutlookFolder = z.infer<typeof OutlookFolderSchema>;\nexport type OutlookAttachment = z.infer<typeof OutlookAttachmentSchema>;\nexport type OneDriveFile = z.infer<typeof OneDriveFileSchema>;\nexport type OutlookCalendarEvent = z.infer<typeof OutlookCalendarEventSchema>;\nexport type OutlookContact = z.infer<typeof OutlookContactSchema>;\nexport type OutlookCategory = z.infer<typeof OutlookCategorySchema>;\n"],"names":["z","EmailAddressSchema","object","name","string","optional","describe","address","email","RecipientSchema","emailAddress","OutlookMessageSchema","id","subject","body","contentType","enum","content","bodyPreview","importance","hasAttachments","boolean","parentFolderId","sender","from","toRecipients","array","ccRecipients","bccRecipients","replyTo","conversationId","conversationIndex","receivedDateTime","sentDateTime","createdDateTime","lastModifiedDateTime","changeKey","categories","isDeliveryReceiptRequested","isReadReceiptRequested","isRead","isDraft","webLink","inferenceClassification","flag","flagStatus","startDateTime","dueDateTime","OutlookFolderSchema","displayName","childFolderCount","number","unreadItemCount","totalItemCount","sizeInBytes","isHidden","wellKnownName","OutlookAttachmentSchema","size","isInline","contentId","contentLocation","contentBytes","OneDriveFileSchema","webUrl","downloadUrl","parentReference","driveId","driveType","path","file","mimeType","hashes","quickXorHash","sha1Hash","sha256Hash","folder","childCount","shared","scope","owner","user","createdBy","lastModifiedBy","OutlookCalendarEventSchema","start","dateTime","timeZone","end","location","street","city","state","countryOrRegion","postalCode","coordinates","latitude","longitude","attendees","type","status","response","time","organizer","recurrence","pattern","interval","month","dayOfMonth","daysOfWeek","firstDayOfWeek","index","range","startDate","endDate","numberOfOccurrences","isAllDay","showAs","sensitivity","reminderMinutesBeforeStart","isReminderOn","onlineMeetingUrl","isOnlineMeeting","onlineMeetingProvider","allowNewTimeProposals","hideAttendees","responseRequested","seriesMasterId","isCancelled","isOrganizer","OutlookCategorySchema","color","OutlookContactSchema","givenName","surname","middleName","nickName","title","companyName","department","officeLocation","profession","businessPhones","homePhones","mobilePhone","emailAddresses","homeAddress","businessAddress","otherAddress","birthday","personalNotes"],"mappings":"AAAA,SAASA,CAAC,QAAQ,MAAM;AAExB,0CAA0C;AAC1C,OAAO,MAAMC,qBAAqBD,EAAEE,MAAM,CAAC;IACzCC,MAAMH,EAAEI,MAAM,GAAGC,QAAQ,GAAGC,QAAQ,CAAC;IACrCC,SAASP,EAAEI,MAAM,GAAGI,KAAK,GAAGF,QAAQ,CAAC;AACvC,GAAG;AAEH,OAAO,MAAMG,kBAAkBT,EAAEE,MAAM,CAAC;IACtCQ,cAAcT;AAChB,GAAG;AAEH,sDAAsD;AACtD,OAAO,MAAMU,uBAAuBX,EAAEE,MAAM,CAAC;IAC3CU,IAAIZ,EAAEI,MAAM,GAAGC,QAAQ,GAAGC,QAAQ,CAAC;IACnCO,SAASb,EAAEI,MAAM,GAAGC,QAAQ,GAAGC,QAAQ,CAAC;IACxCQ,MAAMd,EACHE,MAAM,CAAC;QACNa,aAAaf,EAAEgB,IAAI,CAAC;YAAC;YAAQ;SAAO,EAAEX,QAAQ,GAAGC,QAAQ,CAAC;QAC1DW,SAASjB,EAAEI,MAAM,GAAGC,QAAQ,GAAGC,QAAQ,CAAC;IAC1C,GACCD,QAAQ;IACXa,aAAalB,EAAEI,MAAM,GAAGC,QAAQ,GAAGC,QAAQ,CAAC;IAC5Ca,YAAYnB,EAAEgB,IAAI,CAAC;QAAC;QAAO;QAAU;KAAO,EAAEX,QAAQ,GAAGC,QAAQ,CAAC;IAClEc,gBAAgBpB,EAAEqB,OAAO,GAAGhB,QAAQ,GAAGC,QAAQ,CAAC;IAChDgB,gBAAgBtB,EAAEI,MAAM,GAAGC,QAAQ,GAAGC,QAAQ,CAAC;IAC/CiB,QAAQd,gBAAgBJ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AQ;QACzBuF,OAAO5F,EAAEI,MAAM,GAAGC,QAAQ;QAC1BwF,iBAAiB7F,EAAEI,MAAM,GAAGC,QAAQ;QACpCyF,YAAY9F,EAAEI,MAAM,GAAGC,QAAQ;IACjC,GACCA,QAAQ,GACRC,QAAQ,CAAC;IACZ+I,UAAUrJ,EAAEI,MAAM,GAAGC,QAAQ,GAAGC,QAAQ,CAAC;IACzCgJ,eAAetJ,EAAEI,MAAM,GAAGC,QAAQ,GAAGC,QAAQ,CAAC;IAC9C+B,YAAYrC,EAAE0B,KAAK,CAAC1B,EAAEI,MAAM,IAAIC,QAAQ,GAAGC,QAAQ,CAAC;IACpD4B,iBAAiBlC,EAAEI,MAAM,GAAGC,QAAQ,GAAGC,QAAQ,CAAC;IAChD6B,sBAAsBnC,EAAEI,MAAM,GAAGC,QAAQ,GAAGC,QAAQ,CAAC;IACrD8B,WAAWpC,EAAEI,MAAM,GAAGC,QAAQ,GAAGC,QAAQ,CAAC;IAC1CgB,gBAAgBtB,EAAEI,MAAM,GAAGC,QAAQ,GAAGC,QAAQ,CAAC;AACjD,GAAG"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/open-source/ai/mcp-z/mcp-outlook/src/schemas/outlook-validation.ts"],"sourcesContent":["import { z } from 'zod';\n\n// Base schemas for common Microsoft types\nexport const EmailAddressSchema = z.object({\n name: z.string().optional().describe('Display name of the recipient'),\n address: z.string().email().describe('Email address'),\n});\n\nexport const RecipientSchema = z.object({\n emailAddress: EmailAddressSchema,\n});\n\n// Outlook Message schema based on Microsoft Graph API\nexport const OutlookMessageSchema = z.object({\n id: z.string().optional().describe('Unique identifier for the message'),\n subject: z.string().optional().describe('Subject of the email message'),\n body: z\n .object({\n contentType: z.enum(['text', 'html']).optional().describe('Content type of the body'),\n content: z.string().optional().describe('Body content of the message'),\n })\n .optional(),\n bodyPreview: z.string().optional().describe('First 255 characters of the message body'),\n importance: z.enum(['low', 'normal', 'high']).optional().describe('Importance level of the message'),\n hasAttachments: z.boolean().optional().describe('Indicates whether the message has attachments'),\n parentFolderId: z.string().optional().describe('ID of the parent folder'),\n sender: RecipientSchema.optional().describe('Account used to send the message'),\n from: RecipientSchema.optional().describe('Sender of the message'),\n toRecipients: z.array(RecipientSchema).optional().describe('To recipients of the message'),\n ccRecipients: z.array(RecipientSchema).optional().describe('CC recipients of the message'),\n bccRecipients: z.array(RecipientSchema).optional().describe('BCC recipients of the message'),\n replyTo: z.array(RecipientSchema).optional().describe('Reply-to recipients'),\n conversationId: z.string().optional().describe('ID of the conversation the email belongs to'),\n conversationIndex: z.string().optional().describe('Index for conversation threading'),\n receivedDateTime: z.string().optional().describe('ISO datetime when message was received'),\n sentDateTime: z.string().optional().describe('ISO datetime when message was sent'),\n createdDateTime: z.string().optional().describe('ISO datetime when message was created'),\n lastModifiedDateTime: z.string().optional().describe('ISO datetime when message was last modified'),\n changeKey: z.string().optional().describe('Version of the message'),\n categories: z.array(z.string()).optional().describe('Categories associated with the message'),\n isDeliveryReceiptRequested: z.boolean().optional().describe('Whether delivery receipt is requested'),\n isReadReceiptRequested: z.boolean().optional().describe('Whether read receipt is requested'),\n isRead: z.boolean().optional().describe('Whether the message has been read'),\n isDraft: z.boolean().optional().describe('Whether the message is a draft'),\n webLink: z.string().optional().describe('URL to open the message in Outlook on the web'),\n inferenceClassification: z.enum(['focused', 'other']).optional().describe('Classification for focused inbox'),\n flag: z\n .object({\n flagStatus: z.enum(['notFlagged', 'complete', 'flagged']).describe('Status of the flag'),\n startDateTime: z.string().optional().describe('Start date for the flag'),\n dueDateTime: z.string().optional().describe('Due date for the flag'),\n })\n .optional()\n .describe('Flag information for the message'),\n});\n\n// Outlook Folder schema\nexport const OutlookFolderSchema = z.object({\n id: z.string().optional().describe('Unique identifier for the folder'),\n displayName: z.string().optional().describe('Display name of the folder'),\n parentFolderId: z.string().optional().describe('ID of the parent folder'),\n childFolderCount: z.number().optional().describe('Number of immediate child folders'),\n unreadItemCount: z.number().optional().describe('Number of unread items in the folder'),\n totalItemCount: z.number().optional().describe('Total number of items in the folder'),\n sizeInBytes: z.number().optional().describe('Size of the folder in bytes'),\n isHidden: z.boolean().optional().describe('Whether the folder is hidden'),\n wellKnownName: z\n .enum(['archive', 'clutter', 'conflicts', 'conversationhistory', 'deleteditems', 'drafts', 'inbox', 'junkemail', 'localfailures', 'msgfolderroot', 'outbox', 'recoverableitemsdeletions', 'scheduled', 'searchfolders', 'sentitems', 'serverfailures', 'syncissues'])\n .optional()\n .describe('Well-known folder name if applicable'),\n});\n\n// Outlook Attachment schema\nexport const OutlookAttachmentSchema = z.object({\n id: z.string().optional().describe('Unique identifier for the attachment'),\n name: z.string().optional().describe('Name of the attachment'),\n contentType: z.string().optional().describe('MIME type of the attachment'),\n size: z.number().optional().describe('Size of the attachment in bytes'),\n isInline: z.boolean().optional().describe('Whether the attachment is inline'),\n lastModifiedDateTime: z.string().optional().describe('ISO datetime when attachment was last modified'),\n contentId: z.string().optional().describe('Content ID for inline attachments'),\n contentLocation: z.string().optional().describe('Content location for inline attachments'),\n contentBytes: z.string().optional().describe('Base64-encoded content of the attachment'),\n});\n\n// OneDrive file schema (subset of Microsoft Graph DriveItem)\nexport const OneDriveFileSchema = z.object({\n id: z.string().optional().describe('Unique identifier for the file'),\n name: z.string().optional().describe('Name of the file'),\n size: z.number().optional().describe('Size of the file in bytes'),\n createdDateTime: z.string().optional().describe('ISO datetime when file was created'),\n lastModifiedDateTime: z.string().optional().describe('ISO datetime when file was last modified'),\n webUrl: z.string().optional().describe('URL to view the file in OneDrive'),\n downloadUrl: z.string().optional().describe('Direct download URL for the file'),\n parentReference: z\n .object({\n driveId: z.string().optional().describe('ID of the drive containing the file'),\n driveType: z.enum(['personal', 'business', 'documentLibrary']).optional().describe('Type of drive'),\n id: z.string().optional().describe('ID of the parent folder'),\n name: z.string().optional().describe('Name of the parent folder'),\n path: z.string().optional().describe('Path to the parent folder'),\n })\n .optional()\n .describe('Reference to the parent folder'),\n file: z\n .object({\n mimeType: z.string().optional().describe('MIME type of the file'),\n hashes: z\n .object({\n quickXorHash: z.string().optional().describe('QuickXorHash of the file'),\n sha1Hash: z.string().optional().describe('SHA1 hash of the file'),\n sha256Hash: z.string().optional().describe('SHA256 hash of the file'),\n })\n .optional()\n .describe('Hash values for the file'),\n })\n .optional()\n .describe('File-specific properties'),\n folder: z\n .object({\n childCount: z.number().optional().describe('Number of children in the folder'),\n })\n .optional()\n .describe('Folder-specific properties (present if item is a folder)'),\n shared: z\n .object({\n scope: z.enum(['anonymous', 'organization', 'users']).optional().describe('Scope of sharing'),\n owner: z\n .object({\n user: z\n .object({\n displayName: z.string().optional(),\n id: z.string().optional(),\n })\n .optional(),\n })\n .optional(),\n })\n .optional()\n .describe('Sharing information'),\n createdBy: z\n .object({\n user: z\n .object({\n displayName: z.string().optional(),\n id: z.string().optional(),\n })\n .optional(),\n })\n .optional()\n .describe('User who created the file'),\n lastModifiedBy: z\n .object({\n user: z\n .object({\n displayName: z.string().optional(),\n id: z.string().optional(),\n })\n .optional(),\n })\n .optional()\n .describe('User who last modified the file'),\n});\n\n// Microsoft Calendar Event schema\nexport const OutlookCalendarEventSchema = z.object({\n id: z.string().optional().describe('Unique identifier for the event'),\n subject: z.string().optional().describe('Subject of the event'),\n body: z\n .object({\n contentType: z.enum(['text', 'html']).optional().describe('Content type of the body'),\n content: z.string().optional().describe('Body content of the event'),\n })\n .optional(),\n start: z\n .object({\n dateTime: z.string().describe('Start date and time in ISO format'),\n timeZone: z.string().optional().describe('Time zone for the start time'),\n })\n .optional()\n .describe('Start time of the event'),\n end: z\n .object({\n dateTime: z.string().describe('End date and time in ISO format'),\n timeZone: z.string().optional().describe('Time zone for the end time'),\n })\n .optional()\n .describe('End time of the event'),\n location: z\n .object({\n displayName: z.string().optional().describe('Display name of the location'),\n address: z\n .object({\n street: z.string().optional(),\n city: z.string().optional(),\n state: z.string().optional(),\n countryOrRegion: z.string().optional(),\n postalCode: z.string().optional(),\n })\n .optional(),\n coordinates: z\n .object({\n latitude: z.number().optional(),\n longitude: z.number().optional(),\n })\n .optional(),\n })\n .optional()\n .describe('Location of the event'),\n attendees: z\n .array(\n z.object({\n type: z.enum(['required', 'optional', 'resource']).optional().describe('Type of attendee'),\n status: z\n .object({\n response: z.enum(['none', 'organizer', 'tentativelyAccepted', 'accepted', 'declined', 'notResponded']).optional(),\n time: z.string().optional().describe('Time when response was given'),\n })\n .optional(),\n emailAddress: EmailAddressSchema.optional(),\n })\n )\n .optional()\n .describe('Attendees of the event'),\n organizer: z\n .object({\n emailAddress: EmailAddressSchema.optional(),\n })\n .optional()\n .describe('Organizer of the event'),\n recurrence: z\n .object({\n pattern: z\n .object({\n type: z.enum(['daily', 'weekly', 'absoluteMonthly', 'relativeMonthly', 'absoluteYearly', 'relativeYearly']).describe('Recurrence pattern type'),\n interval: z.number().describe('Interval between occurrences'),\n month: z.number().optional().describe('Month for yearly recurrence'),\n dayOfMonth: z.number().optional().describe('Day of month for monthly recurrence'),\n daysOfWeek: z.array(z.enum(['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday'])).optional(),\n firstDayOfWeek: z.enum(['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday']).optional(),\n index: z.enum(['first', 'second', 'third', 'fourth', 'last']).optional(),\n })\n .describe('Recurrence pattern'),\n range: z\n .object({\n type: z.enum(['endDate', 'noEnd', 'numbered']).describe('Type of recurrence range'),\n startDate: z.string().describe('Start date for recurrence'),\n endDate: z.string().optional().describe('End date for recurrence'),\n numberOfOccurrences: z.number().optional().describe('Number of occurrences'),\n })\n .describe('Recurrence range'),\n })\n .optional()\n .describe('Recurrence pattern for the event'),\n isAllDay: z.boolean().optional().describe('Whether the event is an all-day event'),\n showAs: z.enum(['free', 'tentative', 'busy', 'oof', 'workingElsewhere', 'unknown']).optional().describe('Show as status'),\n sensitivity: z.enum(['normal', 'personal', 'private', 'confidential']).optional().describe('Sensitivity level'),\n importance: z.enum(['low', 'normal', 'high']).optional().describe('Importance level'),\n reminderMinutesBeforeStart: z.number().optional().describe('Minutes before start to show reminder'),\n isReminderOn: z.boolean().optional().describe('Whether reminder is enabled'),\n hasAttachments: z.boolean().optional().describe('Whether the event has attachments'),\n webLink: z.string().optional().describe('URL to open the event in Outlook on the web'),\n onlineMeetingUrl: z.string().optional().describe('URL for online meeting'),\n isOnlineMeeting: z.boolean().optional().describe('Whether the event is an online meeting'),\n onlineMeetingProvider: z.enum(['unknown', 'skypeForBusiness', 'skypeForConsumer', 'teamsForBusiness']).optional(),\n allowNewTimeProposals: z.boolean().optional().describe('Whether attendees can propose new times'),\n hideAttendees: z.boolean().optional().describe('Whether to hide attendee list'),\n responseRequested: z.boolean().optional().describe('Whether response is requested'),\n seriesMasterId: z.string().optional().describe('ID of recurring series master'),\n isCancelled: z.boolean().optional().describe('Whether the event is cancelled'),\n isDraft: z.boolean().optional().describe('Whether the event is a draft'),\n isOrganizer: z.boolean().optional().describe('Whether current user is the organizer'),\n createdDateTime: z.string().optional().describe('ISO datetime when event was created'),\n lastModifiedDateTime: z.string().optional().describe('ISO datetime when event was last modified'),\n});\n\n// Outlook Category schema based on Microsoft Graph API\nexport const OutlookCategorySchema = z.object({\n id: z.string().describe('Unique identifier for the category'),\n displayName: z.string().describe('Display name of the category'),\n color: z\n .enum(['preset0', 'preset1', 'preset2', 'preset3', 'preset4', 'preset5', 'preset6', 'preset7', 'preset8', 'preset9', 'preset10', 'preset11', 'preset12', 'preset13', 'preset14', 'preset15', 'preset16', 'preset17', 'preset18', 'preset19', 'preset20', 'preset21', 'preset22', 'preset23', 'preset24'])\n .describe('Color preset for the category'),\n});\n\n// Microsoft Contact schema\nexport const OutlookContactSchema = z.object({\n id: z.string().optional().describe('Unique identifier for the contact'),\n displayName: z.string().optional().describe('Display name of the contact'),\n givenName: z.string().optional().describe('First name'),\n surname: z.string().optional().describe('Last name'),\n middleName: z.string().optional().describe('Middle name'),\n nickName: z.string().optional().describe('Nickname'),\n title: z.string().optional().describe('Job title'),\n companyName: z.string().optional().describe('Company name'),\n department: z.string().optional().describe('Department'),\n officeLocation: z.string().optional().describe('Office location'),\n profession: z.string().optional().describe('Profession'),\n businessPhones: z.array(z.string()).optional().describe('Business phone numbers'),\n homePhones: z.array(z.string()).optional().describe('Home phone numbers'),\n mobilePhone: z.string().optional().describe('Mobile phone number'),\n emailAddresses: z\n .array(\n z.object({\n name: z.string().optional().describe('Name for the email address'),\n address: z.string().email().describe('Email address'),\n })\n )\n .optional()\n .describe('Email addresses'),\n homeAddress: z\n .object({\n street: z.string().optional(),\n city: z.string().optional(),\n state: z.string().optional(),\n countryOrRegion: z.string().optional(),\n postalCode: z.string().optional(),\n })\n .optional()\n .describe('Home address'),\n businessAddress: z\n .object({\n street: z.string().optional(),\n city: z.string().optional(),\n state: z.string().optional(),\n countryOrRegion: z.string().optional(),\n postalCode: z.string().optional(),\n })\n .optional()\n .describe('Business address'),\n otherAddress: z\n .object({\n street: z.string().optional(),\n city: z.string().optional(),\n state: z.string().optional(),\n countryOrRegion: z.string().optional(),\n postalCode: z.string().optional(),\n })\n .optional()\n .describe('Other address'),\n birthday: z.string().optional().describe('Birthday in ISO date format'),\n personalNotes: z.string().optional().describe('Personal notes about the contact'),\n categories: z.array(z.string()).optional().describe('Categories assigned to the contact'),\n createdDateTime: z.string().optional().describe('ISO datetime when contact was created'),\n lastModifiedDateTime: z.string().optional().describe('ISO datetime when contact was last modified'),\n changeKey: z.string().optional().describe('Version of the contact'),\n parentFolderId: z.string().optional().describe('ID of the parent folder'),\n});\n\n// Export TypeScript types inferred from schemas\nexport type EmailAddress = z.infer<typeof EmailAddressSchema>;\nexport type Recipient = z.infer<typeof RecipientSchema>;\nexport type OutlookMessage = z.infer<typeof OutlookMessageSchema>;\nexport type OutlookFolder = z.infer<typeof OutlookFolderSchema>;\nexport type OutlookAttachment = z.infer<typeof OutlookAttachmentSchema>;\nexport type OneDriveFile = z.infer<typeof OneDriveFileSchema>;\nexport type OutlookCalendarEvent = z.infer<typeof OutlookCalendarEventSchema>;\nexport type OutlookContact = z.infer<typeof OutlookContactSchema>;\nexport type OutlookCategory = z.infer<typeof OutlookCategorySchema>;\n"],"names":["z","EmailAddressSchema","object","name","string","optional","describe","address","email","RecipientSchema","emailAddress","OutlookMessageSchema","id","subject","body","contentType","enum","content","bodyPreview","importance","hasAttachments","boolean","parentFolderId","sender","from","toRecipients","array","ccRecipients","bccRecipients","replyTo","conversationId","conversationIndex","receivedDateTime","sentDateTime","createdDateTime","lastModifiedDateTime","changeKey","categories","isDeliveryReceiptRequested","isReadReceiptRequested","isRead","isDraft","webLink","inferenceClassification","flag","flagStatus","startDateTime","dueDateTime","OutlookFolderSchema","displayName","childFolderCount","number","unreadItemCount","totalItemCount","sizeInBytes","isHidden","wellKnownName","OutlookAttachmentSchema","size","isInline","contentId","contentLocation","contentBytes","OneDriveFileSchema","webUrl","downloadUrl","parentReference","driveId","driveType","path","file","mimeType","hashes","quickXorHash","sha1Hash","sha256Hash","folder","childCount","shared","scope","owner","user","createdBy","lastModifiedBy","OutlookCalendarEventSchema","start","dateTime","timeZone","end","location","street","city","state","countryOrRegion","postalCode","coordinates","latitude","longitude","attendees","type","status","response","time","organizer","recurrence","pattern","interval","month","dayOfMonth","daysOfWeek","firstDayOfWeek","index","range","startDate","endDate","numberOfOccurrences","isAllDay","showAs","sensitivity","reminderMinutesBeforeStart","isReminderOn","onlineMeetingUrl","isOnlineMeeting","onlineMeetingProvider","allowNewTimeProposals","hideAttendees","responseRequested","seriesMasterId","isCancelled","isOrganizer","OutlookCategorySchema","color","OutlookContactSchema","givenName","surname","middleName","nickName","title","companyName","department","officeLocation","profession","businessPhones","homePhones","mobilePhone","emailAddresses","homeAddress","businessAddress","otherAddress","birthday","personalNotes"],"mappings":"AAAA,SAASA,CAAC,QAAQ,MAAM;AAExB,0CAA0C;AAC1C,OAAO,MAAMC,qBAAqBD,EAAEE,MAAM,CAAC;IACzCC,MAAMH,EAAEI,MAAM,GAAGC,QAAQ,GAAGC,QAAQ,CAAC;IACrCC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QAAQ,GAAGC,QAAQ,CAAC;IACpD4B,iBAAiBlC,EAAEI,MAAM,GAAGC,QAAQ,GAAGC,QAAQ,CAAC;IAChD6B,sBAAsBnC,EAAEI,MAAM,GAAGC,QAAQ,GAAGC,QAAQ,CAAC;IACrD8B,WAAWpC,EAAEI,MAAM,GAAGC,QAAQ,GAAGC,QAAQ,CAAC;IAC1CgB,gBAAgBtB,EAAEI,MAAM,GAAGC,QAAQ,GAAGC,QAAQ,CAAC;AACjD,GAAG"}
@@ -1,3 +1,4 @@
1
+ import { fileURLToPath, pathToFileURL } from 'node:url';
1
2
  import { Module } from 'module';
2
3
  import { homedir } from 'os';
3
4
  import * as path from 'path';
@@ -120,10 +121,10 @@ function normalizeResourceStoreUri(resourceStoreUri) {
120
121
  const filePrefix = 'file://';
121
122
  if (resourceStoreUri.startsWith(filePrefix)) {
122
123
  const rawPath = resourceStoreUri.slice(filePrefix.length);
123
- const expandedPath = rawPath.startsWith('~') ? rawPath.replace(/^~/, homedir()) : rawPath;
124
- return `${filePrefix}${path.resolve(expandedPath)}`;
124
+ const filePath = rawPath.startsWith('~') ? rawPath.replace(/^~/, homedir()) : rawPath.startsWith('/') ? fileURLToPath(resourceStoreUri) : rawPath;
125
+ return pathToFileURL(path.resolve(filePath)).href;
125
126
  }
126
127
  if (resourceStoreUri.includes('://')) return resourceStoreUri;
127
128
  const expandedPath = resourceStoreUri.startsWith('~') ? resourceStoreUri.replace(/^~/, homedir()) : resourceStoreUri;
128
- return `${filePrefix}${path.resolve(expandedPath)}`;
129
+ return pathToFileURL(path.resolve(expandedPath)).href;
129
130
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/kevin/Dev/OpenSource/ai/mcp-z/mcp-outlook/src/setup/config.ts"],"sourcesContent":["import type * as OAuthMicrosoft from '@mcp-z/oauth-microsoft';\nimport type * as McpServer from '@mcp-z/server';\nimport { Module } from 'module';\nimport { homedir } from 'os';\nimport * as path from 'path';\nimport { parseArgs } from 'util';\nimport { MS_SCOPE } from '../constants.ts';\nimport type { ServerConfig } from '../types.ts';\nimport { readPkg } from './version-help.ts';\n\nconst pkg = readPkg();\n\n// @mcp-z/oauth-microsoft and @mcp-z/server are requireable at the >=20 floor; deferred so\n// --version/--help (handled via version-help.ts, never this file) load neither package.\nconst _require = typeof require === 'undefined' ? Module.createRequire(import.meta.url) : require;\n\n/**\n * Parse Outlook server configuration from CLI arguments and environment.\n *\n * CLI Arguments (all optional):\n * - --auth=<mode> Authentication mode (default: loopback-oauth)\n * Modes: loopback-oauth, device-code, dcr\n * - --headless Disable browser auto-open, return auth URL instead\n * - --redirect-uri=<uri> OAuth redirect URI (default: ephemeral loopback)\n * - --tenant-id=<id> Microsoft tenant ID (overrides MS_TENANT_ID env var)\n * - --dcr-mode=<mode> DCR mode (self-hosted or external, default: self-hosted)\n * - --dcr-verify-url=<url> External verification endpoint (required for external mode)\n * - --dcr-store-uri=<uri> DCR client storage URI (required for self-hosted mode)\n * - --port=<port> Enable HTTP transport on specified port\n * - --stdio Enable stdio transport (default if no port)\n * - --log-level=<level> Logging level (default: info)\n * - --resource-store-uri=<uri> Resource store URI for CSV file storage (default: file://~/.mcp-z/mcp-outlook/files)\n * - --base-url=<url> Base URL for HTTP file serving (default: http://localhost for HTTP transports)\n *\n * Environment Variables:\n * - MS_CLIENT_ID OAuth client ID (REQUIRED)\n * - MS_TENANT_ID Microsoft tenant ID (REQUIRED)\n * - MS_CLIENT_SECRET OAuth client secret (optional)\n * - AUTH_MODE Default authentication mode (optional)\n * - HEADLESS Disable browser auto-open (optional)\n * - DCR_MODE DCR mode (optional, same format as --dcr-mode)\n * - DCR_VERIFY_URL External verification URL (optional, same as --dcr-verify-url)\n * - DCR_STORE_URI DCR storage URI (optional, same as --dcr-store-uri)\n * - TOKEN_STORE_URI Token storage URI (optional)\n * - PORT Default HTTP port (optional)\n * - LOG_LEVEL Default logging level (optional)\n * - RESOURCE_STORE_URI Resource store URI (optional, file://)\n * - BASE_URL Base URL for HTTP file serving (optional)\n *\n * OAuth Scopes (from constants.ts):\n * openid profile offline_access https://graph.microsoft.com/User.Read https://graph.microsoft.com/Mail.ReadWrite https://graph.microsoft.com/Mail.Send https://graph.microsoft.com/MailboxSettings.ReadWrite\n */\nexport function parseConfig(args: string[], env: Record<string, string | undefined>): ServerConfig {\n const oauthMicrosoft = _require('@mcp-z/oauth-microsoft') as typeof OAuthMicrosoft;\n const mcpServer = _require('@mcp-z/server') as typeof McpServer;\n\n const transportConfig = mcpServer.parseConfig(args, env);\n const oauthConfig = oauthMicrosoft.parseConfig(args, env);\n\n // Parse DCR configuration if DCR mode is enabled\n const dcrConfig = oauthConfig.auth === 'dcr' ? oauthMicrosoft.parseDcrConfig(args, env, MS_SCOPE) : undefined;\n\n // Parse application-level config (LOG_LEVEL, RESOURCE_STORE_URI, BASE_URL)\n const { values } = parseArgs({\n args,\n options: {\n 'log-level': { type: 'string' },\n 'base-url': { type: 'string' },\n 'resource-store-uri': { type: 'string' },\n },\n strict: false, // Allow other arguments\n allowPositionals: true,\n });\n\n const name = pkg.name.replace(/^@[^/]+\\//, '');\n // Parse repository URL from package.json, stripping git+ prefix and .git suffix\n const rawRepoUrl = typeof pkg.repository === 'object' ? pkg.repository.url : pkg.repository;\n const repositoryUrl = rawRepoUrl?.replace(/^git\\+/, '').replace(/\\.git$/, '') ?? `https://github.com/mcp-z/${name}`;\n let rootDir = homedir();\n try {\n const configPath = mcpServer.findConfigPath({ config: '.mcp.json', cwd: process.cwd(), stopDir: homedir() });\n rootDir = path.dirname(configPath);\n } catch {\n rootDir = homedir();\n }\n const baseDir = path.join(rootDir, '.mcp-z');\n const cliLogLevel = typeof values['log-level'] === 'string' ? values['log-level'] : undefined;\n const envLogLevel = env.LOG_LEVEL;\n const logLevel = cliLogLevel ?? envLogLevel ?? 'info';\n\n // Parse file storage configuration\n const cliResourceStoreUri = typeof values['resource-store-uri'] === 'string' ? values['resource-store-uri'] : undefined;\n const envResourceStoreUri = env.RESOURCE_STORE_URI;\n const defaultResourceStorePath = path.join(baseDir, name, 'files');\n const resourceStoreUri = normalizeResourceStoreUri(cliResourceStoreUri ?? envResourceStoreUri ?? defaultResourceStorePath);\n\n const cliBaseUrl = typeof values['base-url'] === 'string' ? values['base-url'] : undefined;\n const envBaseUrl = env.BASE_URL;\n const baseUrl = cliBaseUrl ?? envBaseUrl;\n\n // Combine configs\n const result: ServerConfig = {\n ...oauthConfig, // Includes clientId, auth, headless, redirectUri\n transport: transportConfig.transport,\n logLevel,\n baseDir,\n name,\n version: pkg.version,\n repositoryUrl,\n resourceStoreUri,\n };\n if (baseUrl !== undefined) result.baseUrl = baseUrl;\n if (dcrConfig !== undefined) result.dcrConfig = dcrConfig;\n return result;\n}\n\n/**\n * Build production configuration from process globals.\n * Entry point for production server.\n */\nexport function createConfig(): ServerConfig {\n return parseConfig(process.argv, process.env);\n}\n\nfunction normalizeResourceStoreUri(resourceStoreUri: string): string {\n const filePrefix = 'file://';\n if (resourceStoreUri.startsWith(filePrefix)) {\n const rawPath = resourceStoreUri.slice(filePrefix.length);\n const expandedPath = rawPath.startsWith('~') ? rawPath.replace(/^~/, homedir()) : rawPath;\n return `${filePrefix}${path.resolve(expandedPath)}`;\n }\n\n if (resourceStoreUri.includes('://')) return resourceStoreUri;\n\n const expandedPath = resourceStoreUri.startsWith('~') ? resourceStoreUri.replace(/^~/, homedir()) : resourceStoreUri;\n return `${filePrefix}${path.resolve(expandedPath)}`;\n}\n"],"names":["Module","homedir","path","parseArgs","MS_SCOPE","readPkg","pkg","_require","require","createRequire","url","parseConfig","args","env","cliLogLevel","cliResourceStoreUri","oauthMicrosoft","mcpServer","transportConfig","oauthConfig","dcrConfig","auth","parseDcrConfig","undefined","values","options","type","strict","allowPositionals","name","replace","rawRepoUrl","repository","repositoryUrl","rootDir","configPath","findConfigPath","config","cwd","process","stopDir","dirname","baseDir","join","envLogLevel","LOG_LEVEL","logLevel","envResourceStoreUri","RESOURCE_STORE_URI","defaultResourceStorePath","resourceStoreUri","normalizeResourceStoreUri","cliBaseUrl","envBaseUrl","BASE_URL","baseUrl","result","transport","version","createConfig","argv","filePrefix","startsWith","rawPath","slice","length","expandedPath","resolve","includes"],"mappings":"AAEA,SAASA,MAAM,QAAQ,SAAS;AAChC,SAASC,OAAO,QAAQ,KAAK;AAC7B,YAAYC,UAAU,OAAO;AAC7B,SAASC,SAAS,QAAQ,OAAO;AACjC,SAASC,QAAQ,QAAQ,kBAAkB;AAE3C,SAASC,OAAO,QAAQ,oBAAoB;AAE5C,MAAMC,MAAMD;AAEZ,0FAA0F;AAC1F,wFAAwF;AACxF,MAAME,WAAW,OAAOC,YAAY,cAAcR,OAAOS,aAAa,CAAC,YAAYC,GAAG,IAAIF;AAE1F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmCC,GACD,OAAO,SAASG,YAAYC,IAAc,EAAEC,GAAuC;cAoChEC,OAMkCC;IAzCnD,MAAMC,iBAAiBT,SAAS;IAChC,MAAMU,YAAYV,SAAS;IAE3B,MAAMW,kBAAkBD,UAAUN,WAAW,CAACC,MAAMC;IACpD,MAAMM,cAAcH,eAAeL,WAAW,CAACC,MAAMC;IAErD,iDAAiD;IACjD,MAAMO,YAAYD,YAAYE,IAAI,KAAK,QAAQL,eAAeM,cAAc,CAACV,MAAMC,KAAKT,YAAYmB;IAEpG,2EAA2E;IAC3E,MAAM,EAAEC,MAAM,EAAE,GAAGrB,UAAU;QAC3BS;QACAa,SAAS;YACP,aAAa;gBAAEC,MAAM;YAAS;YAC9B,YAAY;gBAAEA,MAAM;YAAS;YAC7B,sBAAsB;gBAAEA,MAAM;YAAS;QACzC;QACAC,QAAQ;QACRC,kBAAkB;IACpB;IAEA,MAAMC,OAAOvB,IAAIuB,IAAI,CAACC,OAAO,CAAC,aAAa;IAC3C,gFAAgF;IAChF,MAAMC,aAAa,OAAOzB,IAAI0B,UAAU,KAAK,WAAW1B,IAAI0B,UAAU,CAACtB,GAAG,GAAGJ,IAAI0B,UAAU;IAC3F,MAAMC,w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,OAAOD,OAAO,GAAGA;IAC5C,IAAInC,cAAcG,WAAWiC,OAAOpC,SAAS,GAAGA;IAChD,OAAOoC;AACT;AAEA;;;CAGC,GACD,OAAO,SAASG;IACd,OAAOhD,YAAY4B,QAAQqB,IAAI,EAAErB,QAAQ1B,GAAG;AAC9C;AAEA,SAASsC,0BAA0BD,gBAAwB;IACzD,MAAMW,aAAa;IACnB,IAAIX,iBAAiBY,UAAU,CAACD,aAAa;QAC3C,MAAME,UAAUb,iBAAiBc,KAAK,CAACH,WAAWI,MAAM;QACxD,MAAMC,eAAeH,QAAQD,UAAU,CAAC,OAAOC,QAAQjC,OAAO,CAAC,MAAM7B,aAAa8D;QAClF,OAAO,GAAGF,aAAa3D,KAAKiE,OAAO,CAACD,eAAe;IACrD;IAEA,IAAIhB,iBAAiBkB,QAAQ,CAAC,QAAQ,OAAOlB;IAE7C,MAAMgB,eAAehB,iBAAiBY,UAAU,CAAC,OAAOZ,iBAAiBpB,OAAO,CAAC,MAAM7B,aAAaiD;IACpG,OAAO,GAAGW,aAAa3D,KAAKiE,OAAO,CAACD,eAAe;AACrD"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/open-source/ai/mcp-z/mcp-outlook/src/setup/config.ts"],"sourcesContent":["import { fileURLToPath, pathToFileURL } from 'node:url';\nimport type * as OAuthMicrosoft from '@mcp-z/oauth-microsoft';\nimport type * as McpServer from '@mcp-z/server';\nimport { Module } from 'module';\nimport { homedir } from 'os';\nimport * as path from 'path';\nimport { parseArgs } from 'util';\nimport { MS_SCOPE } from '../constants.ts';\nimport type { ServerConfig } from '../types.ts';\nimport { readPkg } from './version-help.ts';\n\nconst pkg = readPkg();\n\n// @mcp-z/oauth-microsoft and @mcp-z/server are requireable at the >=20 floor; deferred so\n// --version/--help (handled via version-help.ts, never this file) load neither package.\nconst _require = typeof require === 'undefined' ? Module.createRequire(import.meta.url) : require;\n\n/**\n * Parse Outlook server configuration from CLI arguments and environment.\n *\n * CLI Arguments (all optional):\n * - --auth=<mode> Authentication mode (default: loopback-oauth)\n * Modes: loopback-oauth, device-code, dcr\n * - --headless Disable browser auto-open, return auth URL instead\n * - --redirect-uri=<uri> OAuth redirect URI (default: ephemeral loopback)\n * - --tenant-id=<id> Microsoft tenant ID (overrides MS_TENANT_ID env var)\n * - --dcr-mode=<mode> DCR mode (self-hosted or external, default: self-hosted)\n * - --dcr-verify-url=<url> External verification endpoint (required for external mode)\n * - --dcr-store-uri=<uri> DCR client storage URI (required for self-hosted mode)\n * - --port=<port> Enable HTTP transport on specified port\n * - --stdio Enable stdio transport (default if no port)\n * - --log-level=<level> Logging level (default: info)\n * - --resource-store-uri=<uri> Resource store URI for CSV file storage (default: file://~/.mcp-z/mcp-outlook/files)\n * - --base-url=<url> Base URL for HTTP file serving (default: http://localhost for HTTP transports)\n *\n * Environment Variables:\n * - MS_CLIENT_ID OAuth client ID (REQUIRED)\n * - MS_TENANT_ID Microsoft tenant ID (REQUIRED)\n * - MS_CLIENT_SECRET OAuth client secret (optional)\n * - AUTH_MODE Default authentication mode (optional)\n * - HEADLESS Disable browser auto-open (optional)\n * - DCR_MODE DCR mode (optional, same format as --dcr-mode)\n * - DCR_VERIFY_URL External verification URL (optional, same as --dcr-verify-url)\n * - DCR_STORE_URI DCR storage URI (optional, same as --dcr-store-uri)\n * - TOKEN_STORE_URI Token storage URI (optional)\n * - PORT Default HTTP port (optional)\n * - LOG_LEVEL Default logging level (optional)\n * - RESOURCE_STORE_URI Resource store URI (optional, file://)\n * - BASE_URL Base URL for HTTP file serving (optional)\n *\n * OAuth Scopes (from constants.ts):\n * openid profile offline_access https://graph.microsoft.com/User.Read https://graph.microsoft.com/Mail.ReadWrite https://graph.microsoft.com/Mail.Send https://graph.microsoft.com/MailboxSettings.ReadWrite\n */\nexport function parseConfig(args: string[], env: Record<string, string | undefined>): ServerConfig {\n const oauthMicrosoft = _require('@mcp-z/oauth-microsoft') as typeof OAuthMicrosoft;\n const mcpServer = _require('@mcp-z/server') as typeof McpServer;\n\n const transportConfig = mcpServer.parseConfig(args, env);\n const oauthConfig = oauthMicrosoft.parseConfig(args, env);\n\n // Parse DCR configuration if DCR mode is enabled\n const dcrConfig = oauthConfig.auth === 'dcr' ? oauthMicrosoft.parseDcrConfig(args, env, MS_SCOPE) : undefined;\n\n // Parse application-level config (LOG_LEVEL, RESOURCE_STORE_URI, BASE_URL)\n const { values } = parseArgs({\n args,\n options: {\n 'log-level': { type: 'string' },\n 'base-url': { type: 'string' },\n 'resource-store-uri': { type: 'string' },\n },\n strict: false, // Allow other arguments\n allowPositionals: true,\n });\n\n const name = pkg.name.replace(/^@[^/]+\\//, '');\n // Parse repository URL from package.json, stripping git+ prefix and .git suffix\n const rawRepoUrl = typeof pkg.repository === 'object' ? pkg.repository.url : pkg.repository;\n const repositoryUrl = rawRepoUrl?.replace(/^git\\+/, '').replace(/\\.git$/, '') ?? `https://github.com/mcp-z/${name}`;\n let rootDir = homedir();\n try {\n const configPath = mcpServer.findConfigPath({ config: '.mcp.json', cwd: process.cwd(), stopDir: homedir() });\n rootDir = path.dirname(configPath);\n } catch {\n rootDir = homedir();\n }\n const baseDir = path.join(rootDir, '.mcp-z');\n const cliLogLevel = typeof values['log-level'] === 'string' ? values['log-level'] : undefined;\n const envLogLevel = env.LOG_LEVEL;\n const logLevel = cliLogLevel ?? envLogLevel ?? 'info';\n\n // Parse file storage configuration\n const cliResourceStoreUri = typeof values['resource-store-uri'] === 'string' ? values['resource-store-uri'] : undefined;\n const envResourceStoreUri = env.RESOURCE_STORE_URI;\n const defaultResourceStorePath = path.join(baseDir, name, 'files');\n const resourceStoreUri = normalizeResourceStoreUri(cliResourceStoreUri ?? envResourceStoreUri ?? defaultResourceStorePath);\n\n const cliBaseUrl = typeof values['base-url'] === 'string' ? values['base-url'] : undefined;\n const envBaseUrl = env.BASE_URL;\n const baseUrl = cliBaseUrl ?? envBaseUrl;\n\n // Combine configs\n const result: ServerConfig = {\n ...oauthConfig, // Includes clientId, auth, headless, redirectUri\n transport: transportConfig.transport,\n logLevel,\n baseDir,\n name,\n version: pkg.version,\n repositoryUrl,\n resourceStoreUri,\n };\n if (baseUrl !== undefined) result.baseUrl = baseUrl;\n if (dcrConfig !== undefined) result.dcrConfig = dcrConfig;\n return result;\n}\n\n/**\n * Build production configuration from process globals.\n * Entry point for production server.\n */\nexport function createConfig(): ServerConfig {\n return parseConfig(process.argv, process.env);\n}\n\nfunction normalizeResourceStoreUri(resourceStoreUri: string): string {\n const filePrefix = 'file://';\n if (resourceStoreUri.startsWith(filePrefix)) {\n const rawPath = resourceStoreUri.slice(filePrefix.length);\n const filePath = rawPath.startsWith('~') ? rawPath.replace(/^~/, homedir()) : rawPath.startsWith('/') ? fileURLToPath(resourceStoreUri) : rawPath;\n return pathToFileURL(path.resolve(filePath)).href;\n }\n\n if (resourceStoreUri.includes('://')) return resourceStoreUri;\n\n const expandedPath = resourceStoreUri.startsWith('~') ? resourceStoreUri.replace(/^~/, homedir()) : resourceStoreUri;\n return pathToFileURL(path.resolve(expandedPath)).href;\n}\n"],"names":["fileURLToPath","pathToFileURL","Module","homedir","path","parseArgs","MS_SCOPE","readPkg","pkg","_require","require","createRequire","url","parseConfig","args","env","cliLogLevel","cliResourceStoreUri","oauthMicrosoft","mcpServer","transportConfig","oauthConfig","dcrConfig","auth","parseDcrConfig","undefined","values","options","type","strict","allowPositionals","name","replace","rawRepoUrl","repository","repositoryUrl","rootDir","configPath","findConfigPath","config","cwd","process","stopDir","dirname","baseDir","join","envLogLevel","LOG_LEVEL","logLevel","envResourceStoreUri","RESOURCE_STORE_URI","defaultResourceStorePath","resourceStoreUri","normalizeResourceStoreUri","cliBaseUrl","envBaseUrl","BASE_URL","baseUrl","result","transport","version","createConfig","argv","filePrefix","startsWith","rawPath","slice","length","filePath","resolve","href","includes","expandedPath"],"mappings":"AAAA,SAASA,aAAa,EAAEC,aAAa,QAAQ,WAAW;AAGxD,SAASC,MAAM,QAAQ,SAAS;AAChC,SAASC,OAAO,QAAQ,KAAK;AAC7B,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;AAC9C;AAEA,SAASsC,0BAA0BD,gBAAwB;IACzD,MAAMW,aAAa;IACnB,IAAIX,iBAAiBY,UAAU,CAACD,aAAa;QAC3C,MAAME,UAAUb,iBAAiBc,KAAK,CAACH,WAAWI,MAAM;QACxD,MAAMC,WAAWH,QAAQD,UAAU,CAAC,OAAOC,QAAQjC,OAAO,CAAC,MAAM7B,aAAa8D,QAAQD,UAAU,CAAC,OAAOhE,cAAcoD,oBAAoBa;QAC1I,OAAOhE,cAAcG,KAAKiE,OAAO,CAACD,WAAWE,IAAI;IACnD;IAEA,IAAIlB,iBAAiBmB,QAAQ,CAAC,QAAQ,OAAOnB;IAE7C,MAAMoB,eAAepB,iBAAiBY,UAAU,CAAC,OAAOZ,iBAAiBpB,OAAO,CAAC,MAAM7B,aAAaiD;IACpG,OAAOnD,cAAcG,KAAKiE,OAAO,CAACG,eAAeF,IAAI;AACvD"}
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/kevin/Dev/OpenSource/ai/mcp-z/mcp-outlook/src/setup/http.ts"],"sourcesContent":["import { composeMiddleware, connectHttp, createFileServingRouter, defaultCacheHints, McpServer, registerPrompts, registerResources, registerTools } from '@mcp-z/server';\nimport cors from 'cors';\nimport express from 'express';\nimport type { RuntimeOverrides, ServerConfig } from '../types.ts';\nimport { createDefaultRuntime } from './runtime.ts';\n\nexport async function createHTTPServer(config: ServerConfig, overrides?: RuntimeOverrides) {\n const runtime = await createDefaultRuntime(config, overrides);\n const modules = runtime.createDomainModules();\n const layers = runtime.middlewareFactories.map((factory) => factory(runtime.deps));\n const composed = composeMiddleware(modules, layers);\n const logger = runtime.deps.logger;\n const port = config.transport.port;\n if (!port) throw new Error('Port is required for HTTP transport');\n\n const tools = [...composed.tools, ...runtime.deps.oauthAdapters.accountTools];\n const filteredTools =\n config.auth === 'dcr'\n ? tools.filter((tool) => tool.name !== 'messages-export-csv') // No file storage in DCR (public cloud responsibility)\n : tools;\n const prompts = [...composed.prompts, ...runtime.deps.oauthAdapters.accountPrompts];\n\n // Built per request (HTTP) and per connection (stdio), not shared. The SDK caches the\n // negotiated protocol revision on the McpServer instance - its own docs say a negotiated\n // session never re-routes a method onto the other era - so one shared instance pins itself\n // to whichever revision reaches it first and answers the other with -32601.\n const buildServer = () => {\n const mcpServer = new McpServer({ name: config.name, version: config.version }, { cacheHints: defaultCacheHints });\n registerTools(mcpServer, filteredTools);\n registerResources(mcpServer, composed.resources);\n registerPrompts(mcpServer, prompts);\n return mcpServer;\n };\n\n const app = express();\n app.use(express.json({ limit: '10mb' }));\n\n // Must mount '/mcp' before any permissive app-level cors(), or that layer answers its\n // preflight first; pass baseUrl's origin/host below or a public deployment 403s itself.\n const publicUrl = config.baseUrl ? new URL(config.baseUrl) : undefined;\n logger.info(`Starting ${config.name} MCP server (http)`);\n const { close, httpServer } = await connectHttp(buildServer, {\n logger,\n app,\n port,\n allowedOrigins: publicUrl ? [publicUrl.origin] : undefined,\n allowedHosts: publicUrl ? [publicUrl.host] : undefined,\n });\n\n // The loopback OAuth callback, the file-export download, and the DCR discovery/\n // registration endpoints are all meant to be reached from a browser on another\n // origin. Keep cors() for them, scoped to their own routes - never in front of '/mcp'.\n if (runtime.deps.oauthAdapters.loopbackRouter) {\n app.use('/', cors(), runtime.deps.oauthAdapters.loopbackRouter);\n logger.info('Mounted loopback OAuth callback router');\n }\n\n if (config.auth !== 'dcr') {\n const fileRouter = createFileServingRouter({ resourceStoreUri: config.resourceStoreUri }, { contentType: 'text/csv', contentDisposition: 'attachment' });\n app.use('/files', cors(), fileRouter);\n }\n\n if (runtime.deps.oauthAdapters.dcrRouter) {\n app.use('/', cors(), runtime.deps.oauthAdapters.dcrRouter);\n logger.info('Mounted DCR router with OAuth endpoints');\n }\n\n logger.info('http transport ready');\n\n return {\n httpServer,\n logger,\n close: async () => {\n await close();\n await runtime.close();\n },\n };\n}\n"],"names":["composeMiddleware","connectHttp","createFileServingRouter","defaultCacheHints","McpServer","registerPrompts","registerResources","registerTools","cors","express","createDefaultRuntime","createHTTPServer","config","overrides","runtime","modules","createDomainModules","layers","middlewareFactories","map","factory","deps","composed","logger","port","transport","Error","tools","oauthAdapters","accountTools","filteredTools","auth","filter","tool","name","prompts","accountPrompts","buildServer","mcpServer","version","cacheHints","resources","app","use","json","limit","publicUrl","baseUrl","URL","undefined","info","close","httpServer","allowedOrigins","origin","allowedHosts","host","loopbackRouter","fileRouter","resourceStoreUri","contentType","contentDisposition","dcrRouter"],"mappings":"AAAA,SAASA,iBAAiB,EAAEC,WAAW,EAAEC,uBAAuB,EAAEC,iBAAiB,EAAEC,SAAS,EAAEC,eAAe,EAAEC,iBAAiB,EAAEC,aAAa,QAAQ,gBAAgB;AACzK,OAAOC,UAAU,OAAO;AACxB,OAAOC,aAAa,UAAU;AAE9B,SAASC,oBAAoB,QAAQ,eAAe;AAEpD,OAAO,eAAeC,iBAAiBC,MAAoB,EAAEC,SAA4B;IACvF,MAAMC,UAAU,MAAMJ,qBAAqBE,QAAQC;IACnD,MAAME,UAAUD,QAAQE,mBAAmB;IAC3C,MAAMC,SAASH,QAAQI,mBAAmB,CAACC,GAAG,CAAC,CAACC,UAAYA,QAAQN,QAAQO,IAAI;IAChF,MAAMC,WAAWtB,kBAAkBe,SAASE;IAC5C,MAAMM,SAAST,QAAQO,IAAI,CAACE,MAAM;IAClC,MAAMC,OAAOZ,OAAOa,SAAS,CAACD,IAAI;IAClC,IAAI,CAACA,MAAM,MAAM,IAAIE,MAAM;IAE3B,MAAMC,QAAQ;WAAIL,SAASK,KAAK;WAAKb,QAAQO,IAAI,CAACO,aAAa,CAACC,YAAY;KAAC;IAC7E,MAAMC,gBACJlB,OAAOmB,IAAI,KAAK,QACZJ,MAAMK,MAAM,CAAC,CAACC,OAASA,KAAKC,IAAI,KAAK,uBAAuB,uDAAuD;OACnHP;IACN,MAAMQ,UAAU;WAAIb,SAASa,OAAO;WAAKrB,QAAQO,IAAI,CAACO,aAAa,CAACQ,cAAc;KAAC;IAEnF,sFAAsF;IACtF,yFAA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5C,QAAQO,IAAI,CAACO,aAAa,CAACkC,SAAS,EAAE;QACxCpB,IAAIC,GAAG,CAAC,KAAKnC,QAAQM,QAAQO,IAAI,CAACO,aAAa,CAACkC,SAAS;QACzDvC,OAAO2B,IAAI,CAAC;IACd;IAEA3B,OAAO2B,IAAI,CAAC;IAEZ,OAAO;QACLE;QACA7B;QACA4B,OAAO;YACL,MAAMA;YACN,MAAMrC,QAAQqC,KAAK;QACrB;IACF;AACF"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/open-source/ai/mcp-z/mcp-outlook/src/setup/http.ts"],"sourcesContent":["import { composeMiddleware, connectHttp, createFileServingRouter, defaultCacheHints, McpServer, registerPrompts, registerResources, registerTools } from '@mcp-z/server';\nimport cors from 'cors';\nimport express from 'express';\nimport type { RuntimeOverrides, ServerConfig } from '../types.ts';\nimport { createDefaultRuntime } from './runtime.ts';\n\nexport async function createHTTPServer(config: ServerConfig, overrides?: RuntimeOverrides) {\n const runtime = await createDefaultRuntime(config, overrides);\n const modules = runtime.createDomainModules();\n const layers = runtime.middlewareFactories.map((factory) => factory(runtime.deps));\n const composed = composeMiddleware(modules, layers);\n const logger = runtime.deps.logger;\n const port = config.transport.port;\n if (!port) throw new Error('Port is required for HTTP transport');\n\n const tools = [...composed.tools, ...runtime.deps.oauthAdapters.accountTools];\n const filteredTools =\n config.auth === 'dcr'\n ? tools.filter((tool) => tool.name !== 'messages-export-csv') // No file storage in DCR (public cloud responsibility)\n : tools;\n const prompts = [...composed.prompts, ...runtime.deps.oauthAdapters.accountPrompts];\n\n // Built per request (HTTP) and per connection (stdio), not shared. The SDK caches the\n // negotiated protocol revision on the McpServer instance - its own docs say a negotiated\n // session never re-routes a method onto the other era - so one shared instance pins itself\n // to whichever revision reaches it first and answers the other with -32601.\n const buildServer = () => {\n const mcpServer = new McpServer({ name: config.name, version: config.version }, { cacheHints: defaultCacheHints });\n registerTools(mcpServer, filteredTools);\n registerResources(mcpServer, composed.resources);\n registerPrompts(mcpServer, prompts);\n return mcpServer;\n };\n\n const app = express();\n app.use(express.json({ limit: '10mb' }));\n\n // Must mount '/mcp' before any permissive app-level cors(), or that layer answers its\n // preflight first; pass baseUrl's origin/host below or a public deployment 403s itself.\n const publicUrl = config.baseUrl ? new URL(config.baseUrl) : undefined;\n logger.info(`Starting ${config.name} MCP server (http)`);\n const { close, httpServer } = await connectHttp(buildServer, {\n logger,\n app,\n port,\n allowedOrigins: publicUrl ? [publicUrl.origin] : undefined,\n allowedHosts: publicUrl ? [publicUrl.host] : undefined,\n });\n\n // The loopback OAuth callback, the file-export download, and the DCR discovery/\n // registration endpoints are all meant to be reached from a browser on another\n // origin. Keep cors() for them, scoped to their own routes - never in front of '/mcp'.\n if (runtime.deps.oauthAdapters.loopbackRouter) {\n app.use('/', cors(), runtime.deps.oauthAdapters.loopbackRouter);\n logger.info('Mounted loopback OAuth callback router');\n }\n\n if (config.auth !== 'dcr') {\n const fileRouter = createFileServingRouter({ resourceStoreUri: config.resourceStoreUri }, { contentType: 'text/csv', contentDisposition: 'attachment' });\n app.use('/files', cors(), fileRouter);\n }\n\n if (runtime.deps.oauthAdapters.dcrRouter) {\n app.use('/', cors(), runtime.deps.oauthAdapters.dcrRouter);\n logger.info('Mounted DCR router with OAuth endpoints');\n }\n\n logger.info('http transport ready');\n\n return {\n httpServer,\n logger,\n close: async () => {\n await close();\n await runtime.close();\n },\n };\n}\n"],"names":["composeMiddleware","connectHttp","createFileServingRouter","defaultCacheHints","McpServer","registerPrompts","registerResources","registerTools","cors","express","createDefaultRuntime","createHTTPServer","config","overrides","runtime","modules","createDomainModules","layers","middlewareFactories","map","factory","deps","composed","logger","port","transport","Error","tools","oauthAdapters","accountTools","filteredTools","auth","filter","tool","name","prompts","accountPrompts","buildServer","mcpServer","version","cacheHints","resources","app","use","json","limit","publicUrl","baseUrl","URL","undefined","info","close","httpServer","allowedOrigins","origin","allowedHosts","host","loopbackRouter","fileRouter","resourceStoreUri","contentType","contentDisposition","dcrRouter"],"mappings":"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ACF"}
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/kevin/Dev/OpenSource/ai/mcp-z/mcp-outlook/src/setup/index.ts"],"sourcesContent":["export { createConfig, parseConfig } from './config.ts';\nexport { createHTTPServer } from './http.ts';\nexport { createOAuthAdapters } from './oauth-microsoft.ts';\nexport * from './runtime.ts';\nexport { createStdioServer } from './stdio.ts';\n"],"names":["createConfig","parseConfig","createHTTPServer","createOAuthAdapters","createStdioServer"],"mappings":"AAAA,SAASA,YAAY,EAAEC,WAAW,QAAQ,cAAc;AACxD,SAASC,gBAAgB,QAAQ,YAAY;AAC7C,SAASC,mBAAmB,QAAQ,uBAAuB;AAC3D,cAAc,eAAe;AAC7B,SAASC,iBAAiB,QAAQ,aAAa"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/open-source/ai/mcp-z/mcp-outlook/src/setup/index.ts"],"sourcesContent":["export { createConfig, parseConfig } from './config.ts';\nexport { createHTTPServer } from './http.ts';\nexport { createOAuthAdapters } from './oauth-microsoft.ts';\nexport * from './runtime.ts';\nexport { createStdioServer } from './stdio.ts';\n"],"names":["createConfig","parseConfig","createHTTPServer","createOAuthAdapters","createStdioServer"],"mappings":"AAAA,SAASA,YAAY,EAAEC,WAAW,QAAQ,cAAc;AACxD,SAASC,gBAAgB,QAAQ,YAAY;AAC7C,SAASC,mBAAmB,QAAQ,uBAAuB;AAC3D,cAAc,eAAe;AAC7B,SAASC,iBAAiB,QAAQ,aAAa"}
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/kevin/Dev/OpenSource/ai/mcp-z/mcp-outlook/src/setup/oauth-microsoft.ts"],"sourcesContent":["import { type AccountAuthProvider, AccountServer } from '@mcp-z/oauth';\nimport { createDcrRouter, createLoopbackCallbackRouter, DcrOAuthProvider, DeviceCodeProvider, LoopbackOAuthProvider } from '@mcp-z/oauth-microsoft';\nimport type { Logger, PromptModule, ToolModule } from '@mcp-z/server';\nimport type { Router } from 'express';\nimport type { Keyv } from 'keyv';\nimport { MS_SCOPE } from '../constants.ts';\nimport type { ServerConfig } from '../types.ts';\n\n/**\n * Outlook OAuth runtime dependencies\n *\n * Contains the required dependencies for OAuth functionality including logger,\n * token storage, and optional DCR store.\n */\nexport interface OAuthRuntimeDeps {\n logger: Logger;\n tokenStore: Keyv<unknown>;\n dcrStore?: Keyv<unknown>;\n}\n\n/**\n * Auth middleware wrapper with withToolAuth/withResourceAuth/withPromptAuth methods\n *\n * Provides authentication middleware methods for tools, resources, and prompts.\n */\nexport interface AuthMiddleware {\n withToolAuth<T extends ToolModule>(module: T): T;\n withResourceAuth<T>(module: T): T;\n withPromptAuth<T>(module: T): T;\n}\n\n/**\n * Result of OAuth adapter creation\n *\n * Contains the primary OAuth adapter, middleware, auth adapter,\n * account tools, prompts, and optional routers.\n */\nexport interface OAuthAdapters {\n primary: LoopbackOAuthProvider | DeviceCodeProvider | DcrOAuthProvider;\n middleware: AuthMiddleware;\n authAdapter: AccountAuthProvider;\n accountTools: ToolModule[];\n accountPrompts: PromptModule[];\n dcrRouter?: Router; // DCR OAuth endpoints (only for dcr mode)\n loopbackRouter?: Router;\n}\n\n/**\n * Create Outlook OAuth adapters based on transport configuration\n *\n * Returns primary adapter, pre-configured middleware, auth email provider,\n * and pre-selected account tools based on auth mode.\n * @param config - Outlook server configuration\n * @param deps - Runtime dependencies (logger, tokenStore, etc.)\n * @returns OAuth adapters with pre-configured middleware and account tools\n */\nexport async function createOAuthAdapters(config: ServerConfig, deps: OAuthRuntimeDeps, baseUrl?: string): Promise<OAuthAdapters> {\n const { logger, tokenStore, dcrStore } = deps;\n const oauthStaticConfig = {\n service: config.name,\n clientId: config.clientId,\n clientSecret: config.clientSecret,\n scope: MS_SCOPE,\n tenantId: config.tenantId,\n auth: config.auth,\n headless: config.headless,\n redirectUri: config.transport.type === 'stdio' ? undefined : config.redirectUri,\n ...(baseUrl && { baseUrl }),\n };\n\n let primary: LoopbackOAuthProvider | DeviceCodeProvider | DcrOAuthProvider;\n\n // DCR mode - Dynamic Client Registration with HTTP-only support\n if (oauthStaticConfig.auth === 'dcr') {\n logger.debug('Creating DCR provider', { service: oauthStaticConfig.service });\n\n // DCR requires dcrStore and baseUrl\n if (!dcrStore) {\n throw new Error('DCR mode requires dcrStore to be configured');\n }\n if (!oauthStaticConfig.baseUrl) {\n throw new Error('DCR mode requires baseUrl to be configured');\n }\n\n // Create DcrOAuthProvider (stateless provider that receives tokens from verification context)\n primary = new DcrOAuthProvider({\n clientId: oauthStaticConfig.clientId,\n ...(oauthStaticConfig.clientSecret && { clientSecret: oauthStaticConfig.clientSecret }),\n tenantId: oauthStaticConfig.tenantId,\n scope: oauthStaticConfig.scope,\n verifyEndpoint: `${oauthStaticConfig.baseUrl}/oauth/verify`,\n logger,\n });\n\n // Create DCR OAuth router with authorization server endpoints\n const dcrRouter = createDcrRouter({\n store: dcrStore,\n issuerUrl: oauthStaticConfig.baseUrl,\n baseUrl: oauthStaticConfig.baseUrl,\n scopesSupported: oauthStaticConfig.scope.split(' '), // Convert space-separated scope to array\n clientConfig: {\n clientId: oauthStaticConfig.clientId,\n ...(oauthStaticConfig.clientSecret && { clientSecret: oauthStaticConfig.clientSecret }),\n tenantId: oauthStaticConfig.tenantId,\n },\n });\n\n // DCR uses bearer token authentication with middleware validation\n const middleware = primary.authMiddleware();\n\n // Create auth email provider (stateless, no token storage)\n const authAdapter: AccountAuthProvider = {\n getAccessToken: () => {\n throw new Error('DCR mode does not support getAccessToken - tokens are provided via bearer auth');\n },\n getUserEmail: () => {\n throw new Error('DCR mode does not support getUserEmail - tokens are provided via bearer auth');\n },\n };\n\n // No account management tools for DCR (multi-user management at client registration level)\n const accountTools: ToolModule[] = [];\n const accountPrompts: PromptModule[] = [];\n\n logger.info('DCR provider created for Outlook', {\n service: oauthStaticConfig.service,\n baseUrl: oauthStaticConfig.baseUrl,\n });\n\n return { primary, middleware: middleware as AuthMiddleware, authAdapter, accountTools, accountPrompts, dcrRouter };\n }\n\n // Device code mode - similar to service accounts (single static identity)\n if (oauthStaticConfig.auth === 'device-code') {\n logger.debug('Creating device code provider', { service: oauthStaticConfig.service });\n const deviceCodeProvider = new DeviceCodeProvider({\n service: oauthStaticConfig.service,\n clientId: oauthStaticConfig.clientId,\n tenantId: oauthStaticConfig.tenantId,\n scope: oauthStaticConfig.scope,\n logger,\n tokenStore,\n headless: oauthStaticConfig.headless,\n });\n primary = deviceCodeProvider;\n\n // Device code uses single-user middleware (no account management needed)\n const middleware = deviceCodeProvider.authMiddleware();\n\n // Create auth email provider\n const authAdapter: AccountAuthProvider = {\n getAccessToken: (accountId) => deviceCodeProvider.getAccessToken(accountId),\n getUserEmail: (accountId) => deviceCodeProvider.getUserEmail(accountId),\n };\n\n // No account management tools for device code (like service accounts)\n const accountTools: ToolModule[] = [];\n const accountPrompts: PromptModule[] = [];\n\n logger.info('Device code provider created for Outlook', {\n service: oauthStaticConfig.service,\n });\n\n return { primary, middleware: middleware as AuthMiddleware, authAdapter, accountTools, accountPrompts };\n }\n\n // Always create primary adapter for file-based OAuth (loopback mode)\n primary = new LoopbackOAuthProvider({\n service: oauthStaticConfig.service,\n clientId: oauthStaticConfig.clientId,\n clientSecret: oauthStaticConfig.clientSecret,\n scope: oauthStaticConfig.scope,\n tenantId: oauthStaticConfig.tenantId,\n headless: oauthStaticConfig.headless,\n logger,\n tokenStore,\n ...(oauthStaticConfig.redirectUri !== undefined && { redirectUri: oauthStaticConfig.redirectUri }),\n });\n\n // Create auth email provider (used by account management tools)\n const authAdapter: AccountAuthProvider = primary;\n\n // Select middleware AND account tools based on auth mode\n const middleware: ReturnType<LoopbackOAuthProvider['authMiddleware']> = primary.authMiddleware();\n\n // Loopback OAuth - multi-account mode\n const result = AccountServer.createLoopback({\n service: oauthStaticConfig.service,\n store: tokenStore,\n logger,\n auth: authAdapter,\n });\n const accountTools: ToolModule[] = result.tools as ToolModule[];\n const accountPrompts: PromptModule[] = result.prompts as PromptModule[];\n logger.debug('Loopback OAuth (multi-account mode)', { service: oauthStaticConfig.service });\n\n const loopbackRouter = oauthStaticConfig.redirectUri ? createLoopbackCallbackRouter(primary) : undefined;\n\n return { primary, middleware: middleware as AuthMiddleware, authAdapter, accountTools, accountPrompts, loopbackRouter };\n}\n"],"names":["AccountServer","createDcrRouter","createLoopbackCallbackRouter","DcrOAuthProvider","DeviceCodeProvider","LoopbackOAuthProvider","MS_SCOPE","createOAuthAdapters","config","deps","baseUrl","logger","tokenStore","dcrStore","oauthStaticConfig","service","name","clientId","clientSecret","scope","tenantId","auth","headless","redirectUri","transport","type","undefined","primary","debug","Error","verifyEndpoint","dcrRouter","store","issuerUrl","scopesSupported","split","clientConfig","middleware","authMiddleware","authAdapter","getAccessToken","getUserEmail","accountTools","accountPrompts","info","deviceCodeProvider","accountId","result","createLoopback","tools","prompts","loopbackRouter"],"mappings":"AAAA,SAAmCA,aAAa,QAAQ,eAAe;AACvE,SAASC,eAAe,EAAEC,4BAA4B,EAAEC,gBAAgB,EAAEC,kBAAkB,EAAEC,qBAAqB,QAAQ,yBAAyB;AAIpJ,SAASC,QAAQ,QAAQ,kBAAkB;AA0C3C;;;;;;;;CAQC,GACD,OAAO,eAAeC,oBAAoBC,MAAoB,EAAEC,IAAsB,EAAEC,OAAgB;IACtG,MAAM,EAAEC,MAAM,EAAEC,UAAU,EAAEC,QAAQ,EAAE,GAAGJ;IACzC,MAAMK,oBAAoB;QACxBC,SAASP,OAAOQ,IAAI;QACpBC,UAAUT,OAAOS,QAAQ;QACzBC,cAAcV,OAAOU,YAAY;QACjCC,OAAOb;QACPc,UAAUZ,OAAOY,QAAQ;QACzBC,MAAMb,OAAOa,IAAI;QACjBC,UAAUd,OAAOc,QAAQ;QACzBC,aAAaf,OAAOgB,SAAS,CAACC,IAAI,KAAK,UAAUC,YAAYlB,OAAOe,WAAW;QAC/E,GAAIb,WAAW;YAAEA;QAAQ,CAAC;IAC5B;IAEA,IAAIiB;IAEJ,gEAAgE;IAChE,IAAIb,kBAAkBO,IAAI,KAAK,OAAO;QACpCV,OAAOiB,KAAK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IAE9F,sCAAsC;IACtC,MAAMS,SAAS/C,cAAcgD,cAAc,CAAC;QAC1CjC,SAASD,kBAAkBC,OAAO;QAClCiB,OAAOpB;QACPD;QACAU,MAAMkB;IACR;IACA,MAAMG,eAA6BK,OAAOE,KAAK;IAC/C,MAAMN,iBAAiCI,OAAOG,OAAO;IACrDvC,OAAOiB,KAAK,CAAC,uCAAuC;QAAEb,SAASD,kBAAkBC,OAAO;IAAC;IAEzF,MAAMoC,iBAAiBrC,kBAAkBS,WAAW,GAAGrB,6BAA6ByB,WAAWD;IAE/F,OAAO;QAAEC;QAASU,YAAYA;QAA8BE;QAAaG;QAAcC;QAAgBQ;IAAe;AACxH"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/open-source/ai/mcp-z/mcp-outlook/src/setup/oauth-microsoft.ts"],"sourcesContent":["import { type AccountAuthProvider, AccountServer } from '@mcp-z/oauth';\nimport { createDcrRouter, createLoopbackCallbackRouter, DcrOAuthProvider, DeviceCodeProvider, LoopbackOAuthProvider } from '@mcp-z/oauth-microsoft';\nimport type { Logger, PromptModule, ToolModule } from '@mcp-z/server';\nimport type { Router } from 'express';\nimport type { Keyv } from 'keyv';\nimport { MS_SCOPE } from '../constants.ts';\nimport type { ServerConfig } from '../types.ts';\n\n/**\n * Outlook OAuth runtime dependencies\n *\n * Contains the required dependencies for OAuth functionality including logger,\n * token storage, and optional DCR store.\n */\nexport interface OAuthRuntimeDeps {\n logger: Logger;\n tokenStore: Keyv<unknown>;\n dcrStore?: Keyv<unknown>;\n}\n\n/**\n * Auth middleware wrapper with withToolAuth/withResourceAuth/withPromptAuth methods\n *\n * Provides authentication middleware methods for tools, resources, and prompts.\n */\nexport interface AuthMiddleware {\n withToolAuth<T extends ToolModule>(module: T): T;\n withResourceAuth<T>(module: T): T;\n withPromptAuth<T>(module: T): T;\n}\n\n/**\n * Result of OAuth adapter creation\n *\n * Contains the primary OAuth adapter, middleware, auth adapter,\n * account tools, prompts, and optional routers.\n */\nexport interface OAuthAdapters {\n primary: LoopbackOAuthProvider | DeviceCodeProvider | DcrOAuthProvider;\n middleware: AuthMiddleware;\n authAdapter: AccountAuthProvider;\n accountTools: ToolModule[];\n accountPrompts: PromptModule[];\n dcrRouter?: Router; // DCR OAuth endpoints (only for dcr mode)\n loopbackRouter?: Router;\n}\n\n/**\n * Create Outlook OAuth adapters based on transport configuration\n *\n * Returns primary adapter, pre-configured middleware, auth email provider,\n * and pre-selected account tools based on auth mode.\n * @param config - Outlook server configuration\n * @param deps - Runtime dependencies (logger, tokenStore, etc.)\n * @returns OAuth adapters with pre-configured middleware and account tools\n */\nexport async function createOAuthAdapters(config: ServerConfig, deps: OAuthRuntimeDeps, baseUrl?: string): Promise<OAuthAdapters> {\n const { logger, tokenStore, dcrStore } = deps;\n const oauthStaticConfig = {\n service: config.name,\n clientId: config.clientId,\n clientSecret: config.clientSecret,\n scope: MS_SCOPE,\n tenantId: config.tenantId,\n auth: config.auth,\n headless: config.headless,\n redirectUri: config.transport.type === 'stdio' ? undefined : config.redirectUri,\n ...(baseUrl && { baseUrl }),\n };\n\n let primary: LoopbackOAuthProvider | DeviceCodeProvider | DcrOAuthProvider;\n\n // DCR mode - Dynamic Client Registration with HTTP-only support\n if (oauthStaticConfig.auth === 'dcr') {\n logger.debug('Creating DCR provider', { service: oauthStaticConfig.service });\n\n // DCR requires dcrStore and baseUrl\n if (!dcrStore) {\n throw new Error('DCR mode requires dcrStore to be configured');\n }\n if (!oauthStaticConfig.baseUrl) {\n throw new Error('DCR mode requires baseUrl to be configured');\n }\n\n // Create DcrOAuthProvider (stateless provider that receives tokens from verification context)\n primary = new DcrOAuthProvider({\n clientId: oauthStaticConfig.clientId,\n ...(oauthStaticConfig.clientSecret && { clientSecret: oauthStaticConfig.clientSecret }),\n tenantId: oauthStaticConfig.tenantId,\n scope: oauthStaticConfig.scope,\n verifyEndpoint: `${oauthStaticConfig.baseUrl}/oauth/verify`,\n logger,\n });\n\n // Create DCR OAuth router with authorization server endpoints\n const dcrRouter = createDcrRouter({\n store: dcrStore,\n issuerUrl: oauthStaticConfig.baseUrl,\n baseUrl: oauthStaticConfig.baseUrl,\n scopesSupported: oauthStaticConfig.scope.split(' '), // Convert space-separated scope to array\n clientConfig: {\n clientId: oauthStaticConfig.clientId,\n ...(oauthStaticConfig.clientSecret && { clientSecret: oauthStaticConfig.clientSecret }),\n tenantId: oauthStaticConfig.tenantId,\n },\n });\n\n // DCR uses bearer token authentication with middleware validation\n const middleware = primary.authMiddleware();\n\n // Create auth email provider (stateless, no token storage)\n const authAdapter: AccountAuthProvider = {\n getAccessToken: () => {\n throw new Error('DCR mode does not support getAccessToken - tokens are provided via bearer auth');\n },\n getUserEmail: () => {\n throw new Error('DCR mode does not support getUserEmail - tokens are provided via bearer auth');\n },\n };\n\n // No account management tools for DCR (multi-user management at client registration level)\n const accountTools: ToolModule[] = [];\n const accountPrompts: PromptModule[] = [];\n\n logger.info('DCR provider created for Outlook', {\n service: oauthStaticConfig.service,\n baseUrl: oauthStaticConfig.baseUrl,\n });\n\n return { primary, middleware: middleware as AuthMiddleware, authAdapter, accountTools, accountPrompts, dcrRouter };\n }\n\n // Device code mode - similar to service accounts (single static identity)\n if (oauthStaticConfig.auth === 'device-code') {\n logger.debug('Creating device code provider', { service: oauthStaticConfig.service });\n const deviceCodeProvider = new DeviceCodeProvider({\n service: oauthStaticConfig.service,\n clientId: oauthStaticConfig.clientId,\n tenantId: oauthStaticConfig.tenantId,\n scope: oauthStaticConfig.scope,\n logger,\n tokenStore,\n headless: oauthStaticConfig.headless,\n });\n primary = deviceCodeProvider;\n\n // Device code uses single-user middleware (no account management needed)\n const middleware = deviceCodeProvider.authMiddleware();\n\n // Create auth email provider\n const authAdapter: AccountAuthProvider = {\n getAccessToken: (accountId) => deviceCodeProvider.getAccessToken(accountId),\n getUserEmail: (accountId) => deviceCodeProvider.getUserEmail(accountId),\n };\n\n // No account management tools for device code (like service accounts)\n const accountTools: ToolModule[] = [];\n const accountPrompts: PromptModule[] = [];\n\n logger.info('Device code provider created for Outlook', {\n service: oauthStaticConfig.service,\n });\n\n return { primary, middleware: middleware as AuthMiddleware, authAdapter, accountTools, accountPrompts };\n }\n\n // Always create primary adapter for file-based OAuth (loopback mode)\n primary = new LoopbackOAuthProvider({\n service: oauthStaticConfig.service,\n clientId: oauthStaticConfig.clientId,\n clientSecret: oauthStaticConfig.clientSecret,\n scope: oauthStaticConfig.scope,\n tenantId: oauthStaticConfig.tenantId,\n headless: oauthStaticConfig.headless,\n logger,\n tokenStore,\n ...(oauthStaticConfig.redirectUri !== undefined && { redirectUri: oauthStaticConfig.redirectUri }),\n });\n\n // Create auth email provider (used by account management tools)\n const authAdapter: AccountAuthProvider = primary;\n\n // Select middleware AND account tools based on auth mode\n const middleware: ReturnType<LoopbackOAuthProvider['authMiddleware']> = primary.authMiddleware();\n\n // Loopback OAuth - multi-account mode\n const result = AccountServer.createLoopback({\n service: oauthStaticConfig.service,\n store: tokenStore,\n logger,\n auth: authAdapter,\n });\n const accountTools: ToolModule[] = result.tools as ToolModule[];\n const accountPrompts: PromptModule[] = result.prompts as PromptModule[];\n logger.debug('Loopback OAuth (multi-account mode)', { service: oauthStaticConfig.service });\n\n const loopbackRouter = oauthStaticConfig.redirectUri ? createLoopbackCallbackRouter(primary) : undefined;\n\n return { primary, middleware: middleware as AuthMiddleware, authAdapter, accountTools, accountPrompts, loopbackRouter };\n}\n"],"names":["AccountServer","createDcrRouter","createLoopbackCallbackRouter","DcrOAuthProvider","DeviceCodeProvider","LoopbackOAuthProvider","MS_SCOPE","createOAuthAdapters","config","deps","baseUrl","logger","tokenStore","dcrStore","oauthStaticConfig","service","name","clientId","clientSecret","scope","tenantId","auth","headless","redirectUri","transport","type","undefined","primary","debug","Error","verifyEndpoint","dcrRouter","store","issuerUrl","scopesSupported","split","clientConfig","middleware","authMiddleware","authAdapter","getAccessToken","getUserEmail","accountTools","accountPrompts","info","deviceCodeProvider","accountId","result","createLoopback","tools","prompts","loopbackRouter"],"mappings":"AAAA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} from '@mcp-z/oauth';
2
3
  import { createLoggingMiddleware } from '@mcp-z/server';
3
4
  import * as fs from 'fs';
@@ -22,12 +23,12 @@ export function createLogger(config) {
22
23
  }) : pino.destination(1));
23
24
  }
24
25
  export async function createTokenStore(baseDir) {
25
- const tokenStoreUri = process.env.TOKEN_STORE_URI || `file://${path.join(baseDir, 'tokens.json')}`;
26
+ const tokenStoreUri = process.env.TOKEN_STORE_URI || pathToFileURL(path.join(baseDir, 'tokens.json')).href;
26
27
  return createStore(tokenStoreUri);
27
28
  }
28
29
  export async function createDcrStore(baseDir, required) {
29
30
  if (!required) return undefined;
30
- const dcrStoreUri = process.env.DCR_STORE_URI || `file://${path.join(baseDir, 'dcr.json')}`;
31
+ const dcrStoreUri = process.env.DCR_STORE_URI || pathToFileURL(path.join(baseDir, 'dcr.json')).href;
31
32
  return createStore(dcrStoreUri);
32
33
  }
33
34
  export function createAuthLayer(authMiddleware) {
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/kevin/Dev/OpenSource/ai/mcp-z/mcp-outlook/src/setup/runtime.ts"],"sourcesContent":["import { sanitizeForLoggingFormatter } from '@mcp-z/oauth';\nimport type { Logger, MiddlewareLayer } from '@mcp-z/server';\nimport { createLoggingMiddleware } from '@mcp-z/server';\nimport * as fs from 'fs';\nimport * as path from 'path';\nimport pino from 'pino';\nimport createStore from '../lib/create-store.ts';\nimport * as mcp from '../mcp/index.ts';\nimport type { CommonRuntime, RuntimeDeps, RuntimeOverrides, ServerConfig, StorageContext } from '../types.ts';\nimport { createOAuthAdapters, type OAuthAdapters } from './oauth-microsoft.ts';\n\nexport function createLogger(config: ServerConfig): Logger {\n const hasStdio = config.transport.type === 'stdio';\n const logsPath = path.join(config.baseDir, 'logs', `${config.name}.log`);\n if (hasStdio) fs.mkdirSync(path.dirname(logsPath), { recursive: true });\n return pino({ level: config.logLevel ?? 'info', formatters: sanitizeForLoggingFormatter() }, hasStdio ? pino.destination({ dest: logsPath, sync: false }) : pino.destination(1));\n}\n\nexport async function createTokenStore(baseDir: string) {\n const tokenStoreUri = process.env.TOKEN_STORE_URI || `file://${path.join(baseDir, 'tokens.json')}`;\n return createStore<unknown>(tokenStoreUri);\n}\n\nexport async function createDcrStore(baseDir: string, required: boolean) {\n if (!required) return undefined;\n const dcrStoreUri = process.env.DCR_STORE_URI || `file://${path.join(baseDir, 'dcr.json')}`;\n return createStore<unknown>(dcrStoreUri);\n}\n\nexport function createAuthLayer(authMiddleware: OAuthAdapters['middleware']): MiddlewareLayer {\n return {\n withTool: authMiddleware.withToolAuth,\n withResource: authMiddleware.withResourceAuth,\n withPrompt: authMiddleware.withPromptAuth,\n };\n}\n\nexport function createLoggingLayer(logger: Logger): MiddlewareLayer {\n const logging = createLoggingMiddleware({ logger });\n return {\n withTool: logging.withToolLogging,\n withResource: logging.withResourceLogging,\n withPrompt: logging.withPromptLogging,\n };\n}\n\nexport function createStorageLayer(storageContext: StorageContext): MiddlewareLayer {\n const wrapAtPosition = <T extends { name: string; handler: unknown; [key: string]: unknown }>(module: T, extraPosition: number): T => {\n const originalHandler = module.handler as (...args: unknown[]) => Promise<unknown>;\n\n const wrappedHandler = async (...allArgs: unknown[]) => {\n const extra = allArgs[extraPosition];\n (extra as { storageContext?: StorageContext }).storageContext = storageContext;\n return await originalHandler(...allArgs);\n };\n\n return {\n ...module,\n handler: wrappedHandler,\n } as T;\n };\n\n return {\n withTool: <T extends { name: string; config: unknown; handler: unknown }>(module: T): T => wrapAtPosition(module, 1) as T,\n };\n}\n\nexport function validateStorageConfig(config: ServerConfig, logger: Logger) {\n if (config.auth === 'dcr') {\n if (config.resourceStoreUri) {\n logger.warn('DCR mode does not support file storage; resourceStoreUri will be ignored.');\n }\n return;\n }\n if (!config.resourceStoreUri) {\n throw new Error('outlook-messages-export-csv: Server configuration missing resourceStoreUri.');\n }\n if (config.transport.type === 'http' && !config.baseUrl && !config.transport.port) {\n throw new Error('outlook-messages-export-csv: HTTP transport requires either baseUrl in server config or port in transport config. This is a server configuration error - please provide --base-url or --port.');\n }\n}\n\nexport async function createDefaultRuntime(config: ServerConfig, overrides?: RuntimeOverrides): Promise<CommonRuntime> {\n if (config.auth === 'dcr' && config.transport.type !== 'http') throw new Error('DCR mode requires an HTTP transport');\n\n const logger = createLogger(config);\n validateStorageConfig(config, logger);\n const tokenStore = await createTokenStore(config.baseDir);\n const baseUrl = config.baseUrl ?? (config.transport.type === 'http' && config.transport.port ? `http://localhost:${config.transport.port}` : undefined);\n const dcrStore = await createDcrStore(config.baseDir, config.auth === 'dcr');\n const oauthAdapters = await createOAuthAdapters(config, { logger, tokenStore, dcrStore }, baseUrl);\n const deps: RuntimeDeps = { config, logger, tokenStore, oauthAdapters, baseUrl };\n const createDomainModules =\n overrides?.createDomainModules ??\n (() => ({\n tools: Object.values(mcp.toolFactories).map((factory) => factory()),\n resources: Object.values(mcp.resourceFactories).map((factory) => factory()),\n prompts: Object.values(mcp.promptFactories).map((factory) => factory()),\n }));\n const middlewareFactories = overrides?.middlewareFactories ?? [() => createAuthLayer(oauthAdapters.middleware), () => createLoggingLayer(logger), ...(config.auth === 'dcr' ? [] : [() => createStorageLayer({ resourceStoreUri: config.resourceStoreUri, baseUrl: config.baseUrl, transport: config.transport })])];\n\n return {\n deps,\n middlewareFactories,\n createDomainModules,\n close: async () => {},\n };\n}\n"],"names":["sanitizeForLoggingFormatter","createLoggingMiddleware","fs","path","pino","createStore","mcp","createOAuthAdapters","createLogger","config","hasStdio","transport","type","logsPath","join","baseDir","name","mkdirSync","dirname","recursive","level","logLevel","formatters","destination","dest","sync","createTokenStore","tokenStoreUri","process","env","TOKEN_STORE_URI","createDcrStore","required","undefined","dcrStoreUri","DCR_STORE_URI","createAuthLayer","authMiddleware","withTool","withToolAuth","withResource","withResourceAuth","withPrompt","withPromptAuth","createLoggingLayer","logger","logging","withToolLogging","withResourceLogging","withPromptLogging","createStorageLayer","storageContext","wrapAtPosition","module","extraPosition","originalHandler","handler","wrappedHandler","allArgs","extra","validateStorageConfig","auth","resourceStoreUri","warn","Error","baseUrl","port","createDefaultRuntime","overrides","tokenStore","dcrStore","oauthAdapters","deps","createDomainModules","tools","Object","values","toolFactories","map","factory","resources","resourceFactories","prompts","promptFactories","middlewareFactories","middleware","close"],"mappings":"AAAA,SAASA,2BAA2B,QAAQ,eAAe;AAE3D,SAASC,uBAAuB,QAAQ,gBAAgB;AACxD,YAAYC,QAAQ,KAAK;AACzB,YAAYC,UAAU,OAAO;AAC7B,OAAOC,UAAU,OAAO;AACxB,OAAOC,iBAAiB,yBAAyB;AACjD,YAAYC,SAAS,kBAAkB;AAEvC,SAASC,mBAAmB,QAA4B,uBAAuB;AAE/E,OAAO,SAASC,aAAaC,MAAoB;QAI1BA;IAHrB,MAAMC,WAAWD,OAAOE,SAAS,CAACC,IAAI,KAAK;IAC3C,MAAMC,WAAWV,KAAKW,IAAI,CAACL,OAAOM,OAAO,EAAE,QAAQ,GAAGN,OAAOO,IAAI,CAAC,IAAI,CAAC;IACvE,IAAIN,UAAUR,GAAGe,SAAS,CAACd,KAAKe,OAAO,CAACL,WAAW;QAAEM,WAAW;IAAK;IACrE,OAAOf,KAAK;QAAEgB,KAAK,GAAEX,mBAAAA,OAAOY,QAAQ,cAAfZ,8BAAAA,mBAAmB;QAAQa,YAAYtB;IAA8B,GAAGU,WAAWN,KAAKmB,WAAW,CAAC;QAAEC,MAAMX;QAAUY,MAAM;IAAM,KAAKrB,KAAKmB,WAAW,CAAC;AAC/K;AAEA,OAAO,eAAeG,iBAAiBX,OAAe;IACpD,MAAMY,gBAAgBC,QAAQC,GAAG,CAACC,eAAe,IAAI,CAAC,OAAO,EAAE3B,KAAKW,IAAI,CAACC,SAAS,gBAAgB;IAClG,OAAOV,YAAqBsB;AAC9B;AAEA,OAAO,eAAeI,eAAehB,OAAe,EAAEiB,QAAiB;IACrE,IAAI,CAACA,UAAU,OAAOC;IACtB,MAAMC,cAAcN,QAAQC,GAAG,CAACM,aAAa,IAAI,CAAC,OAAO,EAAEhC,KAAKW,IA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;oBAAEtD,WAAWF,OAAOE,SAAS;gBAAC;SAAG;KAAE;IAEpT,OAAO;QACL6D;QACAY;QACAX;QACAa,OAAO,WAAa;IACtB;AACF"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/open-source/ai/mcp-z/mcp-outlook/src/setup/runtime.ts"],"sourcesContent":["import { pathToFileURL } from 'node:url';\nimport { sanitizeForLoggingFormatter } from '@mcp-z/oauth';\nimport type { Logger, MiddlewareLayer } from '@mcp-z/server';\nimport { createLoggingMiddleware } from '@mcp-z/server';\nimport * as fs from 'fs';\nimport * as path from 'path';\nimport pino from 'pino';\nimport createStore from '../lib/create-store.ts';\nimport * as mcp from '../mcp/index.ts';\nimport type { CommonRuntime, RuntimeDeps, RuntimeOverrides, ServerConfig, StorageContext } from '../types.ts';\nimport { createOAuthAdapters, type OAuthAdapters } from './oauth-microsoft.ts';\n\nexport function createLogger(config: ServerConfig): Logger {\n const hasStdio = config.transport.type === 'stdio';\n const logsPath = path.join(config.baseDir, 'logs', `${config.name}.log`);\n if (hasStdio) fs.mkdirSync(path.dirname(logsPath), { recursive: true });\n return pino({ level: config.logLevel ?? 'info', formatters: sanitizeForLoggingFormatter() }, hasStdio ? pino.destination({ dest: logsPath, sync: false }) : pino.destination(1));\n}\n\nexport async function createTokenStore(baseDir: string) {\n const tokenStoreUri = process.env.TOKEN_STORE_URI || pathToFileURL(path.join(baseDir, 'tokens.json')).href;\n return createStore<unknown>(tokenStoreUri);\n}\n\nexport async function createDcrStore(baseDir: string, required: boolean) {\n if (!required) return undefined;\n const dcrStoreUri = process.env.DCR_STORE_URI || pathToFileURL(path.join(baseDir, 'dcr.json')).href;\n return createStore<unknown>(dcrStoreUri);\n}\n\nexport function createAuthLayer(authMiddleware: OAuthAdapters['middleware']): MiddlewareLayer {\n return {\n withTool: authMiddleware.withToolAuth,\n withResource: authMiddleware.withResourceAuth,\n withPrompt: authMiddleware.withPromptAuth,\n };\n}\n\nexport function createLoggingLayer(logger: Logger): MiddlewareLayer {\n const logging = createLoggingMiddleware({ logger });\n return {\n withTool: logging.withToolLogging,\n withResource: logging.withResourceLogging,\n withPrompt: logging.withPromptLogging,\n };\n}\n\nexport function createStorageLayer(storageContext: StorageContext): MiddlewareLayer {\n const wrapAtPosition = <T extends { name: string; handler: unknown; [key: string]: unknown }>(module: T, extraPosition: number): T => {\n const originalHandler = module.handler as (...args: unknown[]) => Promise<unknown>;\n\n const wrappedHandler = async (...allArgs: unknown[]) => {\n const extra = allArgs[extraPosition];\n (extra as { storageContext?: StorageContext }).storageContext = storageContext;\n return await originalHandler(...allArgs);\n };\n\n return {\n ...module,\n handler: wrappedHandler,\n } as T;\n };\n\n return {\n withTool: <T extends { name: string; config: unknown; handler: unknown }>(module: T): T => wrapAtPosition(module, 1) as T,\n };\n}\n\nexport function validateStorageConfig(config: ServerConfig, logger: Logger) {\n if (config.auth === 'dcr') {\n if (config.resourceStoreUri) {\n logger.warn('DCR mode does not support file storage; resourceStoreUri will be ignored.');\n }\n return;\n }\n if (!config.resourceStoreUri) {\n throw new Error('outlook-messages-export-csv: Server configuration missing resourceStoreUri.');\n }\n if (config.transport.type === 'http' && !config.baseUrl && !config.transport.port) {\n throw new Error('outlook-messages-export-csv: HTTP transport requires either baseUrl in server config or port in transport config. This is a server configuration error - please provide --base-url or --port.');\n }\n}\n\nexport async function createDefaultRuntime(config: ServerConfig, overrides?: RuntimeOverrides): Promise<CommonRuntime> {\n if (config.auth === 'dcr' && config.transport.type !== 'http') throw new Error('DCR mode requires an HTTP transport');\n\n const logger = createLogger(config);\n validateStorageConfig(config, logger);\n const tokenStore = await createTokenStore(config.baseDir);\n const baseUrl = config.baseUrl ?? (config.transport.type === 'http' && config.transport.port ? `http://localhost:${config.transport.port}` : undefined);\n const dcrStore = await createDcrStore(config.baseDir, config.auth === 'dcr');\n const oauthAdapters = await createOAuthAdapters(config, { logger, tokenStore, dcrStore }, baseUrl);\n const deps: RuntimeDeps = { config, logger, tokenStore, oauthAdapters, baseUrl };\n const createDomainModules =\n overrides?.createDomainModules ??\n (() => ({\n tools: Object.values(mcp.toolFactories).map((factory) => factory()),\n resources: Object.values(mcp.resourceFactories).map((factory) => factory()),\n prompts: Object.values(mcp.promptFactories).map((factory) => factory()),\n }));\n const middlewareFactories = overrides?.middlewareFactories ?? [() => createAuthLayer(oauthAdapters.middleware), () => createLoggingLayer(logger), ...(config.auth === 'dcr' ? [] : [() => createStorageLayer({ resourceStoreUri: config.resourceStoreUri, baseUrl: config.baseUrl, transport: config.transport })])];\n\n return {\n deps,\n middlewareFactories,\n createDomainModules,\n close: async () => {},\n };\n}\n"],"names":["pathToFileURL","sanitizeForLoggingFormatter","createLoggingMiddleware","fs","path","pino","createStore","mcp","createOAuthAdapters","createLogger","config","hasStdio","transport","type","logsPath","join","baseDir","name","mkdirSync","dirname","recursive","level","logLevel","formatters","destination","dest","sync","createTokenStore","tokenStoreUri","process","env","TOKEN_STORE_URI","href","createDcrStore","required","undefined","dcrStoreUri","DCR_STORE_URI","createAuthLayer","authMiddleware","withTool","withToolAuth","withResource","withResourceAuth","withPrompt","withPromptAuth","createLoggingLayer","logger","logging","withToolLogging","withResourceLogging","withPromptLogging","createStorageLayer","storageContext","wrapAtPosition","module","extraPosition","originalHandler","handler","wrappedHandler","allArgs","extra","validateStorageConfig","auth","resourceStoreUri","warn","Error","baseUrl","port","createDefaultRuntime","overrides","tokenStore","dcrStore","oauthAdapters","deps","createDomainModules","tools","Object","values","toolFactories","map","factory","resources","resourceFactories","prompts","promptFactories","middlewareFactories","middleware","close"],"mappings":"AAAA,SAASA,aAAa,QAAQ,WAAW;AACzC,SAASC,2BAA2B,QAAQ,eAAe;AAE3D,SAASC,uBAAuB,QAAQ,gBAAgB;AACxD,YAAYC,QAAQ,KAAK;AACzB,YAAYC,UAAU,OAAO;AAC7B,OAAOC,UAAU,OAAO;AACxB,OAAOC,iBAAiB,yBAAyB;AACjD,YAAYC,SAAS,kBAAkB;AAEvC,SAASC,mBAAmB,QAA4B,uBAAuB;AAE/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C;IAC7I,MAAMqC,WAAW,MAAMvC,eAAevB,OAAOM,OAAO,EAAEN,OAAOqD,IAAI,KAAK;IACtE,MAAMU,gBAAgB,MAAMjE,oBAAoBE,QAAQ;QAAEqC;QAAQwB;QAAYC;IAAS,GAAGL;IAC1F,MAAMO,OAAoB;QAAEhE;QAAQqC;QAAQwB;QAAYE;QAAeN;IAAQ;IAC/E,MAAMQ,8BACJL,sBAAAA,gCAAAA,UAAWK,mBAAmB,uCAC7B,IAAO,CAAA;YACNC,OAAOC,OAAOC,MAAM,CAACvE,IAAIwE,aAAa,EAAEC,GAAG,CAAC,CAACC,UAAYA;YACzDC,WAAWL,OAAOC,MAAM,CAACvE,IAAI4E,iBAAiB,EAAEH,GAAG,CAAC,CAACC,UAAYA;YACjEG,SAASP,OAAOC,MAAM,CAACvE,IAAI8E,eAAe,EAAEL,GAAG,CAAC,CAACC,UAAYA;QAC/D,CAAA;IACF,MAAMK,+BAAsBhB,sBAAAA,gCAAAA,UAAWgB,mBAAmB,yCAAI;QAAC,IAAMhD,gBAAgBmC,cAAcc,UAAU;QAAG,IAAMzC,mBAAmBC;WAAarC,OAAOqD,IAAI,KAAK,QAAQ,EAAE,GAAG;YAAC,IAAMX,mBAAmB;oBAAEY,kBAAkBtD,OAAOsD,gBAAgB;oBAAEG,SAASzD,OAAOyD,OAAO;oBAAEvD,WAAWF,OAAOE,SAAS;gBAAC;SAAG;KAAE;IAEpT,OAAO;QACL8D;QACAY;QACAX;QACAa,OAAO,WAAa;IACtB;AACF"}
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/kevin/Dev/OpenSource/ai/mcp-z/mcp-outlook/src/setup/stdio.ts"],"sourcesContent":["import { composeMiddleware, connectStdio, defaultCacheHints, McpServer, registerPrompts, registerResources, registerTools } from '@mcp-z/server';\nimport type { RuntimeOverrides, ServerConfig } from '../types.ts';\nimport { createDefaultRuntime } from './runtime.ts';\n\nexport async function createStdioServer(config: ServerConfig, overrides?: RuntimeOverrides) {\n const runtime = await createDefaultRuntime(config, overrides);\n const modules = runtime.createDomainModules();\n const layers = runtime.middlewareFactories.map((factory) => factory(runtime.deps));\n const composed = composeMiddleware(modules, layers);\n const logger = runtime.deps.logger;\n\n const tools = [...composed.tools, ...runtime.deps.oauthAdapters.accountTools];\n const filteredTools =\n config.auth === 'dcr'\n ? tools.filter((tool) => tool.name !== 'messages-export-csv') // No file storage in DCR (public cloud responsibility)\n : tools;\n const prompts = [...composed.prompts, ...runtime.deps.oauthAdapters.accountPrompts];\n\n // Built per request (HTTP) and per connection (stdio), not shared. The SDK caches the\n // negotiated protocol revision on the McpServer instance - its own docs say a negotiated\n // session never re-routes a method onto the other era - so one shared instance pins itself\n // to whichever revision reaches it first and answers the other with -32601.\n const buildServer = () => {\n const mcpServer = new McpServer({ name: config.name, version: config.version }, { cacheHints: defaultCacheHints });\n registerTools(mcpServer, filteredTools);\n registerResources(mcpServer, composed.resources);\n registerPrompts(mcpServer, prompts);\n return mcpServer;\n };\n\n logger.info(`Starting ${config.name} MCP server (stdio)`);\n const { close } = await connectStdio(buildServer, { logger });\n logger.info('stdio transport ready');\n\n return {\n logger,\n close: async () => {\n await close();\n await runtime.close();\n },\n };\n}\n"],"names":["composeMiddleware","connectStdio","defaultCacheHints","McpServer","registerPrompts","registerResources","registerTools","createDefaultRuntime","createStdioServer","config","overrides","runtime","modules","createDomainModules","layers","middlewareFactories","map","factory","deps","composed","logger","tools","oauthAdapters","accountTools","filteredTools","auth","filter","tool","name","prompts","accountPrompts","buildServer","mcpServer","version","cacheHints","resources","info","close"],"mappings":"AAAA,SAASA,iBAAiB,EAAEC,YAAY,EAAEC,iBAAiB,EAAEC,SAAS,EAAEC,eAAe,EAAEC,iBAAiB,EAAEC,aAAa,QAAQ,gBAAgB;AAEjJ,SAASC,oBAAoB,QAAQ,eAAe;AAEpD,OAAO,eAAeC,kBAAkBC,MAAoB,EAAEC,SAA4B;IACxF,MAAMC,UAAU,MAAMJ,qBAAqBE,QAAQC;IACnD,MAAME,UAAUD,QAAQE,mBAAmB;IAC3C,MAAMC,SAASH,QAAQI,mBAAmB,CAACC,GAAG,CAAC,CAACC,UAAYA,QAAQN,QAAQO,IAAI;IAChF,MAAMC,WAAWnB,kBAAkBY,SAASE;IAC5C,MAAMM,SAAST,QAAQO,IAAI,CAACE,MAAM;IAElC,MAAMC,QAAQ;WAAIF,SAASE,KAAK;WAAKV,QAAQO,IAAI,CAACI,aAAa,CAACC,YAAY;KAAC;IAC7E,MAAMC,gBACJf,OAAOgB,IAAI,KAAK,QACZJ,MAAMK,MAAM,CAAC,CAACC,OAASA,KAAKC,IAAI,KAAK,uBAAuB,uDAAuD;OACnHP;IACN,MAAMQ,UAAU;WAAIV,SAASU,OAAO;WAAKlB,QAAQO,IAAI,CAACI,aAAa,CAACQ,cAAc;KAAC;IAEnF,sFAAsF;IACtF,yFAAyF;IACzF,2FAA2F;IAC3F,4EAA4E;IAC5E,MAAMC,cAAc;QAClB,MAAMC,YAAY,IAAI7B,UAAU;YAAEyB,MAAMnB,OAAOmB,IAAI;YAAEK,SAASxB,OAAOwB,OAAO;QAAC,GAAG;YAAEC,YAAYhC;QAAkB;QAChHI,cAAc0B,WAAWR;QACzBnB,kBAAkB2B,WAAWb,SAASgB,SAAS;QAC/C/B,gBAAgB4B,WAAWH;QAC3B,OAAOG;IACT;IAEAZ,OAAOgB,IAAI,CAAC,CAAC,SAAS,EAAE3B,OAAOmB,IAAI,CAAC,mBAAmB,CAAC;IACxD,MAAM,EAAES,KAAK,EAAE,GAAG,MAAMpC,aAAa8B,aAAa;QAAEX;IAAO;IAC3DA,OAAOgB,IAAI,CAAC;IAEZ,OAAO;QACLhB;QACAiB,OAAO;YACL,MAAMA;YACN,MAAM1B,QAAQ0B,KAAK;QACrB;IACF;AACF"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/open-source/ai/mcp-z/mcp-outlook/src/setup/stdio.ts"],"sourcesContent":["import { composeMiddleware, connectStdio, defaultCacheHints, McpServer, registerPrompts, registerResources, registerTools } from '@mcp-z/server';\nimport type { RuntimeOverrides, ServerConfig } from '../types.ts';\nimport { createDefaultRuntime } from './runtime.ts';\n\nexport async function createStdioServer(config: ServerConfig, overrides?: RuntimeOverrides) {\n const runtime = await createDefaultRuntime(config, overrides);\n const modules = runtime.createDomainModules();\n const layers = runtime.middlewareFactories.map((factory) => factory(runtime.deps));\n const composed = composeMiddleware(modules, layers);\n const logger = runtime.deps.logger;\n\n const tools = [...composed.tools, ...runtime.deps.oauthAdapters.accountTools];\n const filteredTools =\n config.auth === 'dcr'\n ? tools.filter((tool) => tool.name !== 'messages-export-csv') // No file storage in DCR (public cloud responsibility)\n : tools;\n const prompts = [...composed.prompts, ...runtime.deps.oauthAdapters.accountPrompts];\n\n // Built per request (HTTP) and per connection (stdio), not shared. The SDK caches the\n // negotiated protocol revision on the McpServer instance - its own docs say a negotiated\n // session never re-routes a method onto the other era - so one shared instance pins itself\n // to whichever revision reaches it first and answers the other with -32601.\n const buildServer = () => {\n const mcpServer = new McpServer({ name: config.name, version: config.version }, { cacheHints: defaultCacheHints });\n registerTools(mcpServer, filteredTools);\n registerResources(mcpServer, composed.resources);\n registerPrompts(mcpServer, prompts);\n return mcpServer;\n };\n\n logger.info(`Starting ${config.name} MCP server (stdio)`);\n const { close } = await connectStdio(buildServer, { logger });\n logger.info('stdio transport ready');\n\n return {\n logger,\n close: async () => {\n await close();\n await runtime.close();\n },\n };\n}\n"],"names":["composeMiddleware","connectStdio","defaultCacheHints","McpServer","registerPrompts","registerResources","registerTools","createDefaultRuntime","createStdioServer","config","overrides","runtime","modules","createDomainModules","layers","middlewareFactories","map","factory","deps","composed","logger","tools","oauthAdapters","accountTools","filteredTools","auth","filter","tool","name","prompts","accountPrompts","buildServer","mcpServer","version","cacheHints","resources","info","close"],"mappings":"AAAA,SAASA,iBAAiB,EAAEC,YAAY,EAAEC,iBAAiB,EAAEC,SAAS,EAAEC,eAAe,EAAEC,iBAAiB,EAAEC,aAAa,QAAQ,gBAAgB;AAE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F"}
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/kevin/Dev/OpenSource/ai/mcp-z/mcp-outlook/src/setup/version-help.ts"],"sourcesContent":["import * as fs from 'fs';\nimport moduleRoot from 'module-root-sync';\nimport * as path from 'path';\nimport * as url from 'url';\nimport { parseArgs } from 'util';\n\n// Kept dependency-free (fs/path/url/module-root-sync only) so `--version`/`--help`\n// resolve nothing beyond Node startup: config.ts's parseConfig pulls in @mcp-z/oauth-microsoft\n// and @mcp-z/server, which this path must not touch.\nconst pkg = JSON.parse(fs.readFileSync(path.join(moduleRoot(url.fileURLToPath(import.meta.url)), 'package.json'), 'utf-8'));\n\nconst HELP_TEXT = `\nUsage: mcp-outlook [options]\n\nMCP server for Outlook/Microsoft email management with OAuth authentication.\n\nOptions:\n --version Show version number\n --help Show this help message\n --auth=<mode> Authentication mode (default: loopback-oauth)\n Modes: loopback-oauth, device-code, dcr\n --headless Disable browser auto-open, return auth URL instead\n --redirect-uri=<uri> OAuth redirect URI (default: ephemeral loopback)\n --tenant-id=<id> Microsoft tenant ID (overrides MS_TENANT_ID env var)\n --dcr-mode=<mode> DCR mode (self-hosted or external, default: self-hosted)\n --dcr-verify-url=<url> External verification endpoint (required for external mode)\n --dcr-store-uri=<uri> DCR client storage URI (required for self-hosted mode)\n --port=<port> Enable HTTP transport on specified port\n --stdio Enable stdio transport (default if no port)\n --log-level=<level> Logging level (default: info)\n --resource-store-uri=<uri> Resource store URI for CSV file storage (default: file://~/.mcp-z/mcp-outlook/files)\n --base-url=<url> Base URL for HTTP file serving (default: http://localhost for HTTP transports)\n\nEnvironment Variables:\n MS_CLIENT_ID OAuth client ID (REQUIRED)\n MS_TENANT_ID Microsoft tenant ID (REQUIRED)\n MS_CLIENT_SECRET OAuth client secret (optional)\n AUTH_MODE Default authentication mode (optional)\n HEADLESS Disable browser auto-open (optional)\n DCR_MODE DCR mode (optional, same format as --dcr-mode)\n DCR_VERIFY_URL External verification URL (optional, same as --dcr-verify-url)\n DCR_STORE_URI DCR storage URI (optional, same as --dcr-store-uri)\n TOKEN_STORE_URI Token storage URI (optional)\n PORT Default HTTP port (optional)\n LOG_LEVEL Default logging level (optional)\n RESOURCE_STORE_URI Resource store URI (optional, file://)\n BASE_URL Base URL for HTTP file serving (optional)\n\nStorage Backends:\n TOKEN_STORE_URI and DCR_STORE_URI accept any keyv-registry protocol.\n file:// (the default) and memory:// work out of the box. Any other backend\n needs its adapter installed alongside this server:\n npm install -g @keyv/redis\n TOKEN_STORE_URI=redis://localhost:6379 mcp-outlook\n\nOAuth Scopes:\n openid profile offline_access https://graph.microsoft.com/User.Read https://graph.microsoft.com/Mail.ReadWrite https://graph.microsoft.com/Mail.Send https://graph.microsoft.com/MailboxSettings.ReadWrite\n\nExamples:\n mcp-outlook # Use default settings\n mcp-outlook --auth=device-code # Use device code auth\n mcp-outlook --port=3000 # HTTP transport on port 3000\n mcp-outlook --tenant-id=xxx # Set tenant ID\n mcp-outlook --resource-store-uri=file:///tmp/emails # Custom resource store URI\n MS_CLIENT_ID=xxx mcp-outlook # Set client ID via env var\n`.trim();\n\n/** Package metadata read from package.json, resolved relative to this file. */\nexport function readPkg(): { name: string; version: string; repository?: string | { url?: string } } {\n return pkg;\n}\n\n/**\n * Handle --version/--help flags before config parsing.\n * These must work without requiring any configuration or heavy dependency.\n */\nexport function handleVersionHelp(args: string[]): { handled: boolean; output?: string } {\n const { values } = parseArgs({\n args,\n options: {\n version: { type: 'boolean', short: 'v' },\n help: { type: 'boolean', short: 'h' },\n },\n strict: false,\n allowPositionals: true,\n });\n\n if (values.version) return { handled: true, output: pkg.version };\n if (values.help) return { handled: true, output: HELP_TEXT };\n return { handled: false };\n}\n"],"names":["fs","moduleRoot","path","url","parseArgs","pkg","JSON","parse","readFileSync","join","fileURLToPath","HELP_TEXT","trim","readPkg","handleVersionHelp","args","values","options","version","type","short","help","strict","allowPositionals","handled","output"],"mappings":"AAAA,YAAYA,QAAQ,KAAK;AACzB,OAAOC,gBAAgB,mBAAmB;AAC1C,YAAYC,UAAU,OAAO;AAC7B,YAAYC,SAAS,MAAM;AAC3B,SAASC,SAAS,QAAQ,OAAO;AAEjC,mFAAmF;AACnF,+FAA+F;AAC/F,qDAAqD;AACrD,MAAMC,MAAMC,KAAKC,KAAK,CAACP,GAAGQ,YAAY,CAACN,KAAKO,IAAI,CAACR,WAAWE,IAAIO,aAAa,CAAC,YAAYP,GAAG,IAAI,iBAAiB;AAElH,MAAMQ,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsDnB,CAAC,CAACC,IAAI;AAEN,6EAA6E,GAC7E,OAAO,SAASC;IACd,OAAOR;AACT;AAEA;;;CAGC,GACD,OAAO,SAASS,kBAAkBC,IAAc;IAC9C,MAAM,EAAEC,MAAM,EAAE,GAAGZ,UAAU;QAC3BW;QACAE,SAAS;YACPC,SAAS;gBAAEC,MAAM;gBAAWC,OAAO;YAAI;YACvCC,MAAM;gBAAEF,MAAM;gBAAWC,OAAO;YAAI;QACtC;QACAE,QAAQ;QACRC,kBAAkB;IACpB;IAEA,IAAIP,OAAOE,OAAO,EAAE,OAAO;QAAEM,SAAS;QAAMC,QAAQpB,IAAIa,OAAO;IAAC;IAChE,IAAIF,OAAOK,IAAI,EAAE,OAAO;QAAEG,SAAS;QAAMC,QAAQd;IAAU;IAC3D,OAAO;QAAEa,SAAS;IAAM;AAC1B"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/open-source/ai/mcp-z/mcp-outlook/src/setup/version-help.ts"],"sourcesContent":["import * as fs from 'fs';\nimport moduleRoot from 'module-root-sync';\nimport * as path from 'path';\nimport * as url from 'url';\nimport { parseArgs } from 'util';\n\n// Kept dependency-free (fs/path/url/module-root-sync only) so `--version`/`--help`\n// resolve nothing beyond Node startup: config.ts's parseConfig pulls in @mcp-z/oauth-microsoft\n// and @mcp-z/server, which this path must not touch.\nconst pkg = JSON.parse(fs.readFileSync(path.join(moduleRoot(url.fileURLToPath(import.meta.url)), 'package.json'), 'utf-8'));\n\nconst HELP_TEXT = `\nUsage: mcp-outlook [options]\n\nMCP server for Outlook/Microsoft email management with OAuth authentication.\n\nOptions:\n --version Show version number\n --help Show this help message\n --auth=<mode> Authentication mode (default: loopback-oauth)\n Modes: loopback-oauth, device-code, dcr\n --headless Disable browser auto-open, return auth URL instead\n --redirect-uri=<uri> OAuth redirect URI (default: ephemeral loopback)\n --tenant-id=<id> Microsoft tenant ID (overrides MS_TENANT_ID env var)\n --dcr-mode=<mode> DCR mode (self-hosted or external, default: self-hosted)\n --dcr-verify-url=<url> External verification endpoint (required for external mode)\n --dcr-store-uri=<uri> DCR client storage URI (required for self-hosted mode)\n --port=<port> Enable HTTP transport on specified port\n --stdio Enable stdio transport (default if no port)\n --log-level=<level> Logging level (default: info)\n --resource-store-uri=<uri> Resource store URI for CSV file storage (default: file://~/.mcp-z/mcp-outlook/files)\n --base-url=<url> Base URL for HTTP file serving (default: http://localhost for HTTP transports)\n\nEnvironment Variables:\n MS_CLIENT_ID OAuth client ID (REQUIRED)\n MS_TENANT_ID Microsoft tenant ID (REQUIRED)\n MS_CLIENT_SECRET OAuth client secret (optional)\n AUTH_MODE Default authentication mode (optional)\n HEADLESS Disable browser auto-open (optional)\n DCR_MODE DCR mode (optional, same format as --dcr-mode)\n DCR_VERIFY_URL External verification URL (optional, same as --dcr-verify-url)\n DCR_STORE_URI DCR storage URI (optional, same as --dcr-store-uri)\n TOKEN_STORE_URI Token storage URI (optional)\n PORT Default HTTP port (optional)\n LOG_LEVEL Default logging level (optional)\n RESOURCE_STORE_URI Resource store URI (optional, file://)\n BASE_URL Base URL for HTTP file serving (optional)\n\nStorage Backends:\n TOKEN_STORE_URI and DCR_STORE_URI accept any keyv-registry protocol.\n file:// (the default) and memory:// work out of the box. Any other backend\n needs its adapter installed alongside this server:\n npm install -g @keyv/redis\n TOKEN_STORE_URI=redis://localhost:6379 mcp-outlook\n\nOAuth Scopes:\n openid profile offline_access https://graph.microsoft.com/User.Read https://graph.microsoft.com/Mail.ReadWrite https://graph.microsoft.com/Mail.Send https://graph.microsoft.com/MailboxSettings.ReadWrite\n\nExamples:\n mcp-outlook # Use default settings\n mcp-outlook --auth=device-code # Use device code auth\n mcp-outlook --port=3000 # HTTP transport on port 3000\n mcp-outlook --tenant-id=xxx # Set tenant ID\n mcp-outlook --resource-store-uri=file:///tmp/emails # Custom resource store URI\n MS_CLIENT_ID=xxx mcp-outlook # Set client ID via env var\n`.trim();\n\n/** Package metadata read from package.json, resolved relative to this file. */\nexport function readPkg(): { name: string; version: string; repository?: string | { url?: string } } {\n return pkg;\n}\n\n/**\n * Handle --version/--help flags before config parsing.\n * These must work without requiring any configuration or heavy dependency.\n */\nexport function handleVersionHelp(args: string[]): { handled: boolean; output?: string } {\n const { values } = parseArgs({\n args,\n options: {\n version: { type: 'boolean', short: 'v' },\n help: { type: 'boolean', short: 'h' },\n },\n strict: false,\n allowPositionals: true,\n });\n\n if (values.version) return { handled: true, output: pkg.version };\n if (values.help) return { handled: true, output: HELP_TEXT };\n return { handled: false };\n}\n"],"names":["fs","moduleRoot","path","url","parseArgs","pkg","JSON","parse","readFileSync","join","fileURLToPath","HELP_TEXT","trim","readPkg","handleVersionHelp","args","values","options","version","type","short","help","strict","allowPositionals","handled","output"],"mappings":"AAAA,YAAYA,QAAQ,KAAK;AACzB,OAAOC,gBAAgB,mBAAmB;AAC1C,YAAYC,UAAU,OAAO;AAC7B,YAAYC,SAAS,MAAM;AAC3B,SAASC,SAAS,QAAQ,OAAO;AAEjC,mFAAmF;AACnF,+FAA+F;AAC/F,qDAAqD;AACrD,MAAMC,MAAMC,KAAKC,KAAK,CAACP,GAAGQ,YAAY,CAACN,KAAKO,IAAI,CAACR,WAAWE,IAAIO,aAAa,CAAC,YAAYP,GAAG,IAAI,iBAAiB;AAElH,MAAMQ,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsDnB,CAAC,CAACC,IAAI;AAEN,6EAA6E,GAC7E,OAAO,SAASC;IACd,OAAOR;AACT;AAEA;;;CAGC,GACD,OAAO,SAASS,kBAAkBC,IAAc;IAC9C,MAAM,EAAEC,MAAM,EAAE,GAAGZ,UAAU;QAC3BW;QACAE,SAAS;YACPC,SAAS;gBAAEC,MAAM;gBAAWC,OAAO;YAAI;YACvCC,MAAM;gBAAEF,MAAM;gBAAWC,OAAO;YAAI;QACtC;QACAE,QAAQ;QACRC,kBAAkB;IACpB;IAEA,IAAIP,OAAOE,OAAO,EAAE,OAAO;QAAEM,SAAS;QAAMC,QAAQpB,IAAIa,OAAO;IAAC;IAChE,IAAIF,OAAOK,IAAI,EAAE,OAAO;QAAEG,SAAS;QAAMC,QAAQd;IAAU;IAC3D,OAAO;QAAEa,SAAS;IAAM;AAC1B"}
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/kevin/Dev/OpenSource/ai/mcp-z/mcp-outlook/src/types.ts"],"sourcesContent":["import type { DcrConfig, OAuthConfig } from '@mcp-z/oauth-microsoft';\nimport type { BaseServerConfig, MiddlewareLayer, PromptModule, ResourceModule, Logger as ServerLogger, ToolModule } from '@mcp-z/server';\nimport type { Keyv } from 'keyv';\nimport type { OAuthAdapters } from './setup/oauth-microsoft.ts';\n\nexport type Logger = Pick<Console, 'info' | 'error' | 'warn' | 'debug'>;\n\n/**\n * Composes transport config, OAuth config, and application-level config\n */\nexport interface ServerConfig extends BaseServerConfig, OAuthConfig {\n logLevel: string;\n baseDir: string;\n name: string;\n version: string;\n repositoryUrl: string;\n\n // File serving configuration for CSV exports\n resourceStoreUri: string;\n baseUrl?: string;\n\n // DCR configuration (when auth === 'dcr')\n dcrConfig?: DcrConfig;\n}\n\nexport interface StorageContext {\n resourceStoreUri: string;\n baseUrl?: string;\n transport: BaseServerConfig['transport'];\n}\n\nexport interface StorageExtra {\n storageContext: StorageContext;\n}\n\n/** Runtime dependencies exposed to middleware/factories. */\nexport interface RuntimeDeps {\n config: ServerConfig;\n logger: ServerLogger;\n tokenStore: Keyv<unknown>;\n oauthAdapters: OAuthAdapters;\n baseUrl?: string;\n}\n\n/** Collections of MCP modules produced by domain factories. */\nexport type DomainModules = {\n tools: ToolModule[];\n resources: ResourceModule[];\n prompts: PromptModule[];\n};\n\n/** Factory that produces a middleware layer given runtime dependencies. */\nexport type MiddlewareFactory = (deps: RuntimeDeps) => MiddlewareLayer;\n\n/** Shared runtime configuration returned by `createDefaultRuntime`. */\nexport interface CommonRuntime {\n deps: RuntimeDeps;\n middlewareFactories: MiddlewareFactory[];\n createDomainModules: () => DomainModules;\n close: () => Promise<void>;\n}\n\nexport interface RuntimeOverrides {\n middlewareFactories?: MiddlewareFactory[];\n createDomainModules?: () => DomainModules;\n}\n\nexport type { EmailAddress, OneDriveFile, OutlookAttachment, OutlookCalendarEvent, OutlookCategory, OutlookContact, OutlookFolder, OutlookMessage, OutlookQuery, OutlookSystemCategory, Recipient } from './schemas/index.ts';\n"],"names":[],"mappings":"AAmEA,WAA8N"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/open-source/ai/mcp-z/mcp-outlook/src/types.ts"],"sourcesContent":["import type { DcrConfig, OAuthConfig } from '@mcp-z/oauth-microsoft';\nimport type { BaseServerConfig, MiddlewareLayer, PromptModule, ResourceModule, Logger as ServerLogger, ToolModule } from '@mcp-z/server';\nimport type { Keyv } from 'keyv';\nimport type { OAuthAdapters } from './setup/oauth-microsoft.ts';\n\nexport type Logger = Pick<Console, 'info' | 'error' | 'warn' | 'debug'>;\n\n/**\n * Composes transport config, OAuth config, and application-level config\n */\nexport interface ServerConfig extends BaseServerConfig, OAuthConfig {\n logLevel: string;\n baseDir: string;\n name: string;\n version: string;\n repositoryUrl: string;\n\n // File serving configuration for CSV exports\n resourceStoreUri: string;\n baseUrl?: string;\n\n // DCR configuration (when auth === 'dcr')\n dcrConfig?: DcrConfig;\n}\n\nexport interface StorageContext {\n resourceStoreUri: string;\n baseUrl?: string;\n transport: BaseServerConfig['transport'];\n}\n\nexport interface StorageExtra {\n storageContext: StorageContext;\n}\n\n/** Runtime dependencies exposed to middleware/factories. */\nexport interface RuntimeDeps {\n config: ServerConfig;\n logger: ServerLogger;\n tokenStore: Keyv<unknown>;\n oauthAdapters: OAuthAdapters;\n baseUrl?: string;\n}\n\n/** Collections of MCP modules produced by domain factories. */\nexport type DomainModules = {\n tools: ToolModule[];\n resources: ResourceModule[];\n prompts: PromptModule[];\n};\n\n/** Factory that produces a middleware layer given runtime dependencies. */\nexport type MiddlewareFactory = (deps: RuntimeDeps) => MiddlewareLayer;\n\n/** Shared runtime configuration returned by `createDefaultRuntime`. */\nexport interface CommonRuntime {\n deps: RuntimeDeps;\n middlewareFactories: MiddlewareFactory[];\n createDomainModules: () => DomainModules;\n close: () => Promise<void>;\n}\n\nexport interface RuntimeOverrides {\n middlewareFactories?: MiddlewareFactory[];\n createDomainModules?: () => DomainModules;\n}\n\nexport type { EmailAddress, OneDriveFile, OutlookAttachment, OutlookCalendarEvent, OutlookCategory, OutlookContact, OutlookFolder, OutlookMessage, OutlookQuery, OutlookSystemCategory, Recipient } from './schemas/index.ts';\n"],"names":[],"mappings":"AAmEA,WAA8N"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mcp-z/mcp-outlook",
3
- "version": "2.2.1",
3
+ "version": "2.2.3",
4
4
  "description": "MCP server for Outlook integration with OAuth authentication, message search, and batch operations",
5
5
  "keywords": [
6
6
  "outlook",
@@ -63,6 +63,8 @@
63
63
  "prepublish:check": "ncp",
64
64
  "prepublishOnly": "node scripts/require-dist-tag.cjs && tsds validate",
65
65
  "test": "tsds test:node --no-timeouts",
66
+ "test:ci": "tsds test:node --no-timeouts",
67
+ "test:ci:engines": "nvu engines tsds test:node --no-timeouts",
66
68
  "test:engines": "nvu engines tsds test:node --no-timeouts",
67
69
  "test:setup": "node scripts/setup-test.ts",
68
70
  "version": "tsds version"
@@ -84,8 +86,8 @@
84
86
  "zod": "^4.2.0"
85
87
  },
86
88
  "devDependencies": {
87
- "@mcp-z/client": "^2.0.0",
88
- "@modelcontextprotocol/sdk": "^1.0.0",
89
+ "@mcp-z/client": "^2.4.0",
90
+ "@modelcontextprotocol/sdk": "^1.10.0",
89
91
  "@types/cors": "^2.8.19",
90
92
  "@types/express": "^5.0.6",
91
93
  "@types/mocha": "^10.0.10",
@@ -94,6 +96,7 @@
94
96
  "get-port": "5.1.1",
95
97
  "keyv": "^5.0.0",
96
98
  "node-version-use": "^2.4.7",
99
+ "portable-env": "^1.4.0",
97
100
  "ts-dev-stack": "^1.22.1",
98
101
  "tsds-config": "^1.0.4"
99
102
  },