feat: add X (Twitter) + LinkedIn to the Composio connector whitelist (chat#1793)

Merged
SW
4mo ago
+92-3

What

Adds twitter and linkedin to the existing Composio connector whitelist — the minimal four-constant + env-var expansion described in recoupable/chat#1793. No architecture changes.

  • SUPPORTED_TOOLKITS (lib/composio/connectors/getConnectors.ts) + ENABLED_TOOLKITS (lib/composio/toolRouter/getComposioTools.ts)
  • CONNECTOR_DISPLAY_NAMES (getConnectorsHandler.ts): twitter → "X (Twitter)", linkedin → "LinkedIn"
  • buildAuthConfigs() reads COMPOSIO_TWITTER_AUTH_CONFIG_ID + COMPOSIO_LINKEDIN_AUTH_CONFIG_ID
  • .env.example documents both new vars (env-var names only, no values)

TDD

RED → GREEN, one unit at a time:

  • New buildAuthConfigs.test.ts — asserts the two new env vars are read (isolated env snapshot/restore).
  • Expanded getConnectors.test.ts (toolkit array), getConnectorsHandler.test.ts (display names), and a new ENABLED_TOOLKITS membership test.
  • Confirmed all 5 assertions failed before the constant/env edits, then passed after.

Verification

  • pnpm exec vitest run lib/composio → 157 passed (30 files).
  • pnpm exec tsc --noEmit → no new errors from this change (the repo's pre-existing errors are all in lib/tasks / lib/trigger; lib/composio is clean).
  • eslint on changed files → clean.

Full preview e2e (real test post to each platform via POST /api/connectors/actions) is tracked on chat#1793 and runs once the auth-config env vars are live in Vercel.

Merge order

docs#244 (contract) → this PR. Depends on docs#244 landing first.

Tracking issue: recoupable/chat#1793
Contract: recoupable/docs#244

🤖 Generated with Claude Code


Summary by cubic

Add X (Twitter) and LinkedIn to the Composio connector whitelist so users can authorize and run actions. Implements the minimal whitelist + env expansion from chat#1793 and aligns with docs#244; includes minor test/format cleanup.

  • New Features

    • Added twitter and linkedin to SUPPORTED_TOOLKITS and ENABLED_TOOLKITS.
    • Mapped display names: twitter → "X (Twitter)", linkedin → "LinkedIn".
    • buildAuthConfigs() now reads COMPOSIO_TWITTER_AUTH_CONFIG_ID and COMPOSIO_LINKEDIN_AUTH_CONFIG_ID (documented in .env.example).
  • Migration

    • Set COMPOSIO_TWITTER_AUTH_CONFIG_ID and COMPOSIO_LINKEDIN_AUTH_CONFIG_ID in the environment to enable these connectors.