@taiga-ai/mcp-server 0.35.0-dev.747 → 0.35.0-rc.746

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 +5 -59
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -23212,9 +23212,6 @@ const PRODUCT_DOCUMENT_DISPLAY_NAMES = {
23212
23212
  const PRODUCT_DOCUMENT_ORIGINS = ["plan", "reality"];
23213
23213
  //#endregion
23214
23214
  //#region ../../packages/types/dist/backlog.js
23215
- /** Dispositions that end an item's pipeline life: settled work neither blocks
23216
- * dependants nor counts toward completion denominators. */
23217
- const SETTLED_BACKLOG_STATUSES = ["done", "canceled"];
23218
23215
  /**
23219
23216
  * The initiative's STORED state on the line board (PRO-1305, phase 1).
23220
23217
  *
@@ -23264,11 +23261,6 @@ const LINE_STATES = [
23264
23261
  "plan",
23265
23262
  "build"
23266
23263
  ];
23267
- /** Finished work: settled by a person or a merge, or archived. The one
23268
- * predicate every "can this still move / plan / build" guard reads. */
23269
- function isSettledOrArchived(item) {
23270
- return item.archivedAt != null || SETTLED_BACKLOG_STATUSES.includes(item.status);
23271
- }
23272
23264
  /**
23273
23265
  * The columns a person can drop an initiative into by hand.
23274
23266
  *
@@ -25645,11 +25637,10 @@ function inProductWords(value) {
25645
25637
  const actions = value["actions"];
25646
25638
  if (Array.isArray(actions) && actions.some((action) => WEB_ONLY_ACTIONS.has(String(action)))) {
25647
25639
  const webOnly = actions.filter((action) => WEB_ONLY_ACTIONS.has(String(action)));
25648
- const said = value["webOnlyActions"];
25649
25640
  value = {
25650
25641
  ...value,
25651
25642
  actions: actions.filter((action) => !WEB_ONLY_ACTIONS.has(String(action))),
25652
- webOnlyActions: [.../* @__PURE__ */ new Set([...Array.isArray(said) ? said : [], ...webOnly])]
25643
+ webOnlyActions: webOnly
25653
25644
  };
25654
25645
  }
