cito-mcp 0.3.4 → 0.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/tools/live.js +23 -6
- package/package.json +1 -1
package/dist/tools/live.js
CHANGED
|
@@ -514,12 +514,7 @@ Example: { "game": "lol", "hours": 72, "team": "t1", "limit": 20 }`,
|
|
|
514
514
|
noteIgnored('tournamentId', 'tennis fixtures have no tournamentId filter');
|
|
515
515
|
if (team)
|
|
516
516
|
noteIgnored('team', 'tennis fixtures have no team filter; match player names client-side');
|
|
517
|
-
|
|
518
|
-
noteIgnored('hours', 'tennis fixtures cover ~3 days; filter by startTime client-side');
|
|
519
|
-
if (from)
|
|
520
|
-
noteIgnored('from', 'tennis fixtures cover ~3 days; filter by startTime client-side');
|
|
521
|
-
if (to)
|
|
522
|
-
noteIgnored('to', 'tennis fixtures cover ~3 days; filter by startTime client-side');
|
|
517
|
+
// hours / from / to applied client-side after fetch (below) — not warned as ignored.
|
|
523
518
|
}
|
|
524
519
|
const res = await fetchJson(ctx, path, { query });
|
|
525
520
|
if (!res.ok) {
|
|
@@ -600,6 +595,28 @@ Example: { "game": "lol", "hours": 72, "team": "t1", "limit": 20 }`,
|
|
|
600
595
|
}
|
|
601
596
|
}
|
|
602
597
|
}
|
|
598
|
+
// Tennis: client-side hours / from / to window (fixtures list has no time params)
|
|
599
|
+
if (game === 'tennis' && (args.hours !== undefined || from || to)) {
|
|
600
|
+
const now = Date.now();
|
|
601
|
+
const fromMs = from ? Date.parse(from) : now;
|
|
602
|
+
const toMs = to ? Date.parse(to) : now + hours * 3600_000;
|
|
603
|
+
if (Number.isFinite(fromMs) && Number.isFinite(toMs)) {
|
|
604
|
+
const before = rows.length;
|
|
605
|
+
rows = rows.filter((row) => {
|
|
606
|
+
const r = asRecord(row) ?? {};
|
|
607
|
+
const ts = pickString(r.startTime, r.start_time, r.startsAt);
|
|
608
|
+
if (!ts)
|
|
609
|
+
return true; // keep undated rows rather than drop them
|
|
610
|
+
const t = Date.parse(ts);
|
|
611
|
+
if (!Number.isFinite(t))
|
|
612
|
+
return true;
|
|
613
|
+
return t >= fromMs && t <= toMs;
|
|
614
|
+
});
|
|
615
|
+
if (before > 0 && rows.length === 0) {
|
|
616
|
+
warnings.push(`hours/from/to window matched 0 of ${before} tennis fixtures — widen hours or omit time filters`);
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
}
|
|
603
620
|
// Client-side team filter when API ignored it
|
|
604
621
|
if (team && (game === 'dota2' || game === 'cs2')) {
|
|
605
622
|
const t = team.toLowerCase();
|
package/package.json
CHANGED