@control-plane/runtime-sdk
SDK for building runtimes that plug into the Control Plane: implement the adapter interface, declare capabilities, and pass conformance — without touching Control Plane internals.
Depends only on @adea-ai/contracts
and Zod. Pair it with @adea-ai/contracts
for the service boundary.
What's inside
- Adapter — the runtime adapter contract and registration types.
- Capabilities & eligibility — declare what a runtime supports and let the Control Plane route accordingly.
- Discovery & inventory — runtime discovery records, health, and eligibility evaluation.
- Conformance & compatibility — versioned conformance suites and compatibility checks for runtime implementations.
- Sessions & routing — external session types and routing decisions.
- Transport — the co-located transport port with deterministic in-memory
doubles (
mock.ts,fixtures.ts) for testing adapters.
Runtime usage accounting distinguishes HQ-funded API usage (hq_managed),
user-funded API usage (byo_api), and external subscriptions
(external_subscription). Paid API cost, when reported, must match the exact
USD microunits in accounting. Subscription accounting reports zero charged
microunits. These fields describe provenance; consumers must verify the source
authority before charging.
Install
bun add @adea-ai/runtime-sdk
Usage
import {
RuntimeAdapterMetadataSchema,
RuntimeStartRequestSchema,
RuntimeExecutionResultSchema,
} from '@adea-ai/runtime-sdk'
const metadata = RuntimeAdapterMetadataSchema.parse(raw)
Run the compatibility check against your adapter implementation before registering it (repository development):
bun scripts/compatibility.ts --check
License
Apache-2.0