Skip to content

docs(adr): ADR-0023 OpenAPI→Connector generator + ADR-0024 MCP servers as connectors - #1422

Merged
xuyushun441-sys merged 4 commits into
mainfrom
docs/adr-0023-0024-connector-ingestion
May 31, 2026
Merged

xuyushun441-sys merged 4 commits into
mainfrom
docs/adr-0023-0024-connector-ingestion

Conversation

@xuyushun441-sys

Copy link
Copy Markdown
Collaborator

Summary

Two sibling ADRs for populating the connector registry without hand-writing each integration, both staying inside the ADR-0022 open/enterprise boundary.

ADR-0023 — OpenAPI → Connector Generator

Generate a Connector from an OpenAPI 3.x document: one operation → one action (parameters+requestBody → inputSchema, 2xx response → outputSchema, securitySchemes → static auth). Built on top of @objectstack/connector-rest — no new engine surface. Covers 'the vendor published a REST spec.'

ADR-0024 — MCP Servers as Connectors

A generic adapter turns any MCP server into a Connector: tools/list → actions, connector_action → tools/call. MCP tool shape ≈ ConnectorActionSchema, so it's an adapter, not a port. One adapter unlocks the whole MCP ecosystem; each server is pure config. The same tools double as ADR-0011 AI tools.

Why not just import activepieces/n8n pieces?

Both ADRs record the finding: those integrations are engine-bound code (run(ctx) needs a sandboxed ActionContext), not a portable spec. They can be used as endpoint reference material, but cannot be dropped into our serializable Connector + (input, ctx) handler model.

Status

Both Proposed; no shipped code changes. Each ends with concrete follow-ups (scaffold package, CLI, worked example). All code references verified against real files (engine registry, connector_action node, GET /api/v1/automation/connectors discovery route).

os-zhuang added 4 commits June 1, 2026 06:27
…ata mutations

Completes the FlowTrigger extension point so flows whose start node declares
`triggerType: 'record-after-update'` (etc.) actually fire — previously the
slot was dead (nothing ever called `trigger.start`) and such flows could only
run via a manual `engine.execute()`.

Engine baseline (service-automation):
- Redefine FlowTrigger around a parsed FlowTriggerBinding (flowName/object/
  event/condition/schedule/raw config); the engine — not the trigger — parses
  the start node, keeping trigger plugins decoupled from flow internals
  (mirrors connector_action ↔ connector-rest).
- Bidirectional, ordering-independent wiring: registerFlow/toggleFlow activate
  bindings; registerTrigger retro-binds already-registered flows (a trigger
  plugin wires up on kernel:ready, after AutomationServicePlugin.start() pulls
  flows in). unregisterFlow/unregisterTrigger/disable tear them down.
- Centralized start-condition gate in execute(): the start node's `condition`
  (e.g. `status == 'done' && previous.status != 'done'`) is evaluated once for
  every trigger type and manual runs; false ⇒ `{ skipped: true }`.
- Seed `record`/flattened fields/`previous` into flow variables; expose bare
  identifiers to CEL without breaking `vars.*`.
- getActiveTriggerBindings() for observability/tests.

Spec: add `previous?` to AutomationContext (the pre-update "old" row).

New plugin @objectstack/plugin-trigger-record-change: the concrete trigger —
subscribes to ObjectQL lifecycle hooks (record-after-update → afterUpdate, …),
builds an AutomationContext from the new/old record, and runs the flow.
Error-isolated (a flow failure never breaks the CRUD write); per-flow packageId
so stop() unbinds exactly one flow; graceful degrade when automation/objectql
absent (kernel:ready + getService, mirroring plugin-audit).

Tests: 17 plugin (event mapping, object filter, context build, fallbacks,
error isolation, stop/idempotency, plugin wiring + graceful degrade) + engine
trigger-wiring & condition-gate suites. service-automation 104, spec 6609 green.
Adds plugin-trigger-record-change (this PR) plus connector-rest,
connector-slack, and service-messaging (pre-existing drift) so the
fixed group matches the public workspace and the CI gate passes.
…CP servers as connectors)

Two sibling decisions for populating the connector registry without
hand-writing each integration, both inside the ADR-0022 open/enterprise line:

- ADR-0023: generate a Connector from an OpenAPI 3.x doc (one operation →
  one action), built on top of @objectstack/connector-rest. No new engine surface.
- ADR-0024: adapt any MCP server into a Connector (tools/list → actions,
  connector_action → tools/call); MCP tool shape ≈ ConnectorActionSchema.

Records why activepieces-style pieces are engine-bound code and cannot be
dropped in, only ported.
@vercel

vercel Bot commented May 31, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
spec Building Building Preview, Comment May 31, 2026 10:43pm

Request Review

This branch was successfully deployed

1 active deployment
Preview — 32097817 Deployed May 31, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation size/xl tests tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants