@taiga-ai/mcp-server 0.36.0-dev.811 → 0.36.0-dev.813
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 +73 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -23899,6 +23899,18 @@ var TaigaClient = class {
|
|
|
23899
23899
|
async getLicenseSummary(productId) {
|
|
23900
23900
|
return this.request("GET", `/products/${seg(productId)}/maintenance/licenses`);
|
|
23901
23901
|
}
|
|
23902
|
+
/** One licence across a product's inventory (PRO-3251): what it asks, when to allow it, what brings it in. */
|
|
23903
|
+
async getProductLicense(productId, license) {
|
|
23904
|
+
return this.request("GET", `/products/${seg(productId)}/maintenance/licenses/detail?license=${encodeURIComponent(license)}`);
|
|
23905
|
+
}
|
|
23906
|
+
/** Allow a licence in one product: every licence finding in force for it there ignored (PRO-3727). */
|
|
23907
|
+
async allowProductLicense(productId, body) {
|
|
23908
|
+
return this.request("POST", `/products/${seg(productId)}/maintenance/licenses/ignore`, body);
|
|
23909
|
+
}
|
|
23910
|
+
/** Allow a licence in one product no longer: every one of its ignored licence findings there open again. */
|
|
23911
|
+
async reopenProductLicense(productId, license) {
|
|
23912
|
+
return this.request("POST", `/products/${seg(productId)}/maintenance/licenses/reopen`, { license });
|
|
23913
|
+
}
|
|
23902
23914
|
/** The organization's approved list and every licence in use across its products (PRO-3311). */
|
|
23903
23915
|
async getOrganizationLicenses() {
|
|
23904
23916
|
return this.request("GET", "/tenants/current/licenses");
|
|
@@ -25178,7 +25190,8 @@ const READY_BLOCKERS = [
|
|
|
25178
25190
|
"bar_lowering",
|
|
25179
25191
|
"bar_lowering_unchecked",
|
|
25180
25192
|
"criticals_unresolved",
|
|
25181
|
-
"clean_checkout_failed"
|
|
25193
|
+
"clean_checkout_failed",
|
|
25194
|
+
"license_not_approved"
|
|
25182
25195
|
];
|
|
25183
25196
|
/**
|
|
25184
25197
|
* Why the autonomous loop handed a live pull request to a person (PRO-2409).
|
|
@@ -27325,6 +27338,7 @@ const TOOLSET_OF = {
|
|
|
27325
27338
|
taiga_fix_finding: "operate",
|
|
27326
27339
|
taiga_fix_policy_violation: "operate",
|
|
27327
27340
|
taiga_ignore_finding: "operate",
|
|
27341
|
+
taiga_allow_license: "operate",
|
|
27328
27342
|
taiga_resolve_action: "operate",
|
|
27329
27343
|
taiga_create_factory: "setup",
|
|
27330
27344
|
taiga_rename_factory: "setup",
|
|
@@ -27677,8 +27691,16 @@ const BY_ARGUMENT = {
|
|
|
27677
27691
|
knowledgeId: "taiga_list_knowledge lists the knowledge files.",
|
|
27678
27692
|
productId: "taiga_list_products lists the products the key can see; a name is not an ID (taiga_get_product takes a slug)."
|
|
27679
27693
|
};
|
|
27694
|
+
/**
|
|
27695
|
+
* A licence a product does not hold, as against a product the key cannot see
|
|
27696
|
+
* (PRO-3879). Any other 404 (the routes do not exist where the licenses
|
|
27697
|
+
* feature is off) blames neither.
|
|
27698
|
+
*/
|
|
27699
|
+
const licenseMiss = (hint) => (said) => /\blicen[cs]e\b/i.test(said) ? hint : /\b(product|project) not found/i.test(said) ? BY_ARGUMENT["productId"] : void 0;
|
|
27680
27700
|
/** Where an argument means something else on one tool, or the tool's 404 needs its own word. */
|
|
27681
27701
|
const BY_TOOL = {
|
|
27702
|
+
taiga_allow_license: licenseMiss("taiga_list_packages (productId) summarizes the product's licenses as its findings name them; a license with no finding there has nothing to allow or reopen."),
|
|
27703
|
+
taiga_list_licenses: licenseMiss("taiga_list_licenses without license lists the licenses in use, and taiga_list_packages (productId) one product's, spelled as their findings spell them."),
|
|
27682
27704
|
taiga_resolve_action: () => "taiga_list_action_required lists the items with their IDs.",
|
|
27683
27705
|
taiga_get_sbom: () => "An SBOM exists once a sweep has inventoried that repository, where the licenses feature is enabled; taiga_list_packages (linkId) says whether it has packages, and taiga_list_product_repositories lists the links.",
|
|
27684
27706
|
taiga_get_notices: () => "Notices exist once a sweep has inventoried that repository, where the licenses feature is enabled; taiga_list_product_repositories lists the links.",
|
|
@@ -28519,6 +28541,20 @@ async function sweepOverview(client, productId) {
|
|
|
28519
28541
|
...latest.length === 0 ? { note: "This product has never been swept: no findings is not an all-clear." } : {}
|
|
28520
28542
|
};
|
|
28521
28543
|
}
|
|
28544
|
+
/** The organization's licence read takes an id this long at most, as `organizationLicenseQuery` does. */
|
|
28545
|
+
const ORGANIZATION_LICENSE_MAX = 200;
|
|
28546
|
+
/**
|
|
28547
|
+
* Why a license is allowed in a product, in a license's words, as the web's
|
|
28548
|
+
* Allow dialog offers them (PRO-3727); each is stored as the ignore reason
|
|
28549
|
+
* beside it.
|
|
28550
|
+
*/
|
|
28551
|
+
const LICENSE_ALLOW_REASON_TO_IGNORE = {
|
|
28552
|
+
accepted: "accepted_risk",
|
|
28553
|
+
not_handed_out: "not_reachable",
|
|
28554
|
+
no_alternative: "wont_fix",
|
|
28555
|
+
read_wrong: "false_positive"
|
|
28556
|
+
};
|
|
28557
|
+
const LICENSE_ALLOW_REASONS = Object.keys(LICENSE_ALLOW_REASON_TO_IGNORE);
|
|
28522
28558
|
function registerMaintenanceTools(server, client) {
|
|
28523
28559
|
if (client.hasCapability("tenant:settings")) server.registerTool("taiga_change_license", {
|
|
28524
28560
|
title: "Approve or remove a license",
|
|
@@ -28606,10 +28642,18 @@ function registerMaintenanceTools(server, client) {
|
|
|
28606
28642
|
}));
|
|
28607
28643
|
server.registerTool("taiga_list_licenses", {
|
|
28608
28644
|
title: "List the organization's licenses",
|
|
28609
|
-
description: "List the organization's approved license list and every license in use across its products, approved or not, with packages, products and repositories. With license, where that one is used: products, repositories
|
|
28610
|
-
inputSchema: object({
|
|
28645
|
+
description: "List the organization's approved license list and every license in use across its products, approved or not, with packages, products and repositories. With license, where that one is used: products, repositories, what brings its packages in, and its approved-list history. With license and productId, that license in one product: its standing against the list, what it asks, when to allow it there, how many packages ship, and what brings them in. Decide it there with taiga_allow_license. NOT_FOUND where the licenses feature is off.",
|
|
28646
|
+
inputSchema: object({
|
|
28647
|
+
license: string$2().trim().min(1).max(MAINTENANCE_LICENSE_FILTER_MAX).optional().describe("An SPDX license id or expression: where it is used, instead of the list"),
|
|
28648
|
+
productId: productId.optional().describe("With license: that license in this product only (taiga_list_products gives it)")
|
|
28649
|
+
}),
|
|
28611
28650
|
annotations: READ_ONLY
|
|
28612
|
-
}, (params) => runTool(async () =>
|
|
28651
|
+
}, (params) => runTool(async () => {
|
|
28652
|
+
if (params.productId !== void 0 && params.license === void 0) return toolError("VALIDATION_ERROR", "Name the license to read in this product (license).");
|
|
28653
|
+
if (params.license === void 0) return toolResult((await client.getOrganizationLicenses()).data);
|
|
28654
|
+
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.`);
|
|
28655
|
+
return toolResult(params.productId !== void 0 ? (await client.getProductLicense(params.productId, params.license)).data : (await client.getOrganizationLicense(params.license)).data);
|
|
28656
|
+
}));
|
|
28613
28657
|
server.registerTool("taiga_get_sbom", {
|
|
28614
28658
|
title: "Download a repository SBOM",
|
|
28615
28659
|
description: "Download one repository's software bill of materials (CycloneDX 1.6). Large; taiga_list_packages summarizes. NOT_FOUND where the licenses feature is off, or before a sweep has read the repository.",
|
|
@@ -28748,6 +28792,28 @@ function registerMaintenanceTools(server, client) {
|
|
|
28748
28792
|
const finding = (await client.updateFinding(params.findingId, body)).data;
|
|
28749
28793
|
return toolResult(findingRows([finding], ["ignoreNote"])[0]);
|
|
28750
28794
|
}));
|
|
28795
|
+
server.registerTool("taiga_allow_license", {
|
|
28796
|
+
title: "Allow or reopen a license in a product",
|
|
28797
|
+
description: "Allow a license in one product without approving it for the organization: every license finding of it there that is open, or whose ignore lapsed, is ignored with one reason, as the web's Allow in this product does; one already ignored keeps its reason and expiry, so reopen first to change them. allowed: false reopens them. Another product using the license still raises its finding; to approve it everywhere, use taiga_change_license. Allowing a license is the person's decision. NOT_FOUND when the product has no license finding for it.",
|
|
28798
|
+
inputSchema: object({
|
|
28799
|
+
productId,
|
|
28800
|
+
license: string$2().trim().min(1).max(MAINTENANCE_LICENSE_FILTER_MAX).describe("The license as the product's license findings or taiga_list_packages name it, such as MPL-2.0"),
|
|
28801
|
+
allowed: boolean().describe("true allows the license in this product, false reopens its findings"),
|
|
28802
|
+
reason: _enum(LICENSE_ALLOW_REASONS).optional().describe("Why it is allowed; required when allowing. accepted: reviewed and allowed here, usually for a limited time; not_handed_out: the product runs only internally or on your own servers, its code is never given to anyone; no_alternative: no package under an approved license does the job yet; read_wrong: the packages are not actually under this license"),
|
|
28803
|
+
note: string$2().trim().max(280).optional().describe("A short justification, kept for audit"),
|
|
28804
|
+
expiresAt: string$2().datetime({ offset: true }).meta({ pattern: void 0 }).optional().describe("When the allowance lapses and the findings come back if still there (ISO 8601, in the future)")
|
|
28805
|
+
}),
|
|
28806
|
+
annotations: OPERATE_SETTING
|
|
28807
|
+
}, (params) => runTool(async () => {
|
|
28808
|
+
if (!params.allowed) return toolResult((await client.reopenProductLicense(params.productId, params.license)).data);
|
|
28809
|
+
if (params.reason === void 0) return toolError("VALIDATION_ERROR", "Say why the license is allowed (reason).");
|
|
28810
|
+
return toolResult((await client.allowProductLicense(params.productId, {
|
|
28811
|
+
license: params.license,
|
|
28812
|
+
ignoreReason: LICENSE_ALLOW_REASON_TO_IGNORE[params.reason],
|
|
28813
|
+
...params.note !== void 0 ? { ignoreNote: params.note } : {},
|
|
28814
|
+
...params.expiresAt !== void 0 ? { ignoreExpiresAt: params.expiresAt } : {}
|
|
28815
|
+
})).data);
|
|
28816
|
+
}));
|
|
28751
28817
|
server.registerTool("taiga_fix_finding", {
|
|
28752
28818
|
title: "Fix a finding",
|
|
28753
28819
|
description: "Raise an initiative that fixes a finding; it ends in a pull request, which merges on its own only where the product's auto-merge allows it. wholeGroup: true fixes, in that repository, every open advisory on that package version in one bump, or every place the rule flagged. A malicious package is removed, with every advisory on that version, whatever wholeGroup says. A language runtime moves every file declaring it together, in a container image only to a tag the image has published. Refused when there is no version to move to (fixable: false; for a runtime, also while its image has not published the fix), the code is in a submodule, or a secret is only in history (rotate it outside Taiga).",
|
|
@@ -30229,7 +30295,8 @@ const READY_BLOCKER_SAID = {
|
|
|
30229
30295
|
bar_lowering: "a fix lowered a check instead of fixing the code",
|
|
30230
30296
|
bar_lowering_unchecked: "Taiga could not check whether a fix lowered a check",
|
|
30231
30297
|
criticals_unresolved: "Taiga's own review left a critical issue unresolved",
|
|
30232
|
-
clean_checkout_failed: "the branch does not install or pass its tests from a clean checkout"
|
|
30298
|
+
clean_checkout_failed: "the branch does not install or pass its tests from a clean checkout",
|
|
30299
|
+
license_not_approved: "a package it adds has a licence that is not on your approved list"
|
|
30233
30300
|
};
|
|
30234
30301
|
/** The first sentence of a run's error, short enough for a row. */
|
|
30235
30302
|
function errorSaid(error) {
|
|
@@ -32283,7 +32350,7 @@ async function licenseReviews(client, productId, now) {
|
|
|
32283
32350
|
packages: data["packages"],
|
|
32284
32351
|
...Number.isNaN(created) ? {} : { waitingDays: Math.floor((now - created) / DAY_MS) },
|
|
32285
32352
|
readWith: "taiga_list_licenses (license)",
|
|
32286
|
-
decideWith: "taiga_change_license (license, action: 'approve'); dismissing it is only in the web"
|
|
32353
|
+
decideWith: "taiga_change_license (license, action: 'approve') for every product" + (client.hasCapability("products:write") ? ", or taiga_allow_license (productId, license) for this one" : "") + "; dismissing it is only in the web"
|
|
32287
32354
|
};
|
|
32288
32355
|
}).filter((r) => productId === void 0 || r.productId === productId),
|
|
32289
32356
|
truncated: result.truncated === true
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taiga-ai/mcp-server",
|
|
3
|
-
"version": "0.36.0-dev.
|
|
3
|
+
"version": "0.36.0-dev.813",
|
|
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",
|