@n24q02m/workspace 0.0.0-stage → 0.6.0-beta.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.
- package/LICENSE +202 -0
- package/NOTICE +46 -0
- package/README.md +342 -2
- package/bin/cli.mjs +144 -0
- package/build/src/auth/account-context.d.ts +3 -0
- package/build/src/auth/account-context.d.ts.map +1 -0
- package/build/src/auth/account-context.js +17 -0
- package/build/src/auth/account-context.js.map +1 -0
- package/build/src/auth/account-context.test.d.ts +2 -0
- package/build/src/auth/account-context.test.d.ts.map +1 -0
- package/build/src/auth/account-context.test.js +30 -0
- package/build/src/auth/account-context.test.js.map +1 -0
- package/build/src/auth/account-store.d.ts +87 -0
- package/build/src/auth/account-store.d.ts.map +1 -0
- package/build/src/auth/account-store.js +187 -0
- package/build/src/auth/account-store.js.map +1 -0
- package/build/src/auth/account-store.test.d.ts +2 -0
- package/build/src/auth/account-store.test.d.ts.map +1 -0
- package/build/src/auth/account-store.test.js +264 -0
- package/build/src/auth/account-store.test.js.map +1 -0
- package/build/src/auth/add-account.d.ts +12 -0
- package/build/src/auth/add-account.d.ts.map +1 -0
- package/build/src/auth/add-account.js +95 -0
- package/build/src/auth/add-account.js.map +1 -0
- package/build/src/auth/add-account.test.d.ts +2 -0
- package/build/src/auth/add-account.test.d.ts.map +1 -0
- package/build/src/auth/add-account.test.js +155 -0
- package/build/src/auth/add-account.test.js.map +1 -0
- package/build/src/auth/cli-auth.d.ts +2 -0
- package/build/src/auth/cli-auth.d.ts.map +1 -0
- package/build/src/auth/cli-auth.js +47 -0
- package/build/src/auth/cli-auth.js.map +1 -0
- package/build/src/auth/cli-auth.test.d.ts +2 -0
- package/build/src/auth/cli-auth.test.d.ts.map +1 -0
- package/build/src/auth/cli-auth.test.js +78 -0
- package/build/src/auth/cli-auth.test.js.map +1 -0
- package/build/src/auth/consent-server.d.ts +43 -0
- package/build/src/auth/consent-server.d.ts.map +1 -0
- package/build/src/auth/consent-server.js +56 -0
- package/build/src/auth/consent-server.js.map +1 -0
- package/build/src/auth/credential-state.d.ts +7 -0
- package/build/src/auth/credential-state.d.ts.map +1 -0
- package/build/src/auth/credential-state.js +64 -0
- package/build/src/auth/credential-state.js.map +1 -0
- package/build/src/auth/credential-state.test.d.ts +2 -0
- package/build/src/auth/credential-state.test.d.ts.map +1 -0
- package/build/src/auth/credential-state.test.js +142 -0
- package/build/src/auth/credential-state.test.js.map +1 -0
- package/build/src/auth/loopback-consent.d.ts +23 -0
- package/build/src/auth/loopback-consent.d.ts.map +1 -0
- package/build/src/auth/loopback-consent.js +145 -0
- package/build/src/auth/loopback-consent.js.map +1 -0
- package/build/src/auth/loopback-consent.test.d.ts +2 -0
- package/build/src/auth/loopback-consent.test.d.ts.map +1 -0
- package/build/src/auth/loopback-consent.test.js +131 -0
- package/build/src/auth/loopback-consent.test.js.map +1 -0
- package/build/src/auth/oauth-setup.d.ts +10 -0
- package/build/src/auth/oauth-setup.d.ts.map +1 -0
- package/build/src/auth/oauth-setup.js +92 -0
- package/build/src/auth/oauth-setup.js.map +1 -0
- package/build/src/auth/oauth-setup.test.d.ts +2 -0
- package/build/src/auth/oauth-setup.test.d.ts.map +1 -0
- package/build/src/auth/oauth-setup.test.js +164 -0
- package/build/src/auth/oauth-setup.test.js.map +1 -0
- package/build/src/auth/subject-context.d.ts +2 -0
- package/build/src/auth/subject-context.d.ts.map +1 -0
- package/build/src/auth/subject-context.js +16 -0
- package/build/src/auth/subject-context.js.map +1 -0
- package/build/src/auth/subject-context.test.d.ts +2 -0
- package/build/src/auth/subject-context.test.d.ts.map +1 -0
- package/build/src/auth/subject-context.test.js +34 -0
- package/build/src/auth/subject-context.test.js.map +1 -0
- package/build/src/auth/workspace-auth.d.ts +47 -0
- package/build/src/auth/workspace-auth.d.ts.map +1 -0
- package/build/src/auth/workspace-auth.js +123 -0
- package/build/src/auth/workspace-auth.js.map +1 -0
- package/build/src/auth/workspace-auth.test.d.ts +2 -0
- package/build/src/auth/workspace-auth.test.d.ts.map +1 -0
- package/build/src/auth/workspace-auth.test.js +242 -0
- package/build/src/auth/workspace-auth.test.js.map +1 -0
- package/build/src/constants.d.ts +6 -0
- package/build/src/constants.d.ts.map +1 -0
- package/build/src/constants.js +11 -0
- package/build/src/constants.js.map +1 -0
- package/build/src/create-server.d.ts +13 -0
- package/build/src/create-server.d.ts.map +1 -0
- package/build/src/create-server.js +34 -0
- package/build/src/create-server.js.map +1 -0
- package/build/src/create-server.test.d.ts +2 -0
- package/build/src/create-server.test.d.ts.map +1 -0
- package/build/src/create-server.test.js +13 -0
- package/build/src/create-server.test.js.map +1 -0
- package/build/src/docs/calendar.md +15 -0
- package/build/src/docs/chat.md +15 -0
- package/build/src/docs/config.md +117 -0
- package/build/src/docs/docs.md +36 -0
- package/build/src/docs/drive.md +15 -0
- package/build/src/docs/forms.md +119 -0
- package/build/src/docs/gmail.md +18 -0
- package/build/src/docs/overview.md +52 -0
- package/build/src/docs/people.md +10 -0
- package/build/src/docs/sheets.md +10 -0
- package/build/src/docs/slides.md +26 -0
- package/build/src/docs/tasks.md +13 -0
- package/build/src/docs/time.md +11 -0
- package/build/src/init-server.d.ts +10 -0
- package/build/src/init-server.d.ts.map +1 -0
- package/build/src/init-server.js +13 -0
- package/build/src/init-server.js.map +1 -0
- package/build/src/init-server.test.d.ts +2 -0
- package/build/src/init-server.test.d.ts.map +1 -0
- package/build/src/init-server.test.js +15 -0
- package/build/src/init-server.test.js.map +1 -0
- package/build/src/main.d.ts +33 -0
- package/build/src/main.d.ts.map +1 -0
- package/build/src/main.js +120 -0
- package/build/src/main.js.map +1 -0
- package/build/src/main.test.d.ts +2 -0
- package/build/src/main.test.d.ts.map +1 -0
- package/build/src/main.test.js +204 -0
- package/build/src/main.test.js.map +1 -0
- package/build/src/services/FormsService.d.ts +89 -0
- package/build/src/services/FormsService.d.ts.map +1 -0
- package/build/src/services/FormsService.js +140 -0
- package/build/src/services/FormsService.js.map +1 -0
- package/build/src/services/FormsService.test.d.ts +2 -0
- package/build/src/services/FormsService.test.d.ts.map +1 -0
- package/build/src/services/FormsService.test.js +173 -0
- package/build/src/services/FormsService.test.js.map +1 -0
- package/build/src/tools/config.d.ts +19 -0
- package/build/src/tools/config.d.ts.map +1 -0
- package/build/src/tools/config.js +100 -0
- package/build/src/tools/config.js.map +1 -0
- package/build/src/tools/config.test.d.ts +2 -0
- package/build/src/tools/config.test.d.ts.map +1 -0
- package/build/src/tools/config.test.js +201 -0
- package/build/src/tools/config.test.js.map +1 -0
- package/build/src/tools/domains/calendar.d.ts +3 -0
- package/build/src/tools/domains/calendar.d.ts.map +1 -0
- package/build/src/tools/domains/calendar.js +14 -0
- package/build/src/tools/domains/calendar.js.map +1 -0
- package/build/src/tools/domains/chat.d.ts +3 -0
- package/build/src/tools/domains/chat.d.ts.map +1 -0
- package/build/src/tools/domains/chat.js +16 -0
- package/build/src/tools/domains/chat.js.map +1 -0
- package/build/src/tools/domains/docs.d.ts +8 -0
- package/build/src/tools/domains/docs.d.ts.map +1 -0
- package/build/src/tools/domains/docs.js +11 -0
- package/build/src/tools/domains/docs.js.map +1 -0
- package/build/src/tools/domains/docs.test.d.ts +2 -0
- package/build/src/tools/domains/docs.test.d.ts.map +1 -0
- package/build/src/tools/domains/docs.test.js +111 -0
- package/build/src/tools/domains/docs.test.js.map +1 -0
- package/build/src/tools/domains/drive.d.ts +3 -0
- package/build/src/tools/domains/drive.d.ts.map +1 -0
- package/build/src/tools/domains/drive.js +14 -0
- package/build/src/tools/domains/drive.js.map +1 -0
- package/build/src/tools/domains/factory.d.ts +24 -0
- package/build/src/tools/domains/factory.d.ts.map +1 -0
- package/build/src/tools/domains/factory.js +43 -0
- package/build/src/tools/domains/factory.js.map +1 -0
- package/build/src/tools/domains/factory.test.d.ts +2 -0
- package/build/src/tools/domains/factory.test.d.ts.map +1 -0
- package/build/src/tools/domains/factory.test.js +48 -0
- package/build/src/tools/domains/factory.test.js.map +1 -0
- package/build/src/tools/domains/forms.d.ts +9 -0
- package/build/src/tools/domains/forms.d.ts.map +1 -0
- package/build/src/tools/domains/forms.js +12 -0
- package/build/src/tools/domains/forms.js.map +1 -0
- package/build/src/tools/domains/forms.test.d.ts +2 -0
- package/build/src/tools/domains/forms.test.d.ts.map +1 -0
- package/build/src/tools/domains/forms.test.js +93 -0
- package/build/src/tools/domains/forms.test.js.map +1 -0
- package/build/src/tools/domains/gmail.d.ts +3 -0
- package/build/src/tools/domains/gmail.d.ts.map +1 -0
- package/build/src/tools/domains/gmail.js +17 -0
- package/build/src/tools/domains/gmail.js.map +1 -0
- package/build/src/tools/domains/index.d.ts +20 -0
- package/build/src/tools/domains/index.d.ts.map +1 -0
- package/build/src/tools/domains/index.js +230 -0
- package/build/src/tools/domains/index.js.map +1 -0
- package/build/src/tools/domains/people.d.ts +3 -0
- package/build/src/tools/domains/people.d.ts.map +1 -0
- package/build/src/tools/domains/people.js +5 -0
- package/build/src/tools/domains/people.js.map +1 -0
- package/build/src/tools/domains/sheets.d.ts +3 -0
- package/build/src/tools/domains/sheets.d.ts.map +1 -0
- package/build/src/tools/domains/sheets.js +5 -0
- package/build/src/tools/domains/sheets.js.map +1 -0
- package/build/src/tools/domains/slides.d.ts +3 -0
- package/build/src/tools/domains/slides.d.ts.map +1 -0
- package/build/src/tools/domains/slides.js +25 -0
- package/build/src/tools/domains/slides.js.map +1 -0
- package/build/src/tools/domains/tasks.d.ts +3 -0
- package/build/src/tools/domains/tasks.d.ts.map +1 -0
- package/build/src/tools/domains/tasks.js +14 -0
- package/build/src/tools/domains/tasks.js.map +1 -0
- package/build/src/tools/domains/time.d.ts +3 -0
- package/build/src/tools/domains/time.d.ts.map +1 -0
- package/build/src/tools/domains/time.js +6 -0
- package/build/src/tools/domains/time.js.map +1 -0
- package/build/src/tools/helpers/errors.d.ts +48 -0
- package/build/src/tools/helpers/errors.d.ts.map +1 -0
- package/build/src/tools/helpers/errors.js +290 -0
- package/build/src/tools/helpers/errors.js.map +1 -0
- package/build/src/tools/helpers/errors.test.d.ts +2 -0
- package/build/src/tools/helpers/errors.test.d.ts.map +1 -0
- package/build/src/tools/helpers/errors.test.js +220 -0
- package/build/src/tools/helpers/errors.test.js.map +1 -0
- package/build/src/tools/registry.d.ts +14 -0
- package/build/src/tools/registry.d.ts.map +1 -0
- package/build/src/tools/registry.js +276 -0
- package/build/src/tools/registry.js.map +1 -0
- package/build/src/tools/registry.test.d.ts +2 -0
- package/build/src/tools/registry.test.d.ts.map +1 -0
- package/build/src/tools/registry.test.js +321 -0
- package/build/src/tools/registry.test.js.map +1 -0
- package/build/src/transports/http.d.ts +7 -0
- package/build/src/transports/http.d.ts.map +1 -0
- package/build/src/transports/http.js +56 -0
- package/build/src/transports/http.js.map +1 -0
- package/build/src/transports/http.test.d.ts +2 -0
- package/build/src/transports/http.test.d.ts.map +1 -0
- package/build/src/transports/http.test.js +76 -0
- package/build/src/transports/http.test.js.map +1 -0
- package/build/src/vendored/auth/AuthManager.d.ts +7 -0
- package/build/src/vendored/auth/AuthManager.d.ts.map +1 -0
- package/build/src/vendored/auth/AuthManager.js +11 -0
- package/build/src/vendored/auth/AuthManager.js.map +1 -0
- package/build/src/vendored/services/CalendarService.d.ts +164 -0
- package/build/src/vendored/services/CalendarService.d.ts.map +1 -0
- package/build/src/vendored/services/CalendarService.js +726 -0
- package/build/src/vendored/services/CalendarService.js.map +1 -0
- package/build/src/vendored/services/CalendarValidation.d.ts +9 -0
- package/build/src/vendored/services/CalendarValidation.d.ts.map +1 -0
- package/build/src/vendored/services/CalendarValidation.js +125 -0
- package/build/src/vendored/services/CalendarValidation.js.map +1 -0
- package/build/src/vendored/services/ChatService.d.ts +90 -0
- package/build/src/vendored/services/ChatService.d.ts.map +1 -0
- package/build/src/vendored/services/ChatService.js +451 -0
- package/build/src/vendored/services/ChatService.js.map +1 -0
- package/build/src/vendored/services/DocsService.d.ts +109 -0
- package/build/src/vendored/services/DocsService.d.ts.map +1 -0
- package/build/src/vendored/services/DocsService.js +663 -0
- package/build/src/vendored/services/DocsService.js.map +1 -0
- package/build/src/vendored/services/DocsService.test.d.ts +2 -0
- package/build/src/vendored/services/DocsService.test.d.ts.map +1 -0
- package/build/src/vendored/services/DocsService.test.js +77 -0
- package/build/src/vendored/services/DocsService.test.js.map +1 -0
- package/build/src/vendored/services/DriveService.d.ts +117 -0
- package/build/src/vendored/services/DriveService.d.ts.map +1 -0
- package/build/src/vendored/services/DriveService.js +527 -0
- package/build/src/vendored/services/DriveService.js.map +1 -0
- package/build/src/vendored/services/DriveService.test.d.ts +2 -0
- package/build/src/vendored/services/DriveService.test.d.ts.map +1 -0
- package/build/src/vendored/services/DriveService.test.js +115 -0
- package/build/src/vendored/services/DriveService.test.js.map +1 -0
- package/build/src/vendored/services/GmailService.d.ts +137 -0
- package/build/src/vendored/services/GmailService.d.ts.map +1 -0
- package/build/src/vendored/services/GmailService.js +681 -0
- package/build/src/vendored/services/GmailService.js.map +1 -0
- package/build/src/vendored/services/PeopleService.d.ts +42 -0
- package/build/src/vendored/services/PeopleService.d.ts.map +1 -0
- package/build/src/vendored/services/PeopleService.js +168 -0
- package/build/src/vendored/services/PeopleService.js.map +1 -0
- package/build/src/vendored/services/SheetsService.d.ts +52 -0
- package/build/src/vendored/services/SheetsService.d.ts.map +1 -0
- package/build/src/vendored/services/SheetsService.js +262 -0
- package/build/src/vendored/services/SheetsService.js.map +1 -0
- package/build/src/vendored/services/SheetsService.test.d.ts +2 -0
- package/build/src/vendored/services/SheetsService.test.d.ts.map +1 -0
- package/build/src/vendored/services/SheetsService.test.js +104 -0
- package/build/src/vendored/services/SheetsService.test.js.map +1 -0
- package/build/src/vendored/services/SlidesService.d.ts +167 -0
- package/build/src/vendored/services/SlidesService.d.ts.map +1 -0
- package/build/src/vendored/services/SlidesService.js +887 -0
- package/build/src/vendored/services/SlidesService.js.map +1 -0
- package/build/src/vendored/services/TasksService.d.ts +97 -0
- package/build/src/vendored/services/TasksService.d.ts.map +1 -0
- package/build/src/vendored/services/TasksService.js +234 -0
- package/build/src/vendored/services/TasksService.js.map +1 -0
- package/build/src/vendored/services/TimeService.d.ts +29 -0
- package/build/src/vendored/services/TimeService.d.ts.map +1 -0
- package/build/src/vendored/services/TimeService.js +71 -0
- package/build/src/vendored/services/TimeService.js.map +1 -0
- package/build/src/vendored/utils/DriveQueryBuilder.d.ts +15 -0
- package/build/src/vendored/utils/DriveQueryBuilder.d.ts.map +1 -0
- package/build/src/vendored/utils/DriveQueryBuilder.js +17 -0
- package/build/src/vendored/utils/DriveQueryBuilder.js.map +1 -0
- package/build/src/vendored/utils/GaxiosConfig.d.ts +9 -0
- package/build/src/vendored/utils/GaxiosConfig.d.ts.map +1 -0
- package/build/src/vendored/utils/GaxiosConfig.js +30 -0
- package/build/src/vendored/utils/GaxiosConfig.js.map +1 -0
- package/build/src/vendored/utils/IdUtils.d.ts +13 -0
- package/build/src/vendored/utils/IdUtils.d.ts.map +1 -0
- package/build/src/vendored/utils/IdUtils.js +29 -0
- package/build/src/vendored/utils/IdUtils.js.map +1 -0
- package/build/src/vendored/utils/MimeHelper.d.ts +64 -0
- package/build/src/vendored/utils/MimeHelper.d.ts.map +1 -0
- package/build/src/vendored/utils/MimeHelper.js +174 -0
- package/build/src/vendored/utils/MimeHelper.js.map +1 -0
- package/build/src/vendored/utils/MimeHelper.test.d.ts +2 -0
- package/build/src/vendored/utils/MimeHelper.test.d.ts.map +1 -0
- package/build/src/vendored/utils/MimeHelper.test.js +47 -0
- package/build/src/vendored/utils/MimeHelper.test.js.map +1 -0
- package/build/src/vendored/utils/constants.d.ts +9 -0
- package/build/src/vendored/utils/constants.d.ts.map +1 -0
- package/build/src/vendored/utils/constants.js +9 -0
- package/build/src/vendored/utils/constants.js.map +1 -0
- package/build/src/vendored/utils/logger.d.ts +3 -0
- package/build/src/vendored/utils/logger.d.ts.map +1 -0
- package/build/src/vendored/utils/logger.js +15 -0
- package/build/src/vendored/utils/logger.js.map +1 -0
- package/build/src/vendored/utils/paths.d.ts +2 -0
- package/build/src/vendored/utils/paths.d.ts.map +1 -0
- package/build/src/vendored/utils/paths.js +19 -0
- package/build/src/vendored/utils/paths.js.map +1 -0
- package/build/src/vendored/utils/validation.d.ts +100 -0
- package/build/src/vendored/utils/validation.d.ts.map +1 -0
- package/build/src/vendored/utils/validation.js +161 -0
- package/build/src/vendored/utils/validation.js.map +1 -0
- package/build/src/version.d.ts +2 -0
- package/build/src/version.d.ts.map +1 -0
- package/build/src/version.js +29 -0
- package/build/src/version.js.map +1 -0
- package/build/src/version.test.d.ts +2 -0
- package/build/src/version.test.d.ts.map +1 -0
- package/build/src/version.test.js +19 -0
- package/build/src/version.test.js.map +1 -0
- package/build/tsconfig.tsbuildinfo +1 -0
- package/package.json +69 -4
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DriveService } from '../../vendored/services/DriveService.js';
|
|
2
|
+
import { makeDomainRun } from './factory.js';
|
|
3
|
+
export const DRIVE_ACTIONS = [
|
|
4
|
+
'findFolder',
|
|
5
|
+
'createFolder',
|
|
6
|
+
'search',
|
|
7
|
+
'trashFile',
|
|
8
|
+
'renameFile',
|
|
9
|
+
'getComments',
|
|
10
|
+
'moveFile',
|
|
11
|
+
'downloadFile'
|
|
12
|
+
];
|
|
13
|
+
export const drive = makeDomainRun(DriveService, DRIVE_ACTIONS, { pagination: { search: 'pageSize' } });
|
|
14
|
+
//# sourceMappingURL=drive.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drive.js","sourceRoot":"","sources":["../../../../src/tools/domains/drive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAA;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAE5C,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,YAAY;IACZ,cAAc;IACd,QAAQ;IACR,WAAW;IACX,YAAY;IACZ,aAAa;IACb,UAAU;IACV,cAAc;CACN,CAAA;AACV,MAAM,CAAC,MAAM,KAAK,GAAG,aAAa,CAAC,YAAY,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE,CAAC,CAAA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generic domain mega-tool factory. Every N+2 domain tool (docs, and the 9
|
|
3
|
+
* more Task 7b appends) dispatches `action` to a vendored Service method the
|
|
4
|
+
* same way -- this factory captures that dispatch once instead of each
|
|
5
|
+
* domain hand-rolling it (see docs.ts before this refactor).
|
|
6
|
+
*/
|
|
7
|
+
import type { CallToolResult } from '@modelcontextprotocol/sdk/types.js';
|
|
8
|
+
import { AuthManager } from '../../vendored/auth/AuthManager.js';
|
|
9
|
+
type ServiceCtor = new (auth: AuthManager) => object;
|
|
10
|
+
type ServiceCtorNoAuth = new () => object;
|
|
11
|
+
export declare const DEFAULT_PAGE_SIZE = 20;
|
|
12
|
+
export declare const MAX_PAGE_SIZE = 100;
|
|
13
|
+
export declare function normalizePageSize(value: unknown, field: 'pageSize' | 'maxResults'): number;
|
|
14
|
+
export interface DomainRunInput {
|
|
15
|
+
action: string;
|
|
16
|
+
account?: string;
|
|
17
|
+
[key: string]: unknown;
|
|
18
|
+
}
|
|
19
|
+
export declare function makeDomainRun(ServiceClass: ServiceCtor | ServiceCtorNoAuth, actions: readonly string[], opts?: {
|
|
20
|
+
noAuth?: boolean;
|
|
21
|
+
pagination?: Record<string, 'pageSize' | 'maxResults'>;
|
|
22
|
+
}): (input: DomainRunInput) => Promise<CallToolResult>;
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=factory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../../src/tools/domains/factory.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAA;AAGxE,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAA;AAShE,KAAK,WAAW,GAAG,KAAK,IAAI,EAAE,WAAW,KAAK,MAAM,CAAA;AACpD,KAAK,iBAAiB,GAAG,UAAU,MAAM,CAAA;AAGzC,eAAO,MAAM,iBAAiB,KAAK,CAAA;AACnC,eAAO,MAAM,aAAa,MAAM,CAAA;AAEhC,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,GAAG,YAAY,GAAG,MAAM,CAU1F;AAcD,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACvB;AAED,wBAAgB,aAAa,CAC3B,YAAY,EAAE,WAAW,GAAG,iBAAiB,EAC7C,OAAO,EAAE,SAAS,MAAM,EAAE,EAC1B,IAAI,GAAE;IACJ,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,GAAG,YAAY,CAAC,CAAA;CAClD,GACL,CAAC,KAAK,EAAE,cAAc,KAAK,OAAO,CAAC,cAAc,CAAC,CAwBpD"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { runWithAccount } from '../../auth/account-context.js';
|
|
2
|
+
import { BASE_SCOPES } from '../../constants.js';
|
|
3
|
+
import { AuthManager } from '../../vendored/auth/AuthManager.js';
|
|
4
|
+
import { WorkspaceMCPError, withErrorHandling } from '../helpers/errors.js';
|
|
5
|
+
export const DEFAULT_PAGE_SIZE = 20;
|
|
6
|
+
export const MAX_PAGE_SIZE = 100;
|
|
7
|
+
export function normalizePageSize(value, field) {
|
|
8
|
+
if (value === undefined)
|
|
9
|
+
return DEFAULT_PAGE_SIZE;
|
|
10
|
+
if (typeof value !== 'number' || !Number.isFinite(value) || !Number.isInteger(value)) {
|
|
11
|
+
throw new WorkspaceMCPError(`${field} must be an integer`, 'VALIDATION_ERROR', `Use an integer from 1 to ${MAX_PAGE_SIZE}`);
|
|
12
|
+
}
|
|
13
|
+
return Math.min(Math.max(value, 1), MAX_PAGE_SIZE);
|
|
14
|
+
}
|
|
15
|
+
function normalizeBoundedParams(action, params, pagination) {
|
|
16
|
+
const normalized = { ...params };
|
|
17
|
+
const field = pagination?.[action];
|
|
18
|
+
if (!field)
|
|
19
|
+
return normalized;
|
|
20
|
+
normalized[field] = normalizePageSize(normalized[field], field);
|
|
21
|
+
return normalized;
|
|
22
|
+
}
|
|
23
|
+
export function makeDomainRun(ServiceClass, actions, opts = {}) {
|
|
24
|
+
const svc = opts.noAuth
|
|
25
|
+
? new ServiceClass()
|
|
26
|
+
: new ServiceClass(new AuthManager(BASE_SCOPES));
|
|
27
|
+
return function run(input) {
|
|
28
|
+
return withErrorHandling(async () => {
|
|
29
|
+
const { action, account, ...rawParams } = input;
|
|
30
|
+
if (!actions.includes(action)) {
|
|
31
|
+
throw new WorkspaceMCPError(`Unknown action: ${action}`, 'VALIDATION_ERROR', `Valid actions: ${actions.join(', ')}`);
|
|
32
|
+
}
|
|
33
|
+
const params = normalizeBoundedParams(action, rawParams, opts.pagination);
|
|
34
|
+
const method = svc[action];
|
|
35
|
+
// The vendored service is a singleton built at module load, and upstream's
|
|
36
|
+
// getAuthenticatedClient() takes no arguments, so the account cannot ride
|
|
37
|
+
// down as a parameter without editing vendored code. It travels in
|
|
38
|
+
// AsyncLocalStorage instead; the AuthManager shim reads it back out.
|
|
39
|
+
return runWithAccount(account, () => method(params));
|
|
40
|
+
})();
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=factory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"factory.js","sourceRoot":"","sources":["../../../../src/tools/domains/factory.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAChD,OAA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,IAAK,YAA4B,CAAC,IAAI,WAAW,CAAC,WAAW,CAAC,CAAC,CAAA;IAEnE,OAAO,SAAS,GAAG,CAAC,KAAqB;QACvC,OAAO,iBAAiB,CAAC,KAAK,IAAI,EAAE;YAClC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,SAAS,EAAE,GAAG,KAAK,CAAA;YAC/C,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;gBAC9B,MAAM,IAAI,iBAAiB,CACzB,mBAAmB,MAAM,EAAE,EAC3B,kBAAkB,EAClB,kBAAkB,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CACvC,CAAA;YACH,CAAC;YACD,MAAM,MAAM,GAAG,sBAAsB,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,CAAC,UAAU,CAAC,CAAA;YACzE,MAAM,MAAM,GAAI,GAAgD,CAAC,MAAM,CAAC,CAAA;YACxE,2EAA2E;YAC3E,0EAA0E;YAC1E,mEAAmE;YACnE,qEAAqE;YACrE,OAAO,cAAc,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAA;QACtD,CAAC,CAAC,EAAE,CAAA;IACN,CAAC,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"factory.test.d.ts","sourceRoot":"","sources":["../../../../src/tools/domains/factory.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest';
|
|
2
|
+
import { MAX_PAGE_SIZE, makeDomainRun, normalizePageSize } from './factory.js';
|
|
3
|
+
class CaptureService {
|
|
4
|
+
constructor(auth) {
|
|
5
|
+
this.list = async (params) => ({
|
|
6
|
+
content: [{ type: 'text', text: JSON.stringify(params) }]
|
|
7
|
+
});
|
|
8
|
+
this.write = async (params) => ({
|
|
9
|
+
content: [{ type: 'text', text: JSON.stringify(params) }]
|
|
10
|
+
});
|
|
11
|
+
void auth;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
function textOf(result) {
|
|
15
|
+
const item = result.content[0];
|
|
16
|
+
if (item.type !== 'text')
|
|
17
|
+
throw new Error('expected text result');
|
|
18
|
+
return item.text;
|
|
19
|
+
}
|
|
20
|
+
describe('pagination contracts', () => {
|
|
21
|
+
it('defaults and clamps bounded list inputs', () => {
|
|
22
|
+
expect(normalizePageSize(undefined, 'pageSize')).toBe(20);
|
|
23
|
+
expect(normalizePageSize(0, 'pageSize')).toBe(1);
|
|
24
|
+
expect(normalizePageSize(-10, 'pageSize')).toBe(1);
|
|
25
|
+
expect(normalizePageSize(101, 'pageSize')).toBe(MAX_PAGE_SIZE);
|
|
26
|
+
});
|
|
27
|
+
it.each([1.5, Number.NaN, Number.POSITIVE_INFINITY, '20'])('rejects invalid %s', (value) => {
|
|
28
|
+
expect(() => normalizePageSize(value, 'maxResults')).toThrow(/maxResults must be an integer/);
|
|
29
|
+
});
|
|
30
|
+
it('normalizes only the configured list action', async () => {
|
|
31
|
+
const run = makeDomainRun(CaptureService, ['list', 'write'], {
|
|
32
|
+
pagination: { list: 'pageSize' }
|
|
33
|
+
});
|
|
34
|
+
const listResult = await run({ action: 'list', pageSize: 500 });
|
|
35
|
+
expect(JSON.parse(textOf(listResult))).toEqual({ pageSize: 100 });
|
|
36
|
+
const writeResult = await run({ action: 'write', pageSize: 500 });
|
|
37
|
+
expect(JSON.parse(textOf(writeResult))).toEqual({ pageSize: 500 });
|
|
38
|
+
});
|
|
39
|
+
it('rejects unknown actions before validating pagination fields', async () => {
|
|
40
|
+
const run = makeDomainRun(CaptureService, ['list'], { pagination: { list: 'pageSize' } });
|
|
41
|
+
await expect(run({ action: 'missing', pageSize: 1.5 })).rejects.toThrow(/Unknown action: missing/);
|
|
42
|
+
});
|
|
43
|
+
it('returns a validation error for invalid list input', async () => {
|
|
44
|
+
const run = makeDomainRun(CaptureService, ['list'], { pagination: { list: 'pageSize' } });
|
|
45
|
+
await expect(run({ action: 'list', pageSize: 1.5 })).rejects.toThrow(/pageSize must be an integer/);
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
//# sourceMappingURL=factory.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"factory.test.js","sourceRoot":"","sources":["../../../../src/tools/domains/factory.test.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAA;AAC7C,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAE9E,MAAM,cAAc;IAClB,YAAY,IAAa;QAGzB,SAAI,GAAG,KAAK,EAAE,MAAe,EAA2B,EAAE,CAAC,CAAC;YAC1D,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC;SAC1D,CAAC,CAAA;QAEF,UAAK,GAAG,KAAK,EAAE,MAAe,EAA2B,EAAE,CAAC,CAAC;YAC3D,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC;SAC1D,CAAC,CAAA;QARA,KAAK,IAAI,CAAA;IACX,CAAC;CAQF;AACD,SAAS,MAAM,CAAC,MAAsB;IACpC,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;IAC9B,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM;QAAE,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAA;IACjE,OAAO,IAAI,CAAC,IAAI,CAAA;AAClB,CAAC;AAED,QAAQ,CAAC,sBAAsB,EAAE,GAAG,EAAE;IACpC,EAAE,CAAC,yCAAyC,EAAE,GAAG,EAAE;QACjD,MAAM,CAAC,iBAAiB,CA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Q,EAAE,GAAG,EAAE,CAAC,CAAA;QACjE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,CAAA;IACpE,CAAC,CAAC,CAAA;IACF,EAAE,CAAC,6DAA6D,EAAE,KAAK,IAAI,EAAE;QAC3E,MAAM,GAAG,GAAG,aAAa,CAAC,cAAc,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,CAAC,CAAA;QACzF,MAAM,MAAM,CAAC,GAAG,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,yBAAyB,CAAC,CAAA;IACpG,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,mDAAmD,EAAE,KAAK,IAAI,EAAE;QACjE,MAAM,GAAG,GAAG,aAAa,CAAC,cAAc,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,CAAC,CAAA;QACzF,MAAM,MAAM,CAAC,GAAG,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,6BAA6B,CAAC,CAAA;IACrG,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Forms Mega Tool
|
|
3
|
+
* All Google Forms operations in one unified interface, dispatched by `action`
|
|
4
|
+
* to FormsService via the generic domain factory. FormsService is ours
|
|
5
|
+
* (src/services/, not src/vendored/) because upstream has no Forms coverage.
|
|
6
|
+
*/
|
|
7
|
+
export declare const FORMS_ACTIONS: readonly ["create", "get", "batchUpdate", "listResponses", "getResponse"];
|
|
8
|
+
export declare const forms: (input: import("./factory.js").DomainRunInput) => Promise<import("@modelcontextprotocol/sdk/types").CallToolResult>;
|
|
9
|
+
//# sourceMappingURL=forms.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forms.d.ts","sourceRoot":"","sources":["../../../../src/tools/domains/forms.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,eAAO,MAAM,aAAa,2EAA4E,CAAA;AAEtG,eAAO,MAAM,KAAK,qHAA4F,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Forms Mega Tool
|
|
3
|
+
* All Google Forms operations in one unified interface, dispatched by `action`
|
|
4
|
+
* to FormsService via the generic domain factory. FormsService is ours
|
|
5
|
+
* (src/services/, not src/vendored/) because upstream has no Forms coverage.
|
|
6
|
+
*/
|
|
7
|
+
import { FormsService } from '../../services/FormsService.js';
|
|
8
|
+
import { makeDomainRun } from './factory.js';
|
|
9
|
+
// Action name = FormsService method name (verbatim).
|
|
10
|
+
export const FORMS_ACTIONS = ['create', 'get', 'batchUpdate', 'listResponses', 'getResponse'];
|
|
11
|
+
export const forms = makeDomainRun(FormsService, FORMS_ACTIONS, { pagination: { listResponses: 'pageSize' } });
|
|
12
|
+
//# sourceMappingURL=forms.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forms.js","sourceRoot":"","sources":["../../../../src/tools/domains/forms.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAA;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAE5C,qDAAqD;AACrD,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,QAAQ,EAAE,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,aAAa,CAAU,CAAA;AAEtG,MAAM,CAAC,MAAM,KAAK,GAAG,aAAa,CAAC,YAAY,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,EAAE,aAAa,EAAE,UAAU,EAAE,EAAE,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forms.test.d.ts","sourceRoot":"","sources":["../../../../src/tools/domains/forms.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
|
2
|
+
// vi.mock() factories are hoisted above regular const declarations, so the
|
|
3
|
+
// mocks referenced inside must be created via vi.hoisted() to avoid a
|
|
4
|
+
// temporal-dead-zone error.
|
|
5
|
+
const { getMock, createMock, mockMethods, constructed } = vi.hoisted(() => {
|
|
6
|
+
const getMock = vi.fn();
|
|
7
|
+
const createMock = vi.fn();
|
|
8
|
+
// makeDomainRun builds the service ONCE at module load and hands it the
|
|
9
|
+
// AuthManager. Capturing that instance is what lets the account-plumbing
|
|
10
|
+
// tests below drive the real shim instead of asserting against a mock.
|
|
11
|
+
const constructed = {};
|
|
12
|
+
return { getMock, createMock, mockMethods: { get: getMock, create: createMock }, constructed };
|
|
13
|
+
});
|
|
14
|
+
vi.mock('../../services/FormsService.js', () => ({
|
|
15
|
+
// `new` requires a real function (not an arrow function) as the implementation.
|
|
16
|
+
FormsService: vi.fn().mockImplementation(function FormsServiceMock(auth) {
|
|
17
|
+
constructed.auth = auth;
|
|
18
|
+
return mockMethods;
|
|
19
|
+
})
|
|
20
|
+
}));
|
|
21
|
+
// NOTE: AuthManager is deliberately NOT mocked -- its shim is what reads the
|
|
22
|
+
// per-request account out of AsyncLocalStorage, so mocking it away would make
|
|
23
|
+
// the account tests below pass no matter how the dispatch is wired.
|
|
24
|
+
import { getAuth } from '../../auth/credential-state.js';
|
|
25
|
+
import { FORMS_ACTIONS, forms } from './forms.js';
|
|
26
|
+
/** Records the account each getAuthenticatedClient() call resolves to. */
|
|
27
|
+
function recordResolvedAccounts() {
|
|
28
|
+
const seen = [];
|
|
29
|
+
vi.spyOn(getAuth(), 'getAuthenticatedClient').mockImplementation(async (account) => {
|
|
30
|
+
seen.push(account);
|
|
31
|
+
return {};
|
|
32
|
+
});
|
|
33
|
+
getMock.mockImplementation(async () => {
|
|
34
|
+
await constructed.auth?.getAuthenticatedClient();
|
|
35
|
+
return { content: [{ type: 'text', text: 'ok' }] };
|
|
36
|
+
});
|
|
37
|
+
return seen;
|
|
38
|
+
}
|
|
39
|
+
describe('forms mega-tool', () => {
|
|
40
|
+
beforeEach(() => {
|
|
41
|
+
vi.clearAllMocks();
|
|
42
|
+
});
|
|
43
|
+
afterEach(() => {
|
|
44
|
+
vi.restoreAllMocks();
|
|
45
|
+
});
|
|
46
|
+
it('exposes the 5 FormsService methods as actions', () => {
|
|
47
|
+
expect(FORMS_ACTIONS).toEqual(['create', 'get', 'batchUpdate', 'listResponses', 'getResponse']);
|
|
48
|
+
});
|
|
49
|
+
it('names only methods the real FormsService implements', async () => {
|
|
50
|
+
// Bypasses the module mock above: a typo in FORMS_ACTIONS would otherwise
|
|
51
|
+
// only surface at runtime, as "Unknown action" for an action we advertise.
|
|
52
|
+
const actual = await vi.importActual('../../services/FormsService.js');
|
|
53
|
+
const real = new actual.FormsService({ getAuthenticatedClient: async () => ({}) });
|
|
54
|
+
for (const action of FORMS_ACTIONS) {
|
|
55
|
+
expect(typeof real[action], `FormsService.${action}`).toBe('function');
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
it('dispatches to the matching FormsService method and returns its result unchanged', async () => {
|
|
59
|
+
const svcResult = { content: [{ type: 'text', text: '{"formId":"f1"}' }] };
|
|
60
|
+
getMock.mockResolvedValue(svcResult);
|
|
61
|
+
const result = await forms({ action: 'get', formId: 'f1' });
|
|
62
|
+
expect(getMock).toHaveBeenCalledWith({ formId: 'f1' });
|
|
63
|
+
expect(result).toBe(svcResult);
|
|
64
|
+
});
|
|
65
|
+
it('forwards all non-action, non-account params to the method', async () => {
|
|
66
|
+
createMock.mockResolvedValue({ content: [{ type: 'text', text: 'ok' }] });
|
|
67
|
+
await forms({ action: 'create', title: 'Survey', documentTitle: 'Q3', account: 'work@example.com' });
|
|
68
|
+
// account selects credentials; it is not a service param.
|
|
69
|
+
expect(createMock).toHaveBeenCalledWith({ title: 'Survey', documentTitle: 'Q3' });
|
|
70
|
+
});
|
|
71
|
+
it('throws a WorkspaceMCPError listing valid actions for an unknown action', async () => {
|
|
72
|
+
await expect(forms({ action: 'listForms' })).rejects.toMatchObject({
|
|
73
|
+
code: 'VALIDATION_ERROR',
|
|
74
|
+
message: 'Unknown action: listForms',
|
|
75
|
+
suggestion: `Valid actions: ${FORMS_ACTIONS.join(', ')}`
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
it('passes the account from the tool input down to credential resolution', async () => {
|
|
79
|
+
const seen = recordResolvedAccounts();
|
|
80
|
+
await forms({ action: 'get', account: 'work@example.com', formId: 'f1' });
|
|
81
|
+
expect(seen).toEqual(['work@example.com']);
|
|
82
|
+
});
|
|
83
|
+
it('keeps concurrent calls on their own account', async () => {
|
|
84
|
+
const seen = recordResolvedAccounts();
|
|
85
|
+
await Promise.all([
|
|
86
|
+
forms({ action: 'get', account: 'a@example.com', formId: 'f1' }),
|
|
87
|
+
forms({ action: 'get', account: 'b@example.com', formId: 'f1' }),
|
|
88
|
+
forms({ action: 'get', formId: 'f1' })
|
|
89
|
+
]);
|
|
90
|
+
expect(seen.sort()).toEqual(['a@example.com', 'b@example.com', undefined]);
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
//# sourceMappingURL=forms.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forms.test.js","sourceRoot":"","sources":["../../../../src/tools/domains/forms.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAA;AAExE,2EAA2E;AAC3E,sEAAsE;AACtE,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CAAA;IAEF,EAAE,CAAC,sEAAsE,EAAE,KAAK,IAAI,EAAE;QACpF,MAAM,IAAI,GAAG,sBAAsB,EAAE,CAAA;QAErC,MAAM,KAAK,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAA;QAEzE,MAAM,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAA;IAC5C,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,6CAA6C,EAAE,KAAK,IAAI,EAAE;QAC3D,MAAM,IAAI,GAAG,sBAAsB,EAAE,CAAA;QAErC,MAAM,OAAO,CAAC,GAAG,CAAC;YAChB,KAAK,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;YAChE,KAAK,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;YAChE,KAAK,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;SACvC,CAAC,CAAA;QAEF,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,eAAe,EAAE,eAAe,EAAE,SAAS,CAAC,CAAC,CAAA;IAC5E,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const GMAIL_ACTIONS: readonly ["search", "get", "downloadAttachment", "modify", "batchModify", "modifyThread", "send", "createDraft", "sendDraft", "listLabels", "createLabel"];
|
|
2
|
+
export declare const gmail: (input: import("./factory.js").DomainRunInput) => Promise<import("@modelcontextprotocol/sdk/types").CallToolResult>;
|
|
3
|
+
//# sourceMappingURL=gmail.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gmail.d.ts","sourceRoot":"","sources":["../../../../src/tools/domains/gmail.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,aAAa,4JAYhB,CAAA;AACV,eAAO,MAAM,KAAK,qHAAuF,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { GmailService } from '../../vendored/services/GmailService.js';
|
|
2
|
+
import { makeDomainRun } from './factory.js';
|
|
3
|
+
export const GMAIL_ACTIONS = [
|
|
4
|
+
'search',
|
|
5
|
+
'get',
|
|
6
|
+
'downloadAttachment',
|
|
7
|
+
'modify',
|
|
8
|
+
'batchModify',
|
|
9
|
+
'modifyThread',
|
|
10
|
+
'send',
|
|
11
|
+
'createDraft',
|
|
12
|
+
'sendDraft',
|
|
13
|
+
'listLabels',
|
|
14
|
+
'createLabel'
|
|
15
|
+
];
|
|
16
|
+
export const gmail = makeDomainRun(GmailService, GMAIL_ACTIONS, { pagination: { search: 'maxResults' } });
|
|
17
|
+
//# sourceMappingURL=gmail.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gmail.js","sourceRoot":"","sources":["../../../../src/tools/domains/gmail.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAA;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAE5C,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,QAAQ;IACR,KAAK;IACL,oBAAoB;IACpB,QAAQ;IACR,aAAa;IACb,cAAc;IACd,MAAM;IACN,aAAa;IACb,WAAW;IACX,YAAY;IACZ,aAAa;CACL,CAAA;AACV,MAAM,CAAC,MAAM,KAAK,GAAG,aAAa,CAAC,YAAY,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,EAAE,MAAM,EAAE,YAAY,EAAE,EAAE,CAAC,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Single source of truth for N+2 domain tools. Each DomainDef fully
|
|
3
|
+
* describes one domain (docs; Task 7b appends 9 more) -- registry.ts derives
|
|
4
|
+
* TOOLS, RESOURCES, the help topic allowlist, and the CallTool dispatch map
|
|
5
|
+
* from this one list instead of maintaining them as separate hand-synced
|
|
6
|
+
* arrays. Adding a domain = pushing one DomainDef here.
|
|
7
|
+
*/
|
|
8
|
+
import type { CallToolResult } from '@modelcontextprotocol/sdk/types.js';
|
|
9
|
+
import type { DomainRunInput } from './factory.js';
|
|
10
|
+
export interface DomainDef {
|
|
11
|
+
name: string;
|
|
12
|
+
description: string;
|
|
13
|
+
actions: readonly string[];
|
|
14
|
+
inputProps: Record<string, unknown>;
|
|
15
|
+
localOnlyActions?: readonly string[];
|
|
16
|
+
localOnlyInputProps?: readonly string[];
|
|
17
|
+
run: (input: DomainRunInput) => Promise<CallToolResult>;
|
|
18
|
+
}
|
|
19
|
+
export declare const DOMAINS: DomainDef[];
|
|
20
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tools/domains/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAA;AAKxE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AASlD,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,SAAS,MAAM,EAAE,CAAA;IAC1B,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACnC,gBAAgB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IACpC,mBAAmB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IACvC,GAAG,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,OAAO,CAAC,cAAc,CAAC,CAAA;CACxD;AAED,eAAO,MAAM,OAAO,EAAE,SAAS,EA8N9B,CAAA"}
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Single source of truth for N+2 domain tools. Each DomainDef fully
|
|
3
|
+
* describes one domain (docs; Task 7b appends 9 more) -- registry.ts derives
|
|
4
|
+
* TOOLS, RESOURCES, the help topic allowlist, and the CallTool dispatch map
|
|
5
|
+
* from this one list instead of maintaining them as separate hand-synced
|
|
6
|
+
* arrays. Adding a domain = pushing one DomainDef here.
|
|
7
|
+
*/
|
|
8
|
+
import { CALENDAR_ACTIONS, calendar } from './calendar.js';
|
|
9
|
+
import { CHAT_ACTIONS, chat } from './chat.js';
|
|
10
|
+
import { DOCS_ACTIONS, docs } from './docs.js';
|
|
11
|
+
import { DRIVE_ACTIONS, drive } from './drive.js';
|
|
12
|
+
import { FORMS_ACTIONS, forms } from './forms.js';
|
|
13
|
+
import { GMAIL_ACTIONS, gmail } from './gmail.js';
|
|
14
|
+
import { PEOPLE_ACTIONS, people } from './people.js';
|
|
15
|
+
import { SHEETS_ACTIONS, sheets } from './sheets.js';
|
|
16
|
+
import { SLIDES_ACTIONS, slides } from './slides.js';
|
|
17
|
+
import { TASKS_ACTIONS, tasks } from './tasks.js';
|
|
18
|
+
import { TIME_ACTIONS, time } from './time.js';
|
|
19
|
+
export const DOMAINS = [
|
|
20
|
+
{
|
|
21
|
+
name: 'docs',
|
|
22
|
+
description: 'Google Docs operations.\n\nActions (required params -> optional):\n- getText (documentId -> tabId, limit, preview)\n- create (title -> content)\n- writeText (documentId, text -> position, tabId)\n- getSuggestions (documentId)\n- replaceText (documentId, findText, replaceText -> tabId)\n- formatText (documentId, formats -> tabId)\n\ngetText defaults to 20,000 characters, accepts limit 1-100,000, and marks truncated output explicitly. preview defaults to 2,000 characters unless limit is provided. These bounds limit response size without changing document authorization.\n\naccount = email of the Google account to use (default: primary).',
|
|
23
|
+
actions: DOCS_ACTIONS,
|
|
24
|
+
inputProps: {
|
|
25
|
+
documentId: { type: 'string', description: 'Google Doc ID or URL' },
|
|
26
|
+
title: { type: 'string', description: 'Document title (for create)' },
|
|
27
|
+
content: { type: 'string', description: 'Initial document content (for create)' },
|
|
28
|
+
text: { type: 'string', description: 'Text to insert (for writeText)' },
|
|
29
|
+
position: {
|
|
30
|
+
type: 'string',
|
|
31
|
+
description: 'Insert position for writeText: "beginning", "end" (default), or a positive integer index'
|
|
32
|
+
},
|
|
33
|
+
tabId: { type: 'string', description: 'Tab ID to target (optional, for multi-tab documents)' },
|
|
34
|
+
limit: { type: 'number', description: 'Maximum Docs text characters for getText (1-100000; default 20000)' },
|
|
35
|
+
preview: { type: 'boolean', description: 'Use a 2000-character getText preview unless limit is provided' },
|
|
36
|
+
replaceText: { type: 'string', description: 'Replacement text (for replaceText)' },
|
|
37
|
+
formats: {
|
|
38
|
+
type: 'array',
|
|
39
|
+
items: {
|
|
40
|
+
type: 'object',
|
|
41
|
+
properties: {
|
|
42
|
+
startIndex: { type: 'number' },
|
|
43
|
+
endIndex: { type: 'number' },
|
|
44
|
+
style: { type: 'string' },
|
|
45
|
+
url: { type: 'string' }
|
|
46
|
+
},
|
|
47
|
+
required: ['startIndex', 'endIndex', 'style']
|
|
48
|
+
},
|
|
49
|
+
description: 'Formatting operations to apply (for formatText)'
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
run: docs
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: 'time',
|
|
56
|
+
description: 'Local date/time/timezone helpers (no Google account needed).\n\nActions:\n- getCurrentDate\n- getCurrentTime\n- getTimeZone',
|
|
57
|
+
actions: TIME_ACTIONS,
|
|
58
|
+
inputProps: {},
|
|
59
|
+
run: time
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: 'drive',
|
|
63
|
+
description: 'Drive operations. See the action enum for operations available in this transport. account = email of the Google account to use (default: primary).',
|
|
64
|
+
actions: DRIVE_ACTIONS,
|
|
65
|
+
localOnlyActions: ['downloadFile'],
|
|
66
|
+
localOnlyInputProps: ['localPath'],
|
|
67
|
+
inputProps: {
|
|
68
|
+
fileId: { type: 'string' },
|
|
69
|
+
folderId: { type: 'string' },
|
|
70
|
+
folderName: { type: 'string' },
|
|
71
|
+
query: { type: 'string' },
|
|
72
|
+
name: { type: 'string' },
|
|
73
|
+
newName: { type: 'string' },
|
|
74
|
+
parentId: { type: 'string' },
|
|
75
|
+
destinationFolderId: { type: 'string' },
|
|
76
|
+
pageSize: { type: 'number', description: 'Maximum search results per page (default 10)' },
|
|
77
|
+
pageToken: { type: 'string', description: 'Continuation token from a previous search page' },
|
|
78
|
+
corpus: { type: 'string', enum: ['user', 'domain'], description: 'Drive search corpus' },
|
|
79
|
+
unreadOnly: { type: 'boolean', description: 'Restrict search to unread files where supported' },
|
|
80
|
+
localPath: {
|
|
81
|
+
type: 'string',
|
|
82
|
+
description: 'Local destination path for downloadFile. This action is available only over local stdio transport.'
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
run: drive
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
name: 'calendar',
|
|
89
|
+
description: 'Calendar operations. Actions: ' +
|
|
90
|
+
CALENDAR_ACTIONS.join(', ') +
|
|
91
|
+
'. account = email of the Google account to use (default: primary).',
|
|
92
|
+
actions: CALENDAR_ACTIONS,
|
|
93
|
+
inputProps: {
|
|
94
|
+
calendarId: { type: 'string' },
|
|
95
|
+
eventId: { type: 'string' },
|
|
96
|
+
summary: { type: 'string' },
|
|
97
|
+
description: { type: 'string' },
|
|
98
|
+
start: { type: 'string' },
|
|
99
|
+
end: { type: 'string' },
|
|
100
|
+
attendees: { type: 'array' }
|
|
101
|
+
},
|
|
102
|
+
run: calendar
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
name: 'chat',
|
|
106
|
+
description: 'Chat operations. Actions: ' +
|
|
107
|
+
CHAT_ACTIONS.join(', ') +
|
|
108
|
+
'. account = email of the Google account to use (default: primary).',
|
|
109
|
+
actions: CHAT_ACTIONS,
|
|
110
|
+
inputProps: {
|
|
111
|
+
spaceId: { type: 'string' },
|
|
112
|
+
displayName: { type: 'string' },
|
|
113
|
+
email: { type: 'string' },
|
|
114
|
+
text: { type: 'string' },
|
|
115
|
+
threadId: { type: 'string' },
|
|
116
|
+
pageSize: { type: 'number', description: 'Maximum spaces, messages, or threads per page' },
|
|
117
|
+
pageToken: { type: 'string', description: 'Continuation token from a previous page' },
|
|
118
|
+
unreadOnly: { type: 'boolean', description: 'Return only unread messages' },
|
|
119
|
+
orderBy: { type: 'string', description: 'Message ordering expression' },
|
|
120
|
+
filter: { type: 'string', description: 'Chat message filter' }
|
|
121
|
+
},
|
|
122
|
+
run: chat
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
name: 'gmail',
|
|
126
|
+
description: 'Gmail operations. Actions: ' +
|
|
127
|
+
GMAIL_ACTIONS.join(', ') +
|
|
128
|
+
'. account = email of the Google account to use (default: primary).',
|
|
129
|
+
actions: GMAIL_ACTIONS,
|
|
130
|
+
inputProps: {
|
|
131
|
+
query: { type: 'string' },
|
|
132
|
+
messageId: { type: 'string' },
|
|
133
|
+
threadId: { type: 'string' },
|
|
134
|
+
to: { type: 'string' },
|
|
135
|
+
subject: { type: 'string' },
|
|
136
|
+
body: { type: 'string' },
|
|
137
|
+
draftId: { type: 'string' },
|
|
138
|
+
labelIds: { type: 'array' },
|
|
139
|
+
maxResults: { type: 'number', description: 'Maximum messages returned per page (bounded by Gmail)' },
|
|
140
|
+
pageToken: { type: 'string', description: 'Continuation token from a previous search page' },
|
|
141
|
+
includeSpamTrash: { type: 'boolean', description: 'Include spam and trash in search results' },
|
|
142
|
+
format: { type: 'string', enum: ['minimal', 'full', 'raw', 'metadata'], description: 'Message payload detail' }
|
|
143
|
+
},
|
|
144
|
+
run: gmail
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
name: 'slides',
|
|
148
|
+
description: 'Slides operations. Actions: ' +
|
|
149
|
+
SLIDES_ACTIONS.join(', ') +
|
|
150
|
+
'. account = email of the Google account to use (default: primary).',
|
|
151
|
+
actions: SLIDES_ACTIONS,
|
|
152
|
+
inputProps: {
|
|
153
|
+
presentationId: { type: 'string' },
|
|
154
|
+
title: { type: 'string' },
|
|
155
|
+
slideId: { type: 'string' },
|
|
156
|
+
text: { type: 'string' }
|
|
157
|
+
},
|
|
158
|
+
run: slides
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
name: 'sheets',
|
|
162
|
+
description: 'Sheets operations. Actions: ' +
|
|
163
|
+
SHEETS_ACTIONS.join(', ') +
|
|
164
|
+
'. account = email of the Google account to use (default: primary).',
|
|
165
|
+
actions: SHEETS_ACTIONS,
|
|
166
|
+
inputProps: {
|
|
167
|
+
spreadsheetId: { type: 'string' },
|
|
168
|
+
range: { type: 'string' }
|
|
169
|
+
},
|
|
170
|
+
run: sheets
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
name: 'tasks',
|
|
174
|
+
description: 'Tasks operations. Actions: ' +
|
|
175
|
+
TASKS_ACTIONS.join(', ') +
|
|
176
|
+
'. account = email of the Google account to use (default: primary).',
|
|
177
|
+
actions: TASKS_ACTIONS,
|
|
178
|
+
inputProps: {
|
|
179
|
+
taskListId: { type: 'string' },
|
|
180
|
+
taskId: { type: 'string' },
|
|
181
|
+
title: { type: 'string' },
|
|
182
|
+
notes: { type: 'string' },
|
|
183
|
+
due: { type: 'string' },
|
|
184
|
+
maxResults: { type: 'number', description: 'Maximum task lists or tasks per page' },
|
|
185
|
+
pageToken: { type: 'string', description: 'Continuation token from a previous page' }
|
|
186
|
+
},
|
|
187
|
+
run: tasks
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
name: 'people',
|
|
191
|
+
description: 'People operations. Actions: ' +
|
|
192
|
+
PEOPLE_ACTIONS.join(', ') +
|
|
193
|
+
'. account = email of the Google account to use (default: primary).',
|
|
194
|
+
actions: PEOPLE_ACTIONS,
|
|
195
|
+
inputProps: {
|
|
196
|
+
resourceName: { type: 'string' }
|
|
197
|
+
},
|
|
198
|
+
run: people
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
name: 'forms',
|
|
202
|
+
description: 'Google Forms operations.\n\nActions (required params -> optional):\n- create (title -> documentTitle)\n- get (formId)\n- batchUpdate (formId, requests)\n- listResponses (formId -> pageSize, pageToken, filter)\n- getResponse (formId, responseId)\n\nQuestions are added with batchUpdate, not create. Responses are read-only (the Forms API cannot write one), and listing or deleting forms goes through the drive tool.\n\naccount = email of the Google account to use (default: primary).',
|
|
203
|
+
actions: FORMS_ACTIONS,
|
|
204
|
+
inputProps: {
|
|
205
|
+
formId: {
|
|
206
|
+
type: 'string',
|
|
207
|
+
description: 'Form ID, or the editor URL https://docs.google.com/forms/d/<formId>/edit'
|
|
208
|
+
},
|
|
209
|
+
title: { type: 'string', description: 'Form title shown to respondents (for create)' },
|
|
210
|
+
documentTitle: {
|
|
211
|
+
type: 'string',
|
|
212
|
+
description: 'Drive file name, when it should differ from the title (for create)'
|
|
213
|
+
},
|
|
214
|
+
requests: {
|
|
215
|
+
type: 'array',
|
|
216
|
+
items: { type: 'object' },
|
|
217
|
+
description: 'Forms API batchUpdate requests, e.g. [{"createItem": {...}}] (for batchUpdate)'
|
|
218
|
+
},
|
|
219
|
+
responseId: { type: 'string', description: 'Response ID (for getResponse)' },
|
|
220
|
+
pageSize: { type: 'number', description: 'Maximum responses to return (for listResponses)' },
|
|
221
|
+
pageToken: { type: 'string', description: 'Page token from a previous listResponses call' },
|
|
222
|
+
filter: {
|
|
223
|
+
type: 'string',
|
|
224
|
+
description: 'Response filter, e.g. timestamp > 2026-01-01T00:00:00Z (for listResponses)'
|
|
225
|
+
}
|
|
226
|
+
},
|
|
227
|
+
run: forms
|
|
228
|
+
}
|
|
229
|
+
];
|
|
230
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/tools/domains/index.ts"],"names":[],"mappings":"AAAA;;;;;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AE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,+BAA+B,EAAE;YAC5E,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,iDAAiD,EAAE;YAC5F,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,+CAA+C,EAAE;YAC3F,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,4EAA4E;aAC1F;SACF;QACD,GAAG,EAAE,KAAK;KACX;CACF,CAAA"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const PEOPLE_ACTIONS: readonly ["getUserProfile", "getMe", "getUserRelations"];
|
|
2
|
+
export declare const people: (input: import("./factory.js").DomainRunInput) => Promise<import("@modelcontextprotocol/sdk/types").CallToolResult>;
|
|
3
|
+
//# sourceMappingURL=people.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"people.d.ts","sourceRoot":"","sources":["../../../../src/tools/domains/people.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,cAAc,0DAA2D,CAAA;AACtF,eAAO,MAAM,MAAM,qHAA+C,CAAA"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { PeopleService } from '../../vendored/services/PeopleService.js';
|
|
2
|
+
import { makeDomainRun } from './factory.js';
|
|
3
|
+
export const PEOPLE_ACTIONS = ['getUserProfile', 'getMe', 'getUserRelations'];
|
|
4
|
+
export const people = makeDomainRun(PeopleService, PEOPLE_ACTIONS);
|
|
5
|
+
//# sourceMappingURL=people.js.map
|