@taiga-ai/mcp-server 0.39.0-dev.1225 → 0.39.0-dev.1227

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.
Files changed (2) hide show
  1. package/dist/index.js +15 -11
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -38258,26 +38258,28 @@ const GROUP_WHERE = 5;
38258
38258
  /** What makes two findings one rule's: its rule id for code, infrastructure and secrets, its license verdict for a license. */
38259
38259
  /** The scanner's title cap (deps.py _COLUMN_CAP): a title cut there ends in "...". */
38260
38260
  const TITLE_CAP = 300;
38261
+ /** A text field of a finding row; '' where the row has none. */
38262
+ const textOf = (value) => typeof value === "string" ? value : "";
38261
38263
  /**
38262
38264
  * The license verdict of a license finding's title: what follows "<package> <version>: ". A title the scanner cut
38263
38265
  * at its cap has no whole verdict, so it folds with nothing: two cut titles could share a prefix and differ.
38264
38266
  */
38265
38267
  function licenseVerdict(row) {
38266
- const title = String(row["title"] ?? "");
38268
+ const title = textOf(row["title"]);
38267
38269
  if (title.length >= TITLE_CAP && title.endsWith("...")) return "";
38268
38270
  return title.split(": ").slice(1).join(": ");
38269
38271
  }
38270
38272
  function groupKey(row) {
38271
- const status = String(row["status"] ?? "");
38272
- const link = String(row["productRepositoryId"] ?? "");
38273
+ const status = textOf(row["status"]);
38274
+ const link = textOf(row["productRepositoryId"]);
38273
38275
  if (row["kind"] === "license_violation") {
38274
38276
  const verdict = licenseVerdict(row);
38275
- const reason = String(row["resolvedReason"] ?? row["previouslyResolvedReason"] ?? "");
38277
+ const reason = textOf(row["resolvedReason"] ?? row["previouslyResolvedReason"]);
38276
38278
  return verdict ? `license|${status}|${reason}|${link}|${verdict}` : null;
38277
38279
  }
38278
38280
  const location = row["location"];
38279
38281
  const rule = typeof location?.ruleId === "string" ? location.ruleId : null;
38280
- const decided = String(row["decidedBy"] ?? "");
38282
+ const decided = textOf(row["decidedBy"]);
38281
38283
  return rule ? `${String(row["kind"])}|${String(row["severity"])}|${status}|${decided}|${link}|${rule}` : null;
38282
38284
  }
38283
38285
  /**
@@ -38289,7 +38291,8 @@ function whereOf(row) {
38289
38291
  const paths = Array.isArray(row["sourcePaths"]) ? row["sourcePaths"] : [];
38290
38292
  const file = typeof location?.path === "string" ? location.path : typeof paths[0] === "string" ? paths[0] : null;
38291
38293
  if (file) {
38292
- const at = location?.line ? `${file}:${String(location.line)}` : file;
38294
+ const line = location?.line;
38295
+ const at = line && (typeof line === "number" || typeof line === "string") ? `${file}:${line}` : file;
38293
38296
  return typeof location?.resource === "string" ? `${at} ${location.resource}` : at;
38294
38297
  }
38295
38298
  return [row["packageName"], row["currentVersion"]].filter(Boolean).join(" ") || String(row["id"]);
@@ -38334,7 +38337,7 @@ function grouped(rows, fold) {
38334
38337
  const first = members[0];
38335
38338
  const shared = Object.fromEntries(Object.entries(first).filter(([key, value]) => key !== "id" && key !== "title" && members.every((member) => JSON.stringify(member[key]) === JSON.stringify(value))));
38336
38339
  const location = first["location"];
38337
- const words = sharedTitle(members.map((member) => String(member["title"] ?? "")));
38340
+ const words = sharedTitle(members.map((member) => textOf(member["title"])));
38338
38341
  const rule = typeof location?.ruleId === "string" ? location.ruleId : null;
38339
38342
  const said = first["kind"] === "license_violation" ? licenseVerdict(first) : words ? rule && !words.includes(rule) ? `${rule}: ${words}` : words : rule ?? String(first["title"]);
38340
38343
  return {
@@ -38641,7 +38644,7 @@ function standingSummary(standing) {
38641
38644
  const listed = controls.filter((c) => Number(c["divergenceCount"] ?? 0) > 0 || Number(c["findingCount"] ?? 0) > 0);
38642
38645
  const bySeverity = {};
38643
38646
  for (const violation of violations) {
38644
- const severity = String(violation["severity"] ?? "unknown");
38647
+ const severity = typeof violation["severity"] === "string" ? violation["severity"] : "unknown";
38645
38648
  bySeverity[severity] = (bySeverity[severity] ?? 0) + 1;
38646
38649
  }
38647
38650
  const stated = (state) => controls.filter((c) => c["state"] === state).length;
@@ -40706,7 +40709,8 @@ function hardeningSaid(blocking, named) {
40706
40709
  if (named.length === 0) return `${count}; this run predates recording which.`;
40707
40710
  const shown = named.slice(0, 3).map((finding) => {
40708
40711
  const message = firstSentence(String(finding["message"]));
40709
- const where = finding["line"] ? `${String(finding["path"])}:${String(finding["line"])}` : String(finding["path"]);
40712
+ const line = finding["line"];
40713
+ const where = line && (typeof line === "number" || typeof line === "string") ? `${String(finding["path"])}:${line}` : String(finding["path"]);
40710
40714
  return `${message} (${String(finding["tool"])}, ${where})`;
40711
40715
  });
40712
40716
  const rest = blocking - shown.length;
@@ -41874,7 +41878,7 @@ function registerBacklogReads(server, client) {
41874
41878
  ...failure
41875
41879
  });
41876
41880
  const summary = itemRows([item], ITEM_SUMMARY_FIELDS)[0];
41877
- const description = String(summary["description"] ?? "");
41881
+ const description = typeof summary["description"] === "string" ? summary["description"] : "";
41878
41882
  return toolResult({
41879
41883
  ...withSituation(row, {
41880
41884
  ...summary,
@@ -58768,7 +58772,7 @@ function renderDocument(doc) {
58768
58772
  mimeType: "application/json",
58769
58773
  text: JSON.stringify(doc, null, 2)
58770
58774
  };
58771
- const lines = [`# ${typeof doc.name === "string" ? doc.name : String(doc.type ?? "Document")}`];
58775
+ const lines = [`# ${typeof doc.name === "string" ? doc.name : typeof doc.type === "string" ? doc.type : "Document"}`];
58772
58776
  const facts = [
58773
58777
  "type",
58774
58778
  "origin",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taiga-ai/mcp-server",
3
- "version": "0.39.0-dev.1225",
3
+ "version": "0.39.0-dev.1227",
4
4
  "description": "Taiga for AI coding assistants: read products, policies, initiatives and runs, and operate the line, over MCP",
5
5
  "mcpName": "ga.tai/mcp-server",
6
6
  "license": "UNLICENSED",