@taiga-ai/mcp-server 0.36.0-dev.777 → 0.36.0-rc.776

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 +42 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -23814,6 +23814,14 @@ var TaigaClient = class {
23814
23814
  async getActivePlan(itemId) {
23815
23815
  return this.request("GET", `/backlog/${seg(itemId)}/plans/active`);
23816
23816
  }
23817
+ /** Every plan version of an initiative with the verdict it received, newest first unless `order` says otherwise. */
23818
+ async listPlanHistory(itemId, order) {
23819
+ return this.request("GET", `/backlog/${seg(itemId)}/plans/history${query$1({ order })}`);
23820
+ }
23821
+ /** One plan version with its steps, whether or not it is the active one. */
23822
+ async getPlan(planId) {
23823
+ return this.request("GET", `/plans/${seg(planId)}`);
23824
+ }
23817
23825
  async approvePlan(planId) {
23818
23826
  return this.request("POST", `/plans/${seg(planId)}/approve`);
23819
23827
  }
@@ -26588,6 +26596,7 @@ const TOOLSET_OF = {
26588
26596
  taiga_list_initiatives: "core",
26589
26597
  taiga_get_initiative: "core",
26590
26598
  taiga_get_plan: "core",
26599
+ taiga_list_plans: "core",
26591
26600
  taiga_list_runs: "core",
26592
26601
  taiga_get_run: "core",
26593
26602
  taiga_get_line: "core",
@@ -26918,7 +26927,7 @@ const ITEM_ID_HINT = "taiga_list_initiatives lists a product's initiatives with
26918
26927
  const BY_ARGUMENT = {
26919
26928
  initiativeId: ITEM_ID_HINT,
26920
26929
  runId: "taiga_list_runs lists the runs, of one product or of every product the key can see.",
26921
- planId: "taiga_get_plan gives the initiative's active plan and its ID.",
26930
+ planId: "taiga_get_plan gives the initiative's active plan and its ID; taiga_list_plans lists every version's ID.",
26922
26931
  linkId: "taiga_list_product_repositories lists the product's repository links; a linkable repository id is not a link ID.",
26923
26932
  replacesLinkId: "taiga_list_product_repositories lists the product's repository links.",
26924
26933
  linkableRepositoryId: "taiga_list_linkable_repositories lists the repositories the GitHub and GitLab connections reach, with their ids.",
@@ -30553,27 +30562,57 @@ function registerBacklogReads(server, client) {
30553
30562
  }));
30554
30563
  server.registerTool("taiga_get_plan", {
30555
30564
  title: "Get the active plan",
30556
- 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, the initiative's situation says why.",
30565
+ 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.",
30557
30566
  inputSchema: object({
30558
30567
  initiativeId,
30568
+ 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"),
30559
30569
  full: boolean().optional().describe("Carry each step's complete instructions (default false: a summary)")
30560
30570
  }),
30561
30571
  annotations: READ_ONLY
30562
30572
  }, (params) => runTool(async () => {
30563
- const plan = (await client.getActivePlan(params.initiativeId)).data;
30573
+ let plan;
30574
+ let versionNote = {};
30575
+ if (params.version === void 0) plan = (await client.getActivePlan(params.initiativeId)).data;
30576
+ else {
30577
+ const history = (await client.listPlanHistory(params.initiativeId, "oldest")).data;
30578
+ const entry = history.find((candidate) => candidate.version === params.version);
30579
+ if (!entry) {
30580
+ const have = history.map((candidate) => candidate.version).sort((a, b) => a - b);
30581
+ 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.`);
30582
+ }
30583
+ plan = (await client.getPlan(entry.planId)).data;
30584
+ versionNote = {
30585
+ verdict: entry.verdict,
30586
+ answers: entry.answers
30587
+ };
30588
+ }
30564
30589
  const revision = await planRevisionOf(client, params.initiativeId, plan.id);
30565
30590
  const revised = revision ? { revision } : {};
30566
30591
  if (params.full) return toolResult({
30567
30592
  ...plan,
30593
+ ...versionNote,
30568
30594
  ...revised
30569
30595
  });
30570
30596
  const steps = Array.isArray(plan.steps) ? plan.steps : [];
30571
30597
  return toolResult({
30572
30598
  ...pickFields([plan], PLAN_SUMMARY_FIELDS)[0],
30599
+ ...versionNote,
30573
30600
  ...revised,
30574
30601
  steps: pickFields(steps, PLAN_STEP_SUMMARY_FIELDS)
30575
30602
  });
30576
30603
  }));
30604
+ server.registerTool("taiga_list_plans", {
30605
+ title: "List plan versions and their verdicts",
30606
+ 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.",
30607
+ inputSchema: object({
30608
+ initiativeId,
30609
+ order: _enum(["newest", "oldest"]).optional().describe("Order of the versions (default 'newest')")
30610
+ }),
30611
+ annotations: READ_ONLY
30612
+ }, (params) => runTool(async () => {
30613
+ const versions = (await client.listPlanHistory(params.initiativeId, params.order)).data;
30614
+ return toolResult({ versions });
30615
+ }));
30577
30616
  }
30578
30617
  function registerRequest(server, client) {
30579
30618
  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.36.0-dev.777",
3
+ "version": "0.36.0-rc.776",
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",