@taiga-ai/mcp-server 0.25.0-rc.474 → 0.26.0-dev.481

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 (55) hide show
  1. package/README.md +111 -0
  2. package/dist/index.js +292 -115
  3. package/package.json +15 -2
  4. package/scripts/build.mjs +0 -37
  5. package/scripts/prepare-publish.cjs +0 -49
  6. package/src/client.test.ts +0 -424
  7. package/src/client.ts +0 -977
  8. package/src/config.test.ts +0 -24
  9. package/src/config.ts +0 -28
  10. package/src/index.ts +0 -45
  11. package/src/modern.integration.test.ts +0 -153
  12. package/src/server.integration.test.ts +0 -9214
  13. package/src/server.ts +0 -18
  14. package/src/tools/annotations.ts +0 -38
  15. package/src/tools/autonomy.ts +0 -86
  16. package/src/tools/backlogs.ts +0 -802
  17. package/src/tools/builds.ts +0 -668
  18. package/src/tools/catalogue.test.ts +0 -170
  19. package/src/tools/catalogue.ts +0 -223
  20. package/src/tools/context.ts +0 -513
  21. package/src/tools/documents.ts +0 -375
  22. package/src/tools/errors.ts +0 -172
  23. package/src/tools/hints.ts +0 -99
  24. package/src/tools/inbox.ts +0 -546
  25. package/src/tools/index.ts +0 -239
  26. package/src/tools/inputs.ts +0 -47
  27. package/src/tools/instructions.ts +0 -41
  28. package/src/tools/jobs.ts +0 -90
  29. package/src/tools/knowledge.ts +0 -249
  30. package/src/tools/maintenance.ts +0 -547
  31. package/src/tools/markdown.test.ts +0 -249
  32. package/src/tools/markdown.ts +0 -151
  33. package/src/tools/observe.ts +0 -311
  34. package/src/tools/product-documents.ts +0 -184
  35. package/src/tools/products.ts +0 -529
  36. package/src/tools/prompts.ts +0 -265
  37. package/src/tools/queue.ts +0 -250
  38. package/src/tools/readiness.ts +0 -177
  39. package/src/tools/remote.test.ts +0 -44
  40. package/src/tools/remote.ts +0 -107
  41. package/src/tools/repositories.ts +0 -360
  42. package/src/tools/request-prompt.test.ts +0 -32
  43. package/src/tools/request-prompt.ts +0 -28
  44. package/src/tools/resources.ts +0 -217
  45. package/src/tools/sections.test.ts +0 -143
  46. package/src/tools/sections.ts +0 -287
  47. package/src/tools/setup.ts +0 -455
  48. package/src/tools/summarize.test.ts +0 -20
  49. package/src/tools/summarize.ts +0 -96
  50. package/src/tools/wait.ts +0 -490
  51. package/src/version.test.ts +0 -10
  52. package/src/version.ts +0 -14
  53. package/taiga-ai-mcp-server-0.25.0-rc.474.tgz +0 -0
  54. package/tsconfig.json +0 -21
  55. package/vitest.config.ts +0 -9
