@taiga-ai/mcp-server 0.51.0-dev.1260 → 0.51.0-dev.1261

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 +25 -10
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -23606,10 +23606,6 @@ function parseErrorBody(body) {
23606
23606
  return {};
23607
23607
  }
23608
23608
  }
23609
- /**
23610
- * HTTP client for the Taiga API.
23611
- * Used by the MCP server to proxy tool calls to the backend.
23612
- */
23613
23609
  var TaigaClient = class {
23614
23610
  baseUrl;
23615
23611
  /** The API this client talks to, as its host: the environment a reader is in (PRO-2823). */
@@ -27275,6 +27271,8 @@ const TURN_EVENT_TRIGGERS = [
27275
27271
  "changes_answered",
27276
27272
  "run_replanned"
27277
27273
  ];
27274
+ /** Longest request a change carries: what the person asked for, in a paragraph or two. */
27275
+ const CHANGE_ASK_MAX_CHARS = 2e3;
27278
27276
  /**
27279
27277
  * The events the feed reads beside the turn log (PRO-3156): a board move, a
27280
27278
  * stop cleared, and a person's Start now press. They carry no possession (`turn` is null), so they are not
@@ -44366,6 +44364,19 @@ function carriedCriteria(current, next) {
44366
44364
  const criteriaSpec = (list) => JSON.stringify((list ?? []).map((c) => [c.criterion, c.endToEnd === true]));
44367
44365
  /** The largest value the priority and estimate columns hold (Postgres integer); the route has no bound of its own. */
44368
44366
  const MAX_INT = 2147483647;
44367
+ /**
44368
+ * What the person asked for, as the initiative's history keeps it beside the change (the timeline quotes it): an
44369
+ * agent's change shows whose words it answered, not only what it changed.
44370
+ */
44371
+ const askInput = string$2().trim().min(1).max(CHANGE_ASK_MAX_CHARS).describe("What the person asked you for that this answers, in their own words: quote them where you can, in a sentence or two. Shown on the initiative's timeline with the change, so a reader sees why it was made. Not an instruction to anyone");
44372
+ /** The request and the client that sent it, as the API records them with the change. */
44373
+ function askOf(server, request) {
44374
+ const name = server.server.getClientVersion()?.name?.trim();
44375
+ return {
44376
+ request,
44377
+ ...name ? { client: name.slice(0, 64) } : {}
44378
+ };
44379
+ }
44369
44380
  function registerEdit(server, client) {
44370
44381
  server.registerTool("taiga_update_initiative", {
44371
44382
  title: "Edit initiative",
@@ -44380,11 +44391,12 @@ function registerEdit(server, client) {
44380
44391
  dependencies: array(idInput("initiative", "taiga_list_initiatives gives it")).optional().describe("Every initiative it waits for, replacing the list; [] clears it"),
44381
44392
  acceptanceCriteria: array(criterionInput).optional().describe("Every criterion, in order, replacing the list"),
44382
44393
  assigneeId: idInput("person", "taiga_list_product_people gives it").nullable().optional().describe("The one person accountable for it, someone who can open the product; null unassigns it"),
44383
- documentIds: array(idInput("knowledge file", "taiga_list_knowledge gives it")).optional().describe(`Every knowledge file it links, at most 25, replacing the list; [] clears it. Images in its description stay linked whatever is sent`)
44394
+ documentIds: array(idInput("knowledge file", "taiga_list_knowledge gives it")).optional().describe(`Every knowledge file it links, at most 25, replacing the list; [] clears it. Images in its description stay linked whatever is sent`),
44395
+ request: askInput
44384
44396
  }),
44385
44397
  annotations: WRITE
44386
44398
  }, (params) => runTool(async () => {
44387
- const { initiativeId: id, acceptanceCriteria, documentIds, ...fields } = params;
44399
+ const { initiativeId: id, acceptanceCriteria, documentIds, request, ...fields } = params;
44388
44400
  if (fields.dependencies?.includes(id)) return toolError("VALIDATION_ERROR", "An initiative cannot depend on itself.");
44389
44401
  if (acceptanceCriteria === void 0 && documentIds === void 0 && Object.values(fields).every((value) => value === void 0)) return toolError("VALIDATION_ERROR", "Give at least one of title, description, priority, estimate, category, dependencies, acceptanceCriteria, assigneeId or documentIds.");
44390
44402
  if (documentIds !== void 0) {
@@ -44422,7 +44434,8 @@ function registerEdit(server, client) {
44422
44434
  ...fields.dependencies !== void 0 ? { dependencies: fields.dependencies } : {},
44423
44435
  ...fields.assigneeId !== void 0 ? { assigneeId: fields.assigneeId } : {},
44424
44436
  ...criteria !== void 0 ? { acceptanceCriteria: criteria } : {},
44425
- ...links && linksChange ? { documentIds: links.send } : {}
44437
+ ...links && linksChange ? { documentIds: links.send } : {},
44438
+ ...askOf(server, request)
44426
44439
  })).data;
44427
44440
  } catch (error) {
44428
44441
  if (links && error instanceof TaigaApiError && error.status === 400 && (error.apiMessage ?? "").includes("Referenced documents")) return toolError("VALIDATION_ERROR", `${error.apiMessage} Leave them out of documentIds to unlink them.`);
@@ -44558,10 +44571,11 @@ const BUILD_STATION = /* @__PURE__ */ new Set(["plan", "build"]);
44558
44571
  function registerPlanAgain(server, client) {
44559
44572
  server.registerTool("taiga_plan_again", {
44560
44573
  title: "Plan an initiative again",
44561
- description: "Replace the plan of an initiative in Build with a new one: after a failed plan, or a plan or run you do not want. The old plan is kept and an open pull request stays open. Refused while an agent holds the turn, and while a dependency is in flight or a UI direction has no chosen concept unless force: true (the person decides). Off Build, queue it instead.",
44574
+ description: "Replace the plan of an initiative in Build with a new one: after a failed plan, or a plan or run you do not want. The old plan is kept and an open pull request stays open. Refused while an agent holds the turn, and while a dependency is in flight or a UI direction has no chosen concept unless force: true (the person decides). Off Build, queue it instead. request is kept on its timeline, not handed to the planner: to steer the next plan, reject the one waiting with a comment (taiga_review_plan).",
44562
44575
  inputSchema: object({
44563
44576
  initiativeId,
44564
- force: boolean().optional().describe("Plan anyway past an unsettled dependency or an unchosen UI direction; only when the person says so")
44577
+ force: boolean().optional().describe("Plan anyway past an unsettled dependency or an unchosen UI direction; only when the person says so"),
44578
+ request: askInput
44565
44579
  }),
44566
44580
  annotations: OPERATE
44567
44581
  }, (params) => runTool(async () => {
@@ -44569,7 +44583,8 @@ function registerPlanAgain(server, client) {
44569
44583
  if (!BUILD_STATION.has(String(item.state))) return toolError("CONFLICT", `This initiative is in ${String(item.state)}, not at the Build station. The queue is the only way to start work: put it in the queue with taiga_queue_initiative and it is planned when its turn comes.`);
44570
44584
  const body = {
44571
44585
  state: "plan",
44572
- ...params.force ? { force: true } : {}
44586
+ ...params.force ? { force: true } : {},
44587
+ ...askOf(server, params.request)
44573
44588
  };
44574
44589
  return outcome((await client.transitionInitiative(params.initiativeId, body)).data);
44575
44590
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taiga-ai/mcp-server",
3
- "version": "0.51.0-dev.1260",
3
+ "version": "0.51.0-dev.1261",
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",