@rickybloomfield/ouraclaw 0.1.2 → 0.1.4
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/dist/cron-setup.d.ts.map +1 -1
- package/dist/cron-setup.js +8 -17
- package/dist/cron-setup.js.map +1 -1
- package/package.json +1 -1
- package/skills/oura/SKILL.md +101 -2
package/dist/cron-setup.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cron-setup.d.ts","sourceRoot":"","sources":["../src/cron-setup.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AA6BrC,wBAAgB,cAAc,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"cron-setup.d.ts","sourceRoot":"","sources":["../src/cron-setup.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AA6BrC,wBAAgB,cAAc,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,CAuFvD;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,CAyBvD"}
|
package/dist/cron-setup.js
CHANGED
|
@@ -54,15 +54,13 @@ function createCronJobs(config) {
|
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
// Create morning job
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
"End the summary with a line like: \"Dive deeper in the Oura app: https://cloud.ouraring.com/app/v1/home — enjoy your day!\"",
|
|
65
|
-
].join(" ");
|
|
57
|
+
const channel = config.preferredChannel && config.preferredChannel !== "default"
|
|
58
|
+
? config.preferredChannel
|
|
59
|
+
: "";
|
|
60
|
+
const channelNote = channel
|
|
61
|
+
? ` Format for the ${channel} channel.`
|
|
62
|
+
: "";
|
|
63
|
+
const morningMsg = `Deliver my Oura Ring morning health summary following the oura skill's Morning Summary Template.${channelNote}`;
|
|
66
64
|
const morningArgs = [
|
|
67
65
|
"cron", "add",
|
|
68
66
|
"--name", "OuraClaw Morning Summary",
|
|
@@ -80,14 +78,7 @@ function createCronJobs(config) {
|
|
|
80
78
|
}
|
|
81
79
|
runOpenclaw(morningArgs);
|
|
82
80
|
// Create evening job
|
|
83
|
-
const eveningMsg =
|
|
84
|
-
"Fetch my Oura Ring data for this evening's summary.",
|
|
85
|
-
"Use the oura_data tool to get daily_activity, daily_readiness, daily_stress, and daily_sleep for today.",
|
|
86
|
-
"Format the results as an evening health summary using the oura skill's evening template.",
|
|
87
|
-
"Remember: 6-8 lines max, include date, focus on activity, mention last night's sleep as a recap, end with a warm wind-down nudge.",
|
|
88
|
-
"Do not send any preamble or intro message before the summary — just send the summary directly as a single message.",
|
|
89
|
-
"End the summary with a line like: \"Dive deeper in the Oura app: https://cloud.ouraring.com/app/v1/home — sleep well!\"",
|
|
90
|
-
].join(" ");
|
|
81
|
+
const eveningMsg = `Deliver my Oura Ring evening health summary following the oura skill's Evening Summary Template.${channelNote}`;
|
|
91
82
|
const eveningArgs = [
|
|
92
83
|
"cron", "add",
|
|
93
84
|
"--name", "OuraClaw Evening Summary",
|
package/dist/cron-setup.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cron-setup.js","sourceRoot":"","sources":["../src/cron-setup.ts"],"names":[],"mappings":";;AA8BA,
|
|
1
|
+
{"version":3,"file":"cron-setup.js","sourceRoot":"","sources":["../src/cron-setup.ts"],"names":[],"mappings":";;AA8BA,wCAuFC;AAED,wCAyBC;AAhJD,iDAA6C;AAE7C,+CAA6C;AAE7C,SAAS,UAAU,CAAC,IAAY;IAC9B,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACrD,OAAO,GAAG,OAAO,IAAI,KAAK,QAAQ,CA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AEtC,IAAI,MAAM,CAAC,gBAAgB;QAAE,WAAW,CAAC,GAAG,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;IACtE,IAAI,MAAM,CAAC,gBAAgB;QAAE,WAAW,CAAC,GAAG,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;IAEtE,KAAK,MAAM,GAAG,IAAI,YAAY,EAAE,CAAC;QAC/B,IAAI,kBAAkB,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;YAC1C,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAC1B,CAAC;IACH,CAAC;IAED,KAAK,MAAM,EAAE,IAAI,WAAW,EAAE,CAAC;QAC7B,IAAI,CAAC;YACH,WAAW,CAAC,CAAC,MAAM,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC;QACtC,CAAC;QAAC,MAAM,CAAC;YACP,0BAA0B;QAC5B,CAAC;IACH,CAAC;IAED,IAAA,0BAAY,EAAC;QACX,gBAAgB,EAAE,SAAS;QAC3B,gBAAgB,EAAE,SAAS;KAC5B,CAAC,CAAC;AACL,CAAC"}
|
package/package.json
CHANGED
package/skills/oura/SKILL.md
CHANGED
|
@@ -62,11 +62,75 @@ You have access to the user's Oura Ring data through the `oura_data` tool. Use i
|
|
|
62
62
|
- Convert all durations from seconds to Xh Ym format
|
|
63
63
|
- Add brief, personalized context when relevant (e.g., "HRV is trending lower than usual")
|
|
64
64
|
- Keep summaries scannable — the user may be reading on a phone
|
|
65
|
+
- **Adapt formatting to the delivery channel** — see Channel Formatting Guide below
|
|
66
|
+
|
|
67
|
+
## Channel Formatting Guide
|
|
68
|
+
|
|
69
|
+
Different messaging channels support different formatting syntax. Use the correct format for the delivery channel. When the channel is unknown or "default", use plain text formatting (safe everywhere).
|
|
70
|
+
|
|
71
|
+
### Plain text — iMessage (bluebubbles), Signal
|
|
72
|
+
|
|
73
|
+
No text-based formatting syntax is supported. Characters like `*`, `_`, and `~` appear literally.
|
|
74
|
+
|
|
75
|
+
- Use emoji and whitespace for visual structure
|
|
76
|
+
- Use UPPERCASE sparingly for emphasis if needed (e.g., "SLEEP: 82")
|
|
77
|
+
- URLs are auto-linked — just include them as plain text
|
|
78
|
+
- Use `|` or `·` as inline separators
|
|
79
|
+
- Use `—` (em dash) for inline breaks
|
|
80
|
+
|
|
81
|
+
### WhatsApp
|
|
82
|
+
|
|
83
|
+
- **Bold**: `*text*`
|
|
84
|
+
- **Italic**: `_text_`
|
|
85
|
+
- **Strikethrough**: `~text~`
|
|
86
|
+
- **Inline code**: `` `text` ``
|
|
87
|
+
- **Lists**: `- item` at the start of a line
|
|
88
|
+
- URLs are auto-linked — do NOT use markdown link syntax `[text](url)`
|
|
89
|
+
|
|
90
|
+
### Telegram
|
|
91
|
+
|
|
92
|
+
Supports Markdown-style formatting:
|
|
93
|
+
|
|
94
|
+
- **Bold**: `*text*`
|
|
95
|
+
- **Italic**: `_text_`
|
|
96
|
+
- **Underline**: `__text__`
|
|
97
|
+
- **Strikethrough**: `~text~`
|
|
98
|
+
- **Links**: `[display text](url)`
|
|
99
|
+
- Escape special characters (`.`, `-`, `(`, `)`, `!`, etc.) with `\` when they appear outside formatting
|
|
100
|
+
|
|
101
|
+
### Slack
|
|
102
|
+
|
|
103
|
+
Uses Slack's mrkdwn syntax (not standard Markdown):
|
|
104
|
+
|
|
105
|
+
- **Bold**: `*text*`
|
|
106
|
+
- **Italic**: `_text_`
|
|
107
|
+
- **Strikethrough**: `~text~`
|
|
108
|
+
- **Links**: `<url|display text>`
|
|
109
|
+
- **Lists**: `- item` or `• item`
|
|
110
|
+
- Do NOT use standard Markdown bold (`**text**`) or link syntax (`[text](url)`)
|
|
111
|
+
|
|
112
|
+
### Discord
|
|
113
|
+
|
|
114
|
+
Uses standard Markdown:
|
|
115
|
+
|
|
116
|
+
- **Bold**: `**text**`
|
|
117
|
+
- **Italic**: `*text*`
|
|
118
|
+
- **Underline**: `__text__`
|
|
119
|
+
- **Strikethrough**: `~~text~~`
|
|
120
|
+
- **Links**: `[display text](url)`
|
|
121
|
+
- **Lists**: `- item`
|
|
122
|
+
- **Headers**: `#`, `##`, `###` (at start of line)
|
|
123
|
+
|
|
124
|
+
### WebChat / Default
|
|
125
|
+
|
|
126
|
+
Use standard Markdown formatting.
|
|
65
127
|
|
|
66
128
|
## Morning Summary Template
|
|
67
129
|
|
|
68
130
|
When delivering a morning summary, fetch `daily_sleep`, `sleep` (detailed periods), `daily_readiness`, `daily_activity`, and `daily_stress` for today. Also fetch yesterday's `daily_activity` as a fallback.
|
|
69
131
|
|
|
132
|
+
Send only the formatted summary — no preamble, intro message, or extra commentary before or after it. Apply the correct formatting syntax for the delivery channel (see Channel Formatting Guide).
|
|
133
|
+
|
|
70
134
|
Format rules:
|
|
71
135
|
- Start with "Good morning!" and today's date
|
|
72
136
|
- **Sleep**: score with label, total sleep time (convert seconds to Xh Ym), key contributors that are notably high or low. From the detailed `sleep` endpoint, include lowest resting heart rate, average overnight heart rate, and average HRV. Show deep, REM, and light durations in minutes.
|
|
@@ -75,8 +139,9 @@ Format rules:
|
|
|
75
139
|
- **Stress**: mention if data is available (normal, high, etc.). If no stress data, skip it.
|
|
76
140
|
- No app links at the end.
|
|
77
141
|
- Keep it concise — 8–10 lines max. Use emoji sparingly. Warm but not cheesy.
|
|
142
|
+
- Bold the category labels and scores on channels that support bold (e.g., `*Sleep: 82 (Good)*` on WhatsApp/Telegram/Slack, `**Sleep: 82 (Good)**` on Discord). On plain text channels (iMessage, Signal), do not use any formatting markers.
|
|
78
143
|
|
|
79
|
-
Example tone:
|
|
144
|
+
Example tone (plain text / iMessage):
|
|
80
145
|
|
|
81
146
|
```
|
|
82
147
|
Good morning! Here's your recap for Monday, Jan 27.
|
|
@@ -95,10 +160,31 @@ Stress: normal range
|
|
|
95
160
|
Solid night overall — deep sleep was a bit short but REM made up for it. Enjoy your day!
|
|
96
161
|
```
|
|
97
162
|
|
|
163
|
+
Example tone (WhatsApp / Telegram / Slack):
|
|
164
|
+
|
|
165
|
+
```
|
|
166
|
+
Good morning! Here's your recap for Monday, Jan 27.
|
|
167
|
+
|
|
168
|
+
😴 *Sleep: 82 (Good)* — 7h 12m total
|
|
169
|
+
Deep 58m | REM 1h 24m | Light 4h 50m
|
|
170
|
+
Lowest HR 52 bpm | Avg HR 58 bpm | HRV 42 ms
|
|
171
|
+
|
|
172
|
+
💪 *Readiness: 78 (Good)*
|
|
173
|
+
Body temp +0.1°C | HRV balance solid | Recovery index slightly low
|
|
174
|
+
|
|
175
|
+
🏃 *Activity (yesterday): 74 (Good)* — 8,241 steps, 312 active cal
|
|
176
|
+
|
|
177
|
+
Stress: normal range
|
|
178
|
+
|
|
179
|
+
Solid night overall — deep sleep was a bit short but REM made up for it. Enjoy your day!
|
|
180
|
+
```
|
|
181
|
+
|
|
98
182
|
## Evening Summary Template
|
|
99
183
|
|
|
100
184
|
When delivering an evening summary, fetch `daily_activity`, `daily_readiness`, `daily_stress`, and `daily_sleep` for today.
|
|
101
185
|
|
|
186
|
+
Send only the formatted summary — no preamble, intro message, or extra commentary before or after it. Apply the correct formatting syntax for the delivery channel (see Channel Formatting Guide).
|
|
187
|
+
|
|
102
188
|
Format rules:
|
|
103
189
|
- Start with "Good evening!" and today's date
|
|
104
190
|
- Focus on today's **activity**: score, steps, active calories, total calories.
|
|
@@ -106,8 +192,9 @@ Format rules:
|
|
|
106
192
|
- Briefly mention last night's sleep score as a one-line recap.
|
|
107
193
|
- End with a short, genuine motivational nudge to wind down and get to bed soon for good recovery. Be warm, not preachy.
|
|
108
194
|
- Keep it concise — 6–8 lines max. Use emoji sparingly.
|
|
195
|
+
- Bold the category labels and scores on channels that support bold. On plain text channels (iMessage, Signal), do not use any formatting markers.
|
|
109
196
|
|
|
110
|
-
Example tone:
|
|
197
|
+
Example tone (plain text / iMessage):
|
|
111
198
|
|
|
112
199
|
```
|
|
113
200
|
Good evening! Here's your day in review for Monday, Jan 27.
|
|
@@ -119,6 +206,18 @@ Good evening! Here's your day in review for Monday, Jan 27.
|
|
|
119
206
|
Nice active day — you moved well. Wind down soon and aim for a solid bedtime to keep the momentum going.
|
|
120
207
|
```
|
|
121
208
|
|
|
209
|
+
Example tone (WhatsApp / Telegram / Slack):
|
|
210
|
+
|
|
211
|
+
```
|
|
212
|
+
Good evening! Here's your day in review for Monday, Jan 27.
|
|
213
|
+
|
|
214
|
+
🏃 *Activity: 81 (Good)* — 9,432 steps, 387 active cal, 2,145 total cal
|
|
215
|
+
📊 *Readiness: 78 (Good)* | Stress: normal range
|
|
216
|
+
😴 *Last night's sleep: 82 (Good)*
|
|
217
|
+
|
|
218
|
+
Nice active day — you moved well. Wind down soon and aim for a solid bedtime to keep the momentum going.
|
|
219
|
+
```
|
|
220
|
+
|
|
122
221
|
## Ad-hoc Query Mapping
|
|
123
222
|
|
|
124
223
|
Map natural language to endpoints:
|