fix(google-calendar): align with live API docs, add calendar/ACL update+delete tools#5485
Conversation
…te+delete tools - remove any types from V2 response typing in get/move/quick_add/instances - add google_calendar_update_calendar (PATCH calendars.patch) - add google_calendar_delete_calendar (DELETE calendars.delete) - add google_calendar_update_acl (PATCH acl.patch) - all new tools covered by existing calendar OAuth scope, no new scopes requested
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview The block gains matching operation dropdown entries, conditional sub-blocks (calendar metadata for updates, shared role/notification/rule fields for ACL updates), tool routing, and v2 output for deleted Several existing v2 event tools (get, move, quick_add, instances) replace loose Reviewed by Cursor Bugbot for commit ee6cbf8. Configure here. |
Greptile SummaryThis PR extends the Google Calendar integration with three new tools —
Confidence Score: 5/5Safe to merge — the three new tools are fully wired through the block, registry, and exports, and follow the same patterns as the existing Google Calendar tools. All new tools consistently mirror the established patterns of existing tools (e.g., share_calendar.ts for PATCH+ACL, create_calendar.ts for calendar management). Block wiring — dropdown options, subBlock conditions, tools.access, config.tool switch, config.params coercion — is complete for all three operations in both V1 and V2 blocks. The V2 block correctly inherits V1 subBlocks via spread and generates versioned tool IDs automatically. Type improvements in the four modified files replace any with concrete indexed-access types without touching runtime logic. No files require special attention. Important Files Changed
Sequence Diagram%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
participant UI as Block UI
participant Block as google_calendar.ts
participant Registry as tools/registry.ts
participant Tool as Tool (v1/v2)
participant GCal as Google Calendar API v3
UI->>Block: Select operation (update_calendar / delete_calendar / update_acl)
Block->>Block: config.tool() → tool ID
Block->>Block: config.params() → coerce calendarId, sendNotifications
Block->>Registry: Resolve ToolConfig by ID
Registry->>Tool: updateCalendarTool / deleteCalendarTool / updateAclTool
alt Update Calendar
Tool->>GCal: "PATCH /calendars/{calendarId} {summary, description, location, timeZone}"
GCal-->>Tool: 200 OK + Calendar resource
Tool-->>Block: "{ id, summary, description, location, timeZone }"
end
alt Delete Calendar
Tool->>GCal: "DELETE /calendars/{calendarId}"
GCal-->>Tool: 204 No Content
Tool-->>Block: "{ calendarId, deleted: true }"
end
alt Update ACL
Tool->>GCal: "PATCH /calendars/{calendarId}/acl/{ruleId}?sendNotifications={bool} { role }"
GCal-->>Tool: 200 OK + AclRule resource
Tool-->>Block: "{ id, role, scope }"
end
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
participant UI as Block UI
participant Block as google_calendar.ts
participant Registry as tools/registry.ts
participant Tool as Tool (v1/v2)
participant GCal as Google Calendar API v3
UI->>Block: Select operation (update_calendar / delete_calendar / update_acl)
Block->>Block: config.tool() → tool ID
Block->>Block: config.params() → coerce calendarId, sendNotifications
Block->>Registry: Resolve ToolConfig by ID
Registry->>Tool: updateCalendarTool / deleteCalendarTool / updateAclTool
alt Update Calendar
Tool->>GCal: "PATCH /calendars/{calendarId} {summary, description, location, timeZone}"
GCal-->>Tool: 200 OK + Calendar resource
Tool-->>Block: "{ id, summary, description, location, timeZone }"
end
alt Delete Calendar
Tool->>GCal: "DELETE /calendars/{calendarId}"
GCal-->>Tool: 204 No Content
Tool-->>Block: "{ calendarId, deleted: true }"
end
alt Update ACL
Tool->>GCal: "PATCH /calendars/{calendarId}/acl/{ruleId}?sendNotifications={bool} { role }"
GCal-->>Tool: 200 OK + AclRule resource
Tool-->>Block: "{ id, role, scope }"
end
Reviews (3): Last reviewed commit: "fix(google-calendar): dedupe GoogleCalen..." | Re-trigger Greptile |
export it from types.ts and import instead of redeclaring locally
|
@greptile review |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit ee6cbf8. Configure here.
|
@greptile review |
Summary
anytypes from V2 response typing inget.ts,move.ts,quick_add.ts,instances.ts— now use concreteGoogleCalendarApiEventResponsefield typesgoogle_calendar_update_calendar(PATCH /calendars/{id}) — was missing, could create/share calendars but not update onegoogle_calendar_delete_calendar(DELETE /calendars/{id}) — was missinggoogle_calendar_update_acl(PATCH /calendars/{id}/acl/{ruleId}) — could share/list/remove ACL rules but not change an existing rule's role without delete+recreatehttps://www.googleapis.com/auth/calendarOAuth scope — no new scopes requestedtools.access,tools.config),tools/registry.ts(alphabetical), andindex.tsexportsType of Change
Testing
Tested manually. Ran multiple independent verification passes:
tools.access,tools.config.tool/paramsmapping, BlockMeta templates/skills, registry entriesbun run lintandtsc --noEmitboth cleanChecklist