@taiga-ai/mcp-server 0.46.0-dev.1252 → 0.49.0-dev.1254
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/README.md +10 -10
- package/dist/index.js +210 -22
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ You need an access key, made in Taiga under **Settings > Account > MCP**, where
|
|
|
14
14
|
|
|
15
15
|
Create the key first, and choose when it expires: in 30 days, 90 days, a year, or never. Taiga copies it to your clipboard, shows it once, and keeps it on the page until you say you have saved it, so copying the setup next does not lose it.
|
|
16
16
|
|
|
17
|
-
The same page shows the setup for your client and environment, with the key already filled in where a config file needs it, and a one-click install for Cursor. The examples here pin a release (`@taiga-ai/mcp-server@0.
|
|
17
|
+
The same page shows the setup for your client and environment, with the key already filled in where a config file needs it, and a one-click install for Cursor. The examples here pin a release (`@taiga-ai/mcp-server@0.49.0`), so an install runs the version you chose rather than whatever `latest` is at the next start.
|
|
18
18
|
|
|
19
19
|
## Install
|
|
20
20
|
|
|
@@ -23,29 +23,29 @@ The same page shows the setup for your client and environment, with the key alre
|
|
|
23
23
|
Run the command. When it asks for your access key, paste it once and press Enter. Nothing appears as you paste (PowerShell shows asterisks), and the key stays out of your shell history:
|
|
24
24
|
|
|
25
25
|
```sh
|
|
26
|
-
printf 'Taiga access key: ' && read -rs TAIGA_API_KEY && echo && claude mcp add taiga --scope user -e TAIGA_API_KEY="$TAIGA_API_KEY" -- npx -y @taiga-ai/mcp-server@0.
|
|
26
|
+
printf 'Taiga access key: ' && read -rs TAIGA_API_KEY && echo && claude mcp add taiga --scope user -e TAIGA_API_KEY="$TAIGA_API_KEY" -- npx -y @taiga-ai/mcp-server@0.49.0
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
```sh
|
|
30
|
-
printf 'Taiga access key: ' && read -rs TAIGA_API_KEY && echo && codex mcp add taiga --env TAIGA_API_KEY="$TAIGA_API_KEY" -- npx -y @taiga-ai/mcp-server@0.
|
|
30
|
+
printf 'Taiga access key: ' && read -rs TAIGA_API_KEY && echo && codex mcp add taiga --env TAIGA_API_KEY="$TAIGA_API_KEY" -- npx -y @taiga-ai/mcp-server@0.49.0
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
```sh
|
|
34
|
-
printf 'Taiga access key: ' && read -rs TAIGA_API_KEY && echo && copilot mcp add taiga --env TAIGA_API_KEY="$TAIGA_API_KEY" -- npx -y @taiga-ai/mcp-server@0.
|
|
34
|
+
printf 'Taiga access key: ' && read -rs TAIGA_API_KEY && echo && copilot mcp add taiga --env TAIGA_API_KEY="$TAIGA_API_KEY" -- npx -y @taiga-ai/mcp-server@0.49.0
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
On Windows, in PowerShell (Claude Code and Copilot start `npx` through `cmd /c`; the quoted `'--'` survives npm's PowerShell shims):
|
|
38
38
|
|
|
39
39
|
```powershell
|
|
40
|
-
$k = Read-Host 'Taiga access key' -AsSecureString; claude mcp add taiga --scope user -e "TAIGA_API_KEY=$([Net.NetworkCredential]::new('', $k).Password)" '--' cmd /c npx -y @taiga-ai/mcp-server@0.
|
|
40
|
+
$k = Read-Host 'Taiga access key' -AsSecureString; claude mcp add taiga --scope user -e "TAIGA_API_KEY=$([Net.NetworkCredential]::new('', $k).Password)" '--' cmd /c npx -y @taiga-ai/mcp-server@0.49.0
|
|
41
41
|
```
|
|
42
42
|
|
|
43
43
|
```powershell
|
|
44
|
-
$k = Read-Host 'Taiga access key' -AsSecureString; codex mcp add taiga --env "TAIGA_API_KEY=$([Net.NetworkCredential]::new('', $k).Password)" '--' npx -y @taiga-ai/mcp-server@0.
|
|
44
|
+
$k = Read-Host 'Taiga access key' -AsSecureString; codex mcp add taiga --env "TAIGA_API_KEY=$([Net.NetworkCredential]::new('', $k).Password)" '--' npx -y @taiga-ai/mcp-server@0.49.0
|
|
45
45
|
```
|
|
46
46
|
|
|
47
47
|
```powershell
|
|
48
|
-
$k = Read-Host 'Taiga access key' -AsSecureString; copilot mcp add taiga --env "TAIGA_API_KEY=$([Net.NetworkCredential]::new('', $k).Password)" '--' cmd /c npx -y @taiga-ai/mcp-server@0.
|
|
48
|
+
$k = Read-Host 'Taiga access key' -AsSecureString; copilot mcp add taiga --env "TAIGA_API_KEY=$([Net.NetworkCredential]::new('', $k).Password)" '--' cmd /c npx -y @taiga-ai/mcp-server@0.49.0
|
|
49
49
|
```
|
|
50
50
|
|
|
51
51
|
The Copilot command also sets up the GitHub Copilot app. If you have the app but no `copilot` command, add the server to `~/.copilot/mcp-config.json` instead, beside any servers already there. It holds your key, so keep it out of repositories:
|
|
@@ -56,7 +56,7 @@ The Copilot command also sets up the GitHub Copilot app. If you have the app but
|
|
|
56
56
|
"taiga": {
|
|
57
57
|
"type": "local",
|
|
58
58
|
"command": "npx",
|
|
59
|
-
"args": ["-y", "@taiga-ai/mcp-server@0.
|
|
59
|
+
"args": ["-y", "@taiga-ai/mcp-server@0.49.0"],
|
|
60
60
|
"env": { "TAIGA_API_KEY": "YOUR_ACCESS_KEY" },
|
|
61
61
|
"tools": ["*"]
|
|
62
62
|
}
|
|
@@ -73,7 +73,7 @@ Most clients read the same `mcpServers` block. Add it with your key in place of
|
|
|
73
73
|
"mcpServers": {
|
|
74
74
|
"taiga": {
|
|
75
75
|
"command": "npx",
|
|
76
|
-
"args": ["-y", "@taiga-ai/mcp-server@0.
|
|
76
|
+
"args": ["-y", "@taiga-ai/mcp-server@0.49.0"],
|
|
77
77
|
"env": { "TAIGA_API_KEY": "YOUR_ACCESS_KEY" }
|
|
78
78
|
}
|
|
79
79
|
}
|
|
@@ -101,7 +101,7 @@ In `.vscode/mcp.json`. VS Code reads `servers`, and prompts for the key once and
|
|
|
101
101
|
"taiga": {
|
|
102
102
|
"type": "stdio",
|
|
103
103
|
"command": "npx",
|
|
104
|
-
"args": ["-y", "@taiga-ai/mcp-server@0.
|
|
104
|
+
"args": ["-y", "@taiga-ai/mcp-server@0.49.0"],
|
|
105
105
|
"env": { "TAIGA_API_KEY": "${input:taiga-api-key}" }
|
|
106
106
|
}
|
|
107
107
|
}
|
package/dist/index.js
CHANGED
|
@@ -24066,12 +24066,18 @@ var TaigaClient = class {
|
|
|
24066
24066
|
* What waits on a person (GET /users/me/requests), up to the API's cap, with
|
|
24067
24067
|
* what is assigned to someone else: a key speaks for the team's work.
|
|
24068
24068
|
*/
|
|
24069
|
-
async listRequests() {
|
|
24070
|
-
return this.request("GET", `/users/me/requests${query$1({
|
|
24069
|
+
async listRequests(productId) {
|
|
24070
|
+
return this.request("GET", `/users/me/requests${query$1({
|
|
24071
|
+
everyone: "true",
|
|
24072
|
+
productId
|
|
24073
|
+
})}`);
|
|
24071
24074
|
}
|
|
24072
24075
|
/** What closed in the last two weeks (GET /users/me/requests/done), by the same rules. */
|
|
24073
|
-
async listDoneRequests() {
|
|
24074
|
-
return this.request("GET", `/users/me/requests/done${query$1({
|
|
24076
|
+
async listDoneRequests(productId) {
|
|
24077
|
+
return this.request("GET", `/users/me/requests/done${query$1({
|
|
24078
|
+
everyone: "true",
|
|
24079
|
+
productId
|
|
24080
|
+
})}`);
|
|
24075
24081
|
}
|
|
24076
24082
|
/** Answer a request with one of the answers it offers. */
|
|
24077
24083
|
async answerRequest(id, exit) {
|
|
@@ -37509,7 +37515,7 @@ function outsideAllowlist(expression, allowlist) {
|
|
|
37509
37515
|
* reads as deleted) and fields they explain would simply be missing. So it
|
|
37510
37516
|
* refuses to start, and says what to do.
|
|
37511
37517
|
*/
|
|
37512
|
-
function apiLevelProblem(introspection, apiUrl, required =
|
|
37518
|
+
function apiLevelProblem(introspection, apiUrl, required = 13, version = SERVER_VERSION) {
|
|
37513
37519
|
const offered = introspection.mcpApiLevel ?? 0;
|
|
37514
37520
|
if (offered >= required) return null;
|
|
37515
37521
|
return `The Taiga API at ${apiUrl} is older than @taiga-ai/mcp-server ${version} needs (API level ${offered}, needs ${required}). Run the version published for it, or wait for that API to be updated; an earlier release of this package works against it.`;
|
|
@@ -38181,7 +38187,11 @@ const OUTPUT_SCHEMAS = {
|
|
|
38181
38187
|
clientHealth: object({ unavailable: string$2().nullable().optional() }).loose().nullable().optional(),
|
|
38182
38188
|
note: string$2().nullable().optional()
|
|
38183
38189
|
}).loose(),
|
|
38184
|
-
taiga_get_notices: object({
|
|
38190
|
+
taiga_get_notices: object({
|
|
38191
|
+
notices: string$2().nullable().optional(),
|
|
38192
|
+
totalCharacters: number$1().nullable().optional(),
|
|
38193
|
+
nextCursor: string$2().nullable().optional()
|
|
38194
|
+
}).loose(),
|
|
38185
38195
|
taiga_get_organization_document: object({
|
|
38186
38196
|
data: unknown$1().optional(),
|
|
38187
38197
|
nextCursor: string$2().nullable().optional(),
|
|
@@ -38499,7 +38509,12 @@ const OUTPUT_SCHEMAS = {
|
|
|
38499
38509
|
taiga_get_sbom: object({
|
|
38500
38510
|
bomFormat: string$2().nullable().optional(),
|
|
38501
38511
|
specVersion: string$2().nullable().optional(),
|
|
38502
|
-
|
|
38512
|
+
componentCount: number$1().nullable().optional(),
|
|
38513
|
+
byType: record(string$2(), number$1()).nullable().optional(),
|
|
38514
|
+
byScope: record(string$2(), number$1()).nullable().optional(),
|
|
38515
|
+
byLicense: record(string$2(), number$1()).nullable().optional(),
|
|
38516
|
+
components: array(record(string$2(), unknown$1()).nullable()).nullable().optional(),
|
|
38517
|
+
nextCursor: string$2().nullable().optional()
|
|
38503
38518
|
}).loose(),
|
|
38504
38519
|
taiga_ignore_finding: object({
|
|
38505
38520
|
id: string$2().nullable().optional(),
|
|
@@ -38595,6 +38610,9 @@ const OUTPUT_SCHEMAS = {
|
|
|
38595
38610
|
allowlist: array(string$2().nullable()).nullable().optional(),
|
|
38596
38611
|
custom: boolean().nullable().optional(),
|
|
38597
38612
|
licenses: array(record(string$2(), unknown$1()).nullable()).nullable().optional(),
|
|
38613
|
+
inventoryGaps: array(record(string$2(), unknown$1()).nullable()).nullable().optional(),
|
|
38614
|
+
inventoryGapsMean: string$2().nullable().optional(),
|
|
38615
|
+
usageNote: string$2().nullable().optional(),
|
|
38598
38616
|
license: string$2().nullable().optional(),
|
|
38599
38617
|
approved: boolean().nullable().optional(),
|
|
38600
38618
|
category: string$2().nullable().optional(),
|
|
@@ -40557,6 +40575,162 @@ async function sweepOverview(client, productId) {
|
|
|
40557
40575
|
...latest.length === 0 ? { note: "This product has never been swept: no findings is not an all-clear." } : {}
|
|
40558
40576
|
};
|
|
40559
40577
|
}
|
|
40578
|
+
/** A page of an SBOM's components, and of the notices text: an offset, as nextCursor gives it. */
|
|
40579
|
+
const offsetCursor = string$2().regex(/^\d{1,9}$/).optional().describe("The previous page's nextCursor; omit for the first page");
|
|
40580
|
+
const SBOM_PAGE = 50;
|
|
40581
|
+
const SBOM_PAGE_MAX = 200;
|
|
40582
|
+
/**
|
|
40583
|
+
* An SBOM as the model reads it (PRO-5097): the whole CycloneDX file was 419k characters for one repository,
|
|
40584
|
+
* hashes, suppliers and copyrights of every component, and filled a context in one call. The summary counts its
|
|
40585
|
+
* components; a page lists them by what identifies them. full: true keeps the file.
|
|
40586
|
+
*/
|
|
40587
|
+
function sbomPage(sbom, offset, limit) {
|
|
40588
|
+
const text = (value, otherwise) => typeof value === "string" ? value : otherwise;
|
|
40589
|
+
const components = Array.isArray(sbom["components"]) ? sbom["components"] : [];
|
|
40590
|
+
const metadata = sbom["metadata"] ?? {};
|
|
40591
|
+
const subject = metadata["component"] ?? null;
|
|
40592
|
+
const licensesOf = (component) => (Array.isArray(component["licenses"]) ? component["licenses"] : []).flatMap((entry) => {
|
|
40593
|
+
const license = entry["license"] ?? {};
|
|
40594
|
+
const said = entry["expression"] ?? license["id"] ?? license["name"];
|
|
40595
|
+
return typeof said === "string" ? [said] : [];
|
|
40596
|
+
});
|
|
40597
|
+
const count = (key) => {
|
|
40598
|
+
const counts = /* @__PURE__ */ new Map();
|
|
40599
|
+
for (const component of components) for (const value of key(component)) counts.set(value, (counts.get(value) ?? 0) + 1);
|
|
40600
|
+
return Object.fromEntries([...counts].sort((a, b) => b[1] - a[1]));
|
|
40601
|
+
};
|
|
40602
|
+
const rows = components.slice(offset, offset + limit).map((component) => withoutEmpty({
|
|
40603
|
+
name: typeof component["group"] === "string" ? `${component["group"]}/${text(component["name"], "")}` : component["name"],
|
|
40604
|
+
version: component["version"],
|
|
40605
|
+
purl: component["purl"],
|
|
40606
|
+
type: component["type"] === "library" ? void 0 : component["type"],
|
|
40607
|
+
scope: component["scope"],
|
|
40608
|
+
licenses: licensesOf(component)
|
|
40609
|
+
}));
|
|
40610
|
+
const next = offset + limit < components.length ? String(offset + limit) : null;
|
|
40611
|
+
return {
|
|
40612
|
+
bomFormat: sbom["bomFormat"],
|
|
40613
|
+
specVersion: sbom["specVersion"],
|
|
40614
|
+
serialNumber: sbom["serialNumber"],
|
|
40615
|
+
generatedAt: metadata["timestamp"] ?? null,
|
|
40616
|
+
inventory: inventoryOf(metadata, sbom["compositions"]),
|
|
40617
|
+
describes: subject ? withoutEmpty({
|
|
40618
|
+
name: subject["name"],
|
|
40619
|
+
version: subject["version"]
|
|
40620
|
+
}) : null,
|
|
40621
|
+
componentCount: components.length,
|
|
40622
|
+
byType: count((component) => [text(component["type"], "unknown")]),
|
|
40623
|
+
byScope: count((component) => [text(component["scope"], "required")]),
|
|
40624
|
+
byLicense: count((component) => {
|
|
40625
|
+
const said = licensesOf(component);
|
|
40626
|
+
return said.length > 0 ? said : ["none stated"];
|
|
40627
|
+
}),
|
|
40628
|
+
components: rows,
|
|
40629
|
+
nextCursor: next,
|
|
40630
|
+
...offset === 0 ? { note: "full: true answers the whole CycloneDX document, to save or hand on." } : {}
|
|
40631
|
+
};
|
|
40632
|
+
}
|
|
40633
|
+
/**
|
|
40634
|
+
* The SBOM's own `taiga:` metadata properties (sweep, inventory:detectedAt, inventory:truncated, branch) by their
|
|
40635
|
+
* short names, and whether a composition marks it incomplete: an inventory cut at its cap misses packages.
|
|
40636
|
+
*/
|
|
40637
|
+
function inventoryOf(metadata, compositions) {
|
|
40638
|
+
const said = Object.fromEntries((Array.isArray(metadata["properties"]) ? metadata["properties"] : []).flatMap((property) => typeof property["name"] === "string" && property["name"].startsWith("taiga:") ? [[property["name"].slice(6).replace("inventory:", ""), property["value"]]] : []));
|
|
40639
|
+
const incomplete = Array.isArray(compositions) && compositions.some((composition) => composition["aggregate"] === "incomplete");
|
|
40640
|
+
return {
|
|
40641
|
+
...said,
|
|
40642
|
+
...incomplete || said["truncated"] === "true" ? {
|
|
40643
|
+
incomplete: true,
|
|
40644
|
+
incompleteMeans: "The inventory was cut at its cap: packages are missing, and the counts undercount."
|
|
40645
|
+
} : {}
|
|
40646
|
+
};
|
|
40647
|
+
}
|
|
40648
|
+
/** About this many characters of notices a page, cut where a package's entry starts. */
|
|
40649
|
+
const NOTICES_PAGE = 2e4;
|
|
40650
|
+
const NOTICES_ENTRY = "\n------------------------------------------------------------------------\n";
|
|
40651
|
+
/**
|
|
40652
|
+
* The notices text in pages (PRO-5097): 164k characters for one repository came back in one answer. Each page
|
|
40653
|
+
* ends before an entry's separator, or at a line end, so no package is cut in two where one fits.
|
|
40654
|
+
*/
|
|
40655
|
+
function noticesPage(text, offset) {
|
|
40656
|
+
const start = Math.min(offset, text.length);
|
|
40657
|
+
let end = Math.min(start + NOTICES_PAGE, text.length);
|
|
40658
|
+
if (end < text.length) {
|
|
40659
|
+
const entry = text.lastIndexOf(NOTICES_ENTRY, end);
|
|
40660
|
+
const line = text.lastIndexOf("\n", end);
|
|
40661
|
+
end = entry > start ? entry + 1 : line > start ? line + 1 : end;
|
|
40662
|
+
}
|
|
40663
|
+
return {
|
|
40664
|
+
notices: text.slice(start, end),
|
|
40665
|
+
totalCharacters: text.length,
|
|
40666
|
+
nextCursor: end < text.length ? String(end) : null
|
|
40667
|
+
};
|
|
40668
|
+
}
|
|
40669
|
+
/** A row without what is not set: null, empty text, an empty list, or a flag that is false; keep says otherwise. */
|
|
40670
|
+
function withoutEmpty(row, keep = []) {
|
|
40671
|
+
return Object.fromEntries(Object.entries(row).filter(([key, value]) => keep.includes(key) || value !== null && value !== void 0 && value !== "" && value !== false && !(Array.isArray(value) && value.length === 0)));
|
|
40672
|
+
}
|
|
40673
|
+
/**
|
|
40674
|
+
* The organization's licenses with the products whose inventory breaks a rule, said in words, in place of a raw
|
|
40675
|
+
* count per product (PRO-5097): 51 rows of zeros, 7.8k characters, that nothing explained.
|
|
40676
|
+
*/
|
|
40677
|
+
function withInventoryGaps(summary) {
|
|
40678
|
+
const { invariants, ...rest } = summary;
|
|
40679
|
+
const RULES = [
|
|
40680
|
+
"license",
|
|
40681
|
+
"parent",
|
|
40682
|
+
"scope",
|
|
40683
|
+
"lookups",
|
|
40684
|
+
"paths"
|
|
40685
|
+
];
|
|
40686
|
+
const gaps = (invariants ?? []).filter((row) => RULES.some((rule) => row[rule] > 0)).map((row) => ({
|
|
40687
|
+
productId: row.productId,
|
|
40688
|
+
productName: row.productName,
|
|
40689
|
+
...Object.fromEntries(RULES.filter((rule) => row[rule] > 0).map((rule) => [rule, row[rule]]))
|
|
40690
|
+
}));
|
|
40691
|
+
if (gaps.length === 0) return rest;
|
|
40692
|
+
return {
|
|
40693
|
+
...rest,
|
|
40694
|
+
inventoryGaps: gaps,
|
|
40695
|
+
inventoryGapsMean: "Packages whose inventory is incomplete, per product: license (no license and no reason), parent (nothing named brings it in), scope (neither runtime nor dev), lookups (still being looked up past the deadline), paths (a file path listed as a package). The license counts above may miss them."
|
|
40696
|
+
};
|
|
40697
|
+
}
|
|
40698
|
+
/**
|
|
40699
|
+
* Where one license is used, per product and repository (PRO-5097): the dependency groups of every repository
|
|
40700
|
+
* were 187k characters for MIT across 41 products. What brings its packages in is one product's question, which
|
|
40701
|
+
* productId answers.
|
|
40702
|
+
*/
|
|
40703
|
+
function usageByProduct(read) {
|
|
40704
|
+
const usage = Array.isArray(read["usage"]) ? read["usage"] : null;
|
|
40705
|
+
if (!usage || usage.length === 0) return read;
|
|
40706
|
+
return {
|
|
40707
|
+
...read,
|
|
40708
|
+
usage: usage.map((product) => ({
|
|
40709
|
+
...product,
|
|
40710
|
+
repositories: (Array.isArray(product["repositories"]) ? product["repositories"] : []).map(({ groups: _groups, ...repository }) => repository)
|
|
40711
|
+
})),
|
|
40712
|
+
usageNote: "What brings its packages in, per repository: this tool with license and productId."
|
|
40713
|
+
};
|
|
40714
|
+
}
|
|
40715
|
+
/** A preview's products by name as well as ID (PRO-5097), where the key reads products; the first 25. */
|
|
40716
|
+
async function withProductNamesOf(client, effect) {
|
|
40717
|
+
if (!effect || typeof effect !== "object" || !client.hasCapability("products:read")) return effect;
|
|
40718
|
+
const products = effect["products"];
|
|
40719
|
+
if (!Array.isArray(products)) return effect;
|
|
40720
|
+
const named = await Promise.all(products.map(async (row, index) => {
|
|
40721
|
+
if (index >= 25 || typeof row["productId"] !== "string") return row;
|
|
40722
|
+
const name = await client.getProduct(row["productId"]).then((read) => read.data.name).catch(() => null);
|
|
40723
|
+
return name ? {
|
|
40724
|
+
productId: row["productId"],
|
|
40725
|
+
productName: name,
|
|
40726
|
+
...row
|
|
40727
|
+
} : row;
|
|
40728
|
+
}));
|
|
40729
|
+
return {
|
|
40730
|
+
...effect,
|
|
40731
|
+
products: named
|
|
40732
|
+
};
|
|
40733
|
+
}
|
|
40560
40734
|
/** The organization's licence read takes an id this long at most, as `organizationLicenseQuery` does. */
|
|
40561
40735
|
const ORGANIZATION_LICENSE_MAX = 200;
|
|
40562
40736
|
/**
|
|
@@ -40601,10 +40775,13 @@ function registerMaintenanceTools(server, client) {
|
|
|
40601
40775
|
annotations: OPERATE_SETTING
|
|
40602
40776
|
}, (params) => runTool(async () => {
|
|
40603
40777
|
const change = params.action === "approve" ? { approve: params.license } : { remove: params.license };
|
|
40604
|
-
if (params.preview)
|
|
40605
|
-
|
|
40606
|
-
|
|
40607
|
-
|
|
40778
|
+
if (params.preview) {
|
|
40779
|
+
const effect = (await client.previewLicenseChange(change)).data;
|
|
40780
|
+
return toolResult({
|
|
40781
|
+
preview: true,
|
|
40782
|
+
effect: await withProductNamesOf(client, effect)
|
|
40783
|
+
});
|
|
40784
|
+
}
|
|
40608
40785
|
return toolResult((await client.changeLicenseAllowlist(params.action === "approve" ? { approve: [params.license] } : { remove: [params.license] })).data);
|
|
40609
40786
|
}));
|
|
40610
40787
|
if (!client.hasCapability("products:read")) return;
|
|
@@ -40701,7 +40878,7 @@ function registerMaintenanceTools(server, client) {
|
|
|
40701
40878
|
client.listLicensePackageDecisions(id).catch(() => null)
|
|
40702
40879
|
]);
|
|
40703
40880
|
const allowlist = (summary ?? (decisions?.data.length ? await client.getLicenseSummary(id) : null))?.data.allowlist ?? [];
|
|
40704
|
-
const rows = pickFields(result.data, PACKAGE_ROW_FIELDS).map(ownCode).map((row, index) => withPackageDecision(row, result.data[index], decisions?.data ?? [], allowlist));
|
|
40881
|
+
const rows = pickFields(result.data, PACKAGE_ROW_FIELDS).map(ownCode).map((row, index) => withPackageDecision(row, result.data[index], decisions?.data ?? [], allowlist)).map((row) => withoutEmpty(row, ["licenses", "version"]));
|
|
40705
40882
|
return toolResult({
|
|
40706
40883
|
...summary ? { licenses: summary.data } : {},
|
|
40707
40884
|
...page(rows, result.nextCursor),
|
|
@@ -40718,28 +40895,39 @@ function registerMaintenanceTools(server, client) {
|
|
|
40718
40895
|
annotations: READ_ONLY
|
|
40719
40896
|
}, (params) => runTool(async () => {
|
|
40720
40897
|
if (params.productId !== void 0 && params.license === void 0) return toolError("VALIDATION_ERROR", "Name the license to read in this product (license).");
|
|
40721
|
-
if (params.license === void 0) return toolResult((await client.getOrganizationLicenses()).data);
|
|
40898
|
+
if (params.license === void 0) return toolResult(withInventoryGaps((await client.getOrganizationLicenses()).data));
|
|
40722
40899
|
if (params.productId === void 0 && params.license.length > ORGANIZATION_LICENSE_MAX) return toolError("VALIDATION_ERROR", `A license id is at most ${ORGANIZATION_LICENSE_MAX} characters; name a product (productId) to read a longer expression.`);
|
|
40723
|
-
return toolResult(params.productId !== void 0 ? (await client.getProductLicense(params.productId, params.license)).data : (await client.getOrganizationLicense(params.license)).data);
|
|
40900
|
+
return toolResult(params.productId !== void 0 ? (await client.getProductLicense(params.productId, params.license)).data : usageByProduct((await client.getOrganizationLicense(params.license)).data));
|
|
40724
40901
|
}));
|
|
40725
40902
|
server.registerTool("taiga_get_sbom", {
|
|
40726
40903
|
title: "Download a repository SBOM",
|
|
40727
|
-
description: "
|
|
40904
|
+
description: "Read one repository's software bill of materials (CycloneDX 1.6): what it describes, its components by type, scope and license, and a page of its components (name, version, purl, scope, licenses). full: true answers the whole document, which runs to hundreds of thousands of characters. NOT_FOUND where the licenses feature is off, or before a sweep has read the repository.",
|
|
40728
40905
|
inputSchema: object({
|
|
40729
40906
|
productId,
|
|
40730
|
-
linkId: idInput("repository link", "taiga_list_product_repositories gives it")
|
|
40907
|
+
linkId: idInput("repository link", "taiga_list_product_repositories gives it"),
|
|
40908
|
+
limit: number$1().int().min(1).max(SBOM_PAGE_MAX).optional().describe(`Components per page (default ${SBOM_PAGE})`),
|
|
40909
|
+
cursor: offsetCursor,
|
|
40910
|
+
full: boolean().optional().describe("The whole CycloneDX document, every component and dependency")
|
|
40731
40911
|
}),
|
|
40732
40912
|
annotations: READ_ONLY
|
|
40733
|
-
}, (params) => runTool(async () =>
|
|
40913
|
+
}, (params) => runTool(async () => {
|
|
40914
|
+
const sbom = await client.getSbom(params.productId, params.linkId);
|
|
40915
|
+
if (params.full) {
|
|
40916
|
+
if (params.cursor !== void 0 || params.limit !== void 0) return toolError("VALIDATION_ERROR", "full answers the whole document; limit and cursor page the summary.");
|
|
40917
|
+
return toolResult(sbom);
|
|
40918
|
+
}
|
|
40919
|
+
return toolResult(sbomPage(sbom, Number(params.cursor ?? 0), params.limit ?? SBOM_PAGE));
|
|
40920
|
+
}));
|
|
40734
40921
|
server.registerTool("taiga_get_notices", {
|
|
40735
40922
|
title: "Download a repository's third-party notices",
|
|
40736
|
-
description:
|
|
40923
|
+
description: `One repository's third-party notices: every package it ships, with its licence and copyright holders, as the text a product carries for attribution, in pages of about ${NOTICES_PAGE / 1e3}k characters (nextCursor reads on). NOT_FOUND where the licenses feature is off, or before a sweep has read the repository.`,
|
|
40737
40924
|
inputSchema: object({
|
|
40738
40925
|
productId,
|
|
40739
|
-
linkId: idInput("repository link", "taiga_list_product_repositories gives it")
|
|
40926
|
+
linkId: idInput("repository link", "taiga_list_product_repositories gives it"),
|
|
40927
|
+
cursor: offsetCursor
|
|
40740
40928
|
}),
|
|
40741
40929
|
annotations: READ_ONLY
|
|
40742
|
-
}, (params) => runTool(async () => toolResult(
|
|
40930
|
+
}, (params) => runTool(async () => toolResult(noticesPage(await client.getNotices(params.productId, params.linkId), Number(params.cursor ?? 0)))));
|
|
40743
40931
|
server.registerTool("taiga_get_finding", {
|
|
40744
40932
|
title: "Get a maintenance finding",
|
|
40745
40933
|
description: "Read one finding: how likely it is to be exploited, the advisory and its fixed version, where it is, which policy controls it breaches, any fix under way, and triage: whether the code reaches it, as its factory judged it at a commit. A false positive or not reachable judged with high confidence ignores a vulnerability, secret, insecure-code or misconfiguration finding by itself (decidedBy: auto), except a malicious package, an actively exploited one whose verdict cites no code in the repository, and a not-reachable dependency with a known fix version, which stay open. It reopens when a later verdict, a higher tier or a new fix stops the reason holding; a decision of a person (decidedBy: person) always stands. fixable: false says taiga_fix_finding would refuse it. A secret's value is never stored.",
|
|
@@ -45273,7 +45461,7 @@ function summaryOf(rows) {
|
|
|
45273
45461
|
const inProduct = (productIdWanted) => (row) => productIdWanted === void 0 || (row["product"] ?? {})["id"] === productIdWanted;
|
|
45274
45462
|
/** One product's Action Required as counts, as the list's summary counts them. */
|
|
45275
45463
|
async function attentionCounts(client, productIdWanted) {
|
|
45276
|
-
const result = await client.listRequests();
|
|
45464
|
+
const result = await client.listRequests(productIdWanted);
|
|
45277
45465
|
const [entry] = summaryOf(result.data.filter(inProduct(productIdWanted)).filter((row) => row["kind"] !== "license_review"));
|
|
45278
45466
|
return {
|
|
45279
45467
|
open: entry ? Number(entry["open"]) : 0,
|
|
@@ -45379,7 +45567,7 @@ function registerInboxTools(server, client) {
|
|
|
45379
45567
|
annotations: READ_ONLY
|
|
45380
45568
|
}, (params) => runTool(async () => {
|
|
45381
45569
|
const { resolved, full, kind, category, limit } = params;
|
|
45382
|
-
const result = resolved ? await client.listDoneRequests() : await client.listRequests();
|
|
45570
|
+
const result = resolved ? await client.listDoneRequests(params.productId) : await client.listRequests(params.productId);
|
|
45383
45571
|
const now = Date.now();
|
|
45384
45572
|
const here = result.data.filter(inProduct(params.productId));
|
|
45385
45573
|
const licences = here.filter((row) => row["kind"] === "license_review");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taiga-ai/mcp-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.49.0-dev.1254",
|
|
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",
|