fix: carry weather and fire freshness into tool answers

get_weather dropped the proxy's stale status and get_active_fires dropped
FIRMS staleness and failed satellite sources, so answers and the HUD caption
read them as current. Both now report them, and the caption context marks
such sections stale or degraded.
This commit is contained in:
Sameh Khamis committed 2026-10-02 15:21:36 -07:00
1 parent dd8ba562d2
commit 56f0d2e203
4 files changed
+80 -6

No files matched your search

+11 -2
View File
@@ -104,9 +104,18 @@ export const getWeather = defineTool({
signal,
});
const row = weatherRow(payload?.weather);
// The proxy answers from its cache, marked stale, when a refresh fails.
const stale = payload?.status === 'stale';
return {
summary: `Weather at ${point.label}: ${describeWeather(row)}.`,
data: { location: point, weather: row },
summary:
`Weather at ${point.label}: ${describeWeather(row)}` +
(stale ? ' (data may be stale).' : '.'),
data: {
location: point,
weather: row,
stale,
retrieved_at: payload?.retrievedAt ?? null,
},
};
},
});