@taiga-ai/mcp-server 0.28.0-rc.602 → 0.28.0-rc.620
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 +84 -10
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -23587,7 +23587,8 @@ object({
|
|
|
23587
23587
|
file: lenient(string$2()),
|
|
23588
23588
|
failingChecks: lenient(lenientList(storedFailingCheck)),
|
|
23589
23589
|
blockers: lenient(lenientList(_enum(READY_BLOCKERS))),
|
|
23590
|
-
detail: lenient(string$2())
|
|
23590
|
+
detail: lenient(string$2()),
|
|
23591
|
+
roundsPaused: lenient(boolean())
|
|
23591
23592
|
}).transform((e) => ({
|
|
23592
23593
|
reason: e.reason,
|
|
23593
23594
|
...e.rounds === void 0 ? {} : { rounds: e.rounds },
|
|
@@ -23595,7 +23596,8 @@ object({
|
|
|
23595
23596
|
...e.file === void 0 ? {} : { file: e.file },
|
|
23596
23597
|
...e.failingChecks === void 0 ? {} : { failingChecks: e.failingChecks },
|
|
23597
23598
|
...e.blockers === void 0 ? {} : { blockers: e.blockers },
|
|
23598
|
-
...e.detail === void 0 ? {} : { detail: e.detail }
|
|
23599
|
+
...e.detail === void 0 ? {} : { detail: e.detail },
|
|
23600
|
+
...e.roundsPaused === void 0 ? {} : { roundsPaused: e.roundsPaused }
|
|
23599
23601
|
}));
|
|
23600
23602
|
/**
|
|
23601
23603
|
* What a run's hardening came to, coverage included (PRO-2829). `passed`
|
|
@@ -23893,6 +23895,68 @@ discriminatedUnion("kind", [
|
|
|
23893
23895
|
}).optional()
|
|
23894
23896
|
})
|
|
23895
23897
|
]).options.map((option) => option.shape.kind.value);
|
|
23898
|
+
/** The raster types factory-vm serves, read from the bytes. Never SVG, which can carry script. */
|
|
23899
|
+
const BUILD_OVERVIEW_IMAGE_TYPES = [
|
|
23900
|
+
"image/png",
|
|
23901
|
+
"image/jpeg",
|
|
23902
|
+
"image/gif",
|
|
23903
|
+
"image/webp"
|
|
23904
|
+
];
|
|
23905
|
+
/** The largest image, as factory-vm bounds it (5 MiB). */
|
|
23906
|
+
const BUILD_OVERVIEW_IMAGE_MAX_BYTES = 5242880;
|
|
23907
|
+
/** The longest document: factory-vm keeps it at 60,000 characters. */
|
|
23908
|
+
const BUILD_OVERVIEW_DOCUMENT_MAX = 6e4;
|
|
23909
|
+
/** An image's name: letters, digits, `.`, `_` and `-`, starting with a letter or digit. */
|
|
23910
|
+
const BUILD_OVERVIEW_ASSET_NAME = /^[A-Za-z0-9][A-Za-z0-9._-]{0,99}$/;
|
|
23911
|
+
/**
|
|
23912
|
+
* - `ready`: the document and every image it shows were collected.
|
|
23913
|
+
* - `unavailable`: there is none to show: factory-vm wrote none, or
|
|
23914
|
+
* collecting it failed. `problems` says why.
|
|
23915
|
+
*/
|
|
23916
|
+
const BUILD_OVERVIEW_STATUSES = ["ready", "unavailable"];
|
|
23917
|
+
const buildOverviewAsset = object({
|
|
23918
|
+
name: string$2().regex(BUILD_OVERVIEW_ASSET_NAME),
|
|
23919
|
+
/** What the image shows; its caption and its alt text. */
|
|
23920
|
+
caption: string$2().trim().min(1).max(1e3),
|
|
23921
|
+
mediaType: _enum(BUILD_OVERVIEW_IMAGE_TYPES),
|
|
23922
|
+
size: number$1().int().min(1).max(BUILD_OVERVIEW_IMAGE_MAX_BYTES),
|
|
23923
|
+
/** Hex SHA-256 of the bytes. */
|
|
23924
|
+
sha256: string$2().regex(/^[0-9a-f]{64}$/)
|
|
23925
|
+
});
|
|
23926
|
+
object({
|
|
23927
|
+
version: literal(1),
|
|
23928
|
+
status: _enum(BUILD_OVERVIEW_STATUSES),
|
|
23929
|
+
/** The Markdown, its images at `asset:<name>`. Only when ready. */
|
|
23930
|
+
document: string$2().trim().min(1).max(BUILD_OVERVIEW_DOCUMENT_MAX).optional(),
|
|
23931
|
+
/** The images, in the order the document first shows them. */
|
|
23932
|
+
assets: array(buildOverviewAsset).max(20).default([]),
|
|
23933
|
+
/** Why there is none, in plain sentences. Only when unavailable. */
|
|
23934
|
+
problems: array(string$2().trim().min(1).max(1e3)).max(20).default([])
|
|
23935
|
+
}).superRefine((body, ctx) => {
|
|
23936
|
+
if (body.status === "ready") {
|
|
23937
|
+
if (!body.document) ctx.addIssue({
|
|
23938
|
+
code: "custom",
|
|
23939
|
+
path: ["document"],
|
|
23940
|
+
message: "A ready overview has a document"
|
|
23941
|
+
});
|
|
23942
|
+
if (new Set(body.assets.map((a) => a.name)).size !== body.assets.length) ctx.addIssue({
|
|
23943
|
+
code: "custom",
|
|
23944
|
+
path: ["assets"],
|
|
23945
|
+
message: "Each image is named once"
|
|
23946
|
+
});
|
|
23947
|
+
} else {
|
|
23948
|
+
if (body.problems.length === 0) ctx.addIssue({
|
|
23949
|
+
code: "custom",
|
|
23950
|
+
path: ["problems"],
|
|
23951
|
+
message: "Say why there is no overview"
|
|
23952
|
+
});
|
|
23953
|
+
if (body.document || body.assets.length > 0) ctx.addIssue({
|
|
23954
|
+
code: "custom",
|
|
23955
|
+
path: ["document"],
|
|
23956
|
+
message: "Only a ready overview carries a document"
|
|
23957
|
+
});
|
|
23958
|
+
}
|
|
23959
|
+
});
|
|
23896
23960
|
[...BUILD_RUN_ACTIVE_STATUSES.filter((s) => s !== "reviewing")];
|
|
23897
23961
|
//#endregion
|
|
23898
23962
|
//#region ../../packages/types/dist/agents.js
|
|
@@ -27370,7 +27434,7 @@ function runOutcome(run) {
|
|
|
27370
27434
|
succeeded: `Merged: ${pr} is in ${typeof run["baseBranch"] === "string" ? run["baseBranch"] : "the base branch"}.`,
|
|
27371
27435
|
unmerged: typeof run["prNumber"] === "number" || run["prUrl"] ? `Settled without merging: ${pr} was left unmerged.` : "Settled without a merged pull request.",
|
|
27372
27436
|
failed: `Failed${why ? `: ${why}` : ""}${progress}.`,
|
|
27373
|
-
stopped: replanHandedBack(run["failedReason"],
|
|
27437
|
+
stopped: replanHandedBack(run["failedReason"], run["error"], progress) ?? `Stopped before it finished${progress}.`,
|
|
27374
27438
|
rejected: `${pr} was closed without merging, so the work did not land.${handback ? ` It had been handed back: ${handback}.` : ""}`
|
|
27375
27439
|
}[disposition] ?? status
|
|
27376
27440
|
};
|
|
@@ -27387,12 +27451,22 @@ function steerPaused(reason, progress) {
|
|
|
27387
27451
|
* A run its re-plan handed back (PRO-3165), in one sentence with the
|
|
27388
27452
|
* planner's reason. Null for any other stop.
|
|
27389
27453
|
*/
|
|
27390
|
-
function replanHandedBack(reason,
|
|
27391
|
-
|
|
27392
|
-
|
|
27393
|
-
if (reason === "
|
|
27394
|
-
return
|
|
27395
|
-
}
|
|
27454
|
+
function replanHandedBack(reason, error, progress) {
|
|
27455
|
+
if (reason !== "replan_refused" && reason !== "replan_failed") return null;
|
|
27456
|
+
const why = plannerReasonSaid(error);
|
|
27457
|
+
if (reason === "replan_refused") return `Stopped${progress}, handed back: the planner would not plan the request for changes${why ? `: ${why}` : "."} Resume continues the original plan.`;
|
|
27458
|
+
return `Stopped${progress}, handed back: ${why ?? "the plan could not be revised."} Resume continues the original plan.`;
|
|
27459
|
+
}
|
|
27460
|
+
/** A hand-back's reason on one line, ending as a sentence, capped for a row. */
|
|
27461
|
+
function plannerReasonSaid(error) {
|
|
27462
|
+
if (typeof error !== "string") return null;
|
|
27463
|
+
const text = error.replace(/\s+/g, " ").trim();
|
|
27464
|
+
if (!text) return null;
|
|
27465
|
+
const capped = text.length > PLANNER_REASON_MAX ? `${text.slice(0, PLANNER_REASON_MAX).replace(/\s+\S*$/, "")}...` : text;
|
|
27466
|
+
return /[.!?]$/.test(capped) ? capped : `${capped}.`;
|
|
27467
|
+
}
|
|
27468
|
+
/** Characters of a planner's reason an outcome carries. */
|
|
27469
|
+
const PLANNER_REASON_MAX = 600;
|
|
27396
27470
|
/** Words a sentence does not end at: "e.g." and the like, and a lone initial. */
|
|
27397
27471
|
const ABBREVIATION = /(?:\b(?:e\.g|i\.e|etc|vs|cf|incl|approx)|(?:^|\s)[A-Za-z])\.$/i;
|
|
27398
27472
|
/** A finding's first sentence, capped: it ends at . ! or ? before white space, but not at an abbreviation. */
|
|
@@ -27740,7 +27814,7 @@ function registerBuildTools(server, client) {
|
|
|
27740
27814
|
const steering = client.hasFeature("steerRuns");
|
|
27741
27815
|
if (client.hasFeature("requestChanges")) server.registerTool("taiga_request_changes", {
|
|
27742
27816
|
title: steering ? "Request changes on a run" : "Request changes on a pull request",
|
|
27743
|
-
description: steering ? "Tell Taiga what should change in a run, while it builds or once its pull request waits for review. The run stops after the step it is building (at once when it is not building one), the planner revises the steps still to build on top of the committed work (adding, editing, dropping, or reverting committed steps exactly), and the run continues with the revised steps; never a new initiative. A request while the run hardens, checks CI or is already being re-planned waits and joins the next re-plan. reviewPlan holds the run until a person has looked at the revised plan (taiga_review_plan approves it or comments to revise it again). A request the planner will not plan, a policy conflict, hands the run back with the reason, still on its original plan. The answer says what happened to it (steer). For a plan that waits for its build to be approved, comment on the plan with taiga_review_plan instead." : "Tell the coding agent what should change on a run's open pull request, as a person's review would: it splits the request into separate asks, makes the changes on the same pull request, and answers each one there (done, answered, or not done and why). Only for a run whose pull request is waiting for review (the initiative is in review with its pull request open); refused otherwise, and where the organization does not have it yet. taiga_wait follows the run until it is back in review.",
|
|
27817
|
+
description: steering ? "Tell Taiga what should change in a run, while it builds or once its pull request waits for review, a draft included, such as one Taiga handed back with CI failing or its tests red. The run stops after the step it is building (at once when it is not building one), the planner revises the steps still to build on top of the committed work (adding, editing, dropping, or reverting committed steps exactly), and the run continues with the revised steps; never a new initiative. A request while the run hardens, checks CI or is already being re-planned waits and joins the next re-plan. reviewPlan holds the run until a person has looked at the revised plan (taiga_review_plan approves it or comments to revise it again). A request the planner will not plan, a policy conflict, hands the run back with the reason, still on its original plan. The answer says what happened to it (steer). For a plan that waits for its build to be approved, comment on the plan with taiga_review_plan instead." : "Tell the coding agent what should change on a run's open pull request, as a person's review would: it splits the request into separate asks, makes the changes on the same pull request, and answers each one there (done, answered, or not done and why). Only for a run whose pull request is waiting for review (the initiative is in review with its pull request open), a draft included, such as one Taiga handed back with CI failing or its tests red; refused otherwise, and where the organization does not have it yet. taiga_wait follows the run until it is back in review.",
|
|
27744
27818
|
inputSchema: object({
|
|
27745
27819
|
runId,
|
|
27746
27820
|
notes: string$2().trim().min(1).max(CHANGE_REQUEST_MAX_CHARS).describe("What should change, in markdown: a list of changes, questions, or both"),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taiga-ai/mcp-server",
|
|
3
|
-
"version": "0.28.0-rc.
|
|
3
|
+
"version": "0.28.0-rc.620",
|
|
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",
|