# FastMCP2 Google Workspace Platform - LOCAL Development Configuration
# For testing cloud-ready code locally before deployment

# ============================================
# DEPLOYMENT MODE CONFIGURATION
# ============================================
# For local development with cloud-ready code: FASTMCP_CLOUD=false (or don't set)
FASTMCP_CLOUD=false

# ============================================
# GOOGLE OAUTH CONFIGURATION
# ============================================
# Get these from Google Cloud Console > APIs & Services > Credentials
GOOGLE_CLIENT_ID=your_client_id.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET=your_client_secret

# OAuth redirect URI for LOCAL development
OAUTH_REDIRECT_URI=http://localhost:8002/oauth2callback

# ============================================
# SERVER CONFIGURATION (LOCAL)
# ============================================
# Use localhost for local development - NOT 0.0.0.0 for browser access
SERVER_HOST=localhost
SERVER_PORT=8002
SERVER_NAME=FastMCP2 Google Workspace Platform

# ============================================
# BASE URL (LOCAL)
# ============================================
# This is what gets used in OAuth redirects
BASE_URL=http://localhost:8002

# ============================================
# CREDENTIAL STORAGE (LOCAL)
# ============================================
# Use file-based storage for local development
CREDENTIAL_STORAGE_MODE=FILE_ENCRYPTED
CREDENTIALS_DIR=./credentials

# ============================================
# SSL/HTTPS (LOCAL HTTPS)
# ============================================
# Enable HTTPS for local development (requires SSL certificates)
ENABLE_HTTPS=true

# ============================================
# QDRANT CLOUD CONFIGURATION
# ============================================
# You can still use Qdrant Cloud from local development
QDRANT_URL=https://your-cluster-id.qdrant.io:6333
QDRANT_API_KEY=your_qdrant_cloud_api_key

# ============================================
# AUTHENTICATION & SESSION MANAGEMENT
# ============================================
SESSION_TIMEOUT_MINUTES=60
USE_GOOGLE_OAUTH=true
ENABLE_JWT_AUTH=false

# ============================================
# GMAIL CONFIGURATION
# ============================================
GMAIL_ALLOW_LIST=trusted@example.com,team@company.com
GMAIL_ENABLE_ELICITATION=true
GMAIL_ELICITATION_FALLBACK=block

# ============================================
# OAUTH MIGRATION FEATURE FLAGS
# ============================================
ENABLE_UNIFIED_AUTH=true
LEGACY_COMPAT_MODE=true
CREDENTIAL_MIGRATION=true
SERVICE_CACHING=true
ENHANCED_LOGGING=true

# ============================================
# FASTMCP 2.12.0 GOOGLEPROVIDER (OPTIONAL)
# ============================================
# Leave empty to use legacy OAuth flow
FASTMCP_SERVER_AUTH=
FASTMCP_SERVER_AUTH_GOOGLE_CLIENT_ID=
FASTMCP_SERVER_AUTH_GOOGLE_CLIENT_SECRET=
FASTMCP_SERVER_AUTH_GOOGLE_BASE_URL=

# ============================================
# LOGGING CONFIGURATION
# ============================================
LOG_LEVEL=INFO

# ============================================
# TESTING CONFIGURATION (OPTIONAL)
# ============================================
TEST_USER_EMAIL=your.test@gmail.com
TEST_CHAT_WEBHOOK=https://chat.googleapis.com/v1/spaces/YOUR_SPACE/messages

# ============================================
# INSTRUCTIONS FOR LOCAL TESTING
# ============================================
# 1. Copy this file to .env
# 2. Replace Google OAuth credentials with your actual values
# 3. Ensure OAuth redirect URIs in Google Cloud Console include:
#    http://localhost:8002/oauth2callback (for HTTP)
#    https://localhost:8002/oauth2callback (for HTTPS)
# 4. Run: uv run python server.py