Releases: shkyyy18/mi_fitness_data_bridge
Release list
v0.3.1
Added
--dboption andMI_FITNESS_DB_PATHenvironment variable to override the SQLite database location forsync,export,serve, anddoctor; precedence is CLI option > environment variable > default platform location. This enables test and multi-database isolation, which the platformdirs default cannot provide (it ignoresLOCALAPPDATAon Windows).- "How to get user_id and passToken" guidance in the README configuration sections (browser-cookie method and QR-login tooling), referenced from
doctoroutput when no configuration file is found. - Git Bash virtualenv activation command in the installation instructions.
- Export-sensitivity note in
docs/export-format.mdand the README privacy sections: exports contain no passToken but do carry plaintextuser_ididentifier columns and must be handled as sensitive personal data. - Warn after successful CLI exports when selected datasets contain zero rows; exported JSON/CSV bytes are unchanged (#7, thanks @pollychen-lab).
Changed
load_config()no longer writes a defaultconfig.jsonon first run; configuration is persisted only by the explicitsetupcommand.- README test-suite counts updated to the current 46 tests.
v0.3.0 — agent-safe-series/v1 workout_series contract
Added
- Agent-safe
workout_seriesMCP tool: auto-downsamples workout time series under a hardmax_pointscap (default 400, max 500) using fixed time-bucket means aggregated in SQLite, reports honestdownsampled/source_points/returned_points/methodmetadata, and always includes full-resolution stats (avg/min/max/quantiles) and heart-rate time-in-zone. data_qualityfield (coverage days, missing metrics, last sync time) onquery_workoutsandget_daily_summaryresponses.- Synthetic 3-hour ride fixture (10,800 1 Hz heart-rate points with known ground-truth stats) and regression tests for the downsampling pipeline.
workout_seriescontractagent-safe-series/v1: top-levelstart_time,t_unit(seconds_from_start),unit,contract_version, andrequested_resolution_seconds(alongside the effectiveresolution_seconds);stats.percentile_method(linear_interpolation);time_in_zone.reference_source(activity_recorded_max/observed_max/caller_provided);data_quality.actual_samples,data_quality.sample_interval_seconds, anddata_quality.coverage_anchor.- Optional
reference_max_hrinput onworkout_seriesso agents can normalize time-in-zone against a consistent reference when comparing activities. - Duration-anchored coverage in
workout_series:expected_samplesis computed from the activity's nominal duration (workoutduration_minutes, else the recorded start/end), so samples missing at the start or end of an activity surface ascoverage_ratio < 1.0instead of looking like a shorter, fully-sampled workout; falls back to the first-to-last sample span (coverage_anchor: "sample_span") when no nominal duration is recorded. - Garmin-layout counterpart of the synthetic 3-hour ride fixture (
tests/garmin_fixtures.py,metricDescriptors/activityDetailMetricsshape) plus cross-format regression tests proving both layouts yield identical stats and downsampled points, including a sensor-gap scenario (garmin-mcp issue #19).
Changed
-
Breaking:
workout_seriespoints[].tis now a numeric offset in seconds fromstart_timeinstead of an ISO timestamp string. -
Hide passToken entry in the interactive setup flow.
-
Close the experimental cloud adapter reliably after CLI diagnostics and synchronization.
-
Use
cnconsistently as the default cloud region. -
Reject malformed or reversed export date ranges before reading the local database.
-
Apply configured HTTP limits, retries, pagination, sync chunking, and operation timeouts to CLI diagnostics and synchronization.
-
Reject invalid synchronization lookback and chunk sizes instead of risking non-terminating chunk loops.
-
Report partial and failed CLI synchronization results accurately instead of displaying them as successful.
-
Return a non-zero process status when diagnostics are not ready or any synchronization is partial/failed.