@zahidzorbaz/tudun 1.0.0

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 (145) hide show
  1. package/dist/domain/dto/calendar-event.d.ts +29 -0
  2. package/dist/domain/dto/calendar-event.js +2 -0
  3. package/dist/domain/dto/calendar-event.js.map +1 -0
  4. package/dist/domain/dto/contact.d.ts +26 -0
  5. package/dist/domain/dto/contact.js +2 -0
  6. package/dist/domain/dto/contact.js.map +1 -0
  7. package/dist/domain/dto/email.d.ts +36 -0
  8. package/dist/domain/dto/email.js +2 -0
  9. package/dist/domain/dto/email.js.map +1 -0
  10. package/dist/domain/dto/index.d.ts +4 -0
  11. package/dist/domain/dto/index.js +2 -0
  12. package/dist/domain/dto/index.js.map +1 -0
  13. package/dist/domain/dto/task.d.ts +25 -0
  14. package/dist/domain/dto/task.js +2 -0
  15. package/dist/domain/dto/task.js.map +1 -0
  16. package/dist/domain/ports/auth-service.d.ts +9 -0
  17. package/dist/domain/ports/auth-service.js +2 -0
  18. package/dist/domain/ports/auth-service.js.map +1 -0
  19. package/dist/domain/ports/calendar-service.d.ts +13 -0
  20. package/dist/domain/ports/calendar-service.js +2 -0
  21. package/dist/domain/ports/calendar-service.js.map +1 -0
  22. package/dist/domain/ports/contacts-service.d.ts +10 -0
  23. package/dist/domain/ports/contacts-service.js +2 -0
  24. package/dist/domain/ports/contacts-service.js.map +1 -0
  25. package/dist/domain/ports/gmail-service.d.ts +10 -0
  26. package/dist/domain/ports/gmail-service.js +2 -0
  27. package/dist/domain/ports/gmail-service.js.map +1 -0
  28. package/dist/domain/ports/index.d.ts +5 -0
  29. package/dist/domain/ports/index.js +2 -0
  30. package/dist/domain/ports/index.js.map +1 -0
  31. package/dist/domain/ports/tasks-service.d.ts +15 -0
  32. package/dist/domain/ports/tasks-service.js +2 -0
  33. package/dist/domain/ports/tasks-service.js.map +1 -0
  34. package/dist/infrastructure/config/app-config.d.ts +7 -0
  35. package/dist/infrastructure/config/app-config.js +14 -0
  36. package/dist/infrastructure/config/app-config.js.map +1 -0
  37. package/dist/infrastructure/google/auth.service.d.ts +21 -0
  38. package/dist/infrastructure/google/auth.service.js +196 -0
  39. package/dist/infrastructure/google/auth.service.js.map +1 -0
  40. package/dist/infrastructure/google/calendar.service.d.ts +19 -0
  41. package/dist/infrastructure/google/calendar.service.js +137 -0
  42. package/dist/infrastructure/google/calendar.service.js.map +1 -0
  43. package/dist/infrastructure/google/contacts.service.d.ts +17 -0
  44. package/dist/infrastructure/google/contacts.service.js +182 -0
  45. package/dist/infrastructure/google/contacts.service.js.map +1 -0
  46. package/dist/infrastructure/google/gmail.service.d.ts +17 -0
  47. package/dist/infrastructure/google/gmail.service.js +165 -0
  48. package/dist/infrastructure/google/gmail.service.js.map +1 -0
  49. package/dist/infrastructure/google/index.d.ts +5 -0
  50. package/dist/infrastructure/google/index.js +6 -0
  51. package/dist/infrastructure/google/index.js.map +1 -0
  52. package/dist/infrastructure/google/tasks.service.d.ts +20 -0
  53. package/dist/infrastructure/google/tasks.service.js +133 -0
  54. package/dist/infrastructure/google/tasks.service.js.map +1 -0
  55. package/dist/interface/cli/index.d.ts +2 -0
  56. package/dist/interface/cli/index.js +15 -0
  57. package/dist/interface/cli/index.js.map +1 -0
  58. package/dist/interface/mcp/server.d.ts +2 -0
  59. package/dist/interface/mcp/server.js +84 -0
  60. package/dist/interface/mcp/server.js.map +1 -0
  61. package/dist/interface/mcp/tools/authorize-google.d.ts +3 -0
  62. package/dist/interface/mcp/tools/authorize-google.js +20 -0
  63. package/dist/interface/mcp/tools/authorize-google.js.map +1 -0
  64. package/dist/interface/mcp/tools/complete-task.d.ts +3 -0
  65. package/dist/interface/mcp/tools/complete-task.js +19 -0
  66. package/dist/interface/mcp/tools/complete-task.js.map +1 -0
  67. package/dist/interface/mcp/tools/create-contact.d.ts +3 -0
  68. package/dist/interface/mcp/tools/create-contact.js +34 -0
  69. package/dist/interface/mcp/tools/create-contact.js.map +1 -0
  70. package/dist/interface/mcp/tools/create-event.d.ts +3 -0
  71. package/dist/interface/mcp/tools/create-event.js +32 -0
  72. package/dist/interface/mcp/tools/create-event.js.map +1 -0
  73. package/dist/interface/mcp/tools/create-task-list.d.ts +3 -0
  74. package/dist/interface/mcp/tools/create-task-list.js +18 -0
  75. package/dist/interface/mcp/tools/create-task-list.js.map +1 -0
  76. package/dist/interface/mcp/tools/create-task.d.ts +3 -0
  77. package/dist/interface/mcp/tools/create-task.js +27 -0
  78. package/dist/interface/mcp/tools/create-task.js.map +1 -0
  79. package/dist/interface/mcp/tools/delete-contact.d.ts +3 -0
  80. package/dist/interface/mcp/tools/delete-contact.js +20 -0
  81. package/dist/interface/mcp/tools/delete-contact.js.map +1 -0
  82. package/dist/interface/mcp/tools/delete-event.d.ts +3 -0
  83. package/dist/interface/mcp/tools/delete-event.js +20 -0
  84. package/dist/interface/mcp/tools/delete-event.js.map +1 -0
  85. package/dist/interface/mcp/tools/delete-task.d.ts +3 -0
  86. package/dist/interface/mcp/tools/delete-task.js +21 -0
  87. package/dist/interface/mcp/tools/delete-task.js.map +1 -0
  88. package/dist/interface/mcp/tools/get-event.d.ts +3 -0
  89. package/dist/interface/mcp/tools/get-event.js +18 -0
  90. package/dist/interface/mcp/tools/get-event.js.map +1 -0
  91. package/dist/interface/mcp/tools/get-status.d.ts +3 -0
  92. package/dist/interface/mcp/tools/get-status.js +38 -0
  93. package/dist/interface/mcp/tools/get-status.js.map +1 -0
  94. package/dist/interface/mcp/tools/get-task.d.ts +3 -0
  95. package/dist/interface/mcp/tools/get-task.js +19 -0
  96. package/dist/interface/mcp/tools/get-task.js.map +1 -0
  97. package/dist/interface/mcp/tools/list-contacts.d.ts +3 -0
  98. package/dist/interface/mcp/tools/list-contacts.js +18 -0
  99. package/dist/interface/mcp/tools/list-contacts.js.map +1 -0
  100. package/dist/interface/mcp/tools/list-emails.d.ts +3 -0
  101. package/dist/interface/mcp/tools/list-emails.js +24 -0
  102. package/dist/interface/mcp/tools/list-emails.js.map +1 -0
  103. package/dist/interface/mcp/tools/list-events.d.ts +3 -0
  104. package/dist/interface/mcp/tools/list-events.js +26 -0
  105. package/dist/interface/mcp/tools/list-events.js.map +1 -0
  106. package/dist/interface/mcp/tools/list-task-lists.d.ts +3 -0
  107. package/dist/interface/mcp/tools/list-task-lists.js +15 -0
  108. package/dist/interface/mcp/tools/list-task-lists.js.map +1 -0
  109. package/dist/interface/mcp/tools/list-tasks.d.ts +3 -0
  110. package/dist/interface/mcp/tools/list-tasks.js +25 -0
  111. package/dist/interface/mcp/tools/list-tasks.js.map +1 -0
  112. package/dist/interface/mcp/tools/read-email.d.ts +3 -0
  113. package/dist/interface/mcp/tools/read-email.js +18 -0
  114. package/dist/interface/mcp/tools/read-email.js.map +1 -0
  115. package/dist/interface/mcp/tools/search-contacts.d.ts +3 -0
  116. package/dist/interface/mcp/tools/search-contacts.js +18 -0
  117. package/dist/interface/mcp/tools/search-contacts.js.map +1 -0
  118. package/dist/interface/mcp/tools/send-email.d.ts +3 -0
  119. package/dist/interface/mcp/tools/send-email.js +30 -0
  120. package/dist/interface/mcp/tools/send-email.js.map +1 -0
  121. package/dist/interface/mcp/tools/update-contact.d.ts +3 -0
  122. package/dist/interface/mcp/tools/update-contact.js +33 -0
  123. package/dist/interface/mcp/tools/update-contact.js.map +1 -0
  124. package/dist/interface/mcp/tools/update-event.d.ts +3 -0
  125. package/dist/interface/mcp/tools/update-event.js +31 -0
  126. package/dist/interface/mcp/tools/update-event.js.map +1 -0
  127. package/dist/interface/mcp/tools/update-task.d.ts +3 -0
  128. package/dist/interface/mcp/tools/update-task.js +26 -0
  129. package/dist/interface/mcp/tools/update-task.js.map +1 -0
  130. package/dist/interface/mcp/types.d.ts +12 -0
  131. package/dist/interface/mcp/types.js +2 -0
  132. package/dist/interface/mcp/types.js.map +1 -0
  133. package/dist/shared/errors/index.d.ts +26 -0
  134. package/dist/shared/errors/index.js +46 -0
  135. package/dist/shared/errors/index.js.map +1 -0
  136. package/dist/shared/utils/html-page.d.ts +1 -0
  137. package/dist/shared/utils/html-page.js +9 -0
  138. package/dist/shared/utils/html-page.js.map +1 -0
  139. package/dist/shared/utils/index.d.ts +2 -0
  140. package/dist/shared/utils/index.js +3 -0
  141. package/dist/shared/utils/index.js.map +1 -0
  142. package/dist/shared/utils/open-browser.d.ts +1 -0
  143. package/dist/shared/utils/open-browser.js +10 -0
  144. package/dist/shared/utils/open-browser.js.map +1 -0
  145. package/package.json +43 -0
