v0.6.0 — rail_route: TRA time-dependent routing
v0.6.0 — rail_route: TRA time-dependent routing (Stage 1 of the routing engine)
New MCP tool rail_route(from, to, depart_after?, system) — TRA time-dependent O/D routing (#7). It routes over the real DailyTrainTimetable (per-train departure/arrival times) with a connection-scan earliest-arrival search, then applies live TrainLiveBoard delays so the chosen itinerary reflects current conditions: a delayed train can lose to a later on-time one. This is Stage 1 of a staged time-dependent, live-aware transit routing engine (MCP-native, Taiwan-deep).
Added
rail_routereturnslegs[](train_no, from/to station, dep/arr times,delay_min,source: live | scheduled) +arrival_time+duration_min. TRA-only (the only mode with both a public timetable and a live delay board); distinct fromrail_find_trains(which lists all trains). Tool count 22 → 23.- Reuses existing
RailODFare/RailStopTime/RailLiveTrainmodels + existing registry endpoints (both arrive v3-wrapped; decoded viaTDXDecode.list). Graceful when the timetable (HTTP 500/empty) or live board is unavailable — empty + note, never a crash; missing live data → all legsscheduled.
Verification
- 143 offline tests green, incl.
TimetableRouterTests(the live-delay-changes-the-chosen-train case) + executor graceful-degradation tests. - Live:
rail_route(臺北 1000 → 臺中 3300, now)→ train 111, 臺北 08:00 → 臺中 09:49, 109 min,source: live.
Roadmap (#7)
Stage 1 (this release) = TRA. Stage 2 = headway modes (metro/bus) as synthesized connections. Stage 3 = unified multi-modal CSA/RAPTOR + full live feed.
Install
Download che-transport-mcp-0.6.0.mcpb for one-click install in Claude Desktop. Developer ID signed + Apple notarized.