CX · Reference guidecx-platform-connector
PlaygroundDownloadsAboutv0.18.0-pre.1

cx-platform-connector

the connector kit and sync

Why reach for it

A connector is a declaration, and the plan it makes is pure. cx-platform-connector describes an external system as data — a gateway, its verbs, a binding — and plans every request without resolving anything, so a credential cannot reach a URL, a header, a log line or an audit record even in principle. sync carries the watermarks and cursors that make a repeated walk exact.

The corpus grades the attack classes by name: a control character in a cursor is refused before it can reach a header; a secret written into a gateway row or a feature document is refused at validation with its code; the plan carries a handle marker, never a value; a cursor that repeats is a cycle, not a loop. The positive twins are there too — a clean cursor rides as a query parameter, and only there.

sync is the other half: a watermark per source and tenant, a capture mode (polling diff or provider delta), an overlap window, and the one legal non-advance — an empty run that moves the sequence number and the stall counter and never the cursor — so \"nothing is changing\" and \"the cursor is stuck\" are readable apart without reading the store twice. The reference connectors and their design document ship in this repository's reference/ directory.

What it gives you

Two modules: the connector kit and sync. Both are pure over their declarations — the effect happens in the runtime that executes a plan, never in the plan — so the case below, like the attack cases beside it, runs with no grant at all.

module import it as where it lives reference
connector [?lib 'cx-platform/connector'] Ring 1 · the platform group connector reference
sync [?lib 'cx-platform/sync'] Ring 1 · the platform group sync reference

Try it

A request planned from a gateway, a verb and a binding whose credential is a handle: the plan names the scheme and the handle and puts nothing in the headers. The secret was never in reach.

prog.cx

        [?lib 'cx-platform/connector']
[?let [= $g [gateway name=acme-api kind=http auth=client-credentials]]
      [= $v [verb name=list-contacts effect=observe via=acme-api path='/v3/contacts' [intent [do :list-contacts]]]]
      [= $b [binding base-url='https://api.example.test' credential='handle:acme/prod']]
      [= $req [$connector:plan $g $v $b [do 'acme/list-contacts']]]
      [= $a [$first $req/auth]]
  [probe [scheme $a@scheme] [handle [$string $a@handle]] [headers [$count $req/headers/*]]]]
      
        $ cx prog.cx
[probe [scheme :client-credentials] [handle handle:acme/prod] [headers 0]]
      

Fixture connector-009-the-plan-carries-a-handle-marker-never-a-value in deps/cx-platform-connector/conformance/platform/connector.cxd — replayed against this cx when the page was built.

Status

The connector kit ships as a package: its two modules are bundled into the platform build from the pin, and the front door's link step reads the reference connectors' documents from the same checkout.

fact as the registry records it
ships as package
status extracted
pinned at ce6e7323d
builds on cx-core-code, cx-platform-mail, cx-platform-store
built on by cx-platform-secrets
bundled modules 2
BUILDS ON THIS REPOSITORY · SHIPS BUILT ON BY cx-core-code cx-platform-mail cx-platform-store cx-platform-connector connector sync cx-platform-secrets DRAWN FROM registry/repos.cxd's pins= COLUMN AND registry/modules.cxd WHEN THIS PAGE WAS BUILT
Fig. — what cx-platform-connector plugs into: the repositories it builds on (left), the modules it ships (centre), the repositories that build on it (right) · drawn from registry/repos.cxd, deps.cxd and registry/modules.cxd when this page was built