@taiga-ai/mcp-server 0.35.0-dev.769 → 0.35.0-dev.771
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 +42 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -23803,6 +23803,14 @@ var TaigaClient = class {
|
|
|
23803
23803
|
async getActivePlan(itemId) {
|
|
23804
23804
|
return this.request("GET", `/backlog/${seg(itemId)}/plans/active`);
|
|
23805
23805
|
}
|
|
23806
|
+
/** Every plan version of an initiative with the verdict it received, newest first unless `order` says otherwise. */
|
|
23807
|
+
async listPlanHistory(itemId, order) {
|
|
23808
|
+
return this.request("GET", `/backlog/${seg(itemId)}/plans/history${query$1({ order })}`);
|
|
23809
|
+
}
|
|
23810
|
+
/** One plan version with its steps, whether or not it is the active one. */
|
|
23811
|
+
async getPlan(planId) {
|
|
23812
|
+
return this.request("GET", `/plans/${seg(planId)}`);
|
|
23813
|
+
}
|
|
23806
23814
|
async approvePlan(planId) {
|
|
23807
23815
|
return this.request("POST", `/plans/${seg(planId)}/approve`);
|
|
23808
23816
|
}
|
|
@@ -26573,6 +26581,7 @@ const TOOLSET_OF = {
|
|
|
26573
26581
|
taiga_list_initiatives: "core",
|
|
26574
26582
|
taiga_get_initiative: "core",
|
|
26575
26583
|
taiga_get_plan: "core",
|
|
26584
|
+
taiga_list_plans: "core",
|
|
26576
26585
|
taiga_list_runs: "core",
|
|
26577
26586
|
taiga_get_run: "core",
|
|
26578
26587
|
taiga_get_line: "core",
|
|
@@ -26903,7 +26912,7 @@ const ITEM_ID_HINT = "taiga_list_initiatives lists a product's initiatives with
|
|
|
26903
26912
|
const BY_ARGUMENT = {
|
|
26904
26913
|
initiativeId: ITEM_ID_HINT,
|
|
26905
26914
|
runId: "taiga_list_runs lists the runs, of one product or of every product the key can see.",
|
|
26906
|
-
planId: "taiga_get_plan gives the initiative's active plan and its ID.",
|
|
26915
|
+
planId: "taiga_get_plan gives the initiative's active plan and its ID; taiga_list_plans lists every version's ID.",
|
|
26907
26916
|
linkId: "taiga_list_product_repositories lists the product's repository links; a linkable repository id is not a link ID.",
|
|
26908
26917
|
replacesLinkId: "taiga_list_product_repositories lists the product's repository links.",
|
|
26909
26918
|
linkableRepositoryId: "taiga_list_linkable_repositories lists the repositories the GitHub and GitLab connections reach, with their ids.",
|
|
@@ -30503,27 +30512,57 @@ function registerBacklogReads(server, client) {
|
|
|
30503
30512
|
}));
|
|
30504
30513
|
server.registerTool("taiga_get_plan", {
|
|
30505
30514
|
title: "Get the active plan",
|
|
30506
|
-
description: "Read an initiative's active plan, step by step: what each builds, the files it writes and reads, and what it depends on. Enough to approve or reject it; full: true adds each step's complete instructions (long). A plan a request for changes revised says so in revision: the steps it added, edited and dropped, and the committed steps it reverts. NOT_FOUND when there is no active plan
|
|
30515
|
+
description: "Read an initiative's active plan, step by step: what each builds, the files it writes and reads, and what it depends on. Enough to approve or reject it; full: true adds each step's complete instructions (long). A plan a request for changes revised says so in revision: the steps it added, edited and dropped, and the committed steps it reverts. version reads an earlier version instead (taiga_list_plans lists them): the plan comes with its verdict, who gave it and the comment, and what it answers. NOT_FOUND when there is no active plan, the initiative's situation says why; with version, when the initiative has no such version, and the message names the ones it has.",
|
|
30507
30516
|
inputSchema: object({
|
|
30508
30517
|
initiativeId,
|
|
30518
|
+
version: number$1().int().min(1).optional().describe("A plan version to read, such as 1 (default: the active plan); taiga_list_plans lists the versions"),
|
|
30509
30519
|
full: boolean().optional().describe("Carry each step's complete instructions (default false: a summary)")
|
|
30510
30520
|
}),
|
|
30511
30521
|
annotations: READ_ONLY
|
|
30512
30522
|
}, (params) => runTool(async () => {
|
|
30513
|
-
|
|
30523
|
+
let plan;
|
|
30524
|
+
let versionNote = {};
|
|
30525
|
+
if (params.version === void 0) plan = (await client.getActivePlan(params.initiativeId)).data;
|
|
30526
|
+
else {
|
|
30527
|
+
const history = (await client.listPlanHistory(params.initiativeId, "oldest")).data;
|
|
30528
|
+
const entry = history.find((candidate) => candidate.version === params.version);
|
|
30529
|
+
if (!entry) {
|
|
30530
|
+
const have = history.map((candidate) => candidate.version).sort((a, b) => a - b);
|
|
30531
|
+
return toolError("NOT_FOUND", have.length > 0 ? `This initiative has no plan version ${params.version}; it has version${have.length > 1 ? "s" : ""} ${have.join(", ")}.` : `This initiative has no plan version ${params.version}: it has never been planned.`);
|
|
30532
|
+
}
|
|
30533
|
+
plan = (await client.getPlan(entry.planId)).data;
|
|
30534
|
+
versionNote = {
|
|
30535
|
+
verdict: entry.verdict,
|
|
30536
|
+
answers: entry.answers
|
|
30537
|
+
};
|
|
30538
|
+
}
|
|
30514
30539
|
const revision = await planRevisionOf(client, params.initiativeId, plan.id);
|
|
30515
30540
|
const revised = revision ? { revision } : {};
|
|
30516
30541
|
if (params.full) return toolResult({
|
|
30517
30542
|
...plan,
|
|
30543
|
+
...versionNote,
|
|
30518
30544
|
...revised
|
|
30519
30545
|
});
|
|
30520
30546
|
const steps = Array.isArray(plan.steps) ? plan.steps : [];
|
|
30521
30547
|
return toolResult({
|
|
30522
30548
|
...pickFields([plan], PLAN_SUMMARY_FIELDS)[0],
|
|
30549
|
+
...versionNote,
|
|
30523
30550
|
...revised,
|
|
30524
30551
|
steps: pickFields(steps, PLAN_STEP_SUMMARY_FIELDS)
|
|
30525
30552
|
});
|
|
30526
30553
|
}));
|
|
30554
|
+
server.registerTool("taiga_list_plans", {
|
|
30555
|
+
title: "List plan versions and their verdicts",
|
|
30556
|
+
description: "List every plan version of an initiative, newest first (order: 'oldest' reverses it). Each version has its status, its verdict (approved, rejected, changes_requested, awaiting_review, or none when none was recorded), who gave it by name, when and the comment, and the earlier version and comment it answers. taiga_get_plan with version reads one in full. An initiative never planned returns an empty list.",
|
|
30557
|
+
inputSchema: object({
|
|
30558
|
+
initiativeId,
|
|
30559
|
+
order: _enum(["newest", "oldest"]).optional().describe("Order of the versions (default 'newest')")
|
|
30560
|
+
}),
|
|
30561
|
+
annotations: READ_ONLY
|
|
30562
|
+
}, (params) => runTool(async () => {
|
|
30563
|
+
const versions = (await client.listPlanHistory(params.initiativeId, params.order)).data;
|
|
30564
|
+
return toolResult({ versions });
|
|
30565
|
+
}));
|
|
30527
30566
|
}
|
|
30528
30567
|
function registerRequest(server, client) {
|
|
30529
30568
|
server.registerTool("taiga_request_initiatives", {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taiga-ai/mcp-server",
|
|
3
|
-
"version": "0.35.0-dev.
|
|
3
|
+
"version": "0.35.0-dev.771",
|
|
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",
|