From d95ee57181a0070bcdad66fd3cb31e47bdcb72e3 Mon Sep 17 00:00:00 2001 From: Kai Koenig Date: Wed, 13 May 2026 13:09:21 +1200 Subject: [PATCH 1/7] feat(gmail): upgrade to SDK 2.0.0 (ActionError, schema cleanup, version bump) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Source-side upgrade per the upgrading-sdk-v2 skill: * Import ActionError alongside ActionResult * Convert all 21 error returns from `return ActionResult(data={"error": str(e)}, cost_usd=0.0)` to `return ActionError(message=str(e))` * Drop redundant `"result": True` keys from every success-path return — success/failure now lives on `result.type` (ACTION_SUCCESS vs ACTION_ERROR) instead of a duplicated payload field * Strip the matching `"error"` and `"result"` properties (and their entries in `required`) from every action's output_schema in config.json — 42 schema keys removed across 21 actions * Harden the auth lookup (skill gotcha #9) so a missing access_token surfaces as an upstream auth error rather than a KeyError: `context.auth.get("credentials", {}).get("access_token", "")` * Bump config.json version 0.1.0 → 2.0.0 (major bump for the SDK breaking change) * requirements.txt: autohive-integrations-sdk~=1.0.2 → ~=2.0.0 No `context.fetch()` work needed — gmail uses Google's `googleapiclient.discovery.build()` directly, so the FetchResponse breaking change has no impact on the source. Validation: ✅ validate_integration.py — 0 errors, 1 warning (unused-scopes false positive on gmail.modify) ✅ check_code.py — passed ✅ ruff check / ruff format — clean Refs #324 --- gmail/config.json | 362 +++++++++++------------------------------ gmail/gmail.py | 83 +++++----- gmail/requirements.txt | 2 +- 3 files changed, 137 insertions(+), 310 deletions(-) diff --git a/gmail/config.json b/gmail/config.json index 5e604c24..531f1b94 100644 --- a/gmail/config.json +++ b/gmail/config.json @@ -1,7 +1,7 @@ { "name": "Gmail", "display_name": "Gmail", - "version": "0.1.0", + "version": "2.0.0", "description": "Send, read, and manage emails with labels and threads.", "entry_point": "gmail.py", "auth": { @@ -53,7 +53,10 @@ "body_format": { "type": "string", "description": "Format of the reply body content. When set to 'html', the body parameter will be treated as HTML content and the reply will be sent as a rich HTML email with automatic plain text fallback for maximum compatibility. When set to 'text' (default), the body will be sent as plain text. LLMs can use 'html' to generate well-formatted replies with styling, links, tables, headers, lists, and other rich formatting elements. When using 'html' format, NEVER include CSS rule blocks (like