rouse-context/integrations
monkopedia-coder 8efbf6f750
Unify MCP period parsing on local zone + sliding-from-start-of-today (#500)
* Unify MCP period parsing on local zone + sliding-from-start-of-today (#496)

The usage, notification, and Health Connect MCP providers each parsed the
`period` argument differently. Health Connect was the outlier: it stamped
local-date-midnight as UTC (shifting "today" for non-UTC users) and anchored
week/month windows to `now` rather than the start of today.

Introduce a single shared PeriodParser that maps today|week|month to a
[start, now] range using the local zone and a sliding window anchored to the
start of today. All three providers delegate to it; usage keeps `yesterday`
as a local-only extra. Health Connect's ranges change accordingly (UTC ->
local, now-anchored -> start-of-today-anchored) — intended.

Document the unified semantics (zone + anchoring) in the MCP tool `period`
param descriptions so calling agents can reason about the window.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* Fix DST regression in Usage 'yesterday' period (LocalDate arithmetic) — #500 review

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* Make PeriodParser week/month DST-aware (LocalDate arithmetic) — #500

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: Jason Monk <monkopedia@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18 17:59:52 -04:00
..
src Unify MCP period parsing on local zone + sliding-from-start-of-today (#500) 2026-06-18 17:59:52 -04:00
build.gradle.kts Fix #417: Migrate manual JSON in MCP providers to @Serializable data classes (#418) 2026-04-26 12:10:10 -04:00