Three tiers
YAML spec format
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
The YAML endpoint executor runs the call against the named spec, given the endpoint id, request parameters, secrets, and an abort signal:- 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.
REST endpoints
Two REST routes back the same in-memory registry. Both require anadmin or editor
role plus a tenant; the authoring page posts to them.
A registered spec’s
id is then available to Flow IR source nodes.
AI generator
POST /api/v1/ai/generate-yaml-connector drafts a spec for you. Body:
{ docsUrl?, openapi?, hint? } — at least one is required. The generator fetches the
docs (SSRF-guarded), prompts the tenant’s configured model via generateObject against
the connector-spec Zod schema, and retries up to twice on validation failure —
re-prompting each time with the structured errors.
{ ok: false, errors, retries, tokensUsed } (HTTP 200). The
route requires an admin/editor role and the tenant’s Flow IR feature flag; the
generator panel is collapsible on the Data → YAML Connectors page.
Not yet supported
- Marketplace UI — a browse/install catalog for shared specs (distinct from the authoring page, which ships today)
- Bulk migration of the built-in registry’s HTTP-shaped connectors to YAML specs — the 80 built-in connectors still resolve through the connector registry, not YAML specs
- OAuth2 auto-refresh on 401 —
oauth2auth consumes a pre-fetchedsecrets.accessToken; the runtime does not refresh it - Filesystem auto-discovery of plugins — plugins must be imported and registered explicitly via
connectorRegistry.registerPlugin(plugin) - Streaming connector plugins (Kafka, etc.) — the plugin SDK’s async-iterator
readsupports them, but none ship built-in
Related
- MCP Flow Server —
createYamlConnectoris now a real tool - Pipeline IR — source nodes reference connector ids registered here