bn-google-workspace-mcp-server 0.0.1

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 (75) hide show
  1. package/README.md +718 -0
  2. package/dist/debug-middleware.d.ts +12 -0
  3. package/dist/debug-middleware.d.ts.map +1 -0
  4. package/dist/debug-middleware.js +36 -0
  5. package/dist/debug-middleware.js.map +1 -0
  6. package/dist/google-api-client.d.ts +46 -0
  7. package/dist/google-api-client.d.ts.map +1 -0
  8. package/dist/google-api-client.js +76 -0
  9. package/dist/google-api-client.js.map +1 -0
  10. package/dist/helpers.d.ts +40 -0
  11. package/dist/helpers.d.ts.map +1 -0
  12. package/dist/helpers.js +171 -0
  13. package/dist/helpers.js.map +1 -0
  14. package/dist/index.d.ts +9 -0
  15. package/dist/index.d.ts.map +1 -0
  16. package/dist/index.js +166 -0
  17. package/dist/index.js.map +1 -0
  18. package/dist/schemas.d.ts +303 -0
  19. package/dist/schemas.d.ts.map +1 -0
  20. package/dist/schemas.js +611 -0
  21. package/dist/schemas.js.map +1 -0
  22. package/dist/tool-loader.d.ts +35 -0
  23. package/dist/tool-loader.d.ts.map +1 -0
  24. package/dist/tool-loader.js +121 -0
  25. package/dist/tool-loader.js.map +1 -0
  26. package/dist/tool-registry.d.ts +44 -0
  27. package/dist/tool-registry.d.ts.map +1 -0
  28. package/dist/tool-registry.js +56 -0
  29. package/dist/tool-registry.js.map +1 -0
  30. package/dist/tools/calendar.d.ts +44 -0
  31. package/dist/tools/calendar.d.ts.map +1 -0
  32. package/dist/tools/calendar.js +76 -0
  33. package/dist/tools/calendar.js.map +1 -0
  34. package/dist/tools/chat.d.ts +29 -0
  35. package/dist/tools/chat.d.ts.map +1 -0
  36. package/dist/tools/chat.js +42 -0
  37. package/dist/tools/chat.js.map +1 -0
  38. package/dist/tools/docs.d.ts +29 -0
  39. package/dist/tools/docs.d.ts.map +1 -0
  40. package/dist/tools/docs.js +63 -0
  41. package/dist/tools/docs.js.map +1 -0
  42. package/dist/tools/drive.d.ts +45 -0
  43. package/dist/tools/drive.d.ts.map +1 -0
  44. package/dist/tools/drive.js +135 -0
  45. package/dist/tools/drive.js.map +1 -0
  46. package/dist/tools/forms.d.ts +30 -0
  47. package/dist/tools/forms.d.ts.map +1 -0
  48. package/dist/tools/forms.js +46 -0
  49. package/dist/tools/forms.js.map +1 -0
  50. package/dist/tools/gmail.d.ts +55 -0
  51. package/dist/tools/gmail.d.ts.map +1 -0
  52. package/dist/tools/gmail.js +112 -0
  53. package/dist/tools/gmail.js.map +1 -0
  54. package/dist/tools/index.d.ts +13 -0
  55. package/dist/tools/index.d.ts.map +1 -0
  56. package/dist/tools/index.js +22 -0
  57. package/dist/tools/index.js.map +1 -0
  58. package/dist/tools/sheets.d.ts +40 -0
  59. package/dist/tools/sheets.d.ts.map +1 -0
  60. package/dist/tools/sheets.js +64 -0
  61. package/dist/tools/sheets.js.map +1 -0
  62. package/dist/tools/slides.d.ts +32 -0
  63. package/dist/tools/slides.d.ts.map +1 -0
  64. package/dist/tools/slides.js +46 -0
  65. package/dist/tools/slides.js.map +1 -0
  66. package/dist/tools/tasks.d.ts +43 -0
  67. package/dist/tools/tasks.d.ts.map +1 -0
  68. package/dist/tools/tasks.js +69 -0
  69. package/dist/tools/tasks.js.map +1 -0
  70. package/dist/types.d.ts +110 -0
  71. package/dist/types.d.ts.map +1 -0
  72. package/dist/types.js +2 -0
  73. package/dist/types.js.map +1 -0
  74. package/package.json +54 -0
  75. package/tools.json +379 -0
