@claudinho/mcp 0.8.0 → 0.8.1
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 +32 -9
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -4389,11 +4389,14 @@ function formatShareTable(input, options = {}) {
|
|
|
4389
4389
|
);
|
|
4390
4390
|
return blocks.join("\n\n");
|
|
4391
4391
|
}
|
|
4392
|
-
function formatParticipant(p, flags, locale) {
|
|
4392
|
+
function formatParticipant(p, side, flags, locale) {
|
|
4393
4393
|
const suffix = p.status === "projected" ? ` ${t(locale, "bracket.projected")}` : "";
|
|
4394
|
-
if (flags
|
|
4395
|
-
|
|
4396
|
-
|
|
4394
|
+
if (!flags || p.flag === "\u{1F3F3}\uFE0F") {
|
|
4395
|
+
if (p.code && p.code !== "TBD") return `${p.code}${suffix}`;
|
|
4396
|
+
return `${p.label}${suffix}`;
|
|
4397
|
+
}
|
|
4398
|
+
if (side === "home") return `${p.flag} ${p.label}${suffix}`;
|
|
4399
|
+
return `${p.label}${suffix} ${p.flag}`;
|
|
4397
4400
|
}
|
|
4398
4401
|
function statusTail2(m) {
|
|
4399
4402
|
if (m.status === "LIVE" && m.minute) return ` ${m.minute}'`;
|
|
@@ -4404,8 +4407,8 @@ function statusTail2(m) {
|
|
|
4404
4407
|
}
|
|
4405
4408
|
function formatBracketMatchLine(mv, opts = {}) {
|
|
4406
4409
|
const flags = opts.flags !== false;
|
|
4407
|
-
const home = formatParticipant(mv.home, flags, opts.locale);
|
|
4408
|
-
const away = formatParticipant(mv.away, flags, opts.locale);
|
|
4410
|
+
const home = formatParticipant(mv.home, "home", flags, opts.locale);
|
|
4411
|
+
const away = formatParticipant(mv.away, "away", flags, opts.locale);
|
|
4409
4412
|
const m = mv.match;
|
|
4410
4413
|
if (isFinished(m.status) || isLive(m.status)) {
|
|
4411
4414
|
return ` ${home} ${scoreline(m)} ${away}${statusTail2(m)}`;
|
|
@@ -4441,8 +4444,19 @@ function formatShareBracket(input, options = {}) {
|
|
|
4441
4444
|
const blocks = [t(locale, "bracket.shareTitle"), ""];
|
|
4442
4445
|
if (input.view.stages.length === 0) {
|
|
4443
4446
|
blocks.push(input.emptyNote ?? t(locale, "bracket.empty"));
|
|
4447
|
+
} else if ((options.style ?? "social") === "compact") {
|
|
4448
|
+
const fmtOpts2 = { locale, tz: options.tz };
|
|
4449
|
+
const lines = input.view.stages.flatMap(
|
|
4450
|
+
(stage) => stage.matches.map((mv) => formatBracketCompactLine(mv, fmtOpts2))
|
|
4451
|
+
);
|
|
4452
|
+
blocks.push(lines.join("\n"));
|
|
4453
|
+
if (input.view.degraded) {
|
|
4454
|
+
blocks.push(`(${t(locale, "bracket.degraded")})`);
|
|
4455
|
+
} else if (input.view.standingsDegraded) {
|
|
4456
|
+
blocks.push(`(${t(locale, "bracket.standingsDegraded")})`);
|
|
4457
|
+
}
|
|
4444
4458
|
} else {
|
|
4445
|
-
blocks.push(formatBracketList(input.view, { footer: false, locale }));
|
|
4459
|
+
blocks.push(formatBracketList(input.view, { footer: false, locale, tz: options.tz }));
|
|
4446
4460
|
if (input.view.degraded) {
|
|
4447
4461
|
blocks.push(`(${t(locale, "bracket.degraded")})`);
|
|
4448
4462
|
} else if (input.view.standingsDegraded) {
|
|
@@ -4461,6 +4475,15 @@ function formatShareBracket(input, options = {}) {
|
|
|
4461
4475
|
blocks.push("", footer.join("\n"));
|
|
4462
4476
|
return blocks.join("\n");
|
|
4463
4477
|
}
|
|
4478
|
+
function formatBracketCompactLine(mv, opts = {}) {
|
|
4479
|
+
const flags = opts.flags !== false;
|
|
4480
|
+
const home = formatParticipant(mv.home, "home", flags, opts.locale);
|
|
4481
|
+
const away = formatParticipant(mv.away, "away", flags, opts.locale);
|
|
4482
|
+
const m = mv.match;
|
|
4483
|
+
const mid2 = isFinished(m.status) || isLive(m.status) ? scoreline(m) : "vs";
|
|
4484
|
+
const tail = m.status === "SCHEDULED" && mv.kickoff ? ` \xB7 ${formatKickoff(mv.kickoff, { tz: opts.tz, locale: opts.locale })}` : statusTail2(m);
|
|
4485
|
+
return `${stageLabelI18n(opts.locale, mv.stage)} \xB7 ${home} ${mid2} ${away}${tail}`;
|
|
4486
|
+
}
|
|
4464
4487
|
|
|
4465
4488
|
// src/format.ts
|
|
4466
4489
|
var STATUS_LABEL = {
|
|
@@ -4922,7 +4945,7 @@ async function toolGetShareSnippet(args) {
|
|
|
4922
4945
|
installLine: stageFilter ? `npx @claudinho/cli bracket ${stageFilter}` : "npx @claudinho/cli bracket",
|
|
4923
4946
|
emptyNote: t(args.lang, "bracket.empty")
|
|
4924
4947
|
},
|
|
4925
|
-
{ ...options, locale: args.lang }
|
|
4948
|
+
{ ...options, locale: args.lang, tz: args.tz }
|
|
4926
4949
|
);
|
|
4927
4950
|
return {
|
|
4928
4951
|
text: snippet,
|
|
@@ -5005,7 +5028,7 @@ async function toolGetShareSnippet(args) {
|
|
|
5005
5028
|
|
|
5006
5029
|
// src/server.ts
|
|
5007
5030
|
var SERVER_NAME = "claudinho";
|
|
5008
|
-
var SERVER_VERSION = "0.8.
|
|
5031
|
+
var SERVER_VERSION = "0.8.1";
|
|
5009
5032
|
var VOICE = asFlavorLevel(process.env.CLAUDINHO_FLAVOR) === "off" ? "" : `
|
|
5010
5033
|
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.`;
|
|
5011
5034
|
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.1",
|
|
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.1"
|
|
61
61
|
},
|
|
62
62
|
"scripts": {
|
|
63
63
|
"build": "tsup",
|