Repository navigation
docs(adr): ADR-0023 OpenAPI→Connector generator + ADR-0024 MCP servers as connectors - #1422
Merged
Merged
Conversation
…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.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
Connectorfrom 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 sandboxedActionContext), not a portable spec. They can be used as endpoint reference material, but cannot be dropped into our serializableConnector+(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_actionnode,GET /api/v1/automation/connectorsdiscovery route).