@lssm-tech/integration.provider-health
Website: https://contractspec.io
Health data provider implementations for ContractSpec.
Usage
Import the root entrypoint for the domain surface, or import a concrete implementation from the ./impls/* subpaths.
For a subject-bound PersonalOS health ledger, use ./strict. It exposes:
- strict Strava, Oura, Garmin, and Fitbit adapter constructors over a caller-supplied transport port;
- HealthKit and Health Connect native SDK port contracts, explicitly requiring host SDK installation and user authorization;
- exact normalization that preserves provider provenance, units, timestamps, time zones, page references, and ambiguity for downstream quarantine;
- SHA-256 HMAC webhook verification using constant-time comparison and fail-closed handling for absent credentials or signatures.
Strict adapters hold encrypted credential references only. The host transport resolves credentials transiently and owns retry, timeout, rate-limit, SDK, and network behavior. Raw provider records may be mapped in transit but must never be persisted, logged, returned in errors, or written to ledger state. Revocation and deletion effects are bound to the connection's credential reference, reject caller-supplied mismatches, and sanitize transport failures.
Production hosts should use the createObserved*LedgerAdapter constructors. Their observability port receives only a canonical event name, provider kind, operation, fixed 30-day content-free retention class, opaque HMAC trace reference, result, and allowlisted failure code. Subject, connection, consent, credential, cursor, record, raw payload, and upstream error values never cross that port. A durable begin receipt is required before provider I/O; unavailable observation therefore fails closed. Completion loss leaves the persisted begin record actionable without retrying a provider effect. The one-argument constructors remain compatibility surfaces and do not claim production observability qualification.
The historical ./impls/* entrypoints remain compatibility surfaces for prior consumers. They are not evidence of configured SDKs, credentials, or real native connectivity and should not be selected for the strict PersonalOS ledger path.
Compatibility
This package owns the health implementation slice split out of @lssm-tech/integration.providers-impls. The legacy package continues to re-export these subpaths for existing consumers.