@elizaos/plugin-health 2.0.0-beta.1 → 2.0.11-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +33 -27
- package/assets/hero.svg +67 -0
- package/package.json +57 -4
- package/dist/actions/index.d.ts +0 -20
- package/dist/actions/index.d.ts.map +0 -1
- package/dist/actions/index.js +0 -5
- package/dist/actions/index.js.map +0 -1
- package/dist/anchors/index.d.ts +0 -19
- package/dist/anchors/index.d.ts.map +0 -1
- package/dist/anchors/index.js +0 -9
- package/dist/anchors/index.js.map +0 -1
- package/dist/connectors/contract-stubs.d.ts +0 -112
- package/dist/connectors/contract-stubs.d.ts.map +0 -1
- package/dist/connectors/contract-stubs.js +0 -1
- package/dist/connectors/contract-stubs.js.map +0 -1
- package/dist/connectors/index.d.ts +0 -28
- package/dist/connectors/index.d.ts.map +0 -1
- package/dist/connectors/index.js +0 -202
- package/dist/connectors/index.js.map +0 -1
- package/dist/contracts/circadian-default.d.ts +0 -15
- package/dist/contracts/circadian-default.d.ts.map +0 -1
- package/dist/contracts/circadian-default.js +0 -30
- package/dist/contracts/circadian-default.js.map +0 -1
- package/dist/contracts/circadian.d.ts +0 -92
- package/dist/contracts/circadian.d.ts.map +0 -1
- package/dist/contracts/circadian.js +0 -14
- package/dist/contracts/circadian.js.map +0 -1
- package/dist/contracts/health.d.ts +0 -9
- package/dist/contracts/health.d.ts.map +0 -1
- package/dist/contracts/health.js +0 -21
- package/dist/contracts/health.js.map +0 -1
- package/dist/contracts/lifeops-connector-degradation.d.ts +0 -9
- package/dist/contracts/lifeops-connector-degradation.d.ts.map +0 -1
- package/dist/contracts/lifeops-connector-degradation.js +0 -17
- package/dist/contracts/lifeops-connector-degradation.js.map +0 -1
- package/dist/contracts/lifeops.d.ts +0 -3123
- package/dist/contracts/lifeops.d.ts.map +0 -1
- package/dist/contracts/lifeops.js +0 -635
- package/dist/contracts/lifeops.js.map +0 -1
- package/dist/contracts/permissions.d.ts +0 -39
- package/dist/contracts/permissions.d.ts.map +0 -1
- package/dist/contracts/permissions.js +0 -1
- package/dist/contracts/permissions.js.map +0 -1
- package/dist/default-packs/bedtime.d.ts +0 -14
- package/dist/default-packs/bedtime.d.ts.map +0 -1
- package/dist/default-packs/bedtime.js +0 -48
- package/dist/default-packs/bedtime.js.map +0 -1
- package/dist/default-packs/contract-stubs.d.ts +0 -161
- package/dist/default-packs/contract-stubs.d.ts.map +0 -1
- package/dist/default-packs/contract-stubs.js +0 -1
- package/dist/default-packs/contract-stubs.js.map +0 -1
- package/dist/default-packs/index.d.ts +0 -18
- package/dist/default-packs/index.d.ts.map +0 -1
- package/dist/default-packs/index.js +0 -39
- package/dist/default-packs/index.js.map +0 -1
- package/dist/default-packs/sleep-recap.d.ts +0 -14
- package/dist/default-packs/sleep-recap.d.ts.map +0 -1
- package/dist/default-packs/sleep-recap.js +0 -51
- package/dist/default-packs/sleep-recap.js.map +0 -1
- package/dist/default-packs/wake-up.d.ts +0 -14
- package/dist/default-packs/wake-up.d.ts.map +0 -1
- package/dist/default-packs/wake-up.js +0 -61
- package/dist/default-packs/wake-up.js.map +0 -1
- package/dist/health-bridge/health-bridge.d.ts +0 -57
- package/dist/health-bridge/health-bridge.d.ts.map +0 -1
- package/dist/health-bridge/health-bridge.js +0 -558
- package/dist/health-bridge/health-bridge.js.map +0 -1
- package/dist/health-bridge/health-connectors.d.ts +0 -23
- package/dist/health-bridge/health-connectors.d.ts.map +0 -1
- package/dist/health-bridge/health-connectors.js +0 -1018
- package/dist/health-bridge/health-connectors.js.map +0 -1
- package/dist/health-bridge/health-oauth.d.ts +0 -62
- package/dist/health-bridge/health-oauth.d.ts.map +0 -1
- package/dist/health-bridge/health-oauth.js +0 -432
- package/dist/health-bridge/health-oauth.js.map +0 -1
- package/dist/health-bridge/health-provider-registry.d.ts +0 -89
- package/dist/health-bridge/health-provider-registry.d.ts.map +0 -1
- package/dist/health-bridge/health-provider-registry.js +0 -141
- package/dist/health-bridge/health-provider-registry.js.map +0 -1
- package/dist/health-bridge/health-records.d.ts +0 -14
- package/dist/health-bridge/health-records.d.ts.map +0 -1
- package/dist/health-bridge/health-records.js +0 -45
- package/dist/health-bridge/health-records.js.map +0 -1
- package/dist/health-bridge/index.d.ts +0 -22
- package/dist/health-bridge/index.d.ts.map +0 -1
- package/dist/health-bridge/index.js +0 -7
- package/dist/health-bridge/index.js.map +0 -1
- package/dist/health-bridge/service-normalize-health.d.ts +0 -3
- package/dist/health-bridge/service-normalize-health.d.ts.map +0 -1
- package/dist/health-bridge/service-normalize-health.js +0 -96
- package/dist/health-bridge/service-normalize-health.js.map +0 -1
- package/dist/index.d.ts +0 -41
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -62
- package/dist/index.js.map +0 -1
- package/dist/screen-time/index.d.ts +0 -23
- package/dist/screen-time/index.d.ts.map +0 -1
- package/dist/screen-time/index.js +0 -1
- package/dist/screen-time/index.js.map +0 -1
- package/dist/sleep/awake-probability.d.ts +0 -11
- package/dist/sleep/awake-probability.d.ts.map +0 -1
- package/dist/sleep/awake-probability.js +0 -163
- package/dist/sleep/awake-probability.js.map +0 -1
- package/dist/sleep/circadian-rules.d.ts +0 -45
- package/dist/sleep/circadian-rules.d.ts.map +0 -1
- package/dist/sleep/circadian-rules.js +0 -258
- package/dist/sleep/circadian-rules.js.map +0 -1
- package/dist/sleep/index.d.ts +0 -21
- package/dist/sleep/index.d.ts.map +0 -1
- package/dist/sleep/index.js +0 -11
- package/dist/sleep/index.js.map +0 -1
- package/dist/sleep/sleep-cycle-dispatch.d.ts +0 -75
- package/dist/sleep/sleep-cycle-dispatch.d.ts.map +0 -1
- package/dist/sleep/sleep-cycle-dispatch.js +0 -102
- package/dist/sleep/sleep-cycle-dispatch.js.map +0 -1
- package/dist/sleep/sleep-cycle.d.ts +0 -38
- package/dist/sleep/sleep-cycle.d.ts.map +0 -1
- package/dist/sleep/sleep-cycle.js +0 -418
- package/dist/sleep/sleep-cycle.js.map +0 -1
- package/dist/sleep/sleep-episode-store.d.ts +0 -25
- package/dist/sleep/sleep-episode-store.d.ts.map +0 -1
- package/dist/sleep/sleep-episode-store.js +0 -69
- package/dist/sleep/sleep-episode-store.js.map +0 -1
- package/dist/sleep/sleep-episode-types.d.ts +0 -38
- package/dist/sleep/sleep-episode-types.d.ts.map +0 -1
- package/dist/sleep/sleep-episode-types.js +0 -14
- package/dist/sleep/sleep-episode-types.js.map +0 -1
- package/dist/sleep/sleep-recap.d.ts +0 -19
- package/dist/sleep/sleep-recap.d.ts.map +0 -1
- package/dist/sleep/sleep-recap.js +0 -1
- package/dist/sleep/sleep-recap.js.map +0 -1
- package/dist/sleep/sleep-regularity.d.ts +0 -19
- package/dist/sleep/sleep-regularity.d.ts.map +0 -1
- package/dist/sleep/sleep-regularity.js +0 -242
- package/dist/sleep/sleep-regularity.js.map +0 -1
- package/dist/sleep/sleep-wake-events.d.ts +0 -58
- package/dist/sleep/sleep-wake-events.d.ts.map +0 -1
- package/dist/sleep/sleep-wake-events.js +0 -135
- package/dist/sleep/sleep-wake-events.js.map +0 -1
- package/dist/sleep/source-reliability.d.ts +0 -38
- package/dist/sleep/source-reliability.d.ts.map +0 -1
- package/dist/sleep/source-reliability.js +0 -62
- package/dist/sleep/source-reliability.js.map +0 -1
- package/dist/util/index.d.ts +0 -10
- package/dist/util/index.d.ts.map +0 -1
- package/dist/util/index.js +0 -3
- package/dist/util/index.js.map +0 -1
- package/dist/util/normalize.d.ts +0 -22
- package/dist/util/normalize.d.ts.map +0 -1
- package/dist/util/normalize.js +0 -62
- package/dist/util/normalize.js.map +0 -1
- package/dist/util/time-util.d.ts +0 -10
- package/dist/util/time-util.d.ts.map +0 -1
- package/dist/util/time-util.js +0 -14
- package/dist/util/time-util.js.map +0 -1
- package/dist/util/time.d.ts +0 -17
- package/dist/util/time.d.ts.map +0 -1
- package/dist/util/time.js +0 -152
- package/dist/util/time.js.map +0 -1
- package/dist/util/token-encryption.d.ts +0 -42
- package/dist/util/token-encryption.d.ts.map +0 -1
- package/dist/util/token-encryption.js +0 -96
- package/dist/util/token-encryption.js.map +0 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Shaw Walters and elizaOS Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# `@elizaos/plugin-health`
|
|
2
2
|
|
|
3
3
|
Owns the health, sleep, circadian-regularity, and screen-time domain for
|
|
4
|
-
elizaOS. Extracted from `@elizaos/
|
|
4
|
+
elizaOS. Extracted from `@elizaos/plugin-personal-assistant` so the same domain can serve
|
|
5
5
|
other apps without bringing the LifeOps runtime along.
|
|
6
6
|
|
|
7
7
|
## What this plugin owns
|
|
@@ -18,9 +18,10 @@ Six connector contributions registered against the LifeOps
|
|
|
18
18
|
- `withings`
|
|
19
19
|
- `oura`
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
`src/connectors/index.ts` registers the `ConnectorContribution`s. The Wave-1
|
|
22
|
+
registry adapter returns typed disconnected / transport-error results while
|
|
23
|
+
the concrete OAuth pair/disconnect, credential storage, and provider readers
|
|
24
|
+
live under `src/health-bridge/`.
|
|
24
25
|
|
|
25
26
|
### Anchors
|
|
26
27
|
|
|
@@ -32,13 +33,14 @@ Four anchors registered against the `AnchorRegistry`:
|
|
|
32
33
|
- `nap.start`
|
|
33
34
|
|
|
34
35
|
Anchors back the `relative_to_anchor` trigger on
|
|
35
|
-
`ScheduledTask`s — for example, `
|
|
36
|
-
|
|
36
|
+
`ScheduledTask`s — for example, the `wake-up` pack fires
|
|
37
|
+
`relative_to_anchor("wake.confirmed", 0)` and the `sleep-recap` pack fires
|
|
38
|
+
`relative_to_anchor("wake.confirmed", 240)`.
|
|
37
39
|
|
|
38
40
|
### Bus families
|
|
39
41
|
|
|
40
|
-
Eight families registered against the `
|
|
41
|
-
`ActivitySignalBus`:
|
|
42
|
+
Eight families registered against the `BusFamilyRegistry`
|
|
43
|
+
(`runtime.busFamilyRegistry`) and published on the `ActivitySignalBus`:
|
|
42
44
|
|
|
43
45
|
- `health.sleep.detected`
|
|
44
46
|
- `health.sleep.ended`
|
|
@@ -56,15 +58,18 @@ Eight families registered against the `FamilyRegistry` and published on the
|
|
|
56
58
|
- `sleep-recap` — recap after sleep ends.
|
|
57
59
|
|
|
58
60
|
Each pack is a `ScheduledTask` (or set thereof) consuming the LifeOps spine.
|
|
59
|
-
|
|
60
|
-
|
|
61
|
+
`registerHealthDefaultPacks(runtime)` registers all three packs whenever the
|
|
62
|
+
runtime exposes a `defaultPackRegistry`; if it is absent the plugin logs a
|
|
63
|
+
single skip line and contributes nothing.
|
|
61
64
|
|
|
62
65
|
### Domain logic
|
|
63
66
|
|
|
64
67
|
- `src/sleep/` — sleep / circadian / regularity engines.
|
|
65
|
-
- `src/screen-time/` —
|
|
66
|
-
- `src/health-bridge/` —
|
|
67
|
-
|
|
68
|
+
- `src/screen-time/` — type-only exports (`LifeOpsScreenTimePerAppUsage`, `LifeOpsScreenTimeSummaryPayload`); the aggregator lives in `plugins/plugin-personal-assistant/src/lifeops/service-mixin-screentime.ts` pending Wave-2 (W2-D) decoupling.
|
|
69
|
+
- `src/health-bridge/` — `detectHealthBackend` (HealthKit on darwin, Google
|
|
70
|
+
Fit REST fallback), the Strava/Fitbit/Withings/Oura OAuth-bridged readers,
|
|
71
|
+
the per-provider OAuth flow, and the `createLifeOpsHealth*` record
|
|
72
|
+
factories. These are direct function exports, not HTTP routes.
|
|
68
73
|
|
|
69
74
|
## How LifeOps consumes plugin-health
|
|
70
75
|
|
|
@@ -75,11 +80,12 @@ LifeOps does not import internal modules. Consumption goes through:
|
|
|
75
80
|
2. **Anchor contributions** — registered via `registerHealthAnchors(runtime)`
|
|
76
81
|
into the `AnchorRegistry`.
|
|
77
82
|
3. **Bus families** — registered via `registerHealthBusFamilies(runtime)`
|
|
78
|
-
into `
|
|
83
|
+
into `BusFamilyRegistry` (`runtime.busFamilyRegistry`).
|
|
79
84
|
4. **Default packs** — registered via `registerHealthDefaultPacks(runtime)`.
|
|
80
85
|
5. **Public exports** — `detectHealthBackend`, sleep utilities, screen-time
|
|
81
86
|
helpers exported from `@elizaos/plugin-health` and re-exported by
|
|
82
|
-
|
|
87
|
+
`@elizaos/plugin-personal-assistant` only where the surface is part of the LifeOps
|
|
88
|
+
public API.
|
|
83
89
|
|
|
84
90
|
If the LifeOps runtime registries are not available at boot, the plugin
|
|
85
91
|
logs a single skip line and contributes nothing. This is the soft-dependency
|
|
@@ -87,21 +93,21 @@ posture.
|
|
|
87
93
|
|
|
88
94
|
## Soft-dependency posture
|
|
89
95
|
|
|
90
|
-
`plugin-health` does not require
|
|
91
|
-
plugin by registering their own implementations of:
|
|
96
|
+
`plugin-health` does not require `@elizaos/plugin-personal-assistant`. Other apps can
|
|
97
|
+
consume the plugin by registering their own implementations of:
|
|
92
98
|
|
|
93
|
-
- `ConnectorRegistry` (with `register` / `get` / `
|
|
94
|
-
- `AnchorRegistry` (with `register` / `
|
|
95
|
-
- `
|
|
96
|
-
-
|
|
99
|
+
- `ConnectorRegistry` (with `register` / `list` / `get` / `byCapability`)
|
|
100
|
+
- `AnchorRegistry` (with `register` / `list` / `get`)
|
|
101
|
+
- `BusFamilyRegistry` (with `register` / `list`)
|
|
102
|
+
- `DefaultPackRegistry` (with `register` / `list` / `get`)
|
|
97
103
|
|
|
98
|
-
The contracts the plugin builds against live in
|
|
99
|
-
|
|
104
|
+
The structural contracts the plugin builds against live in
|
|
105
|
+
`src/connectors/contract-types.ts`, `src/default-packs/contract-types.ts`,
|
|
106
|
+
and `src/contracts/health.ts`.
|
|
100
107
|
|
|
101
108
|
## Where to look next
|
|
102
109
|
|
|
103
110
|
- Plugin entry: `src/index.ts`.
|
|
104
|
-
- LifeOps consumption: `plugins/
|
|
105
|
-
- Frozen contracts: `plugins/
|
|
106
|
-
|
|
107
|
-
transport contracts the plugin implements).
|
|
111
|
+
- LifeOps consumption: `plugins/plugin-personal-assistant/README.md`.
|
|
112
|
+
- Frozen contracts: see `plugins/plugin-personal-assistant/AGENTS.md` for the connector /
|
|
113
|
+
channel / transport contracts this plugin implements.
|
package/assets/hero.svg
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024" width="1024" height="1024" role="img" aria-label="Health">
|
|
2
|
+
<defs>
|
|
3
|
+
<linearGradient id="bg-health" x1="0" y1="0" x2="1" y2="1">
|
|
4
|
+
<stop offset="0" stop-color="#28151e"/>
|
|
5
|
+
<stop offset="1" stop-color="#190b0e"/>
|
|
6
|
+
</linearGradient>
|
|
7
|
+
<radialGradient id="blobA-health" cx="0.5" cy="0.5" r="0.5">
|
|
8
|
+
<stop offset="0" stop-color="#da2f7f" stop-opacity="0.55"/>
|
|
9
|
+
<stop offset="1" stop-color="#da2f7f" stop-opacity="0"/>
|
|
10
|
+
</radialGradient>
|
|
11
|
+
<radialGradient id="blobB-health" cx="0.5" cy="0.5" r="0.5">
|
|
12
|
+
<stop offset="0" stop-color="#c32828" stop-opacity="0.5"/>
|
|
13
|
+
<stop offset="1" stop-color="#c32828" stop-opacity="0"/>
|
|
14
|
+
</radialGradient>
|
|
15
|
+
<radialGradient id="vig-health" cx="0.5" cy="0.42" r="0.75">
|
|
16
|
+
<stop offset="0" stop-color="#000000" stop-opacity="0"/>
|
|
17
|
+
<stop offset="0.72" stop-color="#000000" stop-opacity="0"/>
|
|
18
|
+
<stop offset="1" stop-color="#000000" stop-opacity="0.5"/>
|
|
19
|
+
</radialGradient>
|
|
20
|
+
<linearGradient id="label-health" x1="0" y1="0" x2="0" y2="1">
|
|
21
|
+
<stop offset="0" stop-color="#000000" stop-opacity="0"/>
|
|
22
|
+
<stop offset="1" stop-color="#000000" stop-opacity="0.55"/>
|
|
23
|
+
</linearGradient>
|
|
24
|
+
<filter id="soft-health" x="-30%" y="-30%" width="160%" height="160%">
|
|
25
|
+
<feGaussianBlur stdDeviation="46"/>
|
|
26
|
+
</filter>
|
|
27
|
+
<filter id="iglow-health" x="-40%" y="-40%" width="180%" height="180%">
|
|
28
|
+
<feDropShadow dx="0" dy="0" stdDeviation="14" flood-color="#ed4593" flood-opacity="0.45"/>
|
|
29
|
+
</filter>
|
|
30
|
+
</defs>
|
|
31
|
+
|
|
32
|
+
<rect width="1024" height="1024" fill="url(#bg-health)"/>
|
|
33
|
+
|
|
34
|
+
<g opacity="0.9">
|
|
35
|
+
<circle cx="232" cy="220" r="300" fill="url(#blobA-health)" filter="url(#soft-health)"/>
|
|
36
|
+
<circle cx="840" cy="800" r="340" fill="url(#blobB-health)" filter="url(#soft-health)"/>
|
|
37
|
+
</g>
|
|
38
|
+
|
|
39
|
+
<g stroke="#ead7e0" stroke-width="1.4" opacity="0.06">
|
|
40
|
+
<line x1="0" y1="256" x2="1024" y2="256"/>
|
|
41
|
+
<line x1="0" y1="512" x2="1024" y2="512"/>
|
|
42
|
+
<line x1="0" y1="768" x2="1024" y2="768"/>
|
|
43
|
+
<line x1="256" y1="0" x2="256" y2="1024"/>
|
|
44
|
+
<line x1="512" y1="0" x2="512" y2="1024"/>
|
|
45
|
+
<line x1="768" y1="0" x2="768" y2="1024"/>
|
|
46
|
+
</g>
|
|
47
|
+
|
|
48
|
+
<g opacity="0.5">
|
|
49
|
+
<path d="M120 470 A 400 400 0 0 1 904 470" fill="none" stroke="#ed4593" stroke-width="3" opacity="0.35"/>
|
|
50
|
+
</g>
|
|
51
|
+
|
|
52
|
+
<g transform="translate(512 432)" filter="url(#iglow-health)"
|
|
53
|
+
color="#ead7e0" stroke="#ead7e0" stroke-width="20"
|
|
54
|
+
stroke-linecap="round" stroke-linejoin="round" fill="none">
|
|
55
|
+
<path d="M0 150 C-180 18 -120 -120 0 -52 C120 -120 180 18 0 150 Z"/>
|
|
56
|
+
<polyline points="-150,-10 -64,-10 -28,-58 14,52 48,-10 150,-10" fill="none"/>
|
|
57
|
+
</g>
|
|
58
|
+
|
|
59
|
+
<rect x="0" y="784" width="1024" height="240" fill="url(#label-health)"/>
|
|
60
|
+
<text x="512" y="892" text-anchor="middle"
|
|
61
|
+
font-family="system-ui, -apple-system, Segoe UI, Roboto, sans-serif"
|
|
62
|
+
font-size="76" font-weight="600" letter-spacing="0.5"
|
|
63
|
+
fill="#ead7e0">Health</text>
|
|
64
|
+
<rect x="460" y="924" width="104" height="6" rx="3" fill="#ed4593"/>
|
|
65
|
+
|
|
66
|
+
<rect width="1024" height="1024" fill="url(#vig-health)"/>
|
|
67
|
+
</svg>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elizaos/plugin-health",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.11-beta.7",
|
|
4
4
|
"description": "Health, sleep, circadian and screen-time domain plugin for elizaOS — extracted from app-lifeops in Wave 1 (W1-B). Owns connectors (Apple Health, Google Fit, Strava, Fitbit, Withings, Oura), sleep/circadian/regularity engines, screen-time aggregation, and the wake/bedtime/nap anchor contributions consumed by app-lifeops via the W1-F connector / channel / signal-bus contracts.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -11,29 +11,81 @@
|
|
|
11
11
|
"./package.json": "./package.json",
|
|
12
12
|
".": {
|
|
13
13
|
"types": "./dist/index.d.ts",
|
|
14
|
+
"eliza-source": {
|
|
15
|
+
"types": "./src/index.ts",
|
|
16
|
+
"import": "./src/index.ts",
|
|
17
|
+
"default": "./src/index.ts"
|
|
18
|
+
},
|
|
14
19
|
"import": "./dist/index.js",
|
|
15
20
|
"default": "./dist/index.js"
|
|
21
|
+
},
|
|
22
|
+
"./ui": {
|
|
23
|
+
"types": "./dist/ui/index.d.ts",
|
|
24
|
+
"eliza-source": {
|
|
25
|
+
"types": "./src/ui/index.ts",
|
|
26
|
+
"import": "./src/ui/index.ts",
|
|
27
|
+
"default": "./src/ui/index.ts"
|
|
28
|
+
},
|
|
29
|
+
"import": "./dist/ui/index.js",
|
|
30
|
+
"default": "./dist/ui/index.js"
|
|
31
|
+
},
|
|
32
|
+
"./ui/index": {
|
|
33
|
+
"types": "./dist/ui/index.d.ts",
|
|
34
|
+
"eliza-source": {
|
|
35
|
+
"types": "./src/ui/index.ts",
|
|
36
|
+
"import": "./src/ui/index.ts",
|
|
37
|
+
"default": "./src/ui/index.ts"
|
|
38
|
+
},
|
|
39
|
+
"import": "./dist/ui/index.js",
|
|
40
|
+
"default": "./dist/ui/index.js"
|
|
41
|
+
},
|
|
42
|
+
"./*.css": "./dist/*.css",
|
|
43
|
+
"./*": {
|
|
44
|
+
"types": "./dist/*.d.ts",
|
|
45
|
+
"eliza-source": {
|
|
46
|
+
"types": "./src/*.ts",
|
|
47
|
+
"import": "./src/*.ts",
|
|
48
|
+
"default": "./src/*.ts"
|
|
49
|
+
},
|
|
50
|
+
"import": "./dist/*.js",
|
|
51
|
+
"default": "./dist/*.js"
|
|
16
52
|
}
|
|
17
53
|
},
|
|
18
54
|
"files": [
|
|
55
|
+
"assets",
|
|
19
56
|
"dist"
|
|
20
57
|
],
|
|
21
58
|
"scripts": {
|
|
59
|
+
"typecheck": "tsc --noEmit -p tsconfig.json",
|
|
22
60
|
"test": "vitest run --config vitest.config.ts",
|
|
23
|
-
"build": "bun run build:js && bun run build:types",
|
|
61
|
+
"build": "bun run build:js && bun run build:views && bun run build:types",
|
|
24
62
|
"clean": "rm -rf dist",
|
|
25
63
|
"build:js": "tsup --config ../tsup.plugin-packages.shared.ts",
|
|
64
|
+
"build:views": "bunx --bun vite build --config vite.config.views.ts",
|
|
26
65
|
"build:types": "tsc --noCheck -p tsconfig.build.json",
|
|
27
66
|
"lint": "bunx @biomejs/biome check --write --unsafe .",
|
|
28
67
|
"lint:check": "bunx @biomejs/biome check ."
|
|
29
68
|
},
|
|
30
69
|
"dependencies": {
|
|
31
|
-
"@elizaos/core": "2.0.
|
|
70
|
+
"@elizaos/core": "2.0.11-beta.7",
|
|
71
|
+
"@elizaos/shared": "2.0.11-beta.7",
|
|
72
|
+
"@elizaos/ui": "2.0.11-beta.7",
|
|
73
|
+
"lucide-react": "^1.0.0"
|
|
74
|
+
},
|
|
75
|
+
"peerDependencies": {
|
|
76
|
+
"react": "^19.0.0",
|
|
77
|
+
"react-dom": "^19.0.0"
|
|
32
78
|
},
|
|
33
79
|
"devDependencies": {
|
|
80
|
+
"@biomejs/biome": "^2.4.14",
|
|
34
81
|
"@types/node": "^25.6.0",
|
|
82
|
+
"@types/react": "^19.0.0",
|
|
83
|
+
"@types/react-dom": "^19.0.0",
|
|
84
|
+
"react": "^19.0.0",
|
|
85
|
+
"react-dom": "^19.0.0",
|
|
35
86
|
"tsup": "^8.5.1",
|
|
36
87
|
"typescript": "^6.0.3",
|
|
88
|
+
"vite": "^8.0.0",
|
|
37
89
|
"vitest": "^4.0.0"
|
|
38
90
|
},
|
|
39
91
|
"agentConfig": {
|
|
@@ -42,5 +94,6 @@
|
|
|
42
94
|
},
|
|
43
95
|
"publishConfig": {
|
|
44
96
|
"access": "public"
|
|
45
|
-
}
|
|
97
|
+
},
|
|
98
|
+
"gitHead": "cdbc876f793d96073d7eb0d09715a031ce0cd32e"
|
|
46
99
|
}
|
package/dist/actions/index.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Health-related agent actions exposed by plugin-health.
|
|
3
|
-
*
|
|
4
|
-
* Wave-1 (W1-B) move: `actions/health.ts` and `actions/screen-time.ts` are
|
|
5
|
-
* still owned by app-lifeops because they instantiate `LifeOpsService`
|
|
6
|
-
* directly (`new LifeOpsService(runtime)`) — moving the construction surface
|
|
7
|
-
* into plugin-health would create a circular package dependency since
|
|
8
|
-
* `LifeOpsService` lives in app-lifeops.
|
|
9
|
-
*
|
|
10
|
-
* The pure-domain helpers those actions delegate to (`health-bridge.ts`,
|
|
11
|
-
* `health-connectors.ts`, sleep / circadian / awake-probability inference)
|
|
12
|
-
* have been moved into plugin-health. Wave-2 (W2-A: scenario-named action
|
|
13
|
-
* migration onto `ScheduledTask`) is responsible for the action move +
|
|
14
|
-
* `LifeOpsService` decoupling.
|
|
15
|
-
*
|
|
16
|
-
* For now, app-lifeops continues to register both actions on its own plugin
|
|
17
|
-
* surface. plugin-health exposes no actions of its own at Wave-1.
|
|
18
|
-
*/
|
|
19
|
-
export declare const HEALTH_ACTIONS_DEFERRED_TO_WAVE_2: true;
|
|
20
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/actions/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,eAAO,MAAM,iCAAiC,EAAG,IAAa,CAAC"}
|
package/dist/actions/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/actions/index.ts"],"sourcesContent":["/**\n * Health-related agent actions exposed by plugin-health.\n *\n * Wave-1 (W1-B) move: `actions/health.ts` and `actions/screen-time.ts` are\n * still owned by app-lifeops because they instantiate `LifeOpsService`\n * directly (`new LifeOpsService(runtime)`) — moving the construction surface\n * into plugin-health would create a circular package dependency since\n * `LifeOpsService` lives in app-lifeops.\n *\n * The pure-domain helpers those actions delegate to (`health-bridge.ts`,\n * `health-connectors.ts`, sleep / circadian / awake-probability inference)\n * have been moved into plugin-health. Wave-2 (W2-A: scenario-named action\n * migration onto `ScheduledTask`) is responsible for the action move +\n * `LifeOpsService` decoupling.\n *\n * For now, app-lifeops continues to register both actions on its own plugin\n * surface. plugin-health exposes no actions of its own at Wave-1.\n */\n\nexport const HEALTH_ACTIONS_DEFERRED_TO_WAVE_2 = true as const;\n"],"mappings":"AAmBO,MAAM,oCAAoC;","names":[]}
|
package/dist/anchors/index.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Anchor contributions exposed by plugin-health.
|
|
3
|
-
*
|
|
4
|
-
* The actual `registerHealthAnchors` implementation + the `HEALTH_ANCHORS`
|
|
5
|
-
* tuple live in `../connectors/index.ts` (alongside the connector / bus-
|
|
6
|
-
* family registration entry points so a single registry-detection pass
|
|
7
|
-
* runs all three at boot). This file re-exports them so external callers
|
|
8
|
-
* can import from `@elizaos/plugin-health/anchors`.
|
|
9
|
-
*
|
|
10
|
-
* Per `IMPLEMENTATION_PLAN.md` §3.2: BOTH `wake.observed` AND `wake.confirmed`
|
|
11
|
-
* are registered as separate anchors — `observed` = first signal that fits
|
|
12
|
-
* a wake pattern, `confirmed` = sustained signal that survives the
|
|
13
|
-
* `WAKE_CONFIRM_WINDOW_MS` hysteresis window in `circadian-rules.ts`.
|
|
14
|
-
*
|
|
15
|
-
* Per `wave1-interfaces.md` §5.2: the anchor set is
|
|
16
|
-
* `["wake.observed", "wake.confirmed", "bedtime.target", "nap.start"]`.
|
|
17
|
-
*/
|
|
18
|
-
export { type AnchorContribution, type AnchorRegistry, HEALTH_ANCHORS, registerHealthAnchors, } from "../connectors/index.js";
|
|
19
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/anchors/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,cAAc,EACd,qBAAqB,GACtB,MAAM,wBAAwB,CAAC"}
|
package/dist/anchors/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/anchors/index.ts"],"sourcesContent":["/**\n * Anchor contributions exposed by plugin-health.\n *\n * The actual `registerHealthAnchors` implementation + the `HEALTH_ANCHORS`\n * tuple live in `../connectors/index.ts` (alongside the connector / bus-\n * family registration entry points so a single registry-detection pass\n * runs all three at boot). This file re-exports them so external callers\n * can import from `@elizaos/plugin-health/anchors`.\n *\n * Per `IMPLEMENTATION_PLAN.md` §3.2: BOTH `wake.observed` AND `wake.confirmed`\n * are registered as separate anchors — `observed` = first signal that fits\n * a wake pattern, `confirmed` = sustained signal that survives the\n * `WAKE_CONFIRM_WINDOW_MS` hysteresis window in `circadian-rules.ts`.\n *\n * Per `wave1-interfaces.md` §5.2: the anchor set is\n * `[\"wake.observed\", \"wake.confirmed\", \"bedtime.target\", \"nap.start\"]`.\n */\n\nexport {\n type AnchorContribution,\n type AnchorRegistry,\n HEALTH_ANCHORS,\n registerHealthAnchors,\n} from \"../connectors/index.js\";\n"],"mappings":"AAkBA;AAAA,EAGE;AAAA,EACA;AAAA,OACK;","names":[]}
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Wave-1 stubs for the W1-F connector / channel / signal-bus contracts.
|
|
3
|
-
*
|
|
4
|
-
* These mirror `wave1-interfaces.md` §3 byte-identically. When W1-F lands the
|
|
5
|
-
* concrete `ConnectorRegistry` / `AnchorRegistry` / `ActivitySignalBus` types
|
|
6
|
-
* in their owning module, every `import` from this file should be replaced
|
|
7
|
-
* with the real path; nothing else needs to change because the shapes here
|
|
8
|
-
* are the frozen contract.
|
|
9
|
-
*
|
|
10
|
-
* No runtime behaviour lives here — types only.
|
|
11
|
-
*/
|
|
12
|
-
export type ConnectorMode = "local" | "cloud";
|
|
13
|
-
export interface ConnectorStatus {
|
|
14
|
-
state: "ok" | "degraded" | "disconnected";
|
|
15
|
-
message?: string;
|
|
16
|
-
observedAt: string;
|
|
17
|
-
}
|
|
18
|
-
export type DispatchResult = {
|
|
19
|
-
ok: true;
|
|
20
|
-
messageId?: string;
|
|
21
|
-
} | {
|
|
22
|
-
ok: false;
|
|
23
|
-
reason: "disconnected" | "rate_limited" | "auth_expired" | "unknown_recipient" | "transport_error";
|
|
24
|
-
retryAfterMinutes?: number;
|
|
25
|
-
userActionable: boolean;
|
|
26
|
-
message?: string;
|
|
27
|
-
};
|
|
28
|
-
/**
|
|
29
|
-
* OAuth surface a connector contribution may advertise. URL provided by the
|
|
30
|
-
* connector contribution; the dispatcher does not hardcode. Health-bridge
|
|
31
|
-
* connectors (Strava, Fitbit, Withings, Oura) populate this so the OAuth
|
|
32
|
-
* driver iterates the registry — see `health-bridge/health-provider-registry.ts`.
|
|
33
|
-
*/
|
|
34
|
-
export interface ConnectorOAuthConfig {
|
|
35
|
-
readonly authorizeUrl: string;
|
|
36
|
-
readonly tokenUrl: string;
|
|
37
|
-
readonly revokeUrl?: string | null;
|
|
38
|
-
readonly scopes?: readonly string[];
|
|
39
|
-
}
|
|
40
|
-
export interface ConnectorContribution {
|
|
41
|
-
kind: string;
|
|
42
|
-
capabilities: string[];
|
|
43
|
-
modes: ConnectorMode[];
|
|
44
|
-
describe: {
|
|
45
|
-
label: string;
|
|
46
|
-
};
|
|
47
|
-
/** URL provided by the connector contribution; the dispatcher does not hardcode. */
|
|
48
|
-
oauth?: ConnectorOAuthConfig;
|
|
49
|
-
/** URL provided by the connector contribution; the dispatcher does not hardcode. */
|
|
50
|
-
apiBaseUrl?: string;
|
|
51
|
-
start(): Promise<void>;
|
|
52
|
-
disconnect(): Promise<void>;
|
|
53
|
-
verify(): Promise<boolean>;
|
|
54
|
-
status(): Promise<ConnectorStatus>;
|
|
55
|
-
send?(payload: unknown): Promise<DispatchResult>;
|
|
56
|
-
read?(query: unknown): Promise<unknown>;
|
|
57
|
-
requiresApproval?: boolean;
|
|
58
|
-
}
|
|
59
|
-
export interface ConnectorRegistry {
|
|
60
|
-
register(c: ConnectorContribution): void;
|
|
61
|
-
list(filter?: {
|
|
62
|
-
capability?: string;
|
|
63
|
-
mode?: ConnectorMode;
|
|
64
|
-
}): ConnectorContribution[];
|
|
65
|
-
get(kind: string): ConnectorContribution | null;
|
|
66
|
-
byCapability(capability: string): ConnectorContribution[];
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Registry surface exposed by W1-A's `ScheduledTask` runner for anchor key
|
|
70
|
-
* registration. plugin-health contributes `wake.observed`, `wake.confirmed`,
|
|
71
|
-
* `bedtime.target`, `nap.start` per `wave1-interfaces.md` §5.2.
|
|
72
|
-
*
|
|
73
|
-
* `wake.observed` and `wake.confirmed` are intentionally separate (per
|
|
74
|
-
* `IMPLEMENTATION_PLAN.md` §3.2): `observed` = first signal that fits a wake
|
|
75
|
-
* pattern, `confirmed` = sustained signal that survives the
|
|
76
|
-
* `WAKE_CONFIRM_WINDOW_MS` hysteresis window in `circadian-rules.ts`.
|
|
77
|
-
*/
|
|
78
|
-
export interface AnchorRegistry {
|
|
79
|
-
register(anchor: AnchorContribution): void;
|
|
80
|
-
list(): AnchorContribution[];
|
|
81
|
-
get(anchorKey: string): AnchorContribution | null;
|
|
82
|
-
}
|
|
83
|
-
export interface AnchorContribution {
|
|
84
|
-
anchorKey: string;
|
|
85
|
-
description: string;
|
|
86
|
-
source: "plugin-health" | string;
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Bus-family registry for `ActivitySignalBus`. plugin-health publishes the
|
|
90
|
-
* health-prefixed families documented in `wave1-interfaces.md` §5.3.
|
|
91
|
-
*/
|
|
92
|
-
export interface BusFamilyRegistry {
|
|
93
|
-
register(family: BusFamilyContribution): void;
|
|
94
|
-
list(): BusFamilyContribution[];
|
|
95
|
-
}
|
|
96
|
-
export interface BusFamilyContribution {
|
|
97
|
-
family: string;
|
|
98
|
-
description: string;
|
|
99
|
-
source: "plugin-health" | string;
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* The runtime surface plugin-health expects to find on `IAgentRuntime`. All
|
|
103
|
-
* four registries are optional (`undefined` when W1-A / W1-F have not landed
|
|
104
|
-
* yet); registration callers tolerate a missing registry by logging a one-
|
|
105
|
-
* line skip reason.
|
|
106
|
-
*/
|
|
107
|
-
export interface RuntimeWithHealthRegistries {
|
|
108
|
-
connectorRegistry?: ConnectorRegistry;
|
|
109
|
-
anchorRegistry?: AnchorRegistry;
|
|
110
|
-
busFamilyRegistry?: BusFamilyRegistry;
|
|
111
|
-
}
|
|
112
|
-
//# sourceMappingURL=contract-stubs.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"contract-stubs.d.ts","sourceRoot":"","sources":["../../src/connectors/contract-stubs.ts"],"names":[],"mappings":"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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=contract-stubs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Connector / anchor / bus-family registration entry point.
|
|
3
|
-
*
|
|
4
|
-
* Per `wave1-interfaces.md` §5.1 / §5.2 / §5.3, plugin-health contributes:
|
|
5
|
-
*
|
|
6
|
-
* - 6 ConnectorContributions: apple_health, google_fit, strava, fitbit,
|
|
7
|
-
* withings, oura
|
|
8
|
-
* - 4 anchors: wake.observed, wake.confirmed, bedtime.target, nap.start
|
|
9
|
-
* - 8 bus families: health.sleep.detected, health.sleep.ended,
|
|
10
|
-
* health.wake.observed, health.wake.confirmed, health.nap.detected,
|
|
11
|
-
* health.bedtime.imminent, health.regularity.changed,
|
|
12
|
-
* health.workout.completed
|
|
13
|
-
*
|
|
14
|
-
* Registration is best-effort: if W1-A / W1-F's runtime registries have not
|
|
15
|
-
* landed yet, this module logs a one-line skip and continues. The connector
|
|
16
|
-
* / anchor / bus-family identifiers are still exported as constants so
|
|
17
|
-
* other Wave-1 agents can reference them.
|
|
18
|
-
*/
|
|
19
|
-
import type { RuntimeWithHealthRegistries } from "./contract-stubs.js";
|
|
20
|
-
export * from "./contract-stubs.js";
|
|
21
|
-
type RuntimeHealthRegistryHost = object & RuntimeWithHealthRegistries;
|
|
22
|
-
export declare const HEALTH_CONNECTOR_KINDS: readonly ["apple_health", "google_fit", "strava", "fitbit", "withings", "oura"];
|
|
23
|
-
export declare const HEALTH_ANCHORS: readonly ["wake.observed", "wake.confirmed", "bedtime.target", "nap.start"];
|
|
24
|
-
export declare const HEALTH_BUS_FAMILIES: readonly ["health.sleep.detected", "health.sleep.ended", "health.wake.observed", "health.wake.confirmed", "health.nap.detected", "health.bedtime.imminent", "health.regularity.changed", "health.workout.completed"];
|
|
25
|
-
export declare function registerHealthConnectors(runtime: RuntimeHealthRegistryHost): void;
|
|
26
|
-
export declare function registerHealthAnchors(runtime: RuntimeHealthRegistryHost): void;
|
|
27
|
-
export declare function registerHealthBusFamilies(runtime: RuntimeHealthRegistryHost): void;
|
|
28
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/connectors/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAIH,OAAO,KAAK,EAUV,2BAA2B,EAC5B,MAAM,qBAAqB,CAAC;AAE7B,cAAc,qBAAqB,CAAC;AAEpC,KAAK,yBAAyB,GAAG,MAAM,GAAG,2BAA2B,CAAC;AAEtE,eAAO,MAAM,sBAAsB,iFAOG,CAAC;AAEvC,eAAO,MAAM,cAAc,6EAKW,CAAC;AAEvC,eAAO,MAAM,mBAAmB,sNASM,CAAC;AA+JvC,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,yBAAyB,GACjC,IAAI,CAoBN;AAED,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,yBAAyB,GACjC,IAAI,CAuBN;AAED,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,yBAAyB,GACjC,IAAI,CAoBN"}
|