@@ -0,0 +1,38 @@
1
+ export function registerGetStatusTool(server, deps) {
2
+ server.tool('get_status', 'Get Tudun server status: authorization state, available scopes, and module readiness.', {}, async () => {
3
+ try {
4
+ const isAuthorized = await deps.authService.isAuthorized();
5
+ const scopes = await deps.authService.getAuthorizedScopes();
6
+ const scopeMap = {
7
+ calendar: scopes.some((s) => s.includes('calendar')),
8
+ tasks: scopes.some((s) => s.includes('tasks')),
9
+ gmail: scopes.some((s) => s.includes('gmail')),
10
+ contacts: scopes.some((s) => s.includes('contacts')),
11
+ };
12
+ const status = {
13
+ server: 'tudun',
14
+ version: '1.0.0',
15
+ isAuthorized,
16
+ modules: {
17
+ calendar: scopeMap.calendar ? 'ready' : 'not authorized',
18
+ tasks: scopeMap.tasks ? 'ready' : 'not authorized',
19
+ gmail: scopeMap.gmail ? 'ready' : 'not authorized',
20
+ contacts: scopeMap.contacts ? 'ready' : 'not authorized',
21
+ },
22
+ authorizedScopes: scopes,
23
+ };
24
+ return {
25
+ content: [{ type: 'text', text: JSON.stringify(status, null, 2) }],
26
+ };
27
+ }
28
+ catch (error) {
29
+ return {
30
+ content: [
31
+ { type: 'text', text: JSON.stringify({ error: error.message }) },
32
+ ],
33
+ isError: true,
34
+ };
35
+ }
36
+ });
37
+ }
38
+ //# sourceMappingURL=get-status.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-status.js","sourceRoot":"","sources":["../../../../src/interface/mcp/tools/get-status.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,qBAAqB,C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CAAC,gBAAgB;iBACzD;gBACD,gBAAgB,EAAE,MAAM;aACzB,CAAC;YAEF,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;aAC5E,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO;gBACL,OAAO,EAAE;oBACP,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAG,KAAe,CAAC,OAAO,EAAE,CAAC,EAAE;iBACrF;gBACD,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ import type { Dependencies } from '../types.js';
3
+ export declare function registerGetTaskTool(server: McpServer, deps: Dependencies): void;
@@ -0,0 +1,19 @@
1
+ import { z } from 'zod/v4';
2
+ export function registerGetTaskTool(server, deps) {
3
+ server.tool('get_task', 'Get full details of a specific Google Task by ID.', {
4
+ task_id: z.string().describe('Task ID'),
5
+ task_list_id: z.string().optional().describe('Task list ID (default: "@default")'),
6
+ }, async ({ task_id, task_list_id }) => {
7
+ try {
8
+ const result = await deps.tasksService.getTask(task_list_id ?? '@default', task_id);
9
+ return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
10
+ }
11
+ catch (error) {
12
+ return {
13
+ content: [{ type: 'text', text: JSON.stringify({ error: error.message }) }],
14
+ isError: true,
15
+ };
16
+ }
17
+ });
18
+ }
19
+ //# sourceMappingURL=get-task.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-task.js","sourceRoot":"","sources":["../../../../src/interface/mcp/tools/get-task.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAG3B,MAAM,UAAU,mBAAmB,CAAC,MAAiB,EAAE,IAAkB;IACvE,MAAM,CAAC,IAAI,CACT,UAAU,EACV,mDAAmD,EACnD;QACE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC;QACvC,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,oCAAoC,CAAC;KACnF,EACD,KAAK,EAAE,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,EAAE;QAClC,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,YAAY,IAAI,UAAU,EAAE,OAAO,CAAC,CAAC;YACpF,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;QACzF,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAG,KAAe,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC;gBAC/F,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ import type { Dependencies } from '../types.js';
3
+ export declare function registerListContactsTool(server: McpServer, deps: Dependencies): void;
@@ -0,0 +1,18 @@
1
+ import { z } from 'zod/v4';
2
+ export function registerListContactsTool(server, deps) {
3
+ server.tool('list_contacts', 'List Google Contacts sorted by name.', {
4
+ page_size: z.number().optional().describe('Number of contacts to return (default: 50, max: 100)'),
5
+ }, async ({ page_size }) => {
6
+ try {
7
+ const result = await deps.contactsService.listContacts({ pageSize: page_size });
8
+ return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
9
+ }
10
+ catch (error) {
11
+ return {
12
+ content: [{ type: 'text', text: JSON.stringify({ error: error.message }) }],
13
+ isError: true,
14
+ };
15
+ }
16
+ });
17
+ }
18
+ //# sourceMappingURL=list-contacts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-contacts.js","sourceRoot":"","sources":["../../../../src/interface/mcp/tools/list-contacts.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAG3B,MAAM,UAAU,wBAAwB,CAAC,MAAiB,EAAE,IAAkB;IAC5E,MAAM,CAAC,IAAI,CACT,eAAe,EACf,sCAAsC,EACtC;QACE,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,sDAAsD,CAAC;KAClG,EACD,KAAK,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;QACtB,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,CAAC;YAChF,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;QACzF,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAG,KAAe,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC;gBAC/F,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ import type { Dependencies } from '../types.js';
3
+ export declare function registerListEmailsTool(server: McpServer, deps: Dependencies): void;
@@ -0,0 +1,24 @@
1
+ import { z } from 'zod/v4';
2
+ export function registerListEmailsTool(server, deps) {
3
+ server.tool('list_emails', 'List emails from Gmail. Supports Gmail search syntax for filtering.', {
4
+ query: z.string().optional().describe('Gmail search query (e.g., "from:user@example.com", "is:unread", "subject:meeting")'),
5
+ max_results: z.number().optional().describe('Maximum number of emails to return (default: 20, max: 50)'),
6
+ label_ids: z.array(z.string()).optional().describe('Filter by label IDs (e.g., ["INBOX", "UNREAD"])'),
7
+ }, async ({ query, max_results, label_ids }) => {
8
+ try {
9
+ const result = await deps.gmailService.listEmails({
10
+ query,
11
+ maxResults: max_results,
12
+ labelIds: label_ids,
13
+ });
14
+ return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
15
+ }
16
+ catch (error) {
17
+ return {
18
+ content: [{ type: 'text', text: JSON.stringify({ error: error.message }) }],
19
+ isError: true,
20
+ };
21
+ }
22
+ });
23
+ }
24
+ //# sourceMappingURL=list-emails.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-emails.js","sourceRoot":"","sources":["../../../../src/interface/mcp/tools/list-emails.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAG3B,MAAM,UAAU,sBAAsB,CAAC,MAAiB,EAAE,IAAkB;IAC1E,MAAM,CAAC,IAAI,CACT,aAAa,EACb,qEAAqE,EACrE;QACE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,oFAAoF,CAAC;QAC3H,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,2DAA2D,CAAC;QACxG,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,iDAAiD,CAAC;KACtG,EACD,KAAK,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,EAAE,EAAE;QAC1C,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC;gBAChD,KAAK;gBACL,UAAU,EAAE,WAAW;gBACvB,QAAQ,EAAE,SAAS;aACpB,CAAC,CAAC;YACH,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;QACzF,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAG,KAAe,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC;gBAC/F,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ import type { Dependencies } from '../types.js';
3
+ export declare function registerListEventsTool(server: McpServer, deps: Dependencies): void;
@@ -0,0 +1,26 @@
1
+ import { z } from 'zod/v4';
2
+ export function registerListEventsTool(server, deps) {
3
+ server.tool('list_events', 'List upcoming Google Calendar events within a time range. Defaults to next 7 days.', {
4
+ time_min: z.string().optional().describe('Lower bound for event start time in ISO 8601. Defaults to now.'),
5
+ time_max: z.string().optional().describe('Upper bound for event start time in ISO 8601. Defaults to 7 days from now.'),
6
+ max_results: z.number().optional().describe('Maximum number of events to return (default: 20, max: 100)'),
7
+ query: z.string().optional().describe('Free text search terms to find events'),
8
+ }, async ({ time_min, time_max, max_results, query }) => {
9
+ try {
10
+ const result = await deps.calendarService.listEvents({
11
+ timeMin: time_min,
12
+ timeMax: time_max,
13
+ maxResults: max_results,
14
+ query,
15
+ });
16
+ return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
17
+ }
18
+ catch (error) {
19
+ return {
20
+ content: [{ type: 'text', text: JSON.stringify({ error: error.message }) }],
21
+ isError: true,
22
+ };
23
+ }
24
+ });
25
+ }
26
+ //# sourceMappingURL=list-events.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-events.js","sourceRoot":"","sources":["../../../../src/interface/mcp/tools/list-events.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAG3B,MAAM,UAAU,sBAAsB,CAAC,MAAiB,EAAE,IAAkB;IAC1E,MAAM,CAAC,IAAI,CACT,aAAa,EACb,oFAAoF,EACpF;QACE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,gEAAgE,CAAC;QAC1G,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,4EAA4E,CAAC;QACtH,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,4DAA4D,CAAC;QACzG,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,uCAAuC,CAAC;KAC/E,EACD,KAAK,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE,EAAE,EAAE;QACnD,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,UAAU,CAAC;gBACnD,OAAO,EAAE,QAAQ;gBACjB,OAAO,EAAE,QAAQ;gBACjB,UAAU,EAAE,WAAW;gBACvB,KAAK;aACN,CAAC,CAAC;YACH,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;QACzF,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAG,KAAe,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC;gBAC/F,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ import type { Dependencies } from '../types.js';
3
+ export declare function registerListTaskListsTool(server: McpServer, deps: Dependencies): void;
@@ -0,0 +1,15 @@
1
+ export function registerListTaskListsTool(server, deps) {
2
+ server.tool('list_task_lists', 'List all Google Task lists.', {}, async () => {
3
+ try {
4
+ const result = await deps.tasksService.listTaskLists();
5
+ return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
6
+ }
7
+ catch (error) {
8
+ return {
9
+ content: [{ type: 'text', text: JSON.stringify({ error: error.message }) }],
10
+ isError: true,
11
+ };
12
+ }
13
+ });
14
+ }
15
+ //# sourceMappingURL=list-task-lists.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-task-lists.js","sourceRoot":"","sources":["../../../../src/interface/mcp/tools/list-task-lists.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,yBAAyB,CAAC,MAAiB,EAAE,IAAkB;IAC7E,MAAM,CAAC,IAAI,CACT,iBAAiB,EACjB,6BAA6B,EAC7B,EAAE,EACF,KAAK,IAAI,EAAE;QACT,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,aAAa,EAAE,CAAC;YACvD,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;QACzF,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAG,KAAe,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC;gBAC/F,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ import type { Dependencies } from '../types.js';
3
+ export declare function registerListTasksTool(server: McpServer, deps: Dependencies): void;
@@ -0,0 +1,25 @@
1
+ import { z } from 'zod/v4';
2
+ export function registerListTasksTool(server, deps) {
3
+ server.tool('list_tasks', 'List tasks from a Google Task list. By default shows only active tasks from the primary list.', {
4
+ task_list_id: z.string().optional().describe('Task list ID (default: "@default" for primary list)'),
5
+ show_completed: z.boolean().optional().describe('Show completed tasks (default: false)'),
6
+ show_hidden: z.boolean().optional().describe('Show hidden tasks (default: false)'),
7
+ max_results: z.number().optional().describe('Maximum number of tasks to return (default: 50, max: 100)'),
8
+ }, async ({ task_list_id, show_completed, show_hidden, max_results }) => {
9
+ try {
10
+ const result = await deps.tasksService.listTasks(task_list_id ?? '@default', {
11
+ showCompleted: show_completed,
12
+ showHidden: show_hidden,
13
+ maxResults: max_results,
14
+ });
15
+ return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
16
+ }
17
+ catch (error) {
18
+ return {
19
+ content: [{ type: 'text', text: JSON.stringify({ error: error.message }) }],
20
+ isError: true,
21
+ };
22
+ }
23
+ });
24
+ }
25
+ //# sourceM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IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAG,KAAe,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC;gBAC/F,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ import type { Dependencies } from '../types.js';
3
+ export declare function registerReadEmailTool(server: McpServer, deps: Dependencies): void;
@@ -0,0 +1,18 @@
1
+ import { z } from 'zod/v4';
2
+ export function registerReadEmailTool(server, deps) {
3
+ server.tool('read_email', 'Read the full content of a specific email by message ID.', {
4
+ message_id: z.string().describe('Gmail message ID'),
5
+ }, async ({ message_id }) => {
6
+ try {
7
+ const result = await deps.gmailService.readEmail(message_id);
8
+ return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
9
+ }
10
+ catch (error) {
11
+ return {
12
+ content: [{ type: 'text', text: JSON.stringify({ error: error.message }) }],
13
+ isError: true,
14
+ };
15
+ }
16
+ });
17
+ }
18
+ //# sourceMappingURL=read-email.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"read-email.js","sourceRoot":"","sources":["../../../../src/interface/mcp/tools/read-email.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAG3B,MAAM,UAAU,qBAAqB,CAAC,MAAiB,EAAE,IAAkB;IACzE,MAAM,CAAC,IAAI,CACT,YAAY,EACZ,0DAA0D,EAC1D;QACE,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,kBAAkB,CAAC;KACpD,EACD,KAAK,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE;QACvB,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;YAC7D,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;QACzF,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAG,KAAe,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC;gBAC/F,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ import type { Dependencies } from '../types.js';
3
+ export declare function registerSearchContactsTool(server: McpServer, deps: Dependencies): void;
@@ -0,0 +1,18 @@
1
+ import { z } from 'zod/v4';
2
+ export function registerSearchContactsTool(server, deps) {
3
+ server.tool('search_contacts', 'Search Google Contacts by name, email, or phone number.', {
4
+ query: z.string().describe('Search query (searches names, emails, phone numbers)'),
5
+ }, async ({ query }) => {
6
+ try {
7
+ const result = await deps.contactsService.searchContacts(query);
8
+ return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
9
+ }
10
+ catch (error) {
11
+ return {
12
+ content: [{ type: 'text', text: JSON.stringify({ error: error.message }) }],
13
+ isError: true,
14
+ };
15
+ }
16
+ });
17
+ }
18
+ //# sourceMappingURL=search-contacts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-contacts.js","sourceRoot":"","sources":["../../../../src/interface/mcp/tools/search-contacts.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAG3B,MAAM,UAAU,0BAA0B,CAAC,MAAiB,EAAE,IAAkB;IAC9E,MAAM,CAAC,IAAI,CACT,iBAAiB,EACjB,yDAAyD,EACzD;QACE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,sDAAsD,CAAC;KACnF,EACD,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;QAClB,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;YAChE,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;QACzF,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAG,KAAe,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC;gBAC/F,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ import type { Dependencies } from '../types.js';
3
+ export declare function registerSendEmailTool(server: McpServer, deps: Dependencies): void;
@@ -0,0 +1,30 @@
1
+ import { z } from 'zod/v4';
2
+ export function registerSendEmailTool(server, deps) {
3
+ server.tool('send_email', 'Send an email via Gmail. Supports CC, BCC, and reply threading.', {
4
+ to: z.array(z.string()).describe('Recipient email addresses'),
5
+ subject: z.string().describe('Email subject line'),
6
+ body: z.string().describe('Email body (plain text)'),
7
+ cc: z.array(z.string()).optional().describe('CC email addresses'),
8
+ bcc: z.array(z.string()).optional().describe('BCC email addresses'),
9
+ reply_to_message_id: z.string().optional().describe('Message ID to reply to (for threading)'),
10
+ }, async ({ to, subject, body, cc, bcc, reply_to_message_id }) => {
11
+ try {
12
+ const result = await deps.gmailService.sendEmail({
13
+ to,
14
+ subject,
15
+ body,
16
+ cc,
17
+ bcc,
18
+ replyToMessageId: reply_to_message_id,
19
+ });
20
+ return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
21
+ }
22
+ catch (error) {
23
+ return {
24
+ content: [{ type: 'text', text: JSON.stringify({ error: error.message }) }],
25
+ isError: true,
26
+ };
27
+ }
28
+ });
29
+ }
30
+ //# sourceMappingURL=send-email.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"send-email.js","sourceRoot":"","sources":["../../../../src/interface/mcp/tools/send-email.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAG3B,MAAM,UAAU,qBAAqB,CAAC,MAAiB,EAAE,IAAkB;IACzE,MAAM,CAAC,IAAI,CACT,YAAY,EACZ,iEAAiE,EACjE;QACE,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC,2BAA2B,CAAC;QAC7D,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,oBAAoB,CAAC;QAClD,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,yBAAyB,CAAC;QACpD,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,oBAAoB,CAAC;QACjE,GAAG,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,qBAAqB,CAAC;QACnE,mBAAmB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,wCAAwC,CAAC;KAC9F,EACD,KAAK,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,EAAE,mBAAmB,EAAE,EAAE,EAAE;QAC5D,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC;gBAC/C,EAAE;gBACF,OAAO;gBACP,IAAI;gBACJ,EAAE;gBACF,GAAG;gBACH,gBAAgB,EAAE,mBAAmB;aACtC,CAAC,CAAC;YACH,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;QACzF,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAG,KAAe,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC;gBAC/F,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ import type { Dependencies } from '../types.js';
3
+ export declare function registerUpdateContactTool(server: McpServer, deps: Dependencies): void;
@@ -0,0 +1,33 @@
1
+ import { z } from 'zod/v4';
2
+ export function registerUpdateContactTool(server, deps) {
3
+ server.tool('update_contact', 'Update an existing Google Contact. Only provided fields are changed.', {
4
+ resource_name: z.string().describe('Contact resource name (e.g., "people/c1234567890")'),
5
+ first_name: z.string().optional().describe('New first name'),
6
+ last_name: z.string().optional().describe('New last name'),
7
+ phone: z.string().optional().describe('New phone number'),
8
+ email: z.string().optional().describe('New email address'),
9
+ company: z.string().optional().describe('New company name'),
10
+ title: z.string().optional().describe('New job title'),
11
+ notes: z.string().optional().describe('New notes'),
12
+ }, async ({ resource_name, first_name, last_name, phone, email, company, title, notes }) => {
13
+ try {
14
+ const result = await deps.contactsService.updateContact(resource_name, {
15
+ firstName: first_name,
16
+ lastName: last_name,
17
+ phone,
18
+ email,
19
+ company,
20
+ title,
21
+ notes,
22
+ });
23
+ return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
24
+ }
25
+ catch (error) {
26
+ return {
27
+ content: [{ type: 'text', text: JSON.stringify({ error: error.message }) }],
28
+ isError: true,
29
+ };
30
+ }
31
+ });
32
+ }
33
+ //# sourceMappingURL=update-contact.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-contact.js","sourceRoot":"","sources":["../../../../src/interface/mcp/tools/update-contact.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAG3B,MAAM,UAAU,yBAAyB,CAAC,MAAiB,EAAE,IAAkB;IAC7E,MAAM,CAAC,IAAI,CACT,gBAAgB,EAChB,sEAAsE,EACtE;QACE,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,oDAAoD,CAAC;QACxF,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,gBAAgB,CAAC;QAC5D,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,eAAe,CAAC;QAC1D,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,kBAAkB,CAAC;QACzD,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC;QAC1D,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,kBAAkB,CAAC;QAC3D,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,eAAe,CAAC;QACtD,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,WAAW,CAAC;KACnD,EACD,KAAK,EAAE,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE;QACtF,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,aAAa,CAAC,aAAa,EAAE;gBACrE,SAAS,EAAE,UAAU;gBACrB,QAAQ,EAAE,SAAS;gBACnB,KAAK;gBACL,KAAK;gBACL,OAAO;gBACP,KAAK;gBACL,KAAK;aACN,CAAC,CAAC;YACH,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;QACzF,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAG,KAAe,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC;gBAC/F,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ import type { Dependencies } from '../types.js';
3
+ export declare function registerUpdateEventTool(server: McpServer, deps: Dependencies): void;
@@ -0,0 +1,31 @@
1
+ import { z } from 'zod/v4';
2
+ export function registerUpdateEventTool(server, deps) {
3
+ server.tool('update_event', 'Update an existing Google Calendar event. Only provided fields are changed.', {
4
+ event_id: z.string().describe('Google Calendar event ID to update'),
5
+ title: z.string().optional().describe('New event title'),
6
+ start_time: z.string().optional().describe('New start time in ISO 8601 format'),
7
+ end_time: z.string().optional().describe('New end time in ISO 8601 format'),
8
+ description: z.string().optional().describe('New event description'),
9
+ location: z.string().optional().describe('New event location'),
10
+ attendees: z.array(z.string()).optional().describe('New list of attendee email addresses (replaces existing)'),
11
+ }, async ({ event_id, title, start_time, end_time, description, location, attendees }) => {
12
+ try {
13
+ const result = await deps.calendarService.updateEvent(event_id, {
14
+ title,
15
+ startTime: start_time,
16
+ endTime: end_time,
17
+ description,
18
+ location,
19
+ attendees,
20
+ });
21
+ return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
22
+ }
23
+ catch (error) {
24
+ return {
25
+ content: [{ type: 'text', text: JSON.stringify({ error: error.message }) }],
26
+ isError: true,
27
+ };
28
+ }
29
+ });
30
+ }
31
+ //# sourceMappingURL=update-event.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-event.js","sourceRoot":"","sources":["../../../../src/interface/mcp/tools/update-event.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAG3B,MAAM,UAAU,uBAAuB,CAAC,MAAiB,EAAE,IAAkB;IAC3E,MAAM,CAAC,IAAI,CACT,cAAc,EACd,6EAA6E,EAC7E;QACE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,oCAAoC,CAAC;QACnE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,iBAAiB,CAAC;QACxD,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,mCAAmC,CAAC;QAC/E,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,iCAAiC,CAAC;QAC3E,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,uBAAuB,CAAC;QACpE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,oBAAoB,CAAC;QAC9D,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,0DAA0D,CAAC;KAC/G,EACD,KAAK,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,EAAE;QACpF,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC,QAAQ,EAAE;gBAC9D,KAAK;gBACL,SAAS,EAAE,UAAU;gBACrB,OAAO,EAAE,QAAQ;gBACjB,WAAW;gBACX,QAAQ;gBACR,SAAS;aACV,CAAC,CAAC;YACH,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;QACzF,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAG,KAAe,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC;gBAC/F,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ import type { Dependencies } from '../types.js';
3
+ export declare function registerUpdateTaskTool(server: McpServer, deps: Dependencies): void;
@@ -0,0 +1,26 @@
1
+ import { z } from 'zod/v4';
2
+ export function registerUpdateTaskTool(server, deps) {
3
+ server.tool('update_task', 'Update an existing Google Task. Only provided fields are changed.', {
4
+ task_id: z.string().describe('Task ID to update'),
5
+ task_list_id: z.string().optional().describe('Task list ID (default: "@default")'),
6
+ title: z.string().optional().describe('New task title'),
7
+ notes: z.string().optional().describe('New task notes'),
8
+ due: z.string().optional().describe('New due date in RFC 3339 format'),
9
+ }, async ({ task_id, task_list_id, title, notes, due }) => {
10
+ try {
11
+ const result = await deps.tasksService.updateTask(task_list_id ?? '@default', task_id, {
12
+ title,
13
+ notes,
14
+ due,
15
+ });
16
+ return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
17
+ }
18
+ catch (error) {
19
+ return {
20
+ content: [{ type: 'text', text: JSON.stringify({ error: error.message }) }],
21
+ isError: true,
22
+ };
23
+ }
24
+ });
25
+ }
26
+ //# sourceMappingURL=update-task.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-task.js","sourceRoot":"","sources":["../../../../src/interface/mcp/tools/update-task.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAG3B,MAAM,UAAU,sBAAsB,CAAC,MAAiB,EAAE,IAAkB;IAC1E,MAAM,CAAC,IAAI,CACT,aAAa,EACb,mEAAmE,EACnE;QACE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC;QACjD,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,oCAAoC,CAAC;QAClF,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,gBAAgB,CAAC;QACvD,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,gBAAgB,CAAC;QACvD,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,iCAAiC,CAAC;KACvE,EACD,KAAK,EAAE,EAAE,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE;QACrD,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,YAAY,IAAI,UAAU,EAAE,OAAO,EAAE;gBACrF,KAAK;gBACL,KAAK;gBACL,GAAG;aACJ,CAAC,CAAC;YACH,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;QACzF,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAG,KAAe,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC;gBAC/F,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { IAuthService } from '../../domain/ports/auth-service.js';
2
+ import type { ICalendarService } from '../../domain/ports/calendar-service.js';
3
+ import type { ITasksService } from '../../domain/ports/tasks-service.js';
4
+ import type { IContactsService } from '../../domain/ports/contacts-service.js';
5
+ import type { IGmailService } from '../../domain/ports/gmail-service.js';
6
+ export interface Dependencies {
7
+ authService: IAuthService;
8
+ calendarService: ICalendarService;
9
+ tasksService: ITasksService;
10
+ contactsService: IContactsService;
11
+ gmailService: IGmailService;
12
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/interface/mcp/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,26 @@
1
+ export declare class AppError extends Error {
2
+ readonly code: string;
3
+ readonly cause?: unknown | undefined;
4
+ constructor(code: string, message: string, cause?: unknown | undefined);
5
+ }
6
+ export declare class AuthError extends AppError {
7
+ constructor(message: string, cause?: unknown);
8
+ }
9
+ export declare class CalendarError extends AppError {
10
+ constructor(message: string, cause?: unknown);
11
+ }
12
+ export declare class TasksError extends AppError {
13
+ constructor(message: string, cause?: unknown);
14
+ }
15
+ export declare class GmailError extends AppError {
16
+ constructor(message: string, cause?: unknown);
17
+ }
18
+ export declare class ContactsError extends AppError {
19
+ constructor(message: string, cause?: unknown);
20
+ }
21
+ export declare class ValidationError extends AppError {
22
+ constructor(message: string);
23
+ }
24
+ export declare class NotFoundError extends AppError {
25
+ constructor(resource: string, id: string);
26
+ }
@@ -0,0 +1,46 @@
1
+ export class AppError extends Error {
2
+ code;
3
+ cause;
4
+ constructor(code, message, cause) {
5
+ super(message);
6
+ this.code = code;
7
+ this.cause = cause;
8
+ this.name = this.constructor.name;
9
+ }
10
+ }
11
+ export class AuthError extends AppError {
12
+ constructor(message, cause) {
13
+ super('AUTH_ERROR', message, cause);
14
+ }
15
+ }
16
+ export class CalendarError extends AppError {
17
+ constructor(message, cause) {
18
+ super('CALENDAR_ERROR', message, cause);
19
+ }
20
+ }
21
+ export class TasksError extends AppError {
22
+ constructor(message, cause) {
23
+ super('TASKS_ERROR', message, cause);
24
+ }
25
+ }
26
+ export class GmailError extends AppError {
27
+ constructor(message, cause) {
28
+ super('GMAIL_ERROR', message, cause);
29
+ }
30
+ }
31
+ export class ContactsError extends AppError {
32
+ constructor(message, cause) {
33
+ super('CONTACTS_ERROR', message, cause);
34
+ }
35
+ }
36
+ export class ValidationError extends AppError {
37
+ constructor(message) {
38
+ super('VALIDATION_ERROR', message);
39
+ }
40
+ }
41
+ export class NotFoundError extends AppError {
42
+ constructor(resource, id) {
43
+ super('NOT_FOUND', `${resource} not found: ${id}`);
44
+ }
45
+ }
46
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/shared/errors/index.ts"],"names":[],"mappings":"AA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E,GAAG,QAAQ,eAAe,EAAE,EAAE,CAAC,CAAC;IACrD,CAAC;CACF"}
@@ -0,0 +1 @@
1
+ export declare function htmlPage(title: string, message: string): string;
@@ -0,0 +1,9 @@
1
+ export function htmlPage(title, message) {
2
+ return `<!DOCTYPE html>
3
+ <html><head><meta charset="utf-8"><title>Tudun</title>
4
+ <style>body{font-family:system-ui;display:flex;justify-content:center;align-items:center;min-height:100vh;margin:0;background:#f8fafc}
5
+ .card{text-align:center;padding:3rem;border-radius:1rem;background:white;box-shadow:0 4px 24px rgba(0,0,0,.08)}
6
+ h1{color:#0f172a;margin-bottom:.5rem}p{color:#64748b}</style>
7
+ </head><body><div class="card"><h1>${title}</h1><p>${message}</p></div></body></html>`;
8
+ }
9
+ //# sourceMappingURL=html-page.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"html-page.js","sourceRoot":"","sources":["../../../src/shared/utils/html-page.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,QAAQ,CAAC,KAAa,EAAE,OAAe;IACrD,OAAO;;;;;qCAK4B,KAAK,WAAW,OAAO,0BAA0B,CAAC;AACvF,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { openBrowser } from './open-browser.js';
2
+ export { htmlPage } from './html-page.js';
@@ -0,0 +1,3 @@
1
+ export { openBrowser } from './open-browser.js';
2
+ export { htmlPage } from './html-page.js';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/shared/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1 @@
1
+ export declare function openBrowser(url: string): void;
@@ -0,0 +1,10 @@
1
+ import { exec } from 'node:child_process';
2
+ export function openBrowser(url) {
3
+ const cmd = process.platform === 'win32'
4
+ ? `start "" "${url}"`
5
+ : process.platform === 'darwin'
6
+ ? `open "${url}"`
7
+ : `xdg-open "${url}"`;
8
+ exec(cmd);
9
+ }
10
+ //# sourceMappingURL=open-browser.js.map