@taiga-ai/mcp-server 0.18.0-dev.447 → 0.18.0-rc.445

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 CHANGED
@@ -4842,20 +4842,6 @@ const ENVIRONMENT_FIELDS = [
4842
4842
  "isProtected",
4843
4843
  "url"
4844
4844
  ];
4845
- /**
4846
- * Deployments as lines, each naming the repository that deployed it: every
4847
- * repository runs its own deployment in an environment, so two running in
4848
- * production are two repositories, not a contradiction (PRO-2528).
4849
- */
4850
- function deploymentLines(rows) {
4851
- return rows.map((row) => {
4852
- const repository = row.metadata?.repositoryFullName;
4853
- return {
4854
- ...pickFields([row], DEPLOYMENT_FIELDS)[0],
4855
- repository: typeof repository === "string" ? repository : null
4856
- };
4857
- });
4858
- }
4859
4845
  const environmentId = idInput("environment", "taiga_list_environments lists them; a product ID is not one");
4860
4846
  /** The windows the pages offer, as the schema's own values rather than a number checked afterwards. */
4861
4847
  const windowDays = z.literal([
@@ -4924,9 +4910,9 @@ function registerObserveTools(server, client) {
4924
4910
  return toolResult({
4925
4911
  environments: pickFields(environments.rows, ENVIRONMENT_FIELDS),
4926
4912
  ...environments.more ? { moreEnvironments: true } : {},
4927
- running: deploymentLines(now.current ?? []),
4928
- deploying: deploymentLines(now.deploying ?? []),
4929
- history: page(deploymentLines(history.data), history.nextCursor),
4913
+ running: pickFields(now.current ?? [], DEPLOYMENT_FIELDS),
4914
+ deploying: pickFields(now.deploying ?? [], DEPLOYMENT_FIELDS),
4915
+ history: page(pickFields(history.data, DEPLOYMENT_FIELDS), history.nextCursor),
4930
4916
  ..."value" in sync ? { syncStatus: sync.value.data } : {
4931
4917
  syncStatus: null,
4932
4918
  syncUnavailable: sync.unavailable
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taiga-ai/mcp-server",
3
- "version": "0.18.0-dev.447",
3
+ "version": "0.18.0-rc.445",
4
4
  "description": "MCP server for Taiga -- gives AI assistants access to documents and products",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -5201,7 +5201,7 @@ describe('MCP server integration', () => {
5201
5201
  commitSha: 'abc',
5202
5202
  commitSubject: 'Merge #1',
5203
5203
  artifacts: {},
5204
- metadata: { big: true, repositoryFullName: 'acme/api' },
5204
+ metadata: { big: true },
5205
5205
  };
5206
5206
  const { client, fetchSpy } = await bootMcpPair({
5207
5207
  capabilities: ['products:read'],
@@ -5246,11 +5246,8 @@ describe('MCP server integration', () => {
5246
5246
  });
5247
5247
  expect(result.environments.map((e: { id: string }) => e.id)).toEqual([ENV_ID, ENV_ID_2]);
5248
5248
  expect(result).not.toHaveProperty('moreEnvironments');
5249
- // Named by the repository that deployed it: each runs its own in an
5250
- // environment (PRO-2528). The rest of the metadata stays behind.
5251
- expect(result.running[0]).toMatchObject({ id: 'd1', commitSubject: 'Merge #1', repository: 'acme/api' });
5249
+ expect(result.running[0]).toMatchObject({ id: 'd1', commitSubject: 'Merge #1' });
5252
5250
  expect(result.running[0]).not.toHaveProperty('metadata');
5253
- expect(result.history.data[0]).toMatchObject({ id: 'd1', repository: 'acme/api' });
5254
5251
  expect(result.history).toMatchObject({ nextCursor: 'more' });
5255
5252
  expect(result.syncStatus).toBeNull();
5256
5253
  expect(result.syncUnavailable).toContain('500');
@@ -39,21 +39,6 @@ const DEPLOYMENT_FIELDS = [
39
39
 
40
40
  const ENVIRONMENT_FIELDS = ['id', 'name', 'slug', 'type', 'ordinal', 'status', 'isProtected', 'url'] as const;
41
41
 
42
- /**
43
- * Deployments as lines, each naming the repository that deployed it: every
44
- * repository runs its own deployment in an environment, so two running in
45
- * production are two repositories, not a contradiction (PRO-2528).
46
- */
47
- function deploymentLines(rows: Row[]): Row[] {
48
- return rows.map((row) => {
49
- const repository = (row.metadata as Row | undefined)?.repositoryFullName;
50
- return {
51
- ...pickFields([row], DEPLOYMENT_FIELDS)[0],
52
- repository: typeof repository === 'string' ? repository : null,
53
- };
54
- });
55
- }
56
-
57
42
  const environmentId = idInput('environment', 'taiga_list_environments lists them; a product ID is not one');
58
43
  /** The windows the pages offer, as the schema's own values rather than a number checked afterwards. */
59
44
  const windowDays = z.literal([30, 60, 90]).optional().describe('Days to look back: 30, 60 or 90 (default 30)');
@@ -133,9 +118,9 @@ export function registerObserveTools(server: McpServer, client: TaigaClient) {
133
118
  return toolResult({
134
119
  environments: pickFields(environments.rows, ENVIRONMENT_FIELDS),
135
120
  ...(environments.more ? { moreEnvironments: true } : {}),
136
- running: deploymentLines(now.current ?? []),
137
- deploying: deploymentLines(now.deploying ?? []),
138
- history: page(deploymentLines(history.data as Row[]), history.nextCursor),
121
+ running: pickFields(now.current ?? [], DEPLOYMENT_FIELDS),
122
+ deploying: pickFields(now.deploying ?? [], DEPLOYMENT_FIELDS),
123
+ history: page(pickFields(history.data as Row[], DEPLOYMENT_FIELDS), history.nextCursor),
139
124
  ...('value' in sync
140
125
  ? { syncStatus: sync.value.data }
141
126
  : { syncStatus: null, syncUnavailable: sync.unavailable }),