@taiga-ai/mcp-server 0.38.0-dev.1198 → 0.38.0-dev.1201
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 +120 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -27036,6 +27036,12 @@ function readExternalReference(value) {
|
|
|
27036
27036
|
}
|
|
27037
27037
|
//#endregion
|
|
27038
27038
|
//#region ../../packages/types/dist/backlog.js
|
|
27039
|
+
const BACKLOG_CATEGORIES = [
|
|
27040
|
+
"feature",
|
|
27041
|
+
"bug",
|
|
27042
|
+
"tech_debt",
|
|
27043
|
+
"improvement"
|
|
27044
|
+
];
|
|
27039
27045
|
/** Dispositions that end an item's pipeline life: settled work neither blocks
|
|
27040
27046
|
* dependants nor counts toward completion denominators. */
|
|
27041
27047
|
const SETTLED_BACKLOG_STATUSES = ["done", "canceled"];
|
|
@@ -28971,6 +28977,11 @@ Object.freeze({
|
|
|
28971
28977
|
gracePeriodDays: 0,
|
|
28972
28978
|
requiredSince: null
|
|
28973
28979
|
});
|
|
28980
|
+
[...TURN_EVENT_TRIGGERS];
|
|
28981
|
+
/** What a member can ask the admins for (PRO-4544, PRO-4545). */
|
|
28982
|
+
const ACCESS_REQUEST_KINDS = ["auroras", "write_access"];
|
|
28983
|
+
/** Longest request for changes from Taiga (PRO-3035): about four pages of prose. */
|
|
28984
|
+
const CHANGE_REQUEST_MAX_CHARS = 1e4;
|
|
28974
28985
|
//#endregion
|
|
28975
28986
|
//#region ../../packages/types/dist/notifications.js
|
|
28976
28987
|
/**
|
|
@@ -28987,11 +28998,6 @@ const NOTIFICATION_CONTACT_TYPES = [
|
|
|
28987
28998
|
"operations",
|
|
28988
28999
|
"billing"
|
|
28989
29000
|
];
|
|
28990
|
-
[...TURN_EVENT_TRIGGERS];
|
|
28991
|
-
/** What a member can ask the admins for (PRO-4544, PRO-4545). */
|
|
28992
|
-
const ACCESS_REQUEST_KINDS = ["auroras", "write_access"];
|
|
28993
|
-
/** Longest request for changes from Taiga (PRO-3035): about four pages of prose. */
|
|
28994
|
-
const CHANGE_REQUEST_MAX_CHARS = 1e4;
|
|
28995
29001
|
//#endregion
|
|
28996
29002
|
//#region ../../packages/types/dist/requests.js
|
|
28997
29003
|
/**
|
|
@@ -31375,6 +31381,7 @@ strictObject({
|
|
|
31375
31381
|
status: _enum(CLOUD_CONNECTION_STATUSES).optional(),
|
|
31376
31382
|
providerConfig: record(string$2(), unknown$1()).refine(isTenantWritableProviderConfig, { message: TAIGA_MANAGED_PROVIDER_CONFIG_MESSAGE }).optional()
|
|
31377
31383
|
});
|
|
31384
|
+
strictObject({ enabled: boolean() });
|
|
31378
31385
|
object({
|
|
31379
31386
|
url: string$2().url(),
|
|
31380
31387
|
expiresAt: string$2(),
|
|
@@ -37086,6 +37093,7 @@ const TOOLSET_OF = {
|
|
|
37086
37093
|
taiga_wait: "core",
|
|
37087
37094
|
taiga_queue_initiative: "operate",
|
|
37088
37095
|
taiga_move_initiative: "operate",
|
|
37096
|
+
taiga_update_initiative: "operate",
|
|
37089
37097
|
taiga_review_plan: "operate",
|
|
37090
37098
|
taiga_plan_again: "operate",
|
|
37091
37099
|
taiga_resume_initiative: "operate",
|
|
@@ -37173,6 +37181,7 @@ const DELIVERY_TOOLS = /* @__PURE__ */ new Set([
|
|
|
37173
37181
|
"taiga_get_line",
|
|
37174
37182
|
"taiga_queue_initiative",
|
|
37175
37183
|
"taiga_move_initiative",
|
|
37184
|
+
"taiga_update_initiative",
|
|
37176
37185
|
"taiga_review_plan",
|
|
37177
37186
|
"taiga_plan_again",
|
|
37178
37187
|
"taiga_resume_initiative",
|
|
@@ -41519,8 +41528,8 @@ const outcomeOf = (item) => withSituation(item, {
|
|
|
41519
41528
|
const outcome = (item) => toolResult(outcomeOf(item));
|
|
41520
41529
|
/**
|
|
41521
41530
|
* Each tool is registered under the capability its route requires, so a
|
|
41522
|
-
* key sees exactly what it may call: reads on backlog:read; the board move
|
|
41523
|
-
* backlog:write; queueing on both backlog:write and products:write (the
|
|
41531
|
+
* key sees exactly what it may call: reads on backlog:read; the board move and
|
|
41532
|
+
* the edit on backlog:write; queueing on both backlog:write and products:write (the
|
|
41524
41533
|
* state route checks both for a drop into queue); an initiative request
|
|
41525
41534
|
* (an agent job), the resume and the review gate on products:write alone, as
|
|
41526
41535
|
* their routes are (the item ID they take also comes back from a request or a
|
|
@@ -41539,6 +41548,7 @@ function registerBacklogTools(server, client) {
|
|
|
41539
41548
|
const may = (capability) => client.hasCapability(capability);
|
|
41540
41549
|
if (may("backlog:read")) registerBacklogReads(server, client);
|
|
41541
41550
|
if (may("backlog:write")) registerMove(server, client);
|
|
41551
|
+
if (may("backlog:write")) registerEdit(server, client);
|
|
41542
41552
|
if (may("products:write")) registerRequest(server, client);
|
|
41543
41553
|
if (may("backlog:write") && may("products:write")) registerQueue(server, client);
|
|
41544
41554
|
if (may("products:write")) registerResume(server, client);
|
|
@@ -41702,7 +41712,7 @@ function registerRequest(server, client) {
|
|
|
41702
41712
|
function registerMove(server, client) {
|
|
41703
41713
|
server.registerTool("taiga_move_initiative", {
|
|
41704
41714
|
title: "Move initiative on the board",
|
|
41705
|
-
description: "Move an initiative to another board column, take it off the line, or reorder it. Moving it out of Build stops its plan or run; moving it to backlog, todo or canceled closes the pull request it waits on. state build is Start now, from queue, todo or backlog: the initiative is planned at once against main as it is now and built alongside the current work; parallel builds in one repository can conflict, so say that when you ask. It is refused, with the API's message, for done, canceled, archived, plan and build initiatives, and when the line is stopped or there is no buildable repository. archived: true archives it in place (never from Build): pass its current column as state, or it moves too.",
|
|
41715
|
+
description: "Move an initiative to another board column, take it off the line, or reorder it. Moving it out of Build stops its plan or run; moving it to backlog, todo or canceled closes the pull request it waits on. state build is Start now, from queue, todo or backlog: the initiative is planned at once against main as it is now and built alongside the current work; parallel builds in one repository can conflict, so say that when you ask. It is refused, with the API's message, for done, canceled, archived, plan and build initiatives, and when the line is stopped or there is no buildable repository. archived: true archives it in place (never from Build): pass its current column as state, or it moves too. To change its title, description or criteria, edit it with taiga_update_initiative; do not cancel it and request a new one.",
|
|
41706
41716
|
inputSchema: object({
|
|
41707
41717
|
initiativeId,
|
|
41708
41718
|
state: _enum(USER_DROP_STATES).describe("The column to move into"),
|
|
@@ -41717,6 +41727,108 @@ function registerMove(server, client) {
|
|
|
41717
41727
|
return outcome((await client.transitionInitiative(id, body)).data);
|
|
41718
41728
|
}));
|
|
41719
41729
|
}
|
|
41730
|
+
/**
|
|
41731
|
+
* A criterion as the edit takes it: its text, and whether it needs an
|
|
41732
|
+
* end-to-end check. Whether it is met is not the caller's to say: checking a
|
|
41733
|
+
* criterion off is a person's verdict or a run's verification, and the web's
|
|
41734
|
+
* editor does not offer it either.
|
|
41735
|
+
*/
|
|
41736
|
+
const criterionInput = object({
|
|
41737
|
+
criterion: string$2().trim().min(1).describe("What must be true when the work is done"),
|
|
41738
|
+
endToEnd: boolean().optional().describe("true when it can only be shown through the running product")
|
|
41739
|
+
});
|
|
41740
|
+
/**
|
|
41741
|
+
* The criteria to write, each keeping the met state, attribution and evidence
|
|
41742
|
+
* of a current criterion with the same text, once; a new or reworded one
|
|
41743
|
+
* starts unmet. The route takes the whole list and writes it as given, so
|
|
41744
|
+
* without this an edit that only fixed a typo elsewhere in the list would
|
|
41745
|
+
* clear every check-off, and a caller could mark one met. A kept criterion
|
|
41746
|
+
* keeps its stored text, so the route does not take stray whitespace for a
|
|
41747
|
+
* reworded spec; one made end-to-end starts unmet, as it needs a check it
|
|
41748
|
+
* never had.
|
|
41749
|
+
*/
|
|
41750
|
+
function carriedCriteria(current, next) {
|
|
41751
|
+
const unused = [...current ?? []];
|
|
41752
|
+
const carry = ({ criterion, endToEnd }) => {
|
|
41753
|
+
const fits = (was) => was.criterion.trim() !== criterion.trim() ? -1 : (endToEnd === void 0 || was.endToEnd === true === endToEnd ? 2 : 0) + (was.met ? 1 : 0);
|
|
41754
|
+
let at = -1;
|
|
41755
|
+
unused.forEach((was, index) => {
|
|
41756
|
+
if (fits(was) > (at === -1 ? -1 : fits(unused[at]))) at = index;
|
|
41757
|
+
});
|
|
41758
|
+
const kept = at === -1 ? null : unused.splice(at, 1)[0];
|
|
41759
|
+
if (!kept) return {
|
|
41760
|
+
criterion,
|
|
41761
|
+
met: false,
|
|
41762
|
+
...endToEnd !== void 0 ? { endToEnd } : {}
|
|
41763
|
+
};
|
|
41764
|
+
const flag = endToEnd ?? kept.endToEnd;
|
|
41765
|
+
const withFlag = flag !== void 0 ? { endToEnd: flag } : {};
|
|
41766
|
+
const stricter = flag === true && kept.endToEnd !== true;
|
|
41767
|
+
if (!kept.met || stricter) return {
|
|
41768
|
+
criterion: kept.criterion,
|
|
41769
|
+
met: false,
|
|
41770
|
+
...withFlag
|
|
41771
|
+
};
|
|
41772
|
+
return {
|
|
41773
|
+
...kept,
|
|
41774
|
+
...withFlag
|
|
41775
|
+
};
|
|
41776
|
+
};
|
|
41777
|
+
const written = new Array(next.length);
|
|
41778
|
+
next.forEach((one, index) => {
|
|
41779
|
+
if (one.endToEnd !== void 0) written[index] = carry(one);
|
|
41780
|
+
});
|
|
41781
|
+
next.forEach((one, index) => {
|
|
41782
|
+
if (one.endToEnd === void 0) written[index] = carry(one);
|
|
41783
|
+
});
|
|
41784
|
+
return written;
|
|
41785
|
+
}
|
|
41786
|
+
/** What the route counts as the criteria's spec (criteriaSpecChanged): each text and whether it is end-to-end, in order. */
|
|
41787
|
+
const criteriaSpec = (list) => JSON.stringify((list ?? []).map((c) => [c.criterion, c.endToEnd === true]));
|
|
41788
|
+
/** The largest value the priority and estimate columns hold (Postgres integer); the route has no bound of its own. */
|
|
41789
|
+
const MAX_INT = 2147483647;
|
|
41790
|
+
function registerEdit(server, client) {
|
|
41791
|
+
server.registerTool("taiga_update_initiative", {
|
|
41792
|
+
title: "Edit initiative",
|
|
41793
|
+
description: "Change an initiative's title, description, priority, estimate, category, dependencies or acceptance criteria in place, as a person edits it in the web. Use it to correct, reword or translate an initiative rather than canceling it and requesting a new one. A field left out stays as it is. dependencies and acceptanceCriteria replace the whole list: read it first with taiga_get_initiative full: true. A criterion whose text is unchanged keeps whether it is met; a new, reworded or newly end-to-end one starts unmet. The text is refused (CONFLICT) while an agent works on the initiative or its plan waits for review. taiga_move_initiative moves it on the board.",
|
|
41794
|
+
inputSchema: object({
|
|
41795
|
+
initiativeId,
|
|
41796
|
+
title: string$2().trim().min(1).max(500).optional().describe("A new title"),
|
|
41797
|
+
description: string$2().trim().min(1).max(2e4).optional().describe("The whole new description in Markdown: the problem, what it should do, what it leaves alone"),
|
|
41798
|
+
priority: number$1().int().min(1).max(MAX_INT).optional().describe("Its rank: 1 is done first"),
|
|
41799
|
+
estimate: number$1().int().min(0).max(MAX_INT).optional().describe("Its size in points"),
|
|
41800
|
+
category: _enum(BACKLOG_CATEGORIES).optional().describe("The kind of work"),
|
|
41801
|
+
dependencies: array(idInput("initiative", "taiga_list_initiatives gives it")).optional().describe("Every initiative it waits for, replacing the list; [] clears it"),
|
|
41802
|
+
acceptanceCriteria: array(criterionInput).optional().describe("Every criterion, in order, replacing the list")
|
|
41803
|
+
}),
|
|
41804
|
+
annotations: WRITE
|
|
41805
|
+
}, (params) => runTool(async () => {
|
|
41806
|
+
const { initiativeId: id, acceptanceCriteria, ...fields } = params;
|
|
41807
|
+
if (fields.dependencies?.includes(id)) return toolError("VALIDATION_ERROR", "An initiative cannot depend on itself.");
|
|
41808
|
+
if (acceptanceCriteria === 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 or acceptanceCriteria.");
|
|
41809
|
+
if (acceptanceCriteria !== void 0 && !client.hasCapability("backlog:read")) return toolError("FORBIDDEN", "Editing acceptance criteria reads the current ones first and needs backlog:read, which this key lacks.");
|
|
41810
|
+
let criteria;
|
|
41811
|
+
if (acceptanceCriteria !== void 0) {
|
|
41812
|
+
const current = (await client.getBacklogItem(id)).data;
|
|
41813
|
+
const carried = carriedCriteria(current.acceptanceCriteria, acceptanceCriteria);
|
|
41814
|
+
if (criteriaSpec(carried) !== criteriaSpec(current.acceptanceCriteria)) criteria = carried;
|
|
41815
|
+
else if (Object.values(fields).every((value) => value === void 0)) return toolResult({
|
|
41816
|
+
...outcomeOf(current),
|
|
41817
|
+
unchanged: "The criteria are as they were; nothing was written."
|
|
41818
|
+
});
|
|
41819
|
+
}
|
|
41820
|
+
const item = (await client.updateBacklogItem(id, {
|
|
41821
|
+
...fields.title !== void 0 ? { title: fields.title } : {},
|
|
41822
|
+
...fields.description !== void 0 ? { description: fields.description } : {},
|
|
41823
|
+
...fields.priority !== void 0 ? { priority: fields.priority } : {},
|
|
41824
|
+
...fields.estimate !== void 0 ? { estimate: fields.estimate } : {},
|
|
41825
|
+
...fields.category !== void 0 ? { category: fields.category } : {},
|
|
41826
|
+
...fields.dependencies !== void 0 ? { dependencies: fields.dependencies } : {},
|
|
41827
|
+
...criteria !== void 0 ? { acceptanceCriteria: criteria } : {}
|
|
41828
|
+
})).data;
|
|
41829
|
+
return outcome(item);
|
|
41830
|
+
}));
|
|
41831
|
+
}
|
|
41720
41832
|
/** The two halves of the Build station, where Plan again is offered. */
|
|
41721
41833
|
const BUILD_STATION = /* @__PURE__ */ new Set(["plan", "build"]);
|
|
41722
41834
|
function registerPlanAgain(server, client) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taiga-ai/mcp-server",
|
|
3
|
-
"version": "0.38.0-dev.
|
|
3
|
+
"version": "0.38.0-dev.1201",
|
|
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",
|