diff --git a/app/agent_base.py b/app/agent_base.py index 96c2aea4..b7f4f3e6 100644 --- a/app/agent_base.py +++ b/app/agent_base.py @@ -49,6 +49,8 @@ NOTION_SHARED_CLIENT_SECRET, HUBSPOT_SHARED_CLIENT_ID, HUBSPOT_SHARED_CLIENT_SECRET, + SUPABASE_SHARED_CLIENT_ID, + SUPABASE_SHARED_CLIENT_SECRET, SLACK_SHARED_CLIENT_ID, SLACK_SHARED_CLIENT_SECRET, TELEGRAM_SHARED_BOT_TOKEN, @@ -3542,6 +3544,9 @@ async def _initialize_external_libraries(self) -> None: # HubSpot (only used by the `invite` OAuth path; Private App token login needs nothing) "HUBSPOT_SHARED_CLIENT_ID": HUBSPOT_SHARED_CLIENT_ID, "HUBSPOT_SHARED_CLIENT_SECRET": HUBSPOT_SHARED_CLIENT_SECRET, + # Supabase (only used by the OAuth path; personal-access-token login needs nothing) + "SUPABASE_SHARED_CLIENT_ID": SUPABASE_SHARED_CLIENT_ID, + "SUPABASE_SHARED_CLIENT_SECRET": SUPABASE_SHARED_CLIENT_SECRET, # Slack (only used by the `invite` OAuth path) "SLACK_SHARED_CLIENT_ID": SLACK_SHARED_CLIENT_ID, "SLACK_SHARED_CLIENT_SECRET": SLACK_SHARED_CLIENT_SECRET, diff --git a/app/config.py b/app/config.py index 5d59e198..092f7429 100644 --- a/app/config.py +++ b/app/config.py @@ -654,3 +654,12 @@ def detect_and_save_os_language() -> str: HUBSPOT_SHARED_CLIENT_SECRET: str = get_credential( "hubspot", "client_secret", "HUBSPOT_SHARED_CLIENT_SECRET" ) + +# Supabase (confidential OAuth app + PKCE; empty until the app is registered, +# in which case the integration offers only personal-access-token login) +SUPABASE_SHARED_CLIENT_ID: str = get_credential( + "supabase", "client_id", "SUPABASE_SHARED_CLIENT_ID" +) +SUPABASE_SHARED_CLIENT_SECRET: str = get_credential( + "supabase", "client_secret", "SUPABASE_SHARED_CLIENT_SECRET" +) diff --git a/app/data/action/integrations/integration_management.py b/app/data/action/integrations/integration_management.py index 1e6182d7..fe882e33 100644 --- a/app/data/action/integrations/integration_management.py +++ b/app/data/action/integrations/integration_management.py @@ -115,7 +115,7 @@ def list_available_integrations(input_data: dict) -> dict: "description": ( "The integration to connect, using its exact id. Valid values: slack, " "discord, telegram, whatsapp, whatsapp_business, notion, linkedin, " - "posthog, and " + "posthog, supabase, and " "the Google Workspace apps as SEPARATE ids — gmail, google_drive, " "google_docs, google_calendar, google_youtube (there is no single " "'google' integration). Call list_available_integrations if unsure." @@ -132,7 +132,8 @@ def list_available_integrations(input_data: dict) -> dict: "whatsapp_business: {access_token, phone_number_id}, " "notion: {token}, " "posthog: {api_key, host(optional: 'us'/'eu'/self-hosted URL), " - "project_id(optional)}. " + "project_id(optional)}, " + "supabase: {access_token (personal access token, sbp_…)}. " "Leave empty for OAuth or interactive (QR code) flows." ), "example": {"bot_token": "123456:ABC-DEF"}, diff --git a/app/ui_layer/browser/frontend/src/pages/Settings/IntegrationsSettings.tsx b/app/ui_layer/browser/frontend/src/pages/Settings/IntegrationsSettings.tsx index 005a08f7..429bc473 100644 --- a/app/ui_layer/browser/frontend/src/pages/Settings/IntegrationsSettings.tsx +++ b/app/ui_layer/browser/frontend/src/pages/Settings/IntegrationsSettings.tsx @@ -31,6 +31,7 @@ import { YouTube, MicrosoftOutlook, PostHog, + Supabase, } from '@ridemountainpig/svgl-react' import { useTranslation } from 'react-i18next' import { Button, Badge, ConfirmModal } from '../../components/ui' @@ -98,6 +99,7 @@ const SVGL_BY_ID: Record = { google_youtube: YouTube, outlook: MicrosoftOutlook, posthog: PostHog, + supabase: Supabase, } // Integration icon component. Lookup order: @@ -1592,6 +1594,11 @@ export function IntegrationsSettings({ hideHeader = false }: { hideHeader?: bool : isProblem(account) || account.sessionState === 'reconnecting' ? stateLabel(account) : '' + // Nickname first (staged edit wins); the identity can be an + // opaque id (e.g. a token fingerprint), so it stays in the tooltip. + const nickname = staged && account.identity in staged.aliases + ? staged.aliases[account.identity] + : account.alias return (