@adea-ai/runtime-sdk
v3.2.0
Published
SDK for building Control Plane runtimes: adapters, capabilities, conformance, discovery, eligibility, health, sessions, transport, and routing.
Maintainers
Readme
@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,
which also carries the service boundary, and Zod.
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-sdkUsage
import {
RuntimeAdapterMetadataSchema,
RuntimeStartRequestSchema,
RuntimeExecutionResultSchema,
} from '@adea-ai/runtime-sdk'
const metadata = RuntimeAdapterMetadataSchema.parse(raw)In this repository, bun run compatibility:check (from the root) validates the
runtime certification matrix and its generated schema.
License
Apache-2.0