@@ -0,0 +1,121 @@
1
+ /**
2
+ * Tool configuration loader
3
+ * Loads tool definitions from tools.json and validates them
4
+ *
5
+ * Supports loading from (in priority order):
6
+ * 1. Custom path via TOOLS_CONFIG_PATH environment variable
7
+ * 2. tools.json in current working directory (for development)
8
+ * 3. tools.json in package installation directory (for npx/installed usage)
9
+ */
10
+ import { readFileSync, existsSync } from "fs";
11
+ import { resolve, isAbsolute, dirname } from "path";
12
+ import { homedir } from "os";
13
+ import { fileURLToPath } from "url";
14
+ let cachedTools = null;
15
+ let lastLoadTime = 0;
16
+ let lastLoadPath = "";
17
+ /**
18
+ * Resolve the tools configuration file path
19
+ * Supports:
20
+ * - Environment variable: TOOLS_CONFIG_PATH
21
+ * - Absolute paths: /Users/username/Desktop/tools.json
22
+ * - Relative paths: ./tools.json, ../config/tools.json
23
+ * - Home directory: ~/Desktop/tools.json
24
+ * - Default: tools.json in current working directory
25
+ * - Fallback: tools.json in package installation directory
26
+ */
27
+ function resolveToolsPath() {
28
+ // Check environment variable first
29
+ const envPath = process.env.TOOLS_CONFIG_PATH;
30
+ if (envPath) {
31
+ // Expand ~ to home directory
32
+ const expandedPath = envPath.startsWith("~/")
33
+ ? resolve(homedir(), envPath.slice(2))
34
+ : envPath;
35
+ // If absolute path, use as-is
36
+ if (isAbsolute(expandedPath)) {
37
+ return expandedPath;
38
+ }
39
+ // Otherwise resolve relative to current working directory
40
+ return resolve(process.cwd(), expandedPath);
41
+ }
42
+ // Try current working directory first (for dev mode)
43
+ const cwdPath = resolve(process.cwd(), "tools.json");
44
+ if (existsSync(cwdPath)) {
45
+ return cwdPath;
46
+ }
47
+ // Fallback: tools.json in package installation directory (for npx/installed usage)
48
+ // Get the directory of this module file
49
+ const moduleDir = dirname(fileURLToPath(import.meta.url));
50
+ // Go up from dist/tool-loader.js to package root
51
+ const packageRoot = resolve(moduleDir, "..");
52
+ const packagePath = resolve(packageRoot, "tools.json");
53
+ return packagePath;
54
+ }
55
+ /**
56
+ * Load tool definitions from tools.json
57
+ * Uses caching in production, always reloads in development
58
+ */
59
+ export function loadToolDefinitions(forceReload = false) {
60
+ const isDev = process.env.NODE_ENV !== "production";
61
+ const now = Date.now();
62
+ // Get the tools config path
63
+ const toolsPath = resolveToolsPath();
64
+ // In production, cache tools and only reload if forced or path changed
65
+ // In development, reload every time (for nodemon compatibility)
66
+ if (!isDev && !forceReload && cachedTools && (now - lastLoadTime) < 60000 && lastLoadPath === toolsPath) {
67
+ return cachedTools;
68
+ }
69
+ try {
70
+ // Check if file exists
71
+ if (!existsSync(toolsPath)) {
72
+ throw new Error(`Tools configuration file not found: ${toolsPath}`);
73
+ }
74
+ const toolsJson = readFileSync(toolsPath, "utf-8");
75
+ const toolsConfig = JSON.parse(toolsJson);
76
+ // Convert config object to array of tool definitions
77
+ const tools = Object.values(toolsConfig);
78
+ // Validate tool definitions
79
+ for (const tool of tools) {
80
+ if (!tool.name || !tool.description || !tool.inputSchema) {
81
+ throw new Error(`Invalid tool definition: ${JSON.stringify(tool)}`);
82
+ }
83
+ }
84
+ cachedTools = tools;
85
+ lastLoadTime = now;
86
+ lastLoadPath = toolsPath;
87
+ console.log(`[Tool Loader] Loaded ${tools.length} tool definitions from: ${toolsPath}`);
88
+ if (isDev) {
89
+ console.log(`[Tool Loader] Development mode: tools will be reloaded on server restart`);
90
+ }
91
+ if (process.env.TOOLS_CONFIG_PATH) {
92
+ console.log(`[Tool Loader] Using custom config path from TOOLS_CONFIG_PATH`);
93
+ }
94
+ return tools;
95
+ }
96
+ catch (error) {
97
+ console.error("[Tool Loader] Error loading tools.json:", error);
98
+ // In case of error, return cached tools if available
99
+ if (cachedTools) {
100
+ console.warn("[Tool Loader] Using cached tool definitions due to load error");
101
+ return cachedTools;
102
+ }
103
+ throw new Error(`Failed to load tool definitions: ${error instanceof Error ? error.message : "Unknown error"}`);
104
+ }
105
+ }
106
+ /**
107
+ * Get a specific tool definition by name
108
+ */
109
+ export function getToolDefinition(toolName) {
110
+ const tools = loadToolDefinitions();
111
+ return tools.find(tool => tool.name === toolName);
112
+ }
113
+ /**
114
+ * Clear the tool cache (useful for testing or forced reloads)
115
+ */
116
+ export function clearToolCache() {
117
+ cachedTools = null;
118
+ lastLoadTime = 0;
119
+ console.log("[Tool Loader] Tool cache cleared");
120
+ }
121
+ //# sourceMappingURL=tool-loader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool-loader.js","sourceRoot":"","sources":["../src/tool-loader.ts"],"names":[],"mappings":"AA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}
@@ -0,0 +1,44 @@
1
+ import type { Request } from "express";
2
+ import type { z } from "zod";
3
+ import type { ToolResponse } from "./types.js";
4
+ type ToolHandler = (req: Request, args: any) => Promise<any>;
5
+ type ToolSchema = z.ZodSchema<any>;
6
+ /**
7
+ * Registry for managing and executing MCP tools with automatic debug wrapping
8
+ */
9
+ export declare class ToolRegistry {
10
+ private tools;
11
+ /**
12
+ * Register a new tool in the registry
13
+ *
14
+ * @param name - Unique name of the tool
15
+ * @param schema - Zod schema for validating tool input
16
+ * @param handler - Async function that executes the tool logic
17
+ */
18
+ register(name: string, schema: ToolSchema, handler: ToolHandler): void;
19
+ /**
20
+ * Execute a tool by name with automatic validation and debug wrapping
21
+ *
22
+ * @param toolName - Name of the tool to execute
23
+ * @param rawInput - Raw input arguments (will be validated against schema)
24
+ * @param req - Express request object for accessing headers/context
25
+ * @returns ToolResponse with data and optional debug metadata
26
+ * @throws Error if tool is not found or validation fails
27
+ */
28
+ execute(toolName: string, rawInput: unknown, req: Request): Promise<ToolResponse<any>>;
29
+ /**
30
+ * Check if a tool exists in the registry
31
+ *
32
+ * @param toolName - Name of the tool to check
33
+ * @returns True if the tool is registered
34
+ */
35
+ has(toolName: string): boolean;
36
+ /**
37
+ * Get all registered tool names
38
+ *
39
+ * @returns Array of registered tool names
40
+ */
41
+ getToolNames(): string[];
42
+ }
43
+ export {};
44
+ //# sourceMappingURL=tool-registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool-registry.d.ts","sourceRoot":"","sources":["../src/tool-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAK/C,KAAK,WAAW,GAAG,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;AAE7D,KAAK,UAAU,GAAG,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;AAWnC;;GAEG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,KAAK,CAAqC;IAElD;;;;;;OAMG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,WAAW,GAAG,IAAI;IAItE;;;;;;;;OAQG;IACG,OAAO,CACX,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,OAAO,EACjB,GAAG,EAAE,OAAO,GAEX,OAAO,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;IAc7B;;;;;OAKG;IACH,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAI9B;;;;OAIG;IACH,YAAY,IAAI,MAAM,EAAE;CAGzB"}
@@ -0,0 +1,56 @@
1
+ import { wrapWithDebug } from "./debug-middleware.js";
2
+ /**
3
+ * Registry for managing and executing MCP tools with automatic debug wrapping
4
+ */
5
+ export class ToolRegistry {
6
+ tools = new Map();
7
+ /**
8
+ * Register a new tool in the registry
9
+ *
10
+ * @param name - Unique name of the tool
11
+ * @param schema - Zod schema for validating tool input
12
+ * @param handler - Async function that executes the tool logic
13
+ */
14
+ register(name, schema, handler) {
15
+ this.tools.set(name, { name, schema, handler });
16
+ }
17
+ /**
18
+ * Execute a tool by name with automatic validation and debug wrapping
19
+ *
20
+ * @param toolName - Name of the tool to execute
21
+ * @param rawInput - Raw input arguments (will be validated against schema)
22
+ * @param req - Express request object for accessing headers/context
23
+ * @returns ToolResponse with data and optional debug metadata
24
+ * @throws Error if tool is not found or validation fails
25
+ */
26
+ async execute(toolName, rawInput, req
27
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
28
+ ) {
29
+ const tool = this.tools.get(toolName);
30
+ if (!tool) {
31
+ throw new Error(`Unknown tool: ${toolName}`);
32
+ }
33
+ // Validate input against schema
34
+ const args = tool.schema.parse(rawInput);
35
+ // Execute with debug wrapping
36
+ return wrapWithDebug(toolName, args, () => tool.handler(req, args));
37
+ }
38
+ /**
39
+ * Check if a tool exists in the registry
40
+ *
41
+ * @param toolName - Name of the tool to check
42
+ * @returns True if the tool is registered
43
+ */
44
+ has(toolName) {
45
+ return this.tools.has(toolName);
46
+ }
47
+ /**
48
+ * Get all registered tool names
49
+ *
50
+ * @returns Array of registered tool names
51
+ */
52
+ getToolNames() {
53
+ return Array.from(this.tools.keys());
54
+ }
55
+ }
56
+ //# sourceMappingURL=tool-registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool-registry.js","sourceRoot":"","sources":["../src/tool-registry.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAiBtD;;GAEG;AACH,MAAM,OAAO,YAAY;IACf,KAAK,GAAG,IAAI,GAAG,EAA0B,CAAC;IAElD;;;;;;OAMG;IACH,QAAQ,CAAC,IAAY,EAAE,MAAkB,EAAE,OAAoB;QAC7D,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC;IAClD,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,OAAO,CACX,QAAgB,EAChB,QAAiB,EACjB,GAAY;IACZ,8DAA8D;;QAE9D,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAEtC,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,MAAM,IAAI,KAAK,CAAC,iBAAiB,QAAQ,EAAE,CAAC,CAAC;QAC/C,CAAC;QAED,gCAAgC;QAChC,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QAEzC,8BAA8B;QAC9B,OAAO,aAAa,CAAC,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC;IACtE,CAAC;IAED;;;;;OAKG;IACH,GAAG,CAAC,QAAgB;QAClB,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAClC,CAAC;IAED;;;;OAIG;IACH,YAAY;QACV,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;IACvC,CAAC;CACF"}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Google Calendar tool handlers
3
+ */
4
+ import type { Request } from "express";
5
+ import type { z } from "zod";
6
+ import type { CalendarListEventsSchema, CalendarListCalendarsSchema, CalendarCreateEventSchema } from "../schemas.js";
7
+ /**
8
+ * List Google Calendar events
9
+ */
10
+ export declare function calendarListEvents(req: Request, args: z.infer<typeof CalendarListEventsSchema>): Promise<{
11
+ success: boolean;
12
+ events: {
13
+ id: string | null | undefined;
14
+ summary: string;
15
+ start: string | undefined;
16
+ end: string | undefined;
17
+ description: string;
18
+ }[];
19
+ }>;
20
+ /**
21
+ * List all Google Calendars
22
+ */
23
+ export declare function calendarListCalendars(req: Request, _args: z.infer<typeof CalendarListCalendarsSchema>): Promise<{
24
+ success: boolean;
25
+ calendars: {
26
+ id: string | null | undefined;
27
+ summary: string;
28
+ description: string;
29
+ timeZone: string;
30
+ primary: boolean;
31
+ }[];
32
+ }>;
33
+ /**
34
+ * Create a Google Calendar event
35
+ */
36
+ export declare function calendarCreateEvent(req: Request, args: z.infer<typeof CalendarCreateEventSchema>): Promise<{
37
+ success: boolean;
38
+ event: {
39
+ id: string | null | undefined;
40
+ summary: string | null | undefined;
41
+ htmlLink: string | null | undefined;
42
+ };
43
+ }>;
44
+ //# sourceMappingURL=calendar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calendar.d.ts","sourceRoot":"","sources":["../../src/tools/calendar.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAG7B,OAAO,KAAK,EACV,wBAAwB,EACxB,2BAA2B,EAC3B,yBAAyB,EAC1B,MAAM,eAAe,CAAC;AAEvB;;GAEG;AACH,wBAAsB,kBAAkB,CACtC,GAAG,EAAE,OAAO,EACZ,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC;;;;;;;;;GAyB/C;AAED;;GAEG;AACH,wBAAsB,qBAAqB,CACzC,GAAG,EAAE,OAAO,EACZ,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC;;;;;;;;;GAiBnD;AAED;;GAEG;AACH,wBAAsB,mBAAmB,CACvC,GAAG,EAAE,OAAO,EACZ,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC;;;;;;;GAkChD"}
@@ -0,0 +1,76 @@
1
+ /**
2
+ * Google Calendar tool handlers
3
+ */
4
+ import { getCalendarService } from "../google-api-client.js";
5
+ import { formatEventTime } from "../helpers.js";
6
+ /**
7
+ * List Google Calendar events
8
+ */
9
+ export async function calendarListEvents(req, args) {
10
+ const calendar = getCalendarService(req);
11
+ const { maxResults = 10, calendarId = "primary" } = args;
12
+ const response = await calendar.events.list({
13
+ calendarId,
14
+ maxResults,
15
+ singleEvents: true,
16
+ orderBy: "startTime",
17
+ timeMin: new Date().toISOString(), // Only return future events
18
+ });
19
+ const events = response.data.items || [];
20
+ return {
21
+ success: true,
22
+ events: events.map((event) => ({
23
+ id: event.id,
24
+ summary: event.summary || "No Title",
25
+ start: formatEventTime(event.start),
26
+ end: formatEventTime(event.end),
27
+ description: event.description || "",
28
+ })),
29
+ };
30
+ }
31
+ /**
32
+ * List all Google Calendars
33
+ */
34
+ export async function calendarListCalendars(req, _args) {
35
+ const calendar = getCalendarService(req);
36
+ const response = await calendar.calendarList.list();
37
+ const calendars = response.data.items || [];
38
+ return {
39
+ success: true,
40
+ calendars: calendars.map((cal) => ({
41
+ id: cal.id,
42
+ summary: cal.summary || "",
43
+ description: cal.description || "",
44
+ timeZone: cal.timeZone || "",
45
+ primary: cal.primary || false,
46
+ })),
47
+ };
48
+ }
49
+ /**
50
+ * Create a Google Calendar event
51
+ */
52
+ export async function calendarCreateEvent(req, args) {
53
+ const calendar = getCalendarService(req);
54
+ const { summary, startTime, endTime, description, calendarId = "primary", } = args;
55
+ // Determine if this is an all-day event (date only vs dateTime)
56
+ const isAllDay = !startTime.includes("T");
57
+ const event = {
58
+ summary,
59
+ description,
60
+ start: isAllDay ? { date: startTime } : { dateTime: startTime },
61
+ end: isAllDay ? { date: endTime } : { dateTime: endTime },
62
+ };
63
+ const createdEvent = await calendar.events.insert({
64
+ calendarId,
65
+ requestBody: event,
66
+ });
67
+ return {
68
+ success: true,
69
+ event: {
70
+ id: createdEvent.data.id,
71
+ summary: createdEvent.data.summary,
72
+ htmlLink: createdEvent.data.htmlLink,
73
+ },
74
+ };
75
+ }
76
+ //# sourceMappingURL=calendar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calendar.js","sourceRoot":"","sources":["../../src/tools/calendar.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAOhD;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,GAAY,EACZ,IAA8C;IAE9C,MAAM,QAAQ,GAAG,kBAAkB,CAAC,GAAG,CAAC,CAAC;IACzC,MAAM,EAAE,UAAU,GAAG,EAAE,EAAE,UAAU,GAAG,SAAS,EAAE,GAAG,IAAI,CAAC;IAEzD,MAAM,QAAQ,GAAG,MAAM,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC;QAC1C,UAAU;QACV,UAAU;QACV,YAAY,EAAE,IAAI;QAClB,OAAO,EAA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AAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,GAAY,EACZ,IAA+C;IAE/C,MAAM,QAAQ,GAAG,kBAAkB,CAAC,GAAG,CAAC,CAAC;IACzC,MAAM,EACJ,OAAO,EACP,SAAS,EACT,OAAO,EACP,WAAW,EACX,UAAU,GAAG,SAAS,GACvB,GAAG,IAAI,CAAC;IAET,gEAAgE;IAChE,MAAM,QAAQ,GAAG,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;IAE1C,MAAM,KAAK,GAAG;QACZ,OAAO;QACP,WAAW;QACX,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE;QAC/D,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE;KAC1D,CAAC;IAEF,MAAM,YAAY,GAAG,MAAM,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;QAChD,UAAU;QACV,WAAW,EAAE,KAAK;KACnB,CAAC,CAAC;IAEH,OAAO;QACL,OAAO,EAAE,IAAI;QACb,KAAK,EAAE;YACL,EAAE,EAAE,YAAY,CAAC,IAAI,CAAC,EAAE;YACxB,OAAO,EAAE,YAAY,CAAC,IAAI,CAAC,OAAO;YAClC,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC,QAAQ;SACrC;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Google Chat tool handlers
3
+ */
4
+ import type { Request } from "express";
5
+ import type { z } from "zod";
6
+ import type { ChatListSpacesSchema, ChatSendMessageSchema } from "../schemas.js";
7
+ /**
8
+ * List Google Chat spaces
9
+ */
10
+ export declare function chatListSpaces(req: Request, _args: z.infer<typeof ChatListSpacesSchema>): Promise<{
11
+ success: boolean;
12
+ spaces: {
13
+ name: string | null | undefined;
14
+ displayName: string | null | undefined;
15
+ type: string | null | undefined;
16
+ }[];
17
+ }>;
18
+ /**
19
+ * Send a message to Google Chat
20
+ */
21
+ export declare function chatSendMessage(req: Request, args: z.infer<typeof ChatSendMessageSchema>): Promise<{
22
+ success: boolean;
23
+ message: {
24
+ name: string | null | undefined;
25
+ text: string | null | undefined;
26
+ createTime: string | null | undefined;
27
+ };
28
+ }>;
29
+ //# sourceMappingURL=chat.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../src/tools/chat.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B,OAAO,KAAK,EACV,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,eAAe,CAAC;AAEvB;;GAEG;AACH,wBAAsB,cAAc,CAClC,GAAG,EAAE,OAAO,EACZ,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC;;;;;;;GAe5C;AAED;;GAEG;AACH,wBAAsB,eAAe,CACnC,GAAG,EAAE,OAAO,EACZ,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC;;;;;;;GAoB5C"}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Google Chat tool handlers
3
+ */
4
+ import { getChatService } from "../google-api-client.js";
5
+ /**
6
+ * List Google Chat spaces
7
+ */
8
+ export async function chatListSpaces(req, _args) {
9
+ const chat = getChatService(req);
10
+ const result = await chat.spaces.list();
11
+ const spaces = result.data.spaces || [];
12
+ return {
13
+ success: true,
14
+ spaces: spaces.map((space) => ({
15
+ name: space.name,
16
+ displayName: space.displayName,
17
+ type: space.type,
18
+ })),
19
+ };
20
+ }
21
+ /**
22
+ * Send a message to Google Chat
23
+ */
24
+ export async function chatSendMessage(req, args) {
25
+ const chat = getChatService(req);
26
+ const { spaceName, text } = args;
27
+ const sent = await chat.spaces.messages.create({
28
+ parent: spaceName,
29
+ requestBody: {
30
+ text,
31
+ },
32
+ });
33
+ return {
34
+ success: true,
35
+ message: {
36
+ name: sent.data.name,
37
+ text: sent.data.text,
38
+ createTime: sent.data.createTime,
39
+ },
40
+ };
41
+ }
42
+ //# sourceMappingURL=chat.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat.js","sourceRoot":"","sources":["../../src/tools/chat.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAMzD;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,GAAY,EACZ,KAA2C;IAE3C,MAAM,IAAI,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC;IAEjC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;IACxC,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,IAAI,EAAE,CAAC;IAExC,OAAO;QACL,OAAO,EAAE,IAAI;QACb,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;YAC7B,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,WAAW,EAAE,KAAK,CAAC,WAAW;YAC9B,IAAI,EAAE,KAAK,CAAC,IAAI;SACjB,CAAC,CAAC;KACJ,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,GAAY,EACZ,IAA2C;IAE3C,MAAM,IAAI,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC;IACjC,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;IAEjC,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC;QAC7C,MAAM,EAAE,SAAS;QACjB,WAAW,EAAE;YACX,IAAI;SACL;KACF,CAAC,CAAC;IAEH,OAAO;QACL,OAAO,EAAE,IAAI;QACb,OAAO,EAAE;YACP,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI;YACpB,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI;YACpB,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,UAAU;SACjC;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Google Docs tool handlers
3
+ */
4
+ import type { Request } from "express";
5
+ import type { z } from "zod";
6
+ import type { DocsGetDocumentSchema, DocsCreateDocumentSchema } from "../schemas.js";
7
+ /**
8
+ * Get Google Docs document content
9
+ */
10
+ export declare function docsGetDocument(req: Request, args: z.infer<typeof DocsGetDocumentSchema>): Promise<{
11
+ success: boolean;
12
+ document: {
13
+ documentId: string | null | undefined;
14
+ title: string | null | undefined;
15
+ content: string;
16
+ };
17
+ }>;
18
+ /**
19
+ * Create a new Google Docs document
20
+ */
21
+ export declare function docsCreateDocument(req: Request, args: z.infer<typeof DocsCreateDocumentSchema>): Promise<{
22
+ success: boolean;
23
+ document: {
24
+ documentId: string | null | undefined;
25
+ title: string | null | undefined;
26
+ revisionId: string | null | undefined;
27
+ };
28
+ }>;
29
+ //# sourceMappingURL=docs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"docs.d.ts","sourceRoot":"","sources":["../../src/tools/docs.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAG7B,OAAO,KAAK,EACV,qBAAqB,EACrB,wBAAwB,EACzB,MAAM,eAAe,CAAC;AAEvB;;GAEG;AACH,wBAAsB,eAAe,CACnC,GAAG,EAAE,OAAO,EACZ,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC;;;;;;;GAmB5C;AAED;;GAEG;AACH,wBAAsB,kBAAkB,CACtC,GAAG,EAAE,OAAO,EACZ,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC;;;;;;;GAuC/C"}
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Google Docs tool handlers
3
+ */
4
+ import { getDocsService } from "../google-api-client.js";
5
+ import { extractDocsContent } from "../helpers.js";
6
+ /**
7
+ * Get Google Docs document content
8
+ */
9
+ export async function docsGetDocument(req, args) {
10
+ const docs = getDocsService(req);
11
+ const { documentId } = args;
12
+ const document = await docs.documents.get({
13
+ documentId,
14
+ });
15
+ const content = extractDocsContent(document.data.body);
16
+ return {
17
+ success: true,
18
+ document: {
19
+ documentId: document.data.documentId,
20
+ title: document.data.title,
21
+ content,
22
+ },
23
+ };
24
+ }
25
+ /**
26
+ * Create a new Google Docs document
27
+ */
28
+ export async function docsCreateDocument(req, args) {
29
+ const docs = getDocsService(req);
30
+ const { title, content } = args;
31
+ // Create the document
32
+ const createdDoc = await docs.documents.create({
33
+ requestBody: {
34
+ title,
35
+ },
36
+ });
37
+ const documentId = createdDoc.data.documentId;
38
+ // Add content if provided
39
+ if (content && documentId) {
40
+ await docs.documents.batchUpdate({
41
+ documentId,
42
+ requestBody: {
43
+ requests: [
44
+ {
45
+ insertText: {
46
+ location: { index: 1 },
47
+ text: content,
48
+ },
49
+ },
50
+ ],
51
+ },
52
+ });
53
+ }
54
+ return {
55
+ success: true,
56
+ document: {
57
+ documentId: createdDoc.data.documentId,
58
+ title: createdDoc.data.title,
59
+ revisionId: createdDoc.data.revisionId,
60
+ },
61
+ };
62
+ }
63
+ //# sourceMappingURL=docs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"docs.js","sourceRoot":"","sources":["../../src/tools/docs.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,k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;iBACF;aACF;SACF,CAAC,CAAC;IACL,CAAC;IAED,OAAO;QACL,OAAO,EAAE,IAAI;QACb,QAAQ,EAAE;YACR,UAAU,EAAE,UAAU,CAAC,IAAI,CAAC,UAAU;YACtC,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,KAAK;YAC5B,UAAU,EAAE,UAAU,CAAC,IAAI,CAAC,UAAU;SACvC;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Google Drive tool handlers
3
+ */
4
+ import type { Request } from "express";
5
+ import type { z } from "zod";
6
+ import type { DriveListFilesSchema, DriveGetFileContentSchema, DriveCreateFileSchema } from "../schemas.js";
7
+ /**
8
+ * List Google Drive files
9
+ */
10
+ export declare function driveListFiles(req: Request, args: z.infer<typeof DriveListFilesSchema>): Promise<{
11
+ success: boolean;
12
+ files: {
13
+ id: string | null | undefined;
14
+ name: string | null | undefined;
15
+ mimeType: string | null | undefined;
16
+ modifiedTime: string | null | undefined;
17
+ size: string | null | undefined;
18
+ webViewLink: string | null | undefined;
19
+ }[];
20
+ query: string;
21
+ }>;
22
+ /**
23
+ * Get Google Drive file content
24
+ */
25
+ export declare function driveGetFileContent(req: Request, args: z.infer<typeof DriveGetFileContentSchema>): Promise<{
26
+ success: boolean;
27
+ file: {
28
+ id: string | null | undefined;
29
+ name: string | null | undefined;
30
+ mimeType: string | null | undefined;
31
+ content: string;
32
+ };
33
+ }>;
34
+ /**
35
+ * Create a Google Drive file
36
+ */
37
+ export declare function driveCreateFile(req: Request, args: z.infer<typeof DriveCreateFileSchema>): Promise<{
38
+ success: boolean;
39
+ file: {
40
+ id: string | null | undefined;
41
+ name: string | null | undefined;
42
+ webViewLink: string | null | undefined;
43
+ };
44
+ }>;
45
+ //# sourceMappingURL=drive.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drive.d.ts","sourceRoot":"","sources":["../../src/tools/drive.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B,OAAO,KAAK,EACV,oBAAoB,EACpB,yBAAyB,EACzB,qBAAqB,EACtB,MAAM,eAAe,CAAC;AAGvB;;GAEG;AACH,wBAAsB,cAAc,CAClC,GAAG,EAAE,OAAO,EACZ,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC;;;;;;;;;;;GAqE3C;AAED;;GAEG;AACH,wBAAsB,mBAAmB,CACvC,GAAG,EAAE,OAAO,EACZ,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC;;;;;;;;GAuChD;AAED;;GAEG;AACH,wBAAsB,eAAe,CACnC,GAAG,EAAE,OAAO,EACZ,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC;;;;;;;GAgC5C"}