WearMetrics is the single shape every adapter writes into. Downstream
layers (synheart-session, synheart-core, the runtime ingest queue)
read this shape; they do not consume vendor-specific JSON.
WearMetrics
Top-level fields
metrics keys
Maps from the MetricType enum:
Adapters MAY emit additional vendor-specific metric keys but downstream consumers MUST tolerate unknown keys. Stable keys above are the normalised contract.
meta keys (stable)
Adapter-specific meta: Garmin adds
connection_state; WHOOP adds recovery_score, strain, etc. — refer to the per-vendor models.
rr_ms semantics
When present:
- Each value is one inter-beat interval in milliseconds.
- Order is the order observed by the device (chronological).
- The list is per sample, not cumulative — multiple samples at the same
timestampcan share anrr_mspayload via the meta field. - Range gates apply downstream: the runtime’s RR push rejects values outside
[200, 6000].
Adapter source IDs
The top-levelsource field carries the adapter id — typically the bare vendor/source name. More specific flavor information (cloud vs BLE, etc.) lives in meta.source_type.
Consumers MUST tolerate unknown
source and meta.source_type values.
When new adapters land, they take new stable strings. Existing strings do not change meaning.
Compatibility rules
The shape is unversioned. Compatibility rules:- Producers MAY add new metric keys, new meta keys, and new
sourcevalues. - Producers MUST NOT remove or rename existing keys.
- Consumers MUST tolerate unknown metric keys and unknown
sourcevalues. - A future change to the top-level shape would be a breaking change; the SDK would expose both producers in parallel during migration.
Vendor → schema mapping (informal)
This table is informational only. Each adapter is the authoritative source for its mapping; this is a reading aid.How downstream uses this
synheart-session’s WearBiosignalProvider wraps streamHR / streamHRV and converts each WearMetrics into a BiosignalSample:
synheart-core forwards the same shape into the runtime via pushHr / pushRr after consent gating.
Related
- Wear Overview — full SDK surface.
- Adapters — per-vendor flow.
- Errors — failure modes.