feat(tasks): add support for Google Tasks#307
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces Google Tasks integration by implementing a TasksService and registering several MCP tools for managing task lists and tasks. It also includes documentation updates and unit tests. The review feedback highlights improvement opportunities regarding pagination support—specifically suggesting that listing methods return the full response object to preserve page tokens—and recommends standardizing the deletion success message as a JSON string for consistency across the service.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces Google Tasks integration by implementing a new TasksService, registering corresponding MCP tools for listing, creating, updating, and deleting tasks, and adding comprehensive unit tests. The feedback suggests refining the API calls in the TasksService to only include defined properties in the request objects, ensuring consistency with other methods in the class and preventing potential issues with the underlying API library.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request implements Google Tasks integration by introducing a new TasksService, registering several MCP tools for task management, and adding comprehensive unit tests. The review feedback focuses on improving code maintainability and readability within the TasksService. Specifically, it suggests using object destructuring and spreading to simplify API parameter mapping and request body construction, as well as refactoring repetitive error handling logic into a shared private helper method.
Adds full support for Google Tasks with 6 new tools: - tasks.listLists: List task lists - tasks.list: List tasks with filtering (completed, assigned, due dates) - tasks.create: Create new tasks - tasks.update: Update existing tasks - tasks.complete: Mark tasks as completed - tasks.delete: Delete tasks Follows existing service patterns with private client method, error handling, and logging. Tasks scopes (default-OFF) will be gated by the feature configuration service. Fixes #105
… delete - listTaskLists and listTasks now return response.data instead of just items, preserving nextPageToken for pagination - deleteTask returns JSON message instead of plain text for consistency with other services
Use conditional spread to omit undefined parameters from tasklists.list and tasks.list calls, consistent with createTask and updateTask.
Integrate the 6 tasks tools with the feature-configuration service (#284) so they no longer break users on Google's published OAuth project: - Register tasks tools via the feature-gated registerTool wrapper instead of server.registerTool, so they are skipped unless the tasks feature groups are enabled. - Populate the tasks.read (listLists, list) and tasks.write (create, update, complete, delete) tool arrays in feature-config. Both tasks groups are defaultEnabled: false, so getAllPossibleScopes() excludes the tasks scopes from the OAuth consent set — existing users are unaffected. Tools and the tasks scope only activate under WORKSPACE_FEATURE_OVERRIDES="tasks.read:on,tasks.write:on".
cdfc646 to
9ff80e3
Compare
- Add an RFC 3339 example to all task due-date param descriptions (dueMin, dueMax, create due, update due), matching the format used in WORKSPACE-Context.md. - Fix copyright year 2025 -> 2026 in TasksService and its test.
Summary
Adds full support for Google Tasks, rebased onto current
mainand integrated with the feature-configuration service so it ships safely disabled-by-default.TasksServicewith privategetTasksClient()following the same pattern as other servicestasks.listLists,tasks.list,tasks.create,tasks.update,tasks.complete,tasks.deleteregisterToolwrapper, and thetasks.read/tasks.writegroups are populated infeature-config.tswithdefaultEnabled: falseWORKSPACE-Context.mdwith Google Tasks behavioral guidanceReplaces #106 (which predated the current codebase structure).
Safe-by-default for existing users
Both tasks feature groups are
defaultEnabled: false, sogetAllPossibleScopes()excludes the Tasks scopes from the OAuth consent set. Users on Google's published GCP project see no change to the scopes requested — the Tasks tools and thetasksscope only activate underWORKSPACE_FEATURE_OVERRIDES="tasks.read:on,tasks.write:on".Fixes #105
Test plan
npm run test— all 29 suites / 589 tests passnpm run lint— cleannpm run format:check— cleanWORKSPACE_FEATURE_OVERRIDES="tasks.read:on,tasks.write:on"all 6 tools appear and thetasksscope is requested