@taiga-ai/mcp-server 0.26.0-dev.499 → 0.26.0-dev.501
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 +37 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1919,6 +1919,7 @@ const ENVIRONMENT_TYPES = [
|
|
|
1919
1919
|
const MAINTENANCE_FINDING_KINDS = [
|
|
1920
1920
|
"vulnerable_dependency",
|
|
1921
1921
|
"outdated_dependency",
|
|
1922
|
+
"license_violation",
|
|
1922
1923
|
"secret",
|
|
1923
1924
|
"sast",
|
|
1924
1925
|
"iac_misconfig"
|
|
@@ -1943,7 +1944,11 @@ const CODE_REMEDIATION_KINDS = [
|
|
|
1943
1944
|
"iac_misconfig"
|
|
1944
1945
|
];
|
|
1945
1946
|
new Map(Object.entries({
|
|
1946
|
-
deps: [
|
|
1947
|
+
deps: [
|
|
1948
|
+
"vulnerable_dependency",
|
|
1949
|
+
"outdated_dependency",
|
|
1950
|
+
"license_violation"
|
|
1951
|
+
],
|
|
1947
1952
|
secrets: ["secret"],
|
|
1948
1953
|
sast: ["sast"],
|
|
1949
1954
|
iac: ["iac_misconfig"]
|
|
@@ -2030,6 +2035,19 @@ function lockfileScope(path, groups) {
|
|
|
2030
2035
|
}
|
|
2031
2036
|
}
|
|
2032
2037
|
/**
|
|
2038
|
+
* The kinds that are a package in a lockfile (PRO-2862): the ones with a
|
|
2039
|
+
* dependency scope, a relation and an inventory entry. A code kind reuses the
|
|
2040
|
+
* dependency columns for its rule and category and has none of those.
|
|
2041
|
+
*/
|
|
2042
|
+
const DEPENDENCY_FINDING_KINDS = [
|
|
2043
|
+
"vulnerable_dependency",
|
|
2044
|
+
"outdated_dependency",
|
|
2045
|
+
"license_violation"
|
|
2046
|
+
];
|
|
2047
|
+
function isDependencyFindingKind(kind) {
|
|
2048
|
+
return DEPENDENCY_FINDING_KINDS.includes(kind);
|
|
2049
|
+
}
|
|
2050
|
+
/**
|
|
2033
2051
|
* Whether a dependency finding sits only in development dependencies, in at
|
|
2034
2052
|
* least one runtime dependency set, or in lockfiles that do not say. Decided
|
|
2035
2053
|
* per lockfile (`lockfileScope`) and combined pessimistically: one runtime
|
|
@@ -2040,8 +2058,12 @@ function lockfileScope(path, groups) {
|
|
|
2040
2058
|
* install script in any group.
|
|
2041
2059
|
*/
|
|
2042
2060
|
function dependencyScope(finding) {
|
|
2043
|
-
if (finding.kind
|
|
2044
|
-
|
|
2061
|
+
if (!isDependencyFindingKind(finding.kind)) return "unknown";
|
|
2062
|
+
return scopeFromGroups(finding.dependencyGroups);
|
|
2063
|
+
}
|
|
2064
|
+
/** The scope read from per-lockfile groups alone: for an inventory record, which is a package by construction. */
|
|
2065
|
+
function scopeFromGroups(dependencyGroups) {
|
|
2066
|
+
const entries = Object.entries(dependencyGroups ?? {});
|
|
2045
2067
|
if (entries.length === 0) return "unknown";
|
|
2046
2068
|
return combineScopes(entries.map(([path, groups]) => lockfileScope(path, Array.isArray(groups) ? groups : [])));
|
|
2047
2069
|
}
|
|
@@ -2059,8 +2081,12 @@ function combineScopes(scopes) {
|
|
|
2059
2081
|
* remediation step already finds every resolved copy and its parent itself.
|
|
2060
2082
|
*/
|
|
2061
2083
|
function dependencyRelation(finding) {
|
|
2062
|
-
if (finding.kind
|
|
2063
|
-
|
|
2084
|
+
if (!isDependencyFindingKind(finding.kind)) return "unknown";
|
|
2085
|
+
return relationFromLockfiles(finding.dependencyRelation);
|
|
2086
|
+
}
|
|
2087
|
+
/** The relation read from per-lockfile answers alone: for an inventory record, which is a package by construction. */
|
|
2088
|
+
function relationFromLockfiles(dependencyRelation) {
|
|
2089
|
+
const values = Object.values(dependencyRelation ?? {});
|
|
2064
2090
|
if (values.includes("direct")) return "direct";
|
|
2065
2091
|
if (values.length > 0 && values.every((v) => v === "transitive")) return "transitive";
|
|
2066
2092
|
return "unknown";
|
|
@@ -5346,6 +5372,11 @@ const FINDING_ROW_FIELDS = [
|
|
|
5346
5372
|
* read off the row; remediableBy stays as the sweep recorded it.
|
|
5347
5373
|
*/
|
|
5348
5374
|
function withFixability(row) {
|
|
5375
|
+
if (row["kind"] === "license_violation") return {
|
|
5376
|
+
...row,
|
|
5377
|
+
fixable: false,
|
|
5378
|
+
fixNote: "A license violation has no fix version: review the license or replace the package; taiga_fix_finding refuses it."
|
|
5379
|
+
};
|
|
5349
5380
|
if ((row["kind"] === "vulnerable_dependency" || row["kind"] === "outdated_dependency") && !row["recommendedVersion"] && row["remediableBy"] === "coding_agent") return {
|
|
5350
5381
|
...row,
|
|
5351
5382
|
fixable: false,
|
|
@@ -5363,7 +5394,7 @@ function withDependencyScope(row, { keepGroups = false } = {}) {
|
|
|
5363
5394
|
...row,
|
|
5364
5395
|
dependencyRelation: void 0
|
|
5365
5396
|
} : lean;
|
|
5366
|
-
if (!(row["kind"]
|
|
5397
|
+
if (!isDependencyFindingKind(String(row["kind"]))) return rest;
|
|
5367
5398
|
const kind = row["kind"];
|
|
5368
5399
|
return {
|
|
5369
5400
|
...rest,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taiga-ai/mcp-server",
|
|
3
|
-
"version": "0.26.0-dev.
|
|
3
|
+
"version": "0.26.0-dev.501",
|
|
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",
|