@taiga-ai/mcp-server 0.26.0-dev.482 → 0.26.0-dev.483

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 +29 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1827,6 +1827,21 @@ function combineScopes(scopes) {
1827
1827
  if (scopes.includes("unknown") || scopes.length === 0) return "unknown";
1828
1828
  return "dev";
1829
1829
  }
1830
+ /**
1831
+ * Whether the repository declares the package itself. Per lockfile the sweep
1832
+ * says direct or transitive; across lockfiles one direct declaration makes the
1833
+ * finding direct (that copy is the repository's to bump), transitive only when
1834
+ * every readable lockfile says so, unknown when the sweep could read none of
1835
+ * them or did not record it (older images, code kinds). Presentation only; the
1836
+ * remediation step already finds every resolved copy and its parent itself.
1837
+ */
1838
+ function dependencyRelation(finding) {
1839
+ if (finding.kind !== "vulnerable_dependency" && finding.kind !== "outdated_dependency") return "unknown";
1840
+ const values = Object.values(finding.dependencyRelation ?? {});
1841
+ if (values.includes("direct")) return "direct";
1842
+ if (values.length > 0 && values.every((v) => v === "transitive")) return "transitive";
1843
+ return "unknown";
1844
+ }
1830
1845
  new Set(CODE_REMEDIATION_KINDS);
1831
1846
  /** A non-empty string, or null. */
1832
1847
  const locationText = z.string().min(1).nullable().catch(null);
@@ -4961,15 +4976,24 @@ function withFixability(row) {
4961
4976
  * the API carries: the groups need the lockfile name to read, which `dependencyScope` does once here.
4962
4977
  */
4963
4978
  function withDependencyScope(row, { keepGroups = false } = {}) {
4964
- const { dependencyGroups: _groups, ...lean } = row;
4965
- const rest = keepGroups ? row : lean;
4979
+ const { dependencyGroups: _groups, dependencyRelation: _relation, ...lean } = row;
4980
+ const rest = keepGroups ? {
4981
+ ...row,
4982
+ dependencyRelation: void 0
4983
+ } : lean;
4966
4984
  if (!(row["kind"] === "vulnerable_dependency" || row["kind"] === "outdated_dependency")) return rest;
4985
+ const kind = row["kind"];
4967
4986
  return {
4968
4987
  ...rest,
4969
4988
  dependencyScope: dependencyScope({
4970
- kind: row["kind"],
4989
+ kind,
4971
4990
  dependencyGroups: row["dependencyGroups"]
4972
- })
4991
+ }),
4992
+ dependencyRelation: dependencyRelation({
4993
+ kind,
4994
+ dependencyRelation: row["dependencyRelation"]
4995
+ }),
4996
+ ...keepGroups ? { dependencyRelationByLockfile: row["dependencyRelation"] ?? null } : {}
4973
4997
  };
4974
4998
  }
4975
4999
  /** A finding as a tool answers it: the row fields, the scope, and whether Fix would take it. */
@@ -4977,6 +5001,7 @@ function findingRows(findings, extra = []) {
4977
5001
  return pickFields(findings, [
4978
5002
  ...FINDING_ROW_FIELDS,
4979
5003
  "dependencyGroups",
5004
+ "dependencyRelation",
4980
5005
  ...extra
4981
5006
  ]).map((row) => withDependencyScope(row)).map(withFixability);
4982
5007
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taiga-ai/mcp-server",
3
- "version": "0.26.0-dev.482",
3
+ "version": "0.26.0-dev.483",
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
  "type": "module",