feat(datastore): add relative --since duration flag and overnight sleep test
This commit is contained in:
@@ -49,6 +49,7 @@ Logs a point or interval event.
|
||||
- For `nutrition.intake`: `{"item": "...", "qty": 200, "unit": "g"|"ml", "protein_g": ..., "kcal": ...}` (or `{"food_id": "oatly-haferdrink", "qty": 200, "unit": "ml"}`).
|
||||
- For `sleep.session`: `{"type": "nap"|"night", "location": "bett"|"auto"|"kinderwagen"}`.
|
||||
- `start` (string, optional): ISO 8601 timestamp (defaults to current time).
|
||||
- `since` (string, optional): Relative start offset backwards from now (e.g. `'5m'`, `'15m'`, `'1h'`). Use for "schläft seit X Min" to avoid LLM mental math!
|
||||
- `end` (string, optional): ISO 8601 timestamp. Leave empty for open sleep intervals!
|
||||
- `meal` (string, optional): e.g. `'Frühstück'`, `'Mittagessen'`, `'Snack'`.
|
||||
- `estimated` (boolean, optional): Set to `true` if portions or nutrients are estimated.
|
||||
@@ -105,6 +106,13 @@ uv run /home/node/mop-skills/mop-skills/skills/datastore/scripts/datastore.py ad
|
||||
--actor agent:hebamme \
|
||||
--payload '{"type": "nap", "location": "kinderwagen"}'
|
||||
|
||||
# Start Mila's nap with relative time offset (e.g. asleep since 15 minutes)
|
||||
uv run /home/node/mop-skills/mop-skills/skills/datastore/scripts/datastore.py add sleep.session \
|
||||
--subject mila \
|
||||
--actor agent:hebamme \
|
||||
--since "15m" \
|
||||
--payload '{"type": "nap", "location": "bett"}'
|
||||
|
||||
# Stop Mila's nap (closes open interval)
|
||||
uv run /home/node/mop-skills/mop-skills/skills/datastore/scripts/datastore.py stop sleep.session \
|
||||
--subject mila
|
||||
|
||||
Reference in New Issue
Block a user