@mgsoftwarebv/mg-dashboard-mcp 7.0.11 → 7.0.13
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 +44 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -10180,7 +10180,7 @@ var TOOLS = [
|
|
|
10180
10180
|
},
|
|
10181
10181
|
{
|
|
10182
10182
|
name: "get-team-memory",
|
|
10183
|
-
description: "Fetch the
|
|
10183
|
+
description: "Fetch the distilled problem\u2192solution for past conversation(s) found via search-team-memory (pass the `id` from its results). By default returns SOLUTION-MODE: the full problem\u2192solution summary plus the concrete files touched, commands run, error-codes and tech \u2014 the reusable fix without the noise. This is usually enough to reuse the approach. Only set `full: true` if you need the verbatim transcript (much larger). Call this on the 1-2 most relevant hits before re-solving from scratch.",
|
|
10184
10184
|
inputSchema: {
|
|
10185
10185
|
type: "object",
|
|
10186
10186
|
properties: {
|
|
@@ -10192,6 +10192,10 @@ var TOOLS = [
|
|
|
10192
10192
|
type: "array",
|
|
10193
10193
|
items: { type: "string" },
|
|
10194
10194
|
description: "Optional: up to 5 memory ids to fetch in one call."
|
|
10195
|
+
},
|
|
10196
|
+
full: {
|
|
10197
|
+
type: "boolean",
|
|
10198
|
+
description: "Include the raw distilled transcript (up to ~24KB/chat). Default false \u2014 the summary + artifacts are usually enough and far cheaper."
|
|
10195
10199
|
}
|
|
10196
10200
|
}
|
|
10197
10201
|
}
|
|
@@ -10312,7 +10316,13 @@ async function executeToolCall(name, a, _serverId) {
|
|
|
10312
10316
|
const when = hit.lastMessageAt ? new Date(hit.lastMessageAt).toISOString().slice(0, 10) : "unknown date";
|
|
10313
10317
|
const repo = hit.repo ?? "unknown repo";
|
|
10314
10318
|
const sim = hit.similarity !== null ? ` \xB7 ${(hit.similarity * 100).toFixed(0)}% match` : "";
|
|
10315
|
-
|
|
10319
|
+
const facets = [
|
|
10320
|
+
hit.category,
|
|
10321
|
+
hit.resolved === false ? "unresolved" : null,
|
|
10322
|
+
...Array.isArray(hit.tech) ? hit.tech.slice(0, 4) : []
|
|
10323
|
+
].filter(Boolean);
|
|
10324
|
+
const tags = facets.length > 0 ? ` \xB7 ${facets.join(", ")}` : "";
|
|
10325
|
+
return `${index5 + 1}. [${repo} \xB7 ${when}${sim}${tags}] ${hit.title}
|
|
10316
10326
|
id: ${hit.id}
|
|
10317
10327
|
${(hit.summary ?? hit.snippet).replace(/\s+/g, " ").slice(0, 500)}`;
|
|
10318
10328
|
});
|
|
@@ -10344,13 +10354,14 @@ These are SNIPPETS. For any hit worth reusing, call get-team-memory with its id
|
|
|
10344
10354
|
]
|
|
10345
10355
|
};
|
|
10346
10356
|
}
|
|
10357
|
+
const full = a.full === true;
|
|
10347
10358
|
const res = await fetch(`${dashboardBaseUrl}/api/team-memory/detail`, {
|
|
10348
10359
|
method: "POST",
|
|
10349
10360
|
headers: {
|
|
10350
10361
|
"content-type": "application/json",
|
|
10351
10362
|
authorization: `Bearer ${apiKey}`
|
|
10352
10363
|
},
|
|
10353
|
-
body: JSON.stringify({ ids: ids.slice(0, 5) })
|
|
10364
|
+
body: JSON.stringify({ ids: ids.slice(0, 5), full })
|
|
10354
10365
|
});
|
|
10355
10366
|
if (!res.ok) {
|
|
10356
10367
|
const detail = await res.text().catch(() => "");
|
|
@@ -10377,14 +10388,39 @@ These are SNIPPETS. For any hit worth reusing, call get-team-memory with its id
|
|
|
10377
10388
|
const blocks = data.results.map((r) => {
|
|
10378
10389
|
const when = r.lastMessageAt ? new Date(r.lastMessageAt).toISOString().slice(0, 10) : "unknown date";
|
|
10379
10390
|
const repo = r.repo ?? "unknown repo";
|
|
10380
|
-
|
|
10381
|
-
|
|
10382
|
-
|
|
10383
|
-
|
|
10391
|
+
const facets = [
|
|
10392
|
+
r.category,
|
|
10393
|
+
r.resolved === false ? "unresolved" : null,
|
|
10394
|
+
...Array.isArray(r.tech) ? r.tech.slice(0, 5) : []
|
|
10395
|
+
].filter(Boolean);
|
|
10396
|
+
const parts = [
|
|
10397
|
+
`## ${r.title}`,
|
|
10398
|
+
`[${repo} \xB7 ${when} \xB7 ${r.messageCount} msgs \xB7 ${r.source}]` + (facets.length ? `
|
|
10399
|
+
${facets.join(", ")}` : ""),
|
|
10400
|
+
"",
|
|
10401
|
+
r.summary?.trim() || "(no summary stored)"
|
|
10402
|
+
];
|
|
10403
|
+
const files = r.artifacts?.files ?? [];
|
|
10404
|
+
const commands = r.artifacts?.commands ?? [];
|
|
10405
|
+
const symbols = Array.isArray(r.symbols) ? r.symbols : [];
|
|
10406
|
+
if (files.length)
|
|
10407
|
+
parts.push("", `Files: ${files.join(", ")}`);
|
|
10408
|
+
if (commands.length)
|
|
10409
|
+
parts.push(
|
|
10410
|
+
"",
|
|
10411
|
+
"Commands:",
|
|
10412
|
+
...commands.map((c) => ` $ ${c}`)
|
|
10413
|
+
);
|
|
10414
|
+
if (symbols.length)
|
|
10415
|
+
parts.push("", `Symbols: ${symbols.slice(0, 12).join(", ")}`);
|
|
10416
|
+
if (full && r.content?.trim())
|
|
10417
|
+
parts.push("", "--- full transcript ---", r.content);
|
|
10418
|
+
return parts.join("\n");
|
|
10384
10419
|
});
|
|
10420
|
+
const hint = full ? "" : "\n\n(solution-mode: summary + artifacts. Re-call with full:true on an id for the verbatim transcript.)";
|
|
10385
10421
|
return {
|
|
10386
10422
|
content: [
|
|
10387
|
-
{ type: "text", text: blocks.join("\n\n---\n\n") }
|
|
10423
|
+
{ type: "text", text: blocks.join("\n\n---\n\n") + hint }
|
|
10388
10424
|
]
|
|
10389
10425
|
};
|
|
10390
10426
|
}
|