<!-- docs/generated/BACKEND_SDK_REFERENCE.md -->

# Generated backend SDK reference

This file is generated by `scripts/docs/generate-backend-sdk-reference.js` from the canonical production contract. Do not edit it by hand; run `pnpm docs:backend-sdk` after a contract/TCK change.

## Capability states

- `supported`
- `limited`
- `unsupported`
- `unavailable`

## Evidence levels

- `blocked`
- `deterministic`
- `live-preview`
- `supported`
- `reliability-qualified`

## Required TCK scenario identifiers

- `identity.provider-loadability-and-adapter-availability`
- `identity.adapter-selection-and-unique-instance`
- `identity.valid-all-axis-negotiation`
- `identity.version-skew-and-malformed-offers`
- `capability.truth-limits-evidence-and-binding`
- `adapter.atomic-snapshot-and-watch`
- `scan.owner-join-authority-and-signature`
- `scan.fairness-abort-deadline-and-final-cleanup`
- `connection.lease-joins-borrowing-transfer-and-revocation`
- `connection.two-client-arbitration`
- `connection.rssi-and-att-mtu-capability-contract`
- `gatt.descriptor-discovery-read-write`
- `gatt.discovery-complete-paths-and-services-changed`
- `gatt.reads-descriptors-write-policy-and-dispatched-cancellation`
- `gatt.maximum-write-length-boundaries`
- `gatt.long-write-partial-failure`
- `gatt.long-write-cancellation`
- `gatt.long-write-disconnect`
- `subscription.enable-ready-shared-cccd-and-fanout`
- `subscription.pre-ready-overflow-controls-and-late-quarantine`
- `restoration.provider-journal-adoption-and-rejection`
- `electron.trusted-sender-envelope-generations-and-quotas`
- `lifecycle.destroy-idempotency-admission-and-exact-settlement`
- `diagnostics.trace-redaction-and-resource-counters`
- `scenario.scan-connect-discover-read-notify-destroy`
- `web.unsupported-capabilities-reject-and-remain-honest`
- `web.chooser-connect-discover-read-notify-destroy`
- `ipc.event-sink-survives-request-response-traffic`
- `security.state-pair-cancel-unpair`

## Authoring entrypoint

External backends import `unified-ble-manager/backend-sdk`. They define a `BackendAuthoringDefinition` with immutable author metadata, a `BackendTckFactory` that declares both the selected adapter and a known-unlisted stale selection, creates a backend plus `TckScenarioController` deterministic environment inputs for an exact scenario context, and feature suites. A fixture cannot return an executor, facts, proof scope, or receipt. `createBackendAuthorDefinition()` validates the declaration; `runBackendAuthorTck()` runs the complete base suite plus all applicable registered feature suites through runner-owned public-manager scenarios and creates the public `verification: "runner-controlled"` deterministic receipts. Backend instances are consumed once; self-authored or replayed results cannot be presented as conformance. `inspectBackendCapabilities()` projects runtime registry state, author-declared evidence, limitations, limits, and required TCK bindings without exposing implementation handles or labelling author evidence conformant.

The CLI-selected module must export `unifiedBleBackend`, an authoring definition. The Node-only CLI validates that the provider host kind is `node`, `desktop-native`, or `test`; it never selects a browser or React Native radio path.

## Trace format v1

`unified-ble-trace-v1` contains ordered, bounded records with an ordinal, time, kind, event, dotted error cause, a per-capture operation correlation token, and four mandatory redaction markers. The document reports whether producer bounds truncated the record window. Correlation tokens are bounded lowercase opaque labels; the schema has no peer, path, payload, or platform-message field. `ubm trace validate <file>` rejects malformed or unredacted input; `ubm trace redact <file>` strips unsupported fields and emits a redacted trace document without writing the source file.
