Skip to content
ContractSpec
Start here

Package manual · integrations

·Integrations and provider selection

integration.provider-health

Health data provider implementations for ContractSpec.

integrationsintegrationv2.0.5experimentalservernode
@lssm-tech/integration.provider-health
bun add @lssm-tech/integration.provider-health
Package source ↗Manifest ↗

Manifest declarations describe the current workspace; they do not verify registry publication or runtime execution.

Package guide

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.

Relationships

THIS PACKAGEintegration.provider-health20 import paths

Arrows point from a package to its direct dependency. Counts are derived from captured workspace manifests.

4 declarations

Declared capabilities

Integration Provider Health

Health data provider implementations for ContractSpec.

Scripts

  • buildcontractspec-bun-build build
  • build:bundlecontractspec-bun-build transpile
  • build:typescontractspec-bun-build types
  • devcontractspec-bun-build dev
  • cleanrimraf dist .turbo
  • lint:checknode ../../../scripts/biome.cjs check .
  • lint:fixnode ../../../scripts/biome.cjs check --write --unsafe --only=nursery/useSortedClasses . && node ../../../scripts/biome.cjs check --write .
  • testbun test
  • prebuildcontractspec-bun-build prebuild
  • typechecktsgo --noEmit