Skip to content

feat: Nango bridge + Python SDK + SDK improvements#3

Merged
khaliqgant merged 7 commits into
mainfrom
improve/sdk-and-nango-bridge
Mar 24, 2026
Merged

feat: Nango bridge + Python SDK + SDK improvements#3
khaliqgant merged 7 commits into
mainfrom
improve/sdk-and-nango-bridge

Conversation

@khaliqgant

@khaliqgant khaliqgant commented Mar 14, 2026

Copy link
Copy Markdown
Member

What

  • Nango → Relayfile bridge design — webhook flow, file path conventions per provider, semantic properties mapping, writeback flow
  • TS SDK improvements — Nango convenience helpers (ingestNangoWebhook(), getProviderFiles()), missing OpenAPI methods
  • Python SDK — full client mirroring TS SDK with httpx (async), types, errors, Nango helpers
  • Tests — 806 lines TS tests, 531 lines Python tests, nango-e2e.sh script
  • Documentationdocs/nango-bridge-design.md, docs/sdk-improvements.md

Context

Building 7 POC apps that use Nango for SaaS integrations (Zendesk, Shopify, Stripe, GitHub, etc). When Nango receives data from providers, Relayfile ingests it so agents can access it as files. This PR adds the SDK surface and design docs to support that flow.

Files

  • docs/nango-bridge-design.md — architecture design
  • docs/sdk-improvements.md — SDK gap analysis + improvement plan
  • sdk/relayfile-sdk/src/nango.ts — TS Nango helpers (194 lines)
  • sdk/relayfile-sdk/src/client.ts — updated with missing methods
  • sdk/relayfile-sdk/src/client.test.ts — 806 lines of tests
  • sdk/relayfile-sdk-py/ — full Python SDK
  • scripts/nango-e2e.sh — end-to-end test script

+5,719 lines


Open with Devin

khaliqgant and others added 4 commits March 14, 2026 18:56
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add ingestWebhook, listPendingWritebacks, and ackWriteback to the TS SDK
client to close the OpenAPI coverage gap. Implement NangoHelpers class with
webhook ingestion, provider file querying, and event watching. Update
sdk-improvements.md to reflect all 25 endpoints now covered.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…entation status

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add Python SDK (client.py, nango.py) with sync + async clients,
  full API coverage, retry support, and error handling
- Add 34 Python SDK tests covering all methods, errors, auth, and
  Nango helpers
- Add scripts/nango-e2e.sh for Nango bridge integration testing
  with dry-run fallback when no server is available
- Add test script to TS SDK package.json
- Update .gitignore for Python artifacts

Go: 5/5 packages pass
TS SDK: 42/42 tests pass
Python SDK: 34/34 tests pass
Nango E2E: 6/6 pass (dry-run)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
devin-ai-integration[bot]

This comment was marked as resolved.

Multi-provider support for Relayfile:

- IntegrationProvider abstract class: common interface for all integration
  providers (getProviderFiles, watchProviderEvents, ingestWebhook)
- ComposioHelpers: maps Composio trigger webhooks → Relayfile filesystem
  - Supports all major toolkits (GitHub, Slack, Gmail, Zendesk, Shopify, etc.)
  - Auto-maps trigger slugs to object types (GITHUB_COMMIT_EVENT → commits)
  - Extracts object IDs from heterogeneous payloads
  - Handles account expiry events
  - normalize() for custom processing pipelines
- NangoHelpers: refactored to extend IntegrationProvider (backward compatible)
  - Added normalize() method for generic WebhookInput format
- Shared computeCanonicalPath() for consistent path mapping

Composio provides 1000+ toolkits vs Nango's ~150, plus MCP-native support
and a meta-tools architecture for runtime tool discovery.

See: https://docs.composio.dev/docs
devin-ai-integration[bot]

This comment was marked as resolved.

Tests cover:
- GitHub commit, Slack message, Zendesk ticket ingestion
- Account expired event handling
- Unknown trigger slug inference (NOTION_DATABASE_ROW_CREATED → database_rows)
- Nested object ID extraction (issue.id)
- Abort signal passthrough
- normalize() for all payload types
- getProviderFiles with provider/objectType/status filters

Also fixes existing Nango tests for refactored method name
(ingestNangoWebhook → ingestWebhook per IntegrationProvider interface).

56/56 tests passing.
- Exclude *.test.ts from tsconfig.json build (strict mode TS2532 errors in CI)
- Fix Python _build_query to lowercase booleans (True→true, False→false)
  for consistency with TS SDK (addresses Devin review)
- Tests still run via vitest (56/56 passing)
@khaliqgant khaliqgant merged commit cac6b4f into main Mar 24, 2026
1 check passed
khaliqgant pushed a commit that referenced this pull request Jun 23, 2026
- `relayfile dev`: zero-friction entry point that checks auth/status then
  hands off to the listen loop; prints a setup prompt if not connected
- `relayfile listen --background`: detaches to background, logs to
  ~/.relayfile/listen.log; `--daemonized` internal flag for child process
- Added listenPIDFile, listenLogFile, spawnBackgroundListenProcess helpers
- Wired `dev` into run() switch, printHelpForArgs, printUsage
- README: documents background mode, relayfile dev, cloud webhook note (#3)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PF9GK3mPDyWEKXpaJ8ReB9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant