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

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 (3) hide show
  1. package/README.md +10 -10
  2. package/dist/index.js +61 -6
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -14,7 +14,7 @@ You need an access key, made in Taiga under **Settings > Account > MCP**, where
14
14
 
15
15
  Create the key first, and choose when it expires: in 30 days, 90 days, a year, or never. Taiga copies it to your clipboard, shows it once, and keeps it on the page until you say you have saved it, so copying the setup next does not lose it.
16
16
 
17
- The same page shows the setup for your client and environment, with the key already filled in where a config file needs it, and a one-click install for Cursor. The examples here pin a release (`@taiga-ai/mcp-server@0.50.0`), so an install runs the version you chose rather than whatever `latest` is at the next start.
17
+ The same page shows the setup for your client and environment, with the key already filled in where a config file needs it, and a one-click install for Cursor. The examples here pin a release (`@taiga-ai/mcp-server@0.51.0`), so an install runs the version you chose rather than whatever `latest` is at the next start.
18
18
 
19
19
  ## Install
20
20
 
@@ -23,29 +23,29 @@ The same page shows the setup for your client and environment, with the key alre
23
23
  Run the command. When it asks for your access key, paste it once and press Enter. Nothing appears as you paste (PowerShell shows asterisks), and the key stays out of your shell history:
24
24
 
25
25
  ```sh
26
- printf 'Taiga access key: ' && read -rs TAIGA_API_KEY && echo && claude mcp add taiga --scope user -e TAIGA_API_KEY="$TAIGA_API_KEY" -- npx -y @taiga-ai/mcp-server@0.50.0
26
+ printf 'Taiga access key: ' && read -rs TAIGA_API_KEY && echo && claude mcp add taiga --scope user -e TAIGA_API_KEY="$TAIGA_API_KEY" -- npx -y @taiga-ai/mcp-server@0.51.0
27
27
  ```
28
28
 
29
29
  ```sh
30
- printf 'Taiga access key: ' && read -rs TAIGA_API_KEY && echo && codex mcp add taiga --env TAIGA_API_KEY="$TAIGA_API_KEY" -- npx -y @taiga-ai/mcp-server@0.50.0
30
+ printf 'Taiga access key: ' && read -rs TAIGA_API_KEY && echo && codex mcp add taiga --env TAIGA_API_KEY="$TAIGA_API_KEY" -- npx -y @taiga-ai/mcp-server@0.51.0
31
31
  ```
32
32
 
33
33
  ```sh
34
- printf 'Taiga access key: ' && read -rs TAIGA_API_KEY && echo && copilot mcp add taiga --env TAIGA_API_KEY="$TAIGA_API_KEY" -- npx -y @taiga-ai/mcp-server@0.50.0
34
+ printf 'Taiga access key: ' && read -rs TAIGA_API_KEY && echo && copilot mcp add taiga --env TAIGA_API_KEY="$TAIGA_API_KEY" -- npx -y @taiga-ai/mcp-server@0.51.0
35
35
  ```
36
36
 
37
37
  On Windows, in PowerShell (Claude Code and Copilot start `npx` through `cmd /c`; the quoted `'--'` survives npm's PowerShell shims):
38
38
 
39
39
  ```powershell
40
- $k = Read-Host 'Taiga access key' -AsSecureString; claude mcp add taiga --scope user -e "TAIGA_API_KEY=$([Net.NetworkCredential]::new('', $k).Password)" '--' cmd /c npx -y @taiga-ai/mcp-server@0.50.0
40
+ $k = Read-Host 'Taiga access key' -AsSecureString; claude mcp add taiga --scope user -e "TAIGA_API_KEY=$([Net.NetworkCredential]::new('', $k).Password)" '--' cmd /c npx -y @taiga-ai/mcp-server@0.51.0
41
41
  ```
42
42
 
43
43
  ```powershell
44
- $k = Read-Host 'Taiga access key' -AsSecureString; codex mcp add taiga --env "TAIGA_API_KEY=$([Net.NetworkCredential]::new('', $k).Password)" '--' npx -y @taiga-ai/mcp-server@0.50.0
44
+ $k = Read-Host 'Taiga access key' -AsSecureString; codex mcp add taiga --env "TAIGA_API_KEY=$([Net.NetworkCredential]::new('', $k).Password)" '--' npx -y @taiga-ai/mcp-server@0.51.0
45
45
  ```
46
46
 
47
47
  ```powershell
48
- $k = Read-Host 'Taiga access key' -AsSecureString; copilot mcp add taiga --env "TAIGA_API_KEY=$([Net.NetworkCredential]::new('', $k).Password)" '--' cmd /c npx -y @taiga-ai/mcp-server@0.50.0
48
+ $k = Read-Host 'Taiga access key' -AsSecureString; copilot mcp add taiga --env "TAIGA_API_KEY=$([Net.NetworkCredential]::new('', $k).Password)" '--' cmd /c npx -y @taiga-ai/mcp-server@0.51.0
49
49
  ```
50
50
 
51
51
  The Copilot command also sets up the GitHub Copilot app. If you have the app but no `copilot` command, add the server to `~/.copilot/mcp-config.json` instead, beside any servers already there. It holds your key, so keep it out of repositories:
@@ -56,7 +56,7 @@ The Copilot command also sets up the GitHub Copilot app. If you have the app but
56
56
  "taiga": {
57
57
  "type": "local",
58
58
  "command": "npx",
59
- "args": ["-y", "@taiga-ai/mcp-server@0.50.0"],
59
+ "args": ["-y", "@taiga-ai/mcp-server@0.51.0"],
60
60
  "env": { "TAIGA_API_KEY": "YOUR_ACCESS_KEY" },
61
61
  "tools": ["*"]
62
62
  }
@@ -73,7 +73,7 @@ Most clients read the same `mcpServers` block. Add it with your key in place of
73
73
  "mcpServers": {
74
74
  "taiga": {
75
75
  "command": "npx",
76
- "args": ["-y", "@taiga-ai/mcp-server@0.50.0"],
76
+ "args": ["-y", "@taiga-ai/mcp-server@0.51.0"],
77
77
  "env": { "TAIGA_API_KEY": "YOUR_ACCESS_KEY" }
78
78
  }
79
79
  }
@@ -101,7 +101,7 @@ In `.vscode/mcp.json`. VS Code reads `servers`, and prompts for the key once and
101
101
  "taiga": {
102
102
  "type": "stdio",
103
103
  "command": "npx",
104
- "args": ["-y", "@taiga-ai/mcp-server@0.50.0"],
104
+ "args": ["-y", "@taiga-ai/mcp-server@0.51.0"],
105
105
  "env": { "TAIGA_API_KEY": "${input:taiga-api-key}" }
106
106
  }
107
107
  }
package/dist/index.js CHANGED
@@ -29818,7 +29818,9 @@ const SCOPE_TRIGGERS = [
29818
29818
  "defense",
29819
29819
  "ai_system",
29820
29820
  "ai_high_risk",
29821
- "consumer_facing"
29821
+ "consumer_facing",
29822
+ "financial_entity",
29823
+ "nis2_entity"
29822
29824
  ];
29823
29825
  /**
29824
29826
  * Every trigger an industry's content rests on (PRO-4424): its default, and
@@ -41211,6 +41213,17 @@ function sectionsOf(data) {
41211
41213
  return isRecord$1(data.sections) ? data.sections : null;
41212
41214
  }
41213
41215
  /** The text of one section, or null when the section does not exist. */
41216
+ /**
41217
+ * Section ids in the document's order where every section's heading numbers it ("## 3. Capabilities"), as a
41218
+ * specification's do (PRO-5104); the stored order is a jsonb column's (shorter ids first), so an outline read
41219
+ * data, users, vision. Otherwise the stored order, which is all there is.
41220
+ */
41221
+ function inDocumentOrder(sections) {
41222
+ const ids = Object.keys(sections);
41223
+ const numberOf = (id) => /^\s*#{1,6}\s+(\d+)[.)]/.exec(sectionContent(sections, id) ?? "")?.[1];
41224
+ if (ids.some((id) => numberOf(id) === void 0)) return ids;
41225
+ return [...ids].sort((a, b) => Number(numberOf(a)) - Number(numberOf(b)));
41226
+ }
41214
41227
  function sectionContent(sections, sectionId) {
41215
41228
  const section = sections[sectionId];
41216
41229
  if (section === void 0 || section === null) return null;
@@ -41268,7 +41281,7 @@ function instructionsText(sections) {
41268
41281
  return parts.join("\n\n").trim() || null;
41269
41282
  }
41270
41283
  function cutTo(doc, sections, kept) {
41271
- const omittedSections = Object.keys(sections).filter((id) => !Object.hasOwn(kept, id)).map((id) => ({
41284
+ const omittedSections = inDocumentOrder(sections).filter((id) => !Object.hasOwn(kept, id)).map((id) => ({
41272
41285
  id,
41273
41286
  characters: sectionContent(sections, id)?.length ?? 0
41274
41287
  }));
@@ -45832,7 +45845,7 @@ async function documentsPart(client, product, depth) {
45832
45845
  } else {
45833
45846
  const sections = sectionsOf(doc.data ?? {});
45834
45847
  if (sections) {
45835
- const outline = Object.keys(sections).map((id) => ({
45848
+ const outline = inDocumentOrder(sections).map((id) => ({
45836
45849
  id,
45837
45850
  characters: sectionContent(sections, id)?.length ?? 0
45838
45851
  }));
@@ -62102,7 +62115,16 @@ function registerSetupTools(server, client) {
62102
62115
  factoryId: factoryId.describe("The factory to move it to")
62103
62116
  }),
62104
62117
  annotations: READ_ONLY
62105
- }, (params) => runTool(async () => toolResult((await client.previewProductMove(params.productId, params.factoryId)).data)));
62118
+ }, (params) => runTool(async () => {
62119
+ const preview = (await client.previewProductMove(params.productId, params.factoryId)).data;
62120
+ if (preview.sourceFactoryId === preview.targetFactoryId) return toolResult({
62121
+ sourceFactoryId: preview.sourceFactoryId,
62122
+ targetFactoryId: preview.targetFactoryId,
62123
+ alreadyThere: true,
62124
+ note: "The product is already in this factory: a move would change nothing."
62125
+ });
62126
+ return toolResult(preview);
62127
+ }));
62106
62128
  server.registerTool("taiga_move_product", {
62107
62129
  title: "Move a product to another factory",
62108
62130
  description: "Move a product to another factory, which changes who can reach it (taiga_preview_product_move shows who). Refused while a plan or run is in flight; stopLine: true stops the line first, interrupting that work.",
@@ -62525,10 +62547,12 @@ function withRecoveryHints(tool, schema, inputs, isRead) {
62525
62547
  */
62526
62548
  const UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
62527
62549
  async function withIdKind(client, args, result) {
62528
- const productId = typeof args === "object" && args !== null ? args["productId"] : null;
62550
+ const given = typeof args === "object" && args !== null ? args : {};
62551
+ const productId = given["productId"];
62529
62552
  const answer = result;
62530
62553
  const first = answer?.isError ? answer.content?.[0] : void 0;
62531
- if (typeof productId !== "string" || first?.type !== "text") return result;
62554
+ if (first?.type !== "text") return result;
62555
+ if (typeof productId !== "string") return initiativeIdKind(client, given["initiativeId"], answer, first.text);
62532
62556
  let body;
62533
62557
  try {
62534
62558
  body = JSON.parse(first.text);
@@ -62556,6 +62580,37 @@ async function withIdKind(client, args, result) {
62556
62580
  }
62557
62581
  }
62558
62582
  /**
62583
+ * An initiative the API does not know may be a product's ID passed as one (PRO-5104), the likeliest mix-up after a
62584
+ * product read: one read names what the ID is, as the product miss names a factory's.
62585
+ */
62586
+ async function initiativeIdKind(client, initiativeId, answer, text) {
62587
+ if (typeof initiativeId !== "string" || !UUID.test(initiativeId) || !client.hasCapability("products:read")) return answer;
62588
+ let body;
62589
+ try {
62590
+ body = JSON.parse(text);
62591
+ } catch {
62592
+ return answer;
62593
+ }
62594
+ if (body.error !== "NOT_FOUND" || !/\binitiative not found\b/i.test(String(body.message))) return answer;
62595
+ try {
62596
+ const product = (await client.getProduct(initiativeId)).data;
62597
+ const message = `${String(body.message)} That ID is the product "${product.name}", not an initiative: taiga_list_initiatives with productId lists its initiatives.`;
62598
+ return {
62599
+ ...answer,
62600
+ content: [{
62601
+ type: "text",
62602
+ text: JSON.stringify({
62603
+ ...body,
62604
+ message
62605
+ })
62606
+ }, ...answer.content.slice(1)]
62607
+ };
62608
+ } catch (error) {
62609
+ if (error instanceof TaigaApiError || isNetworkFailure(error)) return answer;
62610
+ throw error;
62611
+ }
62612
+ }
62613
+ /**
62559
62614
  * The entry points, loaded with their descriptions at session start
62560
62615
  * (PRO-2800). Claude Code defers every other MCP tool behind tool search and
62561
62616
  * shows the model only its name until it searches, so an agent meeting Taiga
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taiga-ai/mcp-server",
3
- "version": "0.50.0-dev.1257",
3
+ "version": "0.51.0-dev.1260",
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",