plugins/plugin-health/README.md
@elizaos/plugin-healthOwns the health, sleep, circadian-regularity, and screen-time domain for
elizaOS. Extracted from @elizaos/plugin-lifeops so the same domain can serve
other apps without bringing the LifeOps runtime along.
Six connector contributions registered against the LifeOps
ConnectorRegistry:
apple_healthgoogle_fitstravafitbitwithingsouraEach pair-and-disconnect flow, dispatch surface, and credential boundary
lives under src/connectors/. Connectors return typed DispatchResult —
not booleans.
Four anchors registered against the AnchorRegistry:
wake.observedwake.confirmedbedtime.targetnap.startAnchors back the relative_to_anchor trigger on
ScheduledTasks — for example, morning-brief fires relative_to_anchor
on wake.confirmed with a small offset.
Eight families registered against the FamilyRegistry and published on the
ActivitySignalBus:
health.sleep.detectedhealth.sleep.endedhealth.wake.observedhealth.wake.confirmedhealth.nap.detectedhealth.bedtime.imminenthealth.regularity.changedhealth.workout.completedbedtime — fires before the user's target bedtime.wake-up — fires when wake is observed/confirmed.sleep-recap — recap after sleep ends.Each pack is a ScheduledTask (or set thereof) consuming the LifeOps spine.
The plugin registers them lazily — only when at least one health connector
pairs.
src/sleep/ — sleep / circadian / regularity engines.src/screen-time/ — screen-time aggregation.src/health-bridge/ — proxied surfaces consumed by LifeOps
(/api/lifeops/health/summary, /api/lifeops/health/sync).LifeOps does not import internal modules. Consumption goes through:
ConnectorRegistry at boot via registerHealthConnectors(runtime).registerHealthAnchors(runtime)
into the AnchorRegistry.registerHealthBusFamilies(runtime)
into FamilyRegistry.registerHealthDefaultPacks(runtime).detectHealthBackend, sleep utilities, screen-time
helpers exported from @elizaos/plugin-health and re-exported by
app-lifeops only where the surface is part of the LifeOps public API.If the LifeOps runtime registries are not available at boot, the plugin logs a single skip line and contributes nothing. This is the soft-dependency posture.
plugin-health does not require app-lifeops. Other apps can consume the
plugin by registering their own implementations of:
ConnectorRegistry (with register / get / list)AnchorRegistry (with register / resolve)FamilyRegistry (with register)ScheduledTaskRunner that accepts the default packsThe contracts the plugin builds against live in src/contracts/health.ts
and plugins/plugin-lifeops/docs/audit/wave1-interfaces.md §1, §3.
src/index.ts.plugins/plugin-lifeops/README.md.plugins/plugin-lifeops/docs/audit/wave1-interfaces.md
§5 (this plugin's contributions) and §3 (the connector / channel /
transport contracts the plugin implements).