Purge standalone OAuth setup for Gmail and Gcal

- Deleted gmail_oauth_setup.py and gcal_oauth_setup.py (Skald handles OAuth)
- Removed google-auth-oauthlib dependency from requirements.txt and connector.json
- Simplified setup_instructions to point to Skald's OAuth flow
- Updated docstrings and error messages in *_mcp_server.py (no more refs to
  *_oauth_setup.py, point to Skald OAuth / env-var instead)
- connectors.json: removed oauth_setup.py from files[], updated sha256 hashes
This commit is contained in:
2026-07-17 21:53:17 +01:00
parent 46c1446eae
commit b1a3944fc8
9 changed files with 24 additions and 256 deletions
+5 -8
View File
@@ -17,7 +17,6 @@ Provides read, modify, and send access to Gmail via the Gmail API v1.
Skald mode: Skald injects credentials via GMAIL_CREDS_JSON env var (authorized_user JSON).
Standalone mode: reads from GMAIL_CREDS_PATH or ./secrets/gmail_creds.json.
Run scripts/gmail_oauth_setup.py first to generate the OAuth token (standalone).
"""
from __future__ import annotations
@@ -308,21 +307,20 @@ def _format_google_error(e: Exception, api_label: str) -> str:
if RefreshError is not None and isinstance(e, RefreshError):
return (
f"Error: {api_label} API token refresh failed (the refresh token may have been revoked "
"or expired). Re-run scripts/gmail_oauth_setup.py to re-authenticate."
"or expired). Re-authenticate via Skald's OAuth flow (Sign in from the connector page)."
)
if HttpError is not None and isinstance(e, HttpError):
status = getattr(e, "status_code", None)
if status == 401:
return (
f"Error: {api_label} API rejected the access token (401). The OAuth token is invalid "
"or revoked. Re-run scripts/gmail_oauth_setup.py to re-authenticate."
)
f"Error: {api_label} API rejected the access token (401). The OAuth token is invalid "
"or revoked. Re-authenticate via Skald's OAuth flow (Sign in from the connector page)." )
if status == 403:
return (
f"Error: {api_label} API returned 403 Forbidden. The OAuth scopes granted are "
"insufficient for this operation, or the Gmail API is disabled in the Google Cloud "
"Console. Verify the scopes in scripts/gmail_oauth_setup.py and the API enablement."
"Console. Verify the scopes in the Google OAuth provider config and the API enablement."
)
if status == 404:
return (
@@ -482,9 +480,8 @@ def _gmail_status(args: dict | None = None) -> str:
except Exception as e:
return _status_report("", "AUTH_OR_API_ERROR", "action needed",
f"The Gmail API did not respond to the probe call: {_format_google_error(e, 'Gmail')}",
["Run scripts/gmail_oauth_setup.py to refresh / re-issue credentials.",
["Re-authenticate via Skald's OAuth flow (Sign in from the connector page).",
"If credentials are valid, verify the Gmail API is enabled in the Google Cloud Console."])
email = profile.get("emailAddress", "?")
return _status_report("", "READY", "ok",
"Google Gmail integration is operational: credentials load, the access token refreshes "