How It Works
A manifest
connector.yaml declares what the connector reads and writes: its connection fields, how it authenticates, the hosts it calls, and the fields of an account.Code on the SDK
A C# project on the
Klef.Connectors.Sdk package implements the target or source contract. The SDK’s HTTP client applies the manifest’s auth, egress and limits for you.Tests from the kit
The
Klef.Connectors.Testing package runs conformance and a full provisioning journey against your own test tenant.A connector on your network
Your connector runs on a machine you host and serves its calls over HTTP there. Klef’s relay runs beside it and calls out to Klef over HTTPS, so Klef never connects in, never loads your code, and never holds your connector’s credentials.
The Tools
Every type in them is in the Reference.
What a Source Returns
A source is a connector whose manifest declares aworker object. Klef reads it like any other object, a page at a time, and its records are SourceWorker, the worker model in Klef.Connectors.Model.Workers. Whatever reads them relies on these rules, so a source keeps them on every read:
- Only people the source has officially hired are workers. Leave out a draft, an offer not yet accepted, and a contract awaiting a signature.
- Return a leaver, as terminated, for as long as the source holds them. Never leave a worker out to say they left.
- A full read that leaves out workers the source holds says so, with
PageNext.EndandPartialset. - A lookup of named workers returns those the source holds and no others.
- Set
TerminatedAtonly when the source records the real moment the employment ended. A placeholder, such as midnight stamped on a contract that ran its course, is not one.
The Lifecycle
1
Write and test
Scaffold a connector, write it, and test it against your test tenant. See Getting Started.
2
Push a draft
klef connectors push uploads the manifest as a draft revision. It shows up under Connections > Custom connectors.3
Run it with a relay
Serve the connector with
klef connectors serve. Make a runner key for it and start Klef’s relay beside it with klef relay.4
Activate
An Owner activates the revision, and plans use it from then on. An Owner can roll back by activating a revision that was active before.
Klef runs no tests of a connector your workspace writes. You own its behaviour and its tests, which you can run in your own CI.