25655
25646
  for (const [key, inner] of Object.entries(value)) Object.defineProperty(out, PRODUCT_WORDS[key] ?? key, {
@@ -28050,15 +28041,8 @@ function readableRun(run, opts = {}) {
28050
28041
  const blocking = typeof hardening?.blockingFindings === "number" ? hardening.blockingFindings : 0;
28051
28042
  const named = Array.isArray(hardening?.blocking) ? hardening.blocking : [];
28052
28043
  const scan = scanSaid(hardening);
28053
- const actions = Array.isArray(run["actions"]) ? run["actions"] : null;
28054
- const cannotRetry = actions !== null && run["status"] !== "failed" && run["status"] !== "stopped" && actions.includes("retry_from_failed_step");
28055
- const existingWebOnly = Array.isArray(run["webOnlyActions"]) ? run["webOnlyActions"] : [];
28056
28044
  return {
28057
28045
  ...rest,
28058
- ...cannotRetry ? {
28059
- actions: actions.filter((action) => action !== "retry_from_failed_step"),
28060
- webOnlyActions: [.../* @__PURE__ */ new Set([...existingWebOnly, "retry_from_failed_step"])]
28061
- } : {},
28062
28046
  ...origin === void 0 ? {} : { origin: origin === "backlog" ? "initiative" : origin },
28063
28047
  ...means ? { failedReasonMeans: means } : {},
28064
28048
  ...scan && scan.gaps + (scan.verdict === "not_scanned" ? 1 : 0) > 0 ? { scanCoverage: scan.said } : {},
@@ -28175,24 +28159,6 @@ function verificationNote(steps) {
28175
28159
  const proseSaid = prose ? `, including step ${String(prose["stepOrder"])}, which changed only documentation` : "";
28176
28160
  return `Taiga's ${always.join(" and ")} check failed after every checked step (${String(first)} to ${String(last)})${proseSaid}. A check failing from the first step on is usually one the repository or the check environment fails throughout, not one each step broke. ` + (reasons.length > 0 ? `Its reason${reasons.length === 1 ? "" : "s"}: ${reasons.slice(0, 3).join("; ")}.` : "It records no reason; each step's headline says what its own run found.");
28177
28161
  }
28178
- /** What carrying a failed or stopped run on says, from the initiative it belongs to (PRO-1889's resume). */
28179
- async function carryOnStep(client, run) {
28180
- const actions = Array.isArray(run["actions"]) ? run["actions"] : [];
28181
- const initiativeId = run["backlogItemId"];
28182
- if (run["status"] !== "failed" && run["status"] !== "stopped" || typeof initiativeId !== "string" || !actions.some((action) => action === "resume" || action === "retry_from_failed_step")) return null;
28183
- try {
28184
- const item = (await client.getBacklogItem(initiativeId)).data;
28185
- if (typeof item.status === "string" && isSettledOrArchived({
28186
- status: item.status,
28187
- archivedAt: typeof item.archivedAt === "string" ? item.archivedAt : null
28188
- })) return item.archivedAt != null ? "Its initiative is archived, so there is nothing to resume; unarchive it first." : `Its initiative is ${item.status}, so there is nothing to resume; reopen it first.`;
28189
- if (typeof item.state === "string" && item.needsHumanCause == null && item.state !== "plan" && item.state !== "build") return `Its initiative is in ${item.state}, not being built, so there is nothing to resume; move it to Queue to have the line build it (taiga_queue_initiative).`;
28190
- return item.lifecycle?.latestBuild?.id === run["id"] ? `taiga_resume_initiative (initiativeId ${initiativeId}) carries this run on from its first unfinished step, keeping the steps already done (paid work: ask first).` : "A newer run of its initiative supersedes this one; taiga_get_initiative says what applies.";
28191
- } catch (error) {
28192
- if (error instanceof TaigaApiError || isNetworkFailure(error)) return null;
28193
- throw error;
28194
- }
28195
- }
28196
28162
  /** readableRun for a list row. */
28197
28163
  const readableRow = (run) => readableRun(run, { row: true });
28198
28164
  /** How many products the org-wide list names; past this a row keeps its productId only. */
@@ -28329,7 +28295,7 @@ function registerBuildTools(server, client) {
28329
28295
  }));
28330
28296
  server.registerTool("taiga_get_run", {
28331
28297
  title: "Get run",
28332
- description: "Read one coding agent run, and why it failed when it did: its outcome, pull request, security pass (scanCoverage names scanners that did not run) and each step with its commit, files and checks. A failed run says where it stopped (stoppedIn) and the line of the error that says why (cause). full: true adds every step's instructions and report. lastReplan says what a request for changes did to the plan the run builds now: the steps it added, edited and dropped. A failed or stopped run's nextStep says how to carry it on (taiga_resume_initiative on its initiative).",
28298
+ description: "Read one coding agent run, and why it failed when it did: its outcome, pull request, security pass (scanCoverage names scanners that did not run) and each step with its commit, files and checks. A failed run says where it stopped (stoppedIn) and the line of the error that says why (cause). full: true adds every step's instructions and report. lastReplan says what a request for changes did to the plan the run builds now: the steps it added, edited and dropped. Carry it on from its initiative (taiga_resume_initiative).",
28333
28299
  inputSchema: object({
28334
28300
  runId,
28335
28301
  full: boolean().optional().describe("Carry each step's complete instructions and report (default false: a summary)")
@@ -28347,10 +28313,8 @@ function registerBuildTools(server, client) {
28347
28313
  };
28348
28314
  const [states, lastReplan] = await Promise.all([initiativeStates(client, [runRow]), runRow.backlogItemId && runRow.planId ? planRevisionOf(client, runRow.backlogItemId, runRow.planId) : Promise.resolve(null)]);
28349
28315
  const waitsForReview = runRow.status === "replanning" && runRow.failedReason === "steer_review";
28350
- const nextStep = await carryOnStep(client, runRow);
28351
28316
  const readable = {
28352
28317
  ...withInitiativeState(readableRun(runRow), states),
28353
- ...nextStep ? { nextStep } : {},
28354
28318
  ...lastReplan ? { lastReplan: {
28355
28319
  ...lastReplan,
28356
28320
  waitsForReview
@@ -28703,17 +28667,6 @@ const STAGE = {
28703
28667
  canceled: "Canceled"
28704
28668
  };
28705
28669
  /**
28706
- * Whether a run can be carried on by taiga_resume_initiative (the API's deriveRunActions, which mirrors
28707
- * applyUserCommand('resume')): failed or stopped, its pull request not merged, and resume or retry_from_failed_step
28708
- * among its actions. A run absent, or one without actions (an older API), is taken to be carried on, as before.
28709
- */
28710
- function canCarryOn(latestBuild) {
28711
- if (!latestBuild || typeof latestBuild !== "object") return true;
28712
- const run = latestBuild;
28713
- if (!Array.isArray(run.actions)) return true;
28714
- return (run.status === "failed" || run.status === "stopped") && run.actions.some((action) => action === "resume" || action === "retry_from_failed_step");
28715
- }
28716
- /**
28717
28670
  * Where an initiative stands and what moves it on, in one sentence (PRO-2800).
28718
28671
  * Five fields carried it (status, state, planningStatus, needsHumanCause,
28719
28672
  * lifecycle) and a reviewing agent had to read the queue, the initiative and
@@ -28753,7 +28706,7 @@ function situationOf(item) {
28753
28706
  }
28754
28707
  const turn = life.turn === "you" ? "A person's turn" : life.turn === "agent" ? "The agent's turn" : null;
28755
28708
  const handedBack = handbackSaid(build?.reviewEscalation);
28756
- const move = life.cta === "review_pr" && handedBack ? `a person should ${handbackNextStep(build.reviewEscalation, build.provider)}` : stalled && offTheLine || offTheLineStart && life.stage !== "backlog" ? OFF_THE_LINE_MOVE : typeof life.cta === "string" ? life.cta === "resume_build" && !canCarryOn(build) ? CTA_MOVE["retry_build"] : CTA_MOVE[life.cta] : void 0;
28709
+ const move = life.cta === "review_pr" && handedBack ? `a person should ${handbackNextStep(build.reviewEscalation, build.provider)}` : stalled && offTheLine || offTheLineStart && life.stage !== "backlog" ? OFF_THE_LINE_MOVE : typeof life.cta === "string" ? CTA_MOVE[life.cta] : void 0;
28757
28710
  if (requeued) parts.push(`Nothing to do: ${REQUEUED_MOVE}.`);
28758
28711
  else if (life.cta === "view_pr") parts.push(`Nothing to do: ${move}.`);
28759
28712
  else if (turn && move) parts.push(`${turn}: ${move}.`);
@@ -29243,17 +29196,10 @@ function registerReviewGate(server, client) {
29243
29196
  function registerResume(server, client) {
29244
29197
  server.registerTool("taiga_resume_initiative", {
29245
29198
  title: "Resume initiative",
29246
- description: "Carry on an initiative: a failed plan is planned again; a stopped run, or one that failed for a transient reason (server_orphan, timeout), resumes from its first unfinished step and keeps the steps already done, whether or not the line flagged it. Refused, with the action that applies, when the run cannot be resumed (its pull request closed, or nothing is left to do).",
29199
+ description: "Carry on an initiative the line stopped on: a failed plan is planned again, a stopped or failed run resumes from its first unfinished step. Refused when nothing is stopped; the initiative's situation says what applies.",
29247
29200
  inputSchema: object({ initiativeId }),
29248
29201
  annotations: OPERATE
29249
- }, (params) => runTool(async () => {
29250
- try {
29251
- return outcome((await client.resumeInitiative(params.initiativeId)).data);
29252
- } catch (error) {
29253
- if (error instanceof TaigaApiError && error.status === 409 && error.details?.["applies"] === "start_over") return toolError("CONFLICT", `${error.apiMessage ?? "This run cannot be resumed."} Starting over is in the web app (the run page); taiga_move_initiative takes the initiative off the line.`, error.details);
29254
- throw error;
29255
- }
29256
- }));
29202
+ }, (params) => runTool(async () => outcome((await client.resumeInitiative(params.initiativeId)).data)));
29257
29203
  }
29258
29204
  /**
29259
29205
  * One tool for both verdicts on a plan (PRO-3044): approving and sending back are the same review, and two tools for
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taiga-ai/mcp-server",
3
- "version": "0.35.0-dev.747",
3
+ "version": "0.35.0-rc.746",
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",