package/src/server.ts DELETED
@@ -1,18 +0,0 @@
1
- import { McpServer } from '@modelcontextprotocol/server';
2
- import type { TaigaClient } from './client.js';
3
- import { registerAllTools } from './tools/index.js';
4
- import { SERVER_INSTRUCTIONS } from './tools/instructions.js';
5
- import type { WaitOptions } from './tools/wait.js';
6
- import { SERVER_VERSION } from './version.js';
7
-
8
- /**
9
- * The server one connection is served by: its identity, its instructions,
10
- * and the tools, resources and prompts the key's capabilities allow. The
11
- * entry point hands this to serveStdio, which serves 2026-07-28 and 2025-era
12
- * clients from the same instance; tests build it the same way.
13
- */
14
- export function createServer(client: TaigaClient, options: { wait?: WaitOptions } = {}): McpServer {
15
- const server = new McpServer({ name: 'taiga', version: SERVER_VERSION }, { instructions: SERVER_INSTRUCTIONS });
16
- registerAllTools(server, client, options);
17
- return server;
18
- }
@@ -1,38 +0,0 @@
1
- /**
2
- * Tool annotations shared by the tools. Hints for the client, not a
3
- * control: the API enforces what a key may do. A client that asks the
4
- * person before a destructive call reads destructiveHint; the server-side
5
- * approval gate (PRO-548) is separate work.
6
- */
7
- export const READ_ONLY = {
8
- readOnlyHint: true,
9
- destructiveHint: false,
10
- idempotentHint: true,
11
- openWorldHint: false,
12
- } as const;
13
-
14
- /** A write that adds or edits a row and starts nothing: a created initiative, a moved one. */
15
- export const WRITE = {
16
- readOnlyHint: false,
17
- destructiveHint: false,
18
- idempotentHint: false,
19
- openWorldHint: false,
20
- } as const;
21
-
22
- /**
23
- * A write that starts or stops paid work, or opens the door to it: queueing
24
- * an initiative, approving a plan, resuming or stopping a run. Each starts
25
- * an agent that spends tokens and opens pull requests, or halts one mid-way.
26
- */
27
- export const OPERATE = {
28
- readOnlyHint: false,
29
- destructiveHint: true,
30
- idempotentHint: false,
31
- openWorldHint: false,
32
- } as const;
33
-
34
- /**
35
- * An OPERATE write that sets a value rather than adding one: the same call
36
- * twice leaves things as one call does (a review gate set, a line paused).
37
- */
38
- export const OPERATE_SETTING = { ...OPERATE, idempotentHint: true } as const;
@@ -1,86 +0,0 @@
1
- import type { McpServer } from '@modelcontextprotocol/server';
2
- import { z } from 'zod';
3
- import type { TaigaClient } from '../client.js';
4
- import { OPERATE_SETTING } from './annotations.js';
5
- import { runTool, toolError, toolResult } from './errors.js';
6
- import { idInput, productId } from './inputs.js';
7
- import { pickFields } from './summarize.js';
8
-
9
- /**
10
- * Autonomy (docs.tai.ga, Deliver: Initiatives, Auto-merge): whether a landed
11
- * plan is built without a review, and whether a pull request merges on its
12
- * own. The organization and its factories are ceilings for merging, set by
13
- * an administrator in the web; a product sets defaults; an initiative's own
14
- * switch is the final word within the ceilings. The initiative's build gate
15
- * is taiga_set_auto_build.
16
- */
17
-
18
- export function registerAutonomyTools(server: McpServer, client: TaigaClient) {
19
- if (client.hasCapability('products:write')) {
20
- server.registerTool(
21
- 'taiga_set_product_autonomy',
22
- {
23
- title: "Set a product's autonomy defaults",
24
- description:
25
- "Set the defaults a product's initiatives follow unless they decide for themselves. autoBuild: false " +
26
- 'makes every plan wait for a person to approve or reject it; true builds it as soon as the product has ' +
27
- 'room. autoMerge: false makes pull requests wait for a person to merge; null follows the organization ' +
28
- 'and factory (autonomous merge needs the organization switch on, a factory can turn it off, and neither ' +
29
- 'is changed here).',
30
- inputSchema: z.object({
31
- productId,
32
- autoBuild: z.boolean().optional().describe('Build landed plans without a review by default'),
33
- autoMerge: z
34
- .boolean()
35
- .nullable()
36
- .optional()
37
- .describe('false: pull requests wait for a person by default; null: follow the organization and factory'),
38
- }),
39
- annotations: OPERATE_SETTING,
40
- },
41
- (params) =>
42
- runTool(async () => {
43
- if (params.autoBuild === undefined && params.autoMerge === undefined) {
44
- return toolError('VALIDATION_ERROR', 'Set autoBuild, autoMerge or both.');
45
- }
46
- // `true` and `null` mean the same at the product (the scopes above
47
- // decide), and the web writes null to allow; so does this.
48
- const autoMerge = params.autoMerge === true ? null : params.autoMerge;
49
- const product = (
50
- await client.updateProduct(params.productId, {
51
- ...(params.autoBuild !== undefined ? { autoBuild: params.autoBuild } : {}),
52
- ...(autoMerge !== undefined ? { autoMerge } : {}),
53
- })
54
- ).data;
55
- return toolResult(pickFields([product], ['id', 'name', 'slug', 'autoBuild', 'autoMerge'])[0]);
56
- })
57
- );
58
- }
59
-
60
- if (client.hasCapability('backlog:write')) {
61
- server.registerTool(
62
- 'taiga_set_auto_merge',
63
- {
64
- title: "Set whether an initiative's pull request merges on its own",
65
- description:
66
- "Set whether one initiative's pull request merges itself once the repository's rules pass (required " +
67
- 'checks, reviews, a code reviewer Taiga waits for): true, false (a person merges), or null (product ' +
68
- 'default). Where the organization or factory has turned autonomous merge off, true changes nothing. ' +
69
- "Taiga merges through the repository's rules, never around them.",
70
- inputSchema: z.object({
71
- initiativeId: idInput('initiative', 'taiga_list_initiatives (query finds one by title) gives it'),
72
- autoMerge: z
73
- .boolean()
74
- .nullable()
75
- .describe('true merges on its own, false waits for a person, null follows the product'),
76
- }),
77
- annotations: OPERATE_SETTING,
78
- },
79
- (params) =>
80
- runTool(async () => {
81
- const item = (await client.updateBacklogItem(params.initiativeId, { autoMerge: params.autoMerge })).data;
82
- return toolResult(pickFields([item], ['id', 'title', 'state', 'autoMerge', 'autoBuild'])[0]);
83
- })
84
- );
85
- }
86
- }