Switch Gmail and Gcal to env-var OAuth delivery pattern

auth.deliver changes from as:file to as:env:
- Gmail: GMAIL_CREDS_JSON env var (Google authorized_user JSON)
- Gcal: GCAL_CREDS_JSON env var

mcp_config.env removed entirely — Skald injects the env var at runtime,
no path on disk needed.

Server scripts updated:
- Check GMAIL_CREDS_JSON / GCAL_CREDS_JSON env var first
- Use Credentials.from_authorized_user_info() instead of
  from_authorized_user_file()
- Fall back to file-based loading for standalone/legacy use
- _persist_creds only writes to disk when _creds_path is set

gcal/verify.py: support GCAL_CREDS_JSON env var with shared _check_api()

Docs (SKALD.md): updated examples, field table, connector table.
This commit is contained in:
2026-07-17 21:00:58 +01:00
parent 3a3bc4e1e9
commit 46c1446eae
7 changed files with 180 additions and 113 deletions
+4 -9
View File
@@ -15,9 +15,7 @@
],
"setup_instructions": [
"Install dependencies: pip install -r requirements.txt",
"Create secrets/google_oauth_client.json with {\"client_id\": \"...\", \"client_secret\": \"...\"}",
"Run: python3 gcal_oauth_setup.py (opens browser for OAuth)",
"Set GOOGLE_CREDS_PATH env var or place token at secrets/google_creds.json"
"Run: python3 gcal_oauth_setup.py (optional, for standalone use — Skald handles OAuth)"
],
"docs": [
{
@@ -33,17 +31,14 @@
"https://www.googleapis.com/auth/calendar"
],
"deliver": {
"as": "file",
"as": "env",
"format": "google_authorized_user",
"path": "{secrets}/google_creds.json"
"env": "GCAL_CREDS_JSON"
}
},
"mcp_config": {
"command": "python3",
"args": ["gcal_mcp_server.py"],
"env": {
"GOOGLE_CREDS_PATH": "{secrets}/google_creds.json"
}
"args": ["gcal_mcp_server.py"]
},
"verify": {
"command": "python3 verify.py",