Three tiers
| Tier | Mechanism | When |
|---|---|---|
| YAML spec | Declarative HTTP/REST connector | 90% of SaaS APIs (Salesforce, Stripe, HubSpot, Klaviyo, …) |
| TS plugin | defineConnector({...}) via the SDK | Streaming + complex protocols (Kafka, Snowflake COPY, JDBC) |
| AI-generated YAML | Coming in Phase 5b | Net-new HTTP APIs from a docs URL |
YAML spec format
parseConnectorYaml(text) — js-yaml load + Zod safeParse, same two-phase pattern as parsePipelineIR. Invalid specs are rejected before they enter the registry.
Auth types
none, api_key (header or query), basic, oauth2 (operator passes a pre-fetched accessToken in secrets.accessToken; Phase 5 doesn’t auto-refresh, that’s a follow-up).
Pagination types
none, cursor (follows a response field until absent), offset (numeric offset+limit), page (page number). Each stops on a short page or maxPages cap (default 100).
Rate limit
requestsPerSecond paces inter-page sleeps. burstSize is reserved for a future token-bucket implementation.
HTTP runtime
executeYamlEndpoint({ spec, endpointId, params, secrets, signal }) runs the call:
- Resolve auth → headers + query params
- Substitute
{{var}}templates against (params + secrets) - SSRF-validate the URL via
lib/security/url-validator.validateAndResolve - Fetch with rate-limit pacing
- Walk pagination
- Extract rows via
responseRowsPath(defaults to root)
Plugin SDK
connectorRegistry via connectorRegistry.registerPlugin(plugin). Plugin imports must be explicit (no filesystem auto-discovery in Phase 5).
MCP createYamlConnector
Promoted from Phase 2b stub. Accepts a YAML text body, validates via parseConnectorYaml, registers on success.
Out of scope (deferred to Phase 5b)
- AI generator endpoint (
POST /api/v1/ai/generate-yaml-connector) — paste a docs URL, get a draft YAML - Marketplace UI — separate UX layer
- Bulk migration of the 25+ existing HTTP-shaped connectors
- OAuth2 auto-refresh on 401
- Filesystem auto-discovery of plugins
- Streaming connector plugins (Kafka, etc.) — SDK supports them, none ship in Phase 5
Related
- MCP Flow Server —
createYamlConnectoris now a real tool - Pipeline IR — source nodes reference connector ids registered here