@claudinho/mcp 0.8.3 → 0.8.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/index.js +24 -5
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -454,6 +454,7 @@ function formatKickoff(iso, opts = {}) {
|
|
|
454
454
|
const locale = safeLocale(opts.locale);
|
|
455
455
|
return new Intl.DateTimeFormat(locale, {
|
|
456
456
|
weekday: "short",
|
|
457
|
+
...opts.date ? { month: "short", day: "numeric" } : {},
|
|
457
458
|
hour: "2-digit",
|
|
458
459
|
minute: "2-digit",
|
|
459
460
|
hour12: false,
|
|
@@ -3046,6 +3047,18 @@ function hasGroupStarted(group, tables) {
|
|
|
3046
3047
|
if (!table?.rows.length) return false;
|
|
3047
3048
|
return table.rows.some((r) => r.played > 0);
|
|
3048
3049
|
}
|
|
3050
|
+
function matchesPerTeamInGroup(teamCount) {
|
|
3051
|
+
return Math.max(0, teamCount - 1);
|
|
3052
|
+
}
|
|
3053
|
+
function isGroupStandingsComplete(table) {
|
|
3054
|
+
const n = table?.rows.length ?? 0;
|
|
3055
|
+
if (n < 2) return false;
|
|
3056
|
+
const required = matchesPerTeamInGroup(n);
|
|
3057
|
+
return table.rows.every((r) => r.played >= required);
|
|
3058
|
+
}
|
|
3059
|
+
function isGroupComplete(group, tables) {
|
|
3060
|
+
return isGroupStandingsComplete(tables.find((t2) => t2.group === group));
|
|
3061
|
+
}
|
|
3049
3062
|
function resolveWinner(match) {
|
|
3050
3063
|
if (!isFinished(match.status)) return void 0;
|
|
3051
3064
|
if (match.winnerCode) {
|
|
@@ -3094,7 +3107,10 @@ function resolveSlot(ref, ctx) {
|
|
|
3094
3107
|
case "group": {
|
|
3095
3108
|
if (!ctx.standingsDegraded && hasGroupStarted(ref.group, ctx.tables)) {
|
|
3096
3109
|
const team = teamFromStandings(ref.group, ref.position, ctx.tables);
|
|
3097
|
-
if (team)
|
|
3110
|
+
if (team) {
|
|
3111
|
+
const status = isGroupComplete(ref.group, ctx.tables) ? "confirmed" : "projected";
|
|
3112
|
+
return participant(team, status);
|
|
3113
|
+
}
|
|
3098
3114
|
}
|
|
3099
3115
|
const label = ref.position === 1 ? t(ctx.lang, "bracket.slot.groupWinner", { group: ref.group }) : t(ctx.lang, "bracket.slot.groupSecond", { group: ref.group });
|
|
3100
3116
|
return tbd(label);
|
|
@@ -4404,6 +4420,9 @@ function statusTail2(m) {
|
|
|
4404
4420
|
if (isLive(m.status)) return " LIVE";
|
|
4405
4421
|
return "";
|
|
4406
4422
|
}
|
|
4423
|
+
function formatBracketKickoff(iso, opts) {
|
|
4424
|
+
return formatKickoff(iso, { tz: opts.tz, locale: opts.locale, date: true });
|
|
4425
|
+
}
|
|
4407
4426
|
function formatBracketMatchLine(mv, opts = {}) {
|
|
4408
4427
|
const flags = opts.flags !== false;
|
|
4409
4428
|
const home = formatParticipant(mv.home, "home", flags, opts.locale);
|
|
@@ -4412,7 +4431,7 @@ function formatBracketMatchLine(mv, opts = {}) {
|
|
|
4412
4431
|
if (isFinished(m.status) || isLive(m.status)) {
|
|
4413
4432
|
return ` ${home} ${scoreline(m)} ${away}${statusTail2(m)}`;
|
|
4414
4433
|
}
|
|
4415
|
-
const kickoff = mv.kickoff ?
|
|
4434
|
+
const kickoff = mv.kickoff ? formatBracketKickoff(mv.kickoff, opts) : "";
|
|
4416
4435
|
return ` ${home} vs ${away}${kickoff ? ` \xB7 ${kickoff}` : ""}`;
|
|
4417
4436
|
}
|
|
4418
4437
|
function formatBracketList(view, opts = {}) {
|
|
@@ -4480,7 +4499,7 @@ function formatBracketCompactLine(mv, opts = {}) {
|
|
|
4480
4499
|
const away = formatParticipant(mv.away, "away", flags, opts.locale);
|
|
4481
4500
|
const m = mv.match;
|
|
4482
4501
|
const mid2 = isFinished(m.status) || isLive(m.status) ? scoreline(m) : "vs";
|
|
4483
|
-
const tail = m.status === "SCHEDULED" && mv.kickoff ? ` \xB7 ${
|
|
4502
|
+
const tail = m.status === "SCHEDULED" && mv.kickoff ? ` \xB7 ${formatBracketKickoff(mv.kickoff, opts)}` : statusTail2(m);
|
|
4484
4503
|
return `${stageLabelI18n(opts.locale, mv.stage)} \xB7 ${home} ${mid2} ${away}${tail}`;
|
|
4485
4504
|
}
|
|
4486
4505
|
|
|
@@ -4729,7 +4748,7 @@ async function toolGetBracket(args) {
|
|
|
4729
4748
|
resolveAdapter(args),
|
|
4730
4749
|
filter ? { stage: filter, lang: args.lang } : { lang: args.lang }
|
|
4731
4750
|
);
|
|
4732
|
-
let text = formatBracketList(view, { footer: false, locale: args.lang });
|
|
4751
|
+
let text = formatBracketList(view, { footer: false, locale: args.lang, tz: args.tz });
|
|
4733
4752
|
if (degraded) {
|
|
4734
4753
|
text += `
|
|
4735
4754
|
|
|
@@ -5027,7 +5046,7 @@ async function toolGetShareSnippet(args) {
|
|
|
5027
5046
|
|
|
5028
5047
|
// src/server.ts
|
|
5029
5048
|
var SERVER_NAME = "claudinho";
|
|
5030
|
-
var SERVER_VERSION = "0.8.
|
|
5049
|
+
var SERVER_VERSION = "0.8.5";
|
|
5031
5050
|
var VOICE = asFlavorLevel(process.env.CLAUDINHO_FLAVOR) === "off" ? "" : `
|
|
5032
5051
|
Voice: when relaying scores, narrate with lively, regionally-appropriate football-commentary energy in the user's language. Each match line may end with a short exclamation ("\u2014 \xA1GOOOOL!") \u2014 use it as a tone cue. Keep every fact exact; never invent details and never impersonate or name a real commentator.`;
|
|
5033
5052
|
var INSTRUCTIONS = `Claudinho serves live scores, fixtures, and group standings for the 2026 men's football tournament.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@claudinho/mcp",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.5",
|
|
4
4
|
"mcpName": "io.github.arturogarrido/claudinho",
|
|
5
5
|
"description": "MCP server for the 2026 men's football tournament — live scores, fixtures, standings, read-only prediction-market signals, and paste-ready match cards. Works with Claude Code, Cursor, Codex, Windsurf, Zed. Not affiliated with FIFA or Anthropic.",
|
|
6
6
|
"type": "module",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"tsup": "^8.0.0",
|
|
58
58
|
"typescript": "^5.7.0",
|
|
59
59
|
"vitest": "^4.1.9",
|
|
60
|
-
"@claudinho/core": "0.8.
|
|
60
|
+
"@claudinho/core": "0.8.5"
|
|
61
61
|
},
|
|
62
62
|
"scripts": {
|
|
63
63
|
"build": "tsup",
|