nutrition-mcp/scripts
Anthony Merlo 191f5f473b fix: rewrite health-sync.js for current Scripting API
Old script used deprecated Health.read() with Health.Types.* and .quantity
— every read silently failed in try/catch, so no samples were ever collected.

Rewrote to use Health.queryQuantitySamples() with string type identifiers
and .quantityValue(unit) per current Scripting app docs. Added proper units
(kg, mmHg, count/min, count, percent) for each metric type.

Also adds /scriptable/health-sync.js endpoint to serve the script directly.
2026-08-20 23:54:08 +01:00
..
health-sync.js fix: rewrite health-sync.js for current Scripting API 2026-08-20 23:54:08 +01:00