@mgsoftwarebv/mg-dashboard-mcp 7.0.22 → 7.1.0
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 +150 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8208,7 +8208,11 @@ function formatBytes(bytes) {
|
|
|
8208
8208
|
}
|
|
8209
8209
|
var RESPONSE_MAX_BYTES = 8192;
|
|
8210
8210
|
var NO_FOOTER_TOOLS = /* @__PURE__ */ new Set();
|
|
8211
|
-
var RAW_JSON_TOOLS = /* @__PURE__ */ new Set([
|
|
8211
|
+
var RAW_JSON_TOOLS = /* @__PURE__ */ new Set([
|
|
8212
|
+
"get_mg_dashboard_commits",
|
|
8213
|
+
"extract_article",
|
|
8214
|
+
"research_topic"
|
|
8215
|
+
]);
|
|
8212
8216
|
var TOOL_CACHE_TTL_MS = {
|
|
8213
8217
|
"list-servers": 6e4,
|
|
8214
8218
|
"docker-list": 3e4
|
|
@@ -10312,7 +10316,7 @@ var TOOLS = [
|
|
|
10312
10316
|
// ----- Team memory -----
|
|
10313
10317
|
{
|
|
10314
10318
|
name: "get_mg_dashboard_commits",
|
|
10315
|
-
description: "Fetch a SAFE, COMPACT MG Dashboard git commit feed for ONE actor over an EXACT time range \u2014 the 'what was actually built' signal for daily operational reports (e.g. Hermes' rolling 19:00\u219219:00 Europe/Amsterdam Prince report), complementing Refront ticket activity. Backed by code_battle_commits (GitHub push webhook + nightly sync). Returns METADATA
|
|
10319
|
+
description: "Fetch a SAFE, COMPACT MG Dashboard git commit feed for ONE actor over an EXACT time range \u2014 the 'what was actually built' signal for daily operational reports (e.g. Hermes' rolling 19:00\u219219:00 Europe/Amsterdam Prince report), complementing Refront ticket activity. Backed by code_battle_commits (GitHub push webhook + nightly sync). Returns METADATA per commit: timestamp, repo (org/repo), sha, isMerge, additions, deletions, filesChanged, commit message, branch (webhook-only), PR number/title/link, ticketNumbers + ticketLinks (high/medium confidence), plus period summary counts. Optional includeChangedPaths returns filenames only (no diffs). Full diffs are never returned. The actor is mapped to ONE github login via, in order: MG_DASHBOARD_COMMIT_AUTHOR_ALIASES override, the MG Dashboard user's linked github_username, then code_battle_participants by login or display name. When it can't be mapped (or is ambiguous) the response carries an explicit `limitations` entry explaining how to fix it instead of guessing. dateFrom/dateTo accept a full ISO-8601 timestamp WITH offset (for the exact 19:00\u219219:00 window) or a bare YYYY-MM-DD date (local-midnight boundaries in `timezone`). The window is half-open [from, to).",
|
|
10316
10320
|
inputSchema: {
|
|
10317
10321
|
type: "object",
|
|
10318
10322
|
properties: {
|
|
@@ -10336,10 +10340,18 @@ var TOOLS = [
|
|
|
10336
10340
|
type: "string",
|
|
10337
10341
|
description: "Optional repo filter; accepts 'repo' or 'org/repo' (org prefix ignored), matched case-insensitively."
|
|
10338
10342
|
},
|
|
10343
|
+
organization: {
|
|
10344
|
+
type: "string",
|
|
10345
|
+
description: "Optional org/owner filter (case-insensitive), e.g. 'MGSoftwareBV' or 'AVARC-Solutions'."
|
|
10346
|
+
},
|
|
10339
10347
|
includeMerges: {
|
|
10340
10348
|
type: "boolean",
|
|
10341
10349
|
description: "Include merge commits in the commits list (default false). Summary counts always report merges separately."
|
|
10342
10350
|
},
|
|
10351
|
+
includeChangedPaths: {
|
|
10352
|
+
type: "boolean",
|
|
10353
|
+
description: "Include changed file paths per commit (default false). Filenames only \u2014 no file contents or diffs."
|
|
10354
|
+
},
|
|
10343
10355
|
pageSize: {
|
|
10344
10356
|
type: "number",
|
|
10345
10357
|
description: "Max commits listed (1-500, default 100). Summary counts are always the true period totals."
|
|
@@ -10348,6 +10360,66 @@ var TOOLS = [
|
|
|
10348
10360
|
required: ["actor", "dateFrom", "dateTo"]
|
|
10349
10361
|
}
|
|
10350
10362
|
},
|
|
10363
|
+
{
|
|
10364
|
+
name: "extract_article",
|
|
10365
|
+
description: "Extract readable article/content data from ONE PUBLIC URL, with a browser-render fallback for pages that block a normal fetch (403) or only render with JavaScript (ticket 2026-DASMG-039). Returns title, author, publishedAt, source, summary, facts[], optional rawText (capped), canonicalUrl, the `extractionMethod` used (http | browser | jsonld | rss | amp | metadata_only) and an explicit `limitations` array (e.g. blocked_without_browser, paywall_detected, partial_content, rawtext_truncated). PUBLIC URLs only \u2014 SSRF-guarded (private/loopback/metadata addresses rejected), no paywall bypass, no credentials; the source/canonical URL is always preserved. Use it to turn a news/article link into safe factual source material for agents; it never auto-publishes or rewrites. For several sources + cross-checking, use research_topic.",
|
|
10366
|
+
inputSchema: {
|
|
10367
|
+
type: "object",
|
|
10368
|
+
properties: {
|
|
10369
|
+
url: {
|
|
10370
|
+
type: "string",
|
|
10371
|
+
description: "Public http(s) URL of the article/page to extract."
|
|
10372
|
+
},
|
|
10373
|
+
includeRawText: {
|
|
10374
|
+
type: "boolean",
|
|
10375
|
+
description: "Include the readable body as `rawText` (default true). Set false for a compact metadata-only result."
|
|
10376
|
+
},
|
|
10377
|
+
maxRawTextChars: {
|
|
10378
|
+
type: "number",
|
|
10379
|
+
description: "Hard cap for `rawText` length (default 20000, max 100000). Truncation adds a `rawtext_truncated` limitation."
|
|
10380
|
+
}
|
|
10381
|
+
},
|
|
10382
|
+
required: ["url"]
|
|
10383
|
+
}
|
|
10384
|
+
},
|
|
10385
|
+
{
|
|
10386
|
+
name: "research_topic",
|
|
10387
|
+
description: "Turn SEVERAL public sources on one topic into a single cross-checked, sourced 'evidence pack' (ticket 2026-DASMG-040). Composes extract_article per URL and aggregates: collect, extract, cross-check, then hand a downstream agent a safe base to write ORIGINAL content from. Modes: curated (`urls` + optional `topic`), hybrid (`urls` + `discover`), discovery (`topic` + `discover.enabled`). Discovery is currently DEFERRED \u2014 when requested it returns a `discovery_unavailable` limitation while curated `urls` still work. Returns `sources` (id,url,canonicalUrl,source,title,publishedAt,authorityTier,extractionMethod,limitations), `verifiedFacts` (claim + corroboratedBy + confidence + authorityTier + asOf), `conflicts` (variants + suggestedResolution), `uniqueClaims` (single-source), `openQuestions`, `verbatimWarnings`, and pack-level `limitations`. Structured EVIDENCE ONLY \u2014 never ready-to-publish prose or brand voice; every claim traces back to a source id. PUBLIC URLs only (inherits the SSRF guard). Persistence/reuse is out of scope (2026-DASMG-041).",
|
|
10388
|
+
inputSchema: {
|
|
10389
|
+
type: "object",
|
|
10390
|
+
properties: {
|
|
10391
|
+
topic: {
|
|
10392
|
+
type: "string",
|
|
10393
|
+
description: "The topic the evidence pack is about (used for context/labelling)."
|
|
10394
|
+
},
|
|
10395
|
+
urls: {
|
|
10396
|
+
type: "array",
|
|
10397
|
+
items: { type: "string" },
|
|
10398
|
+
description: "Curated list of public http(s) URLs to extract and cross-check (max 20)."
|
|
10399
|
+
},
|
|
10400
|
+
discover: {
|
|
10401
|
+
type: "object",
|
|
10402
|
+
description: "Discovery options (currently deferred). enabled=true emits a discovery_unavailable limitation; curated urls still work.",
|
|
10403
|
+
properties: {
|
|
10404
|
+
enabled: { type: "boolean" },
|
|
10405
|
+
maxSources: { type: "number" },
|
|
10406
|
+
recencyDays: { type: "number" },
|
|
10407
|
+
locale: { type: "string" },
|
|
10408
|
+
allowDomains: { type: "array", items: { type: "string" } },
|
|
10409
|
+
blockDomains: { type: "array", items: { type: "string" } }
|
|
10410
|
+
}
|
|
10411
|
+
},
|
|
10412
|
+
includeRawText: {
|
|
10413
|
+
type: "boolean",
|
|
10414
|
+
description: "Reserved for compatibility; claim mining always reads body text up to maxRawTextChars."
|
|
10415
|
+
},
|
|
10416
|
+
maxRawTextChars: {
|
|
10417
|
+
type: "number",
|
|
10418
|
+
description: "Per-source body cap used for claim mining (default 4000, max 20000)."
|
|
10419
|
+
}
|
|
10420
|
+
}
|
|
10421
|
+
}
|
|
10422
|
+
},
|
|
10351
10423
|
{
|
|
10352
10424
|
name: "search-team-memory",
|
|
10353
10425
|
description: "Search the team's ENTIRE past Cursor history (every developer, every project) for how something was handled before. Use this FIRST, before investigating from scratch, whenever you: hit a non-trivial bug or error, are about to build something that may have been done before, need a project-specific convention/gotcha, or the user asks 'have we done X', 'how did we fix Y', or 'did we solve this already'. Hybrid semantic + keyword search over mirrored conversations. Returns ranked past chats with repo, date, a solution snippet and a similarity score. Phrase the query as the problem in natural language (e.g. 'release pipeline PM2 deploy fails with module not found').",
|
|
@@ -10555,7 +10627,9 @@ async function executeToolCall(name, a, _serverId) {
|
|
|
10555
10627
|
dateTo,
|
|
10556
10628
|
timezone: typeof a.timezone === "string" ? a.timezone : void 0,
|
|
10557
10629
|
repository: typeof a.repository === "string" ? a.repository : void 0,
|
|
10630
|
+
organization: typeof a.organization === "string" ? a.organization : void 0,
|
|
10558
10631
|
includeMerges: typeof a.includeMerges === "boolean" ? a.includeMerges : void 0,
|
|
10632
|
+
includeChangedPaths: typeof a.includeChangedPaths === "boolean" ? a.includeChangedPaths : void 0,
|
|
10559
10633
|
pageSize: typeof a.pageSize === "number" ? a.pageSize : void 0
|
|
10560
10634
|
})
|
|
10561
10635
|
});
|
|
@@ -10575,6 +10649,80 @@ async function executeToolCall(name, a, _serverId) {
|
|
|
10575
10649
|
content: [{ type: "text", text: JSON.stringify(data, null, 2) }]
|
|
10576
10650
|
};
|
|
10577
10651
|
}
|
|
10652
|
+
// ----- Public-web extraction (article tools) -----
|
|
10653
|
+
case "extract_article": {
|
|
10654
|
+
const url = typeof a.url === "string" ? a.url.trim() : "";
|
|
10655
|
+
if (!url) {
|
|
10656
|
+
return { content: [{ type: "text", text: "Error: url is required" }] };
|
|
10657
|
+
}
|
|
10658
|
+
const res = await fetch(`${dashboardBaseUrl}/api/tools/extract-article`, {
|
|
10659
|
+
method: "POST",
|
|
10660
|
+
headers: {
|
|
10661
|
+
"content-type": "application/json",
|
|
10662
|
+
authorization: `Bearer ${apiKey}`
|
|
10663
|
+
},
|
|
10664
|
+
body: JSON.stringify({
|
|
10665
|
+
url,
|
|
10666
|
+
includeRawText: typeof a.includeRawText === "boolean" ? a.includeRawText : void 0,
|
|
10667
|
+
maxRawTextChars: typeof a.maxRawTextChars === "number" ? a.maxRawTextChars : void 0
|
|
10668
|
+
})
|
|
10669
|
+
});
|
|
10670
|
+
if (!res.ok) {
|
|
10671
|
+
const detail = await res.text().catch(() => "");
|
|
10672
|
+
return {
|
|
10673
|
+
content: [
|
|
10674
|
+
{
|
|
10675
|
+
type: "text",
|
|
10676
|
+
text: `Error: extract_article failed (${res.status}). ${detail.slice(0, 300)}`
|
|
10677
|
+
}
|
|
10678
|
+
]
|
|
10679
|
+
};
|
|
10680
|
+
}
|
|
10681
|
+
const data = await res.json();
|
|
10682
|
+
return {
|
|
10683
|
+
content: [{ type: "text", text: JSON.stringify(data, null, 2) }]
|
|
10684
|
+
};
|
|
10685
|
+
}
|
|
10686
|
+
case "research_topic": {
|
|
10687
|
+
const urls = Array.isArray(a.urls) ? a.urls.filter((u) => typeof u === "string") : void 0;
|
|
10688
|
+
const topic = typeof a.topic === "string" ? a.topic.trim() : void 0;
|
|
10689
|
+
if ((!urls || urls.length === 0) && !topic) {
|
|
10690
|
+
return {
|
|
10691
|
+
content: [
|
|
10692
|
+
{ type: "text", text: "Error: provide `urls` (curated) and/or a `topic`" }
|
|
10693
|
+
]
|
|
10694
|
+
};
|
|
10695
|
+
}
|
|
10696
|
+
const res = await fetch(`${dashboardBaseUrl}/api/tools/research-topic`, {
|
|
10697
|
+
method: "POST",
|
|
10698
|
+
headers: {
|
|
10699
|
+
"content-type": "application/json",
|
|
10700
|
+
authorization: `Bearer ${apiKey}`
|
|
10701
|
+
},
|
|
10702
|
+
body: JSON.stringify({
|
|
10703
|
+
topic,
|
|
10704
|
+
urls,
|
|
10705
|
+
discover: a.discover && typeof a.discover === "object" ? a.discover : void 0,
|
|
10706
|
+
includeRawText: typeof a.includeRawText === "boolean" ? a.includeRawText : void 0,
|
|
10707
|
+
maxRawTextChars: typeof a.maxRawTextChars === "number" ? a.maxRawTextChars : void 0
|
|
10708
|
+
})
|
|
10709
|
+
});
|
|
10710
|
+
if (!res.ok) {
|
|
10711
|
+
const detail = await res.text().catch(() => "");
|
|
10712
|
+
return {
|
|
10713
|
+
content: [
|
|
10714
|
+
{
|
|
10715
|
+
type: "text",
|
|
10716
|
+
text: `Error: research_topic failed (${res.status}). ${detail.slice(0, 300)}`
|
|
10717
|
+
}
|
|
10718
|
+
]
|
|
10719
|
+
};
|
|
10720
|
+
}
|
|
10721
|
+
const data = await res.json();
|
|
10722
|
+
return {
|
|
10723
|
+
content: [{ type: "text", text: JSON.stringify(data, null, 2) }]
|
|
10724
|
+
};
|
|
10725
|
+
}
|
|
10578
10726
|
// ----- Team memory -----
|
|
10579
10727
|
case "search-team-memory": {
|
|
10580
10728
|
const query = typeof a.query === "string" ? a.query.trim() : "";
|