Calendar / date-intent helpers shared by chart-review v2 and @repo/ai-agents.
Includes pure logic, the LLM schema bridge, and framework-agnostic classify/ground helpers.
Pipeline-local code is limited to LLM invocation adapters (extractDateIntentWithLLM in legacy,
ExtractDateIntentPrompt in ai-agents).
Narrow the flat LLM output into a real DateIntent, validating through the
discriminated union. An incoherent combination (e.g. rolling_days without n) degrades
to unresolvable instead of throwing — the resolution stage treats that as "no window".
Calendar / date-intent helpers shared by chart-review v2 and
@repo/ai-agents. Includes pure logic, the LLM schema bridge, and framework-agnostic classify/ground helpers. Pipeline-local code is limited to LLM invocation adapters (extractDateIntentWithLLMin legacy,ExtractDateIntentPromptin ai-agents).