feat: scriptable script + /ingest endpoint + smoothie recipe

- POST /ingest endpoint for Apple Health vitals (src/ingest.rs)
- GET /scriptable/health-sync.js for phone download
- recipes/daily-smoothie.json — Atrdeus's daily smoothie with barcodes
- Scriptable script reads HealthKit and POSTs to /ingest

Closes nutrition-mcp-aav
This commit is contained in:
Anthony Merlo 2026-08-21 09:30:20 +01:00
parent 51b864438b
commit e8bdea78bb
2 changed files with 21 additions and 0 deletions

View file

@ -12,3 +12,4 @@
{"id":"int-3c1839f2748ae8a9fb303881ba9c3dda","kind":"field_change","created_at":"2026-08-20T15:56:03.881585777Z","actor":"Anthony Merlo","issue_id":"nutrition-mcp-foe","extra":{"field":"status","new_value":"closed","old_value":"in_progress","reason":"Deployed: systemd user service created at ~/.config/systemd/user/nutrition-mcp.service, enabled with linger. Server running on 0.0.0.0:9432. Health check passes. Registered with Hermes via mcp_servers config. API key: 333f09ce904e9cbbe3b578fda393be92869122c7222dbccd"}}
{"id":"int-b0e97dffd303b9e4f164830ebcbe2085","kind":"field_change","created_at":"2026-08-20T15:56:04.581867751Z","actor":"Anthony Merlo","issue_id":"nutrition-mcp-aea","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"Hermes skill created at ~/.hermes/skills/productivity/nutrition-tracker/SKILL.md with workflow guidance, meal auto-detection, portion handling, protein estimation guide, and gout/hypertension health context."}}
{"id":"int-c69e98d9ab404dbe46f1b088e3453677","kind":"field_change","created_at":"2026-08-20T16:25:47.847889101Z","actor":"Anthony Merlo","issue_id":"nutrition-mcp-45t","extra":{"field":"status","new_value":"closed","old_value":"in_progress","reason":"25 integration tests added, all passing. Covers: DB init, goals seeding, FTS5 cache search, upsert, portion scaling, sum_nutriments (with no-data handling), meal detection, date format, log entry round trips, goals update, weight log + upsert. Also fixed sum_nutriments display key bug (was using OFF field names instead of display names) and weight_log UNIQUE constraint."}}
{"id":"int-80ae42f606a6a22aef6d8883d3462f72","kind":"field_change","created_at":"2026-08-20T21:57:03.081085913Z","actor":"Anthony Merlo","issue_id":"nutrition-mcp-aav","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"POST /ingest endpoint implemented in src/ingest.rs. Accepts array of health samples (weight, BP, HR, steps, sleep, SpO2). Auth via Bearer token. Tested: 4 samples ingested (weight, BP, steps, HR), 401 on missing auth. 31 tests passing. Server restarted and live. Dependency on 3nl was for vitals tables — ingest uses a generic vitals table with JSON value column, no need to wait for individual table tooling."}}

View file

@ -0,0 +1,20 @@
{
"name": "Daily Smoothie",
"description": "Atrdeus's daily breakfast smoothie. Ingredients vary based on availability.",
"default_recipe": [
{"name": "spinach", "grams": 53, "barcode": "5053526969790", "notes": "Tesco leaf spinach"},
{"name": "oats", "grams": 54, "barcode": "5063334029845", "notes": "Scottish whole rolled jumbo oats"},
{"name": "oat milk", "grams": 341, "barcode": "7394376665035", "notes": "Oat milk"},
{"name": "banana", "grams": 216, "barcode": "5010251953760", "notes": "Morrisons bananas"},
{"name": "frozen strawberries and blueberries", "grams": 171, "barcode": "00263252", "notes": "Frozen mix"},
{"name": "frozen pineapple", "grams": 92, "barcode": "00263184", "notes": "Frozen"},
{"name": "frozen dark sweet cherries", "grams": 92, "barcode": "5063334035211", "notes": "Frozen"}
],
"total_weight_g": 1019,
"notes": "Recipe changes sometimes due to ingredient availability. When logging, search for each ingredient or use barcodes. Barcodes are from OFF product codes.",
"health_flags": {
"fructose": "High — banana + berries + pineapple + cherries contribute significant fructose",
"potassium": "Should be high (spinach, banana, oats) but OFF data may be sparse",
"protein": "Low — consider adding protein powder or Greek yogurt"
}
}