@mgsoftwarebv/mg-dashboard-mcp 7.0.23 → 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 +139 -1
- 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
|
|
@@ -10356,6 +10360,66 @@ var TOOLS = [
|
|
|
10356
10360
|
required: ["actor", "dateFrom", "dateTo"]
|
|
10357
10361
|
}
|
|
10358
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
|
+
},
|
|
10359
10423
|
{
|
|
10360
10424
|
name: "search-team-memory",
|
|
10361
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').",
|
|
@@ -10585,6 +10649,80 @@ async function executeToolCall(name, a, _serverId) {
|
|
|
10585
10649
|
content: [{ type: "text", text: JSON.stringify(data, null, 2) }]
|
|
10586
10650
|
};
|
|
10587
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
|
+
}
|
|
10588
10726
|
// ----- Team memory -----
|
|
10589
10727
|
case "search-team-memory": {
|
|
10590
10728
|
const query = typeof a.query === "string" ? a.query.trim() : "";
|