Skip to content

feat(tasks): add support for Google Tasks#307

Merged
allenhutchison merged 5 commits into
mainfrom
feat/tasks-support-v2
Jun 5, 2026
Merged

feat(tasks): add support for Google Tasks#307
allenhutchison merged 5 commits into
mainfrom
feat/tasks-support-v2

Conversation

@allenhutchison
Copy link
Copy Markdown
Contributor

@allenhutchison allenhutchison commented Mar 30, 2026

Summary

Adds full support for Google Tasks, rebased onto current main and integrated with the feature-configuration service so it ships safely disabled-by-default.

  • Implements TasksService with private getTasksClient() following the same pattern as other services
  • Registers 6 new tools: tasks.listLists, tasks.list, tasks.create, tasks.update, tasks.complete, tasks.delete
  • Gated behind the feature configuration service (feat: feature configuration service for scope-based toggles #284): tools are registered via the feature-gated registerTool wrapper, and the tasks.read / tasks.write groups are populated in feature-config.ts with defaultEnabled: false
  • Full error handling with try/catch and logging on all methods
  • Updates WORKSPACE-Context.md with Google Tasks behavioral guidance

Replaces #106 (which predated the current codebase structure).

Safe-by-default for existing users

Both tasks feature groups are defaultEnabled: false, so getAllPossibleScopes() 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 the tasks scope only activate under WORKSPACE_FEATURE_OVERRIDES="tasks.read:on,tasks.write:on".

Fixes #105

Test plan

  • 14 unit tests covering all 6 methods including error handling
  • npm run test — all 29 suites / 589 tests pass
  • npm run lint — clean
  • npm run format:check — clean
  • Verified gating: by default 0 Tasks tools exposed and 0 Tasks scopes requested; with WORKSPACE_FEATURE_OVERRIDES="tasks.read:on,tasks.write:on" all 6 tools appear and the tasks scope is requested

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread workspace-server/src/services/TasksService.ts Outdated
Comment thread workspace-server/src/services/TasksService.ts Outdated
Comment thread workspace-server/src/services/TasksService.ts Outdated
Comment thread workspace-server/src/__tests__/services/TasksService.test.ts Outdated
Comment thread workspace-server/src/__tests__/services/TasksService.test.ts Outdated
Comment thread workspace-server/src/__tests__/services/TasksService.test.ts Outdated
Comment thread workspace-server/src/__tests__/services/TasksService.test.ts Outdated
@allenhutchison
Copy link
Copy Markdown
Contributor Author

/gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread workspace-server/src/services/TasksService.ts
Comment thread workspace-server/src/services/TasksService.ts
@allenhutchison
Copy link
Copy Markdown
Contributor Author

/gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread workspace-server/src/services/TasksService.ts
Comment thread workspace-server/src/services/TasksService.ts
Comment thread workspace-server/src/services/TasksService.ts
Comment thread workspace-server/src/services/TasksService.ts
Comment thread workspace-server/src/services/TasksService.ts
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".
Copy link
Copy Markdown
Contributor

@abhipatel12 abhipatel12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm! small nits!

Comment thread workspace-server/src/index.ts Outdated
Comment thread workspace-server/src/__tests__/services/TasksService.test.ts Outdated
Comment thread workspace-server/src/services/TasksService.ts Outdated
- 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.
@allenhutchison allenhutchison merged commit 7ddc181 into main Jun 5, 2026
18 checks passed
@allenhutchison allenhutchison deleted the feat/tasks-support-v2 branch June 5, 2026 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Google Tasks support

3 participants