@taiga-ai/mcp-server 0.51.0-dev.1260 → 0.51.0-dev.1262
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 +55 -10
- 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
|
|
@@ -30008,6 +30006,23 @@ const IAC_PHRASES = [
|
|
|
30008
30006
|
new RegExp(`^\\|\\s*(${CONTROL_ID_SOURCE})\\s*\\|\\s*(.*?)\\s*(?:\\||$)`);
|
|
30009
30007
|
REALITY_DERIVED_DOCUMENT_TYPES.filter((t) => t !== "codebase_snapshot");
|
|
30010
30008
|
//#endregion
|
|
30009
|
+
//#region ../../packages/types/dist/interpretation.js
|
|
30010
|
+
/**
|
|
30011
|
+
* The organization's position on an open point of law (PRO-5051).
|
|
30012
|
+
*
|
|
30013
|
+
* Where an official text can reasonably be read more than one way, the
|
|
30014
|
+
* content says so in one sentence at the end of the control (the
|
|
30015
|
+
* interpretation rule in `regulations/README.md`): "Interpretation: <what
|
|
30016
|
+
* the text leaves open>; the organisation decides how it applies to its
|
|
30017
|
+
* service." This is where the organization's decision is kept: it takes the
|
|
30018
|
+
* reading the control is written to, or states its own. One position per
|
|
30019
|
+
* control and per organization, the latest standing; each act is audited.
|
|
30020
|
+
*/
|
|
30021
|
+
/** How the organization answers an open point: the control as written, or its own reading. */
|
|
30022
|
+
const INTERPRETATION_POSITIONS = ["accepted", "own"];
|
|
30023
|
+
/** The longest statement of the organization's own reading. */
|
|
30024
|
+
const INTERPRETATION_STATEMENT_MAX_LENGTH = 2e3;
|
|
30025
|
+
//#endregion
|
|
30011
30026
|
//#region ../../packages/types/dist/product-requirements.js
|
|
30012
30027
|
/**
|
|
30013
30028
|
* Where a product's requirements are stored (PRO-5046, PRO-5048): the
|
|
@@ -30833,6 +30848,14 @@ object({
|
|
|
30833
30848
|
})).optional()
|
|
30834
30849
|
}))
|
|
30835
30850
|
});
|
|
30851
|
+
object({ positions: array(object({
|
|
30852
|
+
controlId: string$2(),
|
|
30853
|
+
position: _enum(INTERPRETATION_POSITIONS),
|
|
30854
|
+
statement: string$2().nullable(),
|
|
30855
|
+
open: string$2(),
|
|
30856
|
+
decidedAt: string$2(),
|
|
30857
|
+
decidedByName: string$2().nullable()
|
|
30858
|
+
})) });
|
|
30836
30859
|
object({
|
|
30837
30860
|
regulationId: string$2(),
|
|
30838
30861
|
acknowledgements: array(object({
|
|
@@ -31537,6 +31560,11 @@ strictObject({
|
|
|
31537
31560
|
acknowledge: boolean(),
|
|
31538
31561
|
immediate: boolean().optional()
|
|
31539
31562
|
}), strictObject({ regulationId }), strictObject({ regulationId }), strictObject({
|
|
31563
|
+
controlId: string$2().min(1).max(40),
|
|
31564
|
+
position: _enum(INTERPRETATION_POSITIONS),
|
|
31565
|
+
statement: string$2().max(INTERPRETATION_STATEMENT_MAX_LENGTH).optional(),
|
|
31566
|
+
open: string$2().min(1).max(4e3)
|
|
31567
|
+
}), strictObject({
|
|
31540
31568
|
documentType: string$2().min(1).max(100),
|
|
31541
31569
|
sections: record(string$2(), unknown$1())
|
|
31542
31570
|
}), object({ jobId: uuid }), settledBilling(tenantBillingSchema), strictObject({
|
|
@@ -44366,6 +44394,19 @@ function carriedCriteria(current, next) {
|
|
|
44366
44394
|
const criteriaSpec = (list) => JSON.stringify((list ?? []).map((c) => [c.criterion, c.endToEnd === true]));
|
|
44367
44395
|
/** The largest value the priority and estimate columns hold (Postgres integer); the route has no bound of its own. */
|
|
44368
44396
|
const MAX_INT = 2147483647;
|
|
44397
|
+
/**
|
|
44398
|
+
* What the person asked for, as the initiative's history keeps it beside the change (the timeline quotes it): an
|
|
44399
|
+
* agent's change shows whose words it answered, not only what it changed.
|
|
44400
|
+
*/
|
|
44401
|
+
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");
|
|
44402
|
+
/** The request and the client that sent it, as the API records them with the change. */
|
|
44403
|
+
function askOf(server, request) {
|
|
44404
|
+
const name = server.server.getClientVersion()?.name?.trim();
|
|
44405
|
+
return {
|
|
44406
|
+
request,
|
|
44407
|
+
...name ? { client: name.slice(0, 64) } : {}
|
|
44408
|
+
};
|
|
44409
|
+
}
|
|
44369
44410
|
function registerEdit(server, client) {
|
|
44370
44411
|
server.registerTool("taiga_update_initiative", {
|
|
44371
44412
|
title: "Edit initiative",
|
|
@@ -44380,11 +44421,12 @@ function registerEdit(server, client) {
|
|
|
44380
44421
|
dependencies: array(idInput("initiative", "taiga_list_initiatives gives it")).optional().describe("Every initiative it waits for, replacing the list; [] clears it"),
|
|
44381
44422
|
acceptanceCriteria: array(criterionInput).optional().describe("Every criterion, in order, replacing the list"),
|
|
44382
44423
|
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`)
|
|
44424
|
+
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`),
|
|
44425
|
+
request: askInput
|
|
44384
44426
|
}),
|
|
44385
44427
|
annotations: WRITE
|
|
44386
44428
|
}, (params) => runTool(async () => {
|
|
44387
|
-
const { initiativeId: id, acceptanceCriteria, documentIds, ...fields } = params;
|
|
44429
|
+
const { initiativeId: id, acceptanceCriteria, documentIds, request, ...fields } = params;
|
|
44388
44430
|
if (fields.dependencies?.includes(id)) return toolError("VALIDATION_ERROR", "An initiative cannot depend on itself.");
|
|
44389
44431
|
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
44432
|
if (documentIds !== void 0) {
|
|
@@ -44422,7 +44464,8 @@ function registerEdit(server, client) {
|
|
|
44422
44464
|
...fields.dependencies !== void 0 ? { dependencies: fields.dependencies } : {},
|
|
44423
44465
|
...fields.assigneeId !== void 0 ? { assigneeId: fields.assigneeId } : {},
|
|
44424
44466
|
...criteria !== void 0 ? { acceptanceCriteria: criteria } : {},
|
|
44425
|
-
...links && linksChange ? { documentIds: links.send } : {}
|
|
44467
|
+
...links && linksChange ? { documentIds: links.send } : {},
|
|
44468
|
+
...askOf(server, request)
|
|
44426
44469
|
})).data;
|
|
44427
44470
|
} catch (error) {
|
|
44428
44471
|
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 +44601,11 @@ const BUILD_STATION = /* @__PURE__ */ new Set(["plan", "build"]);
|
|
|
44558
44601
|
function registerPlanAgain(server, client) {
|
|
44559
44602
|
server.registerTool("taiga_plan_again", {
|
|
44560
44603
|
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.",
|
|
44604
|
+
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
44605
|
inputSchema: object({
|
|
44563
44606
|
initiativeId,
|
|
44564
|
-
force: boolean().optional().describe("Plan anyway past an unsettled dependency or an unchosen UI direction; only when the person says so")
|
|
44607
|
+
force: boolean().optional().describe("Plan anyway past an unsettled dependency or an unchosen UI direction; only when the person says so"),
|
|
44608
|
+
request: askInput
|
|
44565
44609
|
}),
|
|
44566
44610
|
annotations: OPERATE
|
|
44567
44611
|
}, (params) => runTool(async () => {
|
|
@@ -44569,7 +44613,8 @@ function registerPlanAgain(server, client) {
|
|
|
44569
44613
|
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
44614
|
const body = {
|
|
44571
44615
|
state: "plan",
|
|
44572
|
-
...params.force ? { force: true } : {}
|
|
44616
|
+
...params.force ? { force: true } : {},
|
|
44617
|
+
...askOf(server, params.request)
|
|
44573
44618
|
};
|
|
44574
44619
|
return outcome((await client.transitionInitiative(params.initiativeId, body)).data);
|
|
44575
44620
|
}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taiga-ai/mcp-server",
|
|
3
|
-
"version": "0.51.0-dev.
|
|
3
|
+
"version": "0.51.0-dev.1262",
|
|
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",
|