@structured-world/gitlab-mcp 6.7.0 → 6.8.0

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/README.md CHANGED
@@ -55,6 +55,7 @@ env = { "GITLAB_TOKEN" = "mytoken", "GITLAB_API_URL" = "https://gitlab.com" }
55
55
  "USE_VARIABLES": "true", // use variables api?
56
56
  "USE_WEBHOOKS": "true", // use webhooks api?
57
57
  "USE_SNIPPETS": "true", // use snippets api?
58
+ "USE_INTEGRATIONS": "true", // use integrations api?
58
59
  "SKIP_TLS_VERIFY": "false" // skip SSL cert verification (dev only)
59
60
  }
60
61
  }
@@ -126,6 +127,8 @@ env = { "GITLAB_TOKEN" = "mytoken", "GITLAB_API_URL" = "https://gitlab.com" }
126
127
  "USE_WEBHOOKS",
127
128
  "-e",
128
129
  "USE_SNIPPETS",
130
+ "-e",
131
+ "USE_INTEGRATIONS",
129
132
  "ghcr.io/structured-world/gitlab-mcp:latest"
130
133
  ],
131
134
  "env": {
@@ -137,7 +140,8 @@ env = { "GITLAB_TOKEN" = "mytoken", "GITLAB_API_URL" = "https://gitlab.com" }
137
140
  "USE_PIPELINE": "true",
138
141
  "USE_VARIABLES": "true",
139
142
  "USE_WEBHOOKS": "true",
140
- "USE_SNIPPETS": "true"
143
+ "USE_SNIPPETS": "true",
144
+ "USE_INTEGRATIONS": "true"
141
145
  }
142
146
  }
143
147
  }
@@ -475,6 +479,7 @@ When OAuth is enabled, the following endpoints are available:
475
479
  - `USE_WORKITEMS`: When set to 'true', enables the work items-related tools (browse_work_items, manage_work_item). These 2 CQRS tools consolidate all work item operations using GitLab GraphQL API. By default, work items features are enabled.
476
480
  - `USE_WEBHOOKS`: When set to 'true', enables the webhooks-related tools (list_webhooks, manage_webhook). These 2 tools provide full CRUD operations plus testing for both project and group webhooks. Group webhooks require GitLab Premium tier. By default, webhooks features are enabled.
477
481
  - `USE_SNIPPETS`: When set to 'true', enables the snippets-related tools (list_snippets, manage_snippet). These 2 CQRS tools provide full listing and CRUD operations for both personal and project snippets. Supports multi-file snippets, visibility control, and flexible scoping. By default, snippets features are enabled.
482
+ - `USE_INTEGRATIONS`: When set to 'true', enables the integrations-related tools (list_integrations, manage_integration). These 2 CQRS tools provide full listing and management of 50+ project integrations (Slack, Jira, Discord, Jenkins, etc.). By default, integrations features are enabled.
478
483
  - `GITLAB_AUTH_COOKIE_PATH`: Path to an authentication cookie file for GitLab instances that require cookie-based authentication. When provided, the cookie will be included in all GitLab API requests.
479
484
  - `SKIP_TLS_VERIFY`: When set to 'true', skips TLS certificate verification for all GitLab API requests (both REST and GraphQL). **WARNING**: This bypasses SSL certificate validation and should only be used for testing with self-signed certificates or trusted internal GitLab instances. Never use this in production environments.
480
485
  - `SSL_CERT_PATH`: Path to PEM certificate file for direct HTTPS/TLS termination. Requires `SSL_KEY_PATH` to also be set.
@@ -547,7 +552,7 @@ export GITLAB_TOOL_MANAGE_WORK_ITEM="Create and manage tickets for our sprint pl
547
552
 
548
553
  ## Tools 🛠️
549
554
 
550
- **59 Tools Available** - Organized by entity and functionality below.
555
+ **61 Tools Available** - Organized by entity and functionality below.
551
556
 
552
557
  ### Key Features:
553
558
  - **CQRS Pattern** - Consolidated action-based tools: `browse_*` for reads, `manage_*` for writes
@@ -715,6 +720,32 @@ Snippets can contain multiple files with individual operations:
715
720
  - **Create action** - Files array with `file_path` and `content` for each file
716
721
  - **Update action** - Files array with `action` field: "create" (add new), "update" (modify existing), "delete" (remove), "move" (rename with `previous_path`)
717
722
 
723
+ ### Integrations Management (2 tools)
724
+ Requires USE_INTEGRATIONS=true environment variable (enabled by default). Uses CQRS pattern with action-based tools. Supports 50+ project integrations for connecting with external services.
725
+
726
+ #### Integration Browsing (Query)
727
+ - 📖 **`list_integrations`**: LIST all active integrations for a project. Returns configured integrations like Slack, Jira, Discord, Microsoft Teams, Jenkins, etc. Only shows enabled/configured integrations with their settings.
728
+
729
+ #### Integration Management (Command)
730
+ - ✏️ **`manage_integration`**: MANAGE project integrations. Actions: "get" retrieves integration settings (read-only), "update" modifies or enables integration with specific config, "disable" removes integration. Supports 50+ integration types. Note: gitlab-slack-application cannot be created via API - requires OAuth install from GitLab UI.
731
+
732
+ #### Supported Integration Types
733
+ GitLab supports 50+ integrations organized by category:
734
+ - **Communication** - Slack, Discord, Microsoft Teams, Mattermost, Telegram, Matrix, Pumble, and more
735
+ - **Issue Trackers** - Jira, Bugzilla, Redmine, YouTrack, ClickUp, Linear, Phorge, Asana
736
+ - **CI/CD** - Jenkins, TeamCity, Bamboo, Buildkite, Drone CI, Datadog
737
+ - **Documentation** - Confluence, External Wiki
738
+ - **Mobile/Publishing** - Apple App Store, Google Play, Packagist
739
+ - **Cloud** - Google Cloud Platform (Artifact Registry, Workload Identity), Harbor
740
+ - **Security** - GitGuardian
741
+ - **Other** - GitHub, Emails on Push, Pipelines Email, Pushover
742
+
743
+ #### Common Event Triggers
744
+ Most integrations support configuring which events trigger notifications:
745
+ - Push events, Tag push events, Issue events, Merge request events
746
+ - Note events, Pipeline events, Job events, Wiki page events
747
+ - Deployment events, Release events, Vulnerability events
748
+
718
749
  ## CLI Tools 🔧
719
750
 
720
751
  ### list-tools - Browse Available Tools
@@ -13,6 +13,7 @@ export declare const USE_FILES: boolean;
13
13
  export declare const USE_VARIABLES: boolean;
14
14
  export declare const USE_SNIPPETS: boolean;
15
15
  export declare const USE_WEBHOOKS: boolean;
16
+ export declare const USE_INTEGRATIONS: boolean;
16
17
  export declare const HOST: string;
17
18
  export declare const PORT: string | number;
18
19
  export declare const SSL_CERT_PATH: string | undefined;
@@ -33,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
33
33
  };
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.packageVersion = exports.packageName = exports.GITLAB_ALLOWED_PROJECT_IDS = exports.GITLAB_PROJECT_ID = exports.GITLAB_API_URL = exports.GITLAB_BASE_URL = exports.GITLAB_CA_CERT_PATH = exports.NODE_TLS_REJECT_UNAUTHORIZED = exports.HTTPS_PROXY = exports.HTTP_PROXY = exports.SKIP_TLS_VERIFY = exports.RATE_LIMIT_SESSION_MAX_REQUESTS = exports.RATE_LIMIT_SESSION_WINDOW_MS = exports.RATE_LIMIT_SESSION_ENABLED = exports.RATE_LIMIT_IP_MAX_REQUESTS = exports.RATE_LIMIT_IP_WINDOW_MS = exports.RATE_LIMIT_IP_ENABLED = exports.API_TIMEOUT_MS = exports.TRUST_PROXY = exports.SSL_PASSPHRASE = exports.SSL_CA_PATH = exports.SSL_KEY_PATH = exports.SSL_CERT_PATH = exports.PORT = exports.HOST = exports.USE_WEBHOOKS = exports.USE_SNIPPETS = exports.USE_VARIABLES = exports.USE_FILES = exports.USE_MRS = exports.USE_LABELS = exports.USE_WORKITEMS = exports.USE_PIPELINE = exports.USE_MILESTONE = exports.USE_GITLAB_WIKI = exports.GITLAB_DENIED_TOOLS_REGEX = exports.GITLAB_READ_ONLY_MODE = exports.IS_OLD = exports.GITLAB_AUTH_COOKIE_PATH = exports.GITLAB_TOKEN = void 0;
36
+ exports.packageVersion = exports.packageName = exports.GITLAB_ALLOWED_PROJECT_IDS = exports.GITLAB_PROJECT_ID = exports.GITLAB_API_URL = exports.GITLAB_BASE_URL = exports.GITLAB_CA_CERT_PATH = exports.NODE_TLS_REJECT_UNAUTHORIZED = exports.HTTPS_PROXY = exports.HTTP_PROXY = exports.SKIP_TLS_VERIFY = exports.RATE_LIMIT_SESSION_MAX_REQUESTS = exports.RATE_LIMIT_SESSION_WINDOW_MS = exports.RATE_LIMIT_SESSION_ENABLED = exports.RATE_LIMIT_IP_MAX_REQUESTS = exports.RATE_LIMIT_IP_WINDOW_MS = exports.RATE_LIMIT_IP_ENABLED = exports.API_TIMEOUT_MS = exports.TRUST_PROXY = exports.SSL_PASSPHRASE = exports.SSL_CA_PATH = exports.SSL_KEY_PATH = exports.SSL_CERT_PATH = exports.PORT = exports.HOST = exports.USE_INTEGRATIONS = exports.USE_WEBHOOKS = exports.USE_SNIPPETS = exports.USE_VARIABLES = exports.USE_FILES = exports.USE_MRS = exports.USE_LABELS = exports.USE_WORKITEMS = exports.USE_PIPELINE = exports.USE_MILESTONE = exports.USE_GITLAB_WIKI = exports.GITLAB_DENIED_TOOLS_REGEX = exports.GITLAB_READ_ONLY_MODE = exports.IS_OLD = exports.GITLAB_AUTH_COOKIE_PATH = exports.GITLAB_TOKEN = void 0;
37
37
  exports.getEffectiveProjectId = getEffectiveProjectId;
38
38
  exports.getToolDescriptionOverrides = getToolDescriptionOverrides;
39
39
  const path = __importStar(require("path"));
@@ -56,6 +56,7 @@ exports.USE_FILES = process.env.USE_FILES !== "false";
56
56
  exports.USE_VARIABLES = process.env.USE_VARIABLES !== "false";
57
57
  exports.USE_SNIPPETS = process.env.USE_SNIPPETS !== "false";
58
58
  exports.USE_WEBHOOKS = process.env.USE_WEBHOOKS !== "false";
59
+ exports.USE_INTEGRATIONS = process.env.USE_INTEGRATIONS !== "false";
59
60
  exports.HOST = process.env.HOST ?? "0.0.0.0";
60
61
  exports.PORT = process.env.PORT ?? 3002;
61
62
  exports.SSL_CERT_PATH = process.env.SSL_CERT_PATH;
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/config.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgGA,sDAcC;AAwBD,kEAgBC;AAtJD,2CAA6B;AAC7B,uCAAyB;AAEzB,MAAM,eAAe,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,cAAc,CAAC,CAAC;AAGvD,QAAA,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC;AACxC,QAAA,uBAAuB,GAAG,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC;AAC9D,QAAA,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,aAAa,KAAK,MAAM,CAAC;AAC9C,QAAA,qBAAqB,GAAG,OAAO,CAAC,GAA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AA0B,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CACxG,CAAC;QACJ,CAAC;IACH,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AAGD,IAAI,WAAW,GAAG,YAAY,CAAC;AActB,kCAAW;AAbpB,IAAI,cAAc,GAAG,SAAS,CAAC;AAaT,wCAAc;AAXpC,IAAI,CAAC;IACH,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,eAAe,EAAE,MAAM,CAAC,CAGtE,CAAC;IACF,sBAAA,WAAW,GAAG,WAAW,CAAC,IAAI,IAAI,WAAW,CAAC;IAC9C,yBAAA,cAAc,GAAG,WAAW,CAAC,OAAO,IAAI,cAAc,CAAC;AACzD,CAAC;AAAC,MAAM,CAAC;AAET,CAAC;AASD,SAAgB,2BAA2B;IACzC,MAAM,SAAS,GAAG,IAAI,GAAG,EAAkB,CAAC;IAC5C,MAAM,MAAM,GAAG,cAAc,CAAC;IAG9B,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;QACvD,IAAI,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,KAAK,EAAE,CAAC;YAGpC,MAAM,QAAQ,GAAG,GAAG,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,CAAC;YAE5D,SAAS,CAAC,GAAG,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;QACjC,CAAC;IACH,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC"}
@@ -0,0 +1,7 @@
1
+ export * from "../shared";
2
+ export * from "./schema-readonly";
3
+ export * from "./schema";
4
+ export * from "./registry";
5
+ import type { ToolDefinition } from "../../types";
6
+ export declare const integrationsTools: ToolDefinition[];
7
+ export declare const integrationsReadOnlyTools: string[];
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.integrationsReadOnlyTools = exports.integrationsTools = void 0;
18
+ __exportStar(require("../shared"), exports);
19
+ __exportStar(require("./schema-readonly"), exports);
20
+ __exportStar(require("./schema"), exports);
21
+ __exportStar(require("./registry"), exports);
22
+ const registry_1 = require("./registry");
23
+ const isReadOnly = process.env.GITLAB_READONLY === "true";
24
+ const integrationsToolsFromRegistry = (0, registry_1.getFilteredIntegrationsTools)(isReadOnly);
25
+ exports.integrationsTools = integrationsToolsFromRegistry.map((tool) => ({
26
+ name: tool.name,
27
+ description: tool.description,
28
+ inputSchema: tool.inputSchema,
29
+ }));
30
+ exports.integrationsReadOnlyTools = (0, registry_1.getIntegrationsReadOnlyToolNames)();
31
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/entities/integrations/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACA,4CAA0B;AAG1B,oDAAkC;AAGlC,2CAAyB;AAGzB,6CAA2B;AAG3B,yCAA4F;AAI5F,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,KAAK,MAAM,CAAC;AAG1D,MAAM,6BAA6B,GAAG,IAAA,uCAA4B,EAAC,UAAU,CAAC,CAAC;AAGlE,QAAA,iBAAiB,GAAqB,6BAA6B,CAAC,GAAG,CAClF,CAAC,IAAI,EAAkB,EAAE,CAAC,CAAC;IACzB,IAAI,EAAE,IAAI,CAAC,IAAI;IACf,WAAW,EAAE,IAAI,CAAC,WAAW;IAC7B,WAAW,EAAE,IAAI,CAAC,WAAW;CAC9B,CAAC,CACH,CAAC;AAGW,QAAA,yBAAyB,GAAG,IAAA,2CAAgC,GAAE,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { ToolRegistry, EnhancedToolDefinition } from "../../types";
2
+ export declare const integrationsToolRegistry: ToolRegistry;
3
+ export declare function getIntegrationsReadOnlyToolNames(): string[];
4
+ export declare function getIntegrationsToolDefinitions(): EnhancedToolDefinition[];
5
+ export declare function getFilteredIntegrationsTools(readOnlyMode?: boolean): EnhancedToolDefinition[];
@@ -0,0 +1,117 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.integrationsToolRegistry = void 0;
37
+ exports.getIntegrationsReadOnlyToolNames = getIntegrationsReadOnlyToolNames;
38
+ exports.getIntegrationsToolDefinitions = getIntegrationsToolDefinitions;
39
+ exports.getFilteredIntegrationsTools = getFilteredIntegrationsTools;
40
+ const z = __importStar(require("zod"));
41
+ const schema_readonly_1 = require("./schema-readonly");
42
+ const schema_1 = require("./schema");
43
+ const gitlab_api_1 = require("../../utils/gitlab-api");
44
+ const config_1 = require("../../config");
45
+ exports.integrationsToolRegistry = new Map([
46
+ [
47
+ "list_integrations",
48
+ {
49
+ name: "list_integrations",
50
+ description: "LIST all active integrations for a project. Returns integrations like Slack, Jira, Discord, Microsoft Teams, Jenkins, etc. Only shows enabled/configured integrations.",
51
+ inputSchema: z.toJSONSchema(schema_readonly_1.ListIntegrationsSchema, {}),
52
+ handler: async (args) => {
53
+ const input = schema_readonly_1.ListIntegrationsSchema.parse(args);
54
+ const projectId = (0, config_1.getEffectiveProjectId)(input.project_id);
55
+ const query = (0, gitlab_api_1.toQuery)({
56
+ per_page: input.per_page,
57
+ page: input.page,
58
+ }, []);
59
+ return gitlab_api_1.gitlab.get(`projects/${encodeURIComponent(projectId)}/integrations`, { query });
60
+ },
61
+ },
62
+ ],
63
+ [
64
+ "manage_integration",
65
+ {
66
+ name: "manage_integration",
67
+ description: 'MANAGE project integrations. Actions: "get" retrieves integration settings (read-only), "update" modifies or enables integration with specific config, "disable" removes integration. Supports 50+ integrations: Slack, Jira, Discord, Teams, Jenkins, etc. Note: gitlab-slack-application cannot be created via API - requires OAuth install from UI.',
68
+ inputSchema: z.toJSONSchema(schema_1.ManageIntegrationSchema, {}),
69
+ handler: async (args) => {
70
+ const input = schema_1.ManageIntegrationSchema.parse(args);
71
+ const projectId = (0, config_1.getEffectiveProjectId)(input.project_id);
72
+ const integrationSlug = input.integration;
73
+ const isReadOnly = process.env.GITLAB_READ_ONLY_MODE === "true";
74
+ if (isReadOnly && (input.action === "update" || input.action === "disable")) {
75
+ throw new Error(`Action '${input.action}' is not allowed in read-only mode. Only 'get' action is permitted.`);
76
+ }
77
+ switch (input.action) {
78
+ case "get": {
79
+ return gitlab_api_1.gitlab.get(`projects/${encodeURIComponent(projectId)}/integrations/${integrationSlug}`);
80
+ }
81
+ case "update": {
82
+ const { action: _action, project_id: _project_id, integration: _integration, ...body } = input;
83
+ let finalBody = { ...body };
84
+ if (body.config) {
85
+ const { config, ...rest } = body;
86
+ finalBody = { ...rest, ...config };
87
+ }
88
+ return gitlab_api_1.gitlab.put(`projects/${encodeURIComponent(projectId)}/integrations/${integrationSlug}`, {
89
+ body: finalBody,
90
+ contentType: "json",
91
+ });
92
+ }
93
+ case "disable": {
94
+ await gitlab_api_1.gitlab.delete(`projects/${encodeURIComponent(projectId)}/integrations/${integrationSlug}`);
95
+ return { deleted: true };
96
+ }
97
+ default:
98
+ throw new Error(`Unknown action: ${input.action}`);
99
+ }
100
+ },
101
+ },
102
+ ],
103
+ ]);
104
+ function getIntegrationsReadOnlyToolNames() {
105
+ return ["list_integrations", "manage_integration"];
106
+ }
107
+ function getIntegrationsToolDefinitions() {
108
+ return Array.from(exports.integrationsToolRegistry.values());
109
+ }
110
+ function getFilteredIntegrationsTools(readOnlyMode = false) {
111
+ if (readOnlyMode) {
112
+ const readOnlyNames = getIntegrationsReadOnlyToolNames();
113
+ return Array.from(exports.integrationsToolRegistry.values()).filter(tool => readOnlyNames.includes(tool.name));
114
+ }
115
+ return getIntegrationsToolDefinitions();
116
+ }
117
+ //# sourceMappingURL=registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../../src/entities/integrations/registry.ts"],"names":[],"mappings":";;;;;;;;;;;;;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BAC3B,CAAC;oBAGD;wBACE,MAAM,IAAI,KAAK,CAAC,mBAAoB,KAA4B,CAAC,MAAM,EAAE,CAAC,CAAC;gBAC/E,CAAC;YACH,CAAC;SACF;KACF;CACF,CAAC,CAAC;AAOH,SAAgB,gCAAgC;IAC9C,OAAO,CAAC,mBAAmB,EAAE,oBAAoB,CAAC,CAAC;AACrD,CAAC;AAKD,SAAgB,8BAA8B;IAC5C,OAAO,KAAK,CAAC,IAAI,CAAC,gCAAwB,CAAC,MAAM,EAAE,CAAC,CAAC;AACvD,CAAC;AAKD,SAAgB,4BAA4B,CAC1C,eAAwB,KAAK;IAE7B,IAAI,YAAY,EAAE,CAAC;QACjB,MAAM,aAAa,GAAG,gCAAgC,EAAE,CAAC;QACzD,OAAO,KAAK,CAAC,IAAI,CAAC,gCAAwB,CAAC,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CACjE,aAAa,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAClC,CAAC;IACJ,CAAC;IACD,OAAO,8BAA8B,EAAE,CAAC;AAC1C,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { z } from "zod";
2
+ export declare const ListIntegrationsSchema: z.ZodObject<{
3
+ project_id: z.ZodString;
4
+ per_page: z.ZodOptional<z.ZodNumber>;
5
+ page: z.ZodOptional<z.ZodNumber>;
6
+ }, z.core.$strip>;
7
+ export type ListIntegrationsInput = z.infer<typeof ListIntegrationsSchema>;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ListIntegrationsSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.ListIntegrationsSchema = zod_1.z.object({
6
+ project_id: zod_1.z.string().describe("Project ID or URL-encoded path"),
7
+ per_page: zod_1.z.number().int().min(1).max(100).optional().describe("Number of items per page"),
8
+ page: zod_1.z.number().int().min(1).optional().describe("Page number"),
9
+ });
10
+ //# sourceMappingURL=schema-readonly.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema-readonly.js","sourceRoot":"","sources":["../../../../src/entities/integrations/schema-readonly.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAMX,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,gCAAgC,CAAC;IACjE,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,0BAA0B,CAAC;IAC1F,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,aAAa,CAAC;CACjE,CAAC,CAAC"}
@@ -0,0 +1,129 @@
1
+ import { z } from "zod";
2
+ export declare const IntegrationTypeSchema: z.ZodEnum<{
3
+ slack: "slack";
4
+ "gitlab-slack-application": "gitlab-slack-application";
5
+ "slack-slash-commands": "slack-slash-commands";
6
+ discord: "discord";
7
+ "microsoft-teams": "microsoft-teams";
8
+ mattermost: "mattermost";
9
+ "mattermost-slash-commands": "mattermost-slash-commands";
10
+ telegram: "telegram";
11
+ matrix: "matrix";
12
+ pumble: "pumble";
13
+ "hangouts-chat": "hangouts-chat";
14
+ "webex-teams": "webex-teams";
15
+ "unify-circuit": "unify-circuit";
16
+ campfire: "campfire";
17
+ irker: "irker";
18
+ jira: "jira";
19
+ "jira-cloud-app": "jira-cloud-app";
20
+ bugzilla: "bugzilla";
21
+ redmine: "redmine";
22
+ youtrack: "youtrack";
23
+ clickup: "clickup";
24
+ linear: "linear";
25
+ phorge: "phorge";
26
+ pivotaltracker: "pivotaltracker";
27
+ asana: "asana";
28
+ "custom-issue-tracker": "custom-issue-tracker";
29
+ ewm: "ewm";
30
+ jenkins: "jenkins";
31
+ teamcity: "teamcity";
32
+ bamboo: "bamboo";
33
+ buildkite: "buildkite";
34
+ "drone-ci": "drone-ci";
35
+ datadog: "datadog";
36
+ "mock-ci": "mock-ci";
37
+ "diffblue-cover": "diffblue-cover";
38
+ confluence: "confluence";
39
+ "external-wiki": "external-wiki";
40
+ "apple-app-store": "apple-app-store";
41
+ "google-play": "google-play";
42
+ packagist: "packagist";
43
+ "google-cloud-platform-artifact-registry": "google-cloud-platform-artifact-registry";
44
+ "google-cloud-platform-workload-identity-federation": "google-cloud-platform-workload-identity-federation";
45
+ harbor: "harbor";
46
+ "git-guardian": "git-guardian";
47
+ github: "github";
48
+ assembla: "assembla";
49
+ "emails-on-push": "emails-on-push";
50
+ "pipelines-email": "pipelines-email";
51
+ pushover: "pushover";
52
+ "squash-tm": "squash-tm";
53
+ }>;
54
+ export declare const ManageIntegrationSchema: z.ZodObject<{
55
+ action: z.ZodEnum<{
56
+ update: "update";
57
+ get: "get";
58
+ disable: "disable";
59
+ }>;
60
+ project_id: z.ZodString;
61
+ integration: z.ZodEnum<{
62
+ slack: "slack";
63
+ "gitlab-slack-application": "gitlab-slack-application";
64
+ "slack-slash-commands": "slack-slash-commands";
65
+ discord: "discord";
66
+ "microsoft-teams": "microsoft-teams";
67
+ mattermost: "mattermost";
68
+ "mattermost-slash-commands": "mattermost-slash-commands";
69
+ telegram: "telegram";
70
+ matrix: "matrix";
71
+ pumble: "pumble";
72
+ "hangouts-chat": "hangouts-chat";
73
+ "webex-teams": "webex-teams";
74
+ "unify-circuit": "unify-circuit";
75
+ campfire: "campfire";
76
+ irker: "irker";
77
+ jira: "jira";
78
+ "jira-cloud-app": "jira-cloud-app";
79
+ bugzilla: "bugzilla";
80
+ redmine: "redmine";
81
+ youtrack: "youtrack";
82
+ clickup: "clickup";
83
+ linear: "linear";
84
+ phorge: "phorge";
85
+ pivotaltracker: "pivotaltracker";
86
+ asana: "asana";
87
+ "custom-issue-tracker": "custom-issue-tracker";
88
+ ewm: "ewm";
89
+ jenkins: "jenkins";
90
+ teamcity: "teamcity";
91
+ bamboo: "bamboo";
92
+ buildkite: "buildkite";
93
+ "drone-ci": "drone-ci";
94
+ datadog: "datadog";
95
+ "mock-ci": "mock-ci";
96
+ "diffblue-cover": "diffblue-cover";
97
+ confluence: "confluence";
98
+ "external-wiki": "external-wiki";
99
+ "apple-app-store": "apple-app-store";
100
+ "google-play": "google-play";
101
+ packagist: "packagist";
102
+ "google-cloud-platform-artifact-registry": "google-cloud-platform-artifact-registry";
103
+ "google-cloud-platform-workload-identity-federation": "google-cloud-platform-workload-identity-federation";
104
+ harbor: "harbor";
105
+ "git-guardian": "git-guardian";
106
+ github: "github";
107
+ assembla: "assembla";
108
+ "emails-on-push": "emails-on-push";
109
+ "pipelines-email": "pipelines-email";
110
+ pushover: "pushover";
111
+ "squash-tm": "squash-tm";
112
+ }>;
113
+ active: z.ZodOptional<z.ZodPipe<z.ZodTransform<boolean, unknown>, z.ZodBoolean>>;
114
+ push_events: z.ZodOptional<z.ZodPipe<z.ZodTransform<boolean, unknown>, z.ZodBoolean>>;
115
+ issues_events: z.ZodOptional<z.ZodPipe<z.ZodTransform<boolean, unknown>, z.ZodBoolean>>;
116
+ merge_requests_events: z.ZodOptional<z.ZodPipe<z.ZodTransform<boolean, unknown>, z.ZodBoolean>>;
117
+ tag_push_events: z.ZodOptional<z.ZodPipe<z.ZodTransform<boolean, unknown>, z.ZodBoolean>>;
118
+ note_events: z.ZodOptional<z.ZodPipe<z.ZodTransform<boolean, unknown>, z.ZodBoolean>>;
119
+ confidential_issues_events: z.ZodOptional<z.ZodPipe<z.ZodTransform<boolean, unknown>, z.ZodBoolean>>;
120
+ pipeline_events: z.ZodOptional<z.ZodPipe<z.ZodTransform<boolean, unknown>, z.ZodBoolean>>;
121
+ wiki_page_events: z.ZodOptional<z.ZodPipe<z.ZodTransform<boolean, unknown>, z.ZodBoolean>>;
122
+ job_events: z.ZodOptional<z.ZodPipe<z.ZodTransform<boolean, unknown>, z.ZodBoolean>>;
123
+ deployment_events: z.ZodOptional<z.ZodPipe<z.ZodTransform<boolean, unknown>, z.ZodBoolean>>;
124
+ releases_events: z.ZodOptional<z.ZodPipe<z.ZodTransform<boolean, unknown>, z.ZodBoolean>>;
125
+ vulnerability_events: z.ZodOptional<z.ZodPipe<z.ZodTransform<boolean, unknown>, z.ZodBoolean>>;
126
+ config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
127
+ }, z.core.$loose>;
128
+ export type ManageIntegrationInput = z.infer<typeof ManageIntegrationSchema>;
129
+ export type IntegrationType = z.infer<typeof IntegrationTypeSchema>;
@@ -0,0 +1,94 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ManageIntegrationSchema = exports.IntegrationTypeSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const utils_1 = require("../utils");
6
+ exports.IntegrationTypeSchema = zod_1.z.enum([
7
+ "slack",
8
+ "gitlab-slack-application",
9
+ "slack-slash-commands",
10
+ "discord",
11
+ "microsoft-teams",
12
+ "mattermost",
13
+ "mattermost-slash-commands",
14
+ "telegram",
15
+ "matrix",
16
+ "pumble",
17
+ "hangouts-chat",
18
+ "webex-teams",
19
+ "unify-circuit",
20
+ "campfire",
21
+ "irker",
22
+ "jira",
23
+ "jira-cloud-app",
24
+ "bugzilla",
25
+ "redmine",
26
+ "youtrack",
27
+ "clickup",
28
+ "linear",
29
+ "phorge",
30
+ "pivotaltracker",
31
+ "asana",
32
+ "custom-issue-tracker",
33
+ "ewm",
34
+ "jenkins",
35
+ "teamcity",
36
+ "bamboo",
37
+ "buildkite",
38
+ "drone-ci",
39
+ "datadog",
40
+ "mock-ci",
41
+ "diffblue-cover",
42
+ "confluence",
43
+ "external-wiki",
44
+ "apple-app-store",
45
+ "google-play",
46
+ "packagist",
47
+ "google-cloud-platform-artifact-registry",
48
+ "google-cloud-platform-workload-identity-federation",
49
+ "harbor",
50
+ "git-guardian",
51
+ "github",
52
+ "assembla",
53
+ "emails-on-push",
54
+ "pipelines-email",
55
+ "pushover",
56
+ "squash-tm",
57
+ ]);
58
+ exports.ManageIntegrationSchema = zod_1.z
59
+ .object({
60
+ action: zod_1.z.enum(["get", "update", "disable"]).describe("Action to perform"),
61
+ project_id: zod_1.z.string().describe("Project ID or URL-encoded path"),
62
+ integration: exports.IntegrationTypeSchema.describe("Integration type slug (e.g., slack, jira, discord). Note: gitlab-slack-application cannot be created via API - it requires OAuth installation from GitLab UI."),
63
+ active: utils_1.flexibleBoolean
64
+ .optional()
65
+ .describe("For 'update': Enable or disable the integration without full configuration"),
66
+ push_events: utils_1.flexibleBoolean.optional().describe("Trigger integration on push events"),
67
+ issues_events: utils_1.flexibleBoolean.optional().describe("Trigger integration on issue events"),
68
+ merge_requests_events: utils_1.flexibleBoolean
69
+ .optional()
70
+ .describe("Trigger integration on merge request events"),
71
+ tag_push_events: utils_1.flexibleBoolean.optional().describe("Trigger integration on tag push events"),
72
+ note_events: utils_1.flexibleBoolean.optional().describe("Trigger integration on note events"),
73
+ confidential_issues_events: utils_1.flexibleBoolean
74
+ .optional()
75
+ .describe("Trigger integration on confidential issue events"),
76
+ pipeline_events: utils_1.flexibleBoolean.optional().describe("Trigger integration on pipeline events"),
77
+ wiki_page_events: utils_1.flexibleBoolean
78
+ .optional()
79
+ .describe("Trigger integration on wiki page events"),
80
+ job_events: utils_1.flexibleBoolean.optional().describe("Trigger integration on job events"),
81
+ deployment_events: utils_1.flexibleBoolean
82
+ .optional()
83
+ .describe("Trigger integration on deployment events"),
84
+ releases_events: utils_1.flexibleBoolean.optional().describe("Trigger integration on release events"),
85
+ vulnerability_events: utils_1.flexibleBoolean
86
+ .optional()
87
+ .describe("Trigger integration on vulnerability events"),
88
+ config: zod_1.z
89
+ .record(zod_1.z.string(), zod_1.z.unknown())
90
+ .optional()
91
+ .describe("Integration-specific configuration parameters. Pass as key-value pairs. Examples: webhook_url, token, channel, etc. See GitLab API documentation for integration-specific fields."),
92
+ })
93
+ .passthrough();
94
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../src/entities/integrations/schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,oCAA2C;AAM9B,QAAA,qBAAqB,GAAG,OAAC,CAAC,IAAI,CAAC;IAE1C,OAAO;IACP,0BAA0B;IAC1B,sBAAsB;IACtB,SAAS;IACT,iBAAiB;IACjB,YAAY;IACZ,2BAA2B;IAC3B,UAAU;IACV,QAAQ;IACR,QAAQ;IACR,eAAe;IACf,aAAa;IACb,eAAe;IACf,UAAU;IACV,OAAO;IAEP,MAAM;IACN,gBAAgB;IAChB,UAAU;IACV,SAAS;IACT,UAAU;IACV,SAAS;IACT,QAAQ;IACR,QAAQ;IACR,gBAAgB;IAChB,OAAO;IACP,sBAAsB;IACtB,KAAK;IAEL,SAAS;IACT,UAAU;IACV,QAAQ;IACR,WAAW;IACX,UAAU;IACV,SAAS;IACT,SAAS;IACT,gBAAgB;IAEhB,YAAY;IACZ,eAAe;IAEf,iBAAiB;IACjB,aAAa;IACb,WAAW;IAEX,yCAAyC;IACzC,oDAAoD;IACpD,QAAQ;IAER,cAAc;IAEd,QAAQ;IACR,UAAU;IACV,gBAAgB;IAChB,iBAAiB;IACjB,UAAU;IACV,WAAW;CACZ,CAAC,CAAC;AAOU,QAAA,uBAAuB,GAAG,OAAC;KACrC,MAAM,CAAC;IACN,MAAM,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,mBAAmB,CAAC;IAC1E,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,gCAAgC,CAAC;IACjE,WAAW,EAAE,6BAAqB,CAAC,QAAQ,CACzC,+JAA+J,CAChK;IAGD,MAAM,EAAE,uBAAe;SACpB,QAAQ,EAAE;SACV,QAAQ,CAAC,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ry");
13
13
  const registry_10 = require("./entities/webhooks/registry");
14
14
  const registry_11 = require("./entities/snippets/registry");
15
+ const registry_12 = require("./entities/integrations/registry");
15
16
  const config_1 = require("./config");
16
17
  const ToolAvailability_1 = require("./services/ToolAvailability");
17
18
  const logger_1 = require("./logger");
@@ -66,6 +67,9 @@ class RegistryManager {
66
67
  if (config_1.USE_WEBHOOKS) {
67
68
  this.registries.set("webhooks", registry_10.webhooksToolRegistry);
68
69
  }
70
+ if (config_1.USE_INTEGRATIONS) {
71
+ this.registries.set("integrations", registry_12.integrationsToolRegistry);
72
+ }
69
73
  }
70
74
  loadDescriptionOverrides() {
71
75
  this.descriptionOverrides = (0, config_1.getToolDescriptionOverrides)();
@@ -109,6 +113,9 @@ class RegistryManager {
109
113
  if (config_1.USE_WEBHOOKS) {
110
114
  readOnlyTools.push(...(0, registry_10.getWebhooksReadOnlyToolNames)());
111
115
  }
116
+ if (config_1.USE_INTEGRATIONS) {
117
+ readOnlyTools.push(...(0, registry_12.getIntegrationsReadOnlyToolNames)());
118
+ }
112
119
  return readOnlyTools;
113
120
  }
114
121
  getReadOnlyTools() {
@@ -194,6 +201,7 @@ class RegistryManager {
194
201
  const useWorkitems = process.env.USE_WORKITEMS !== "false";
195
202
  const useSnippets = process.env.USE_SNIPPETS !== "false";
196
203
  const useWebhooks = process.env.USE_WEBHOOKS !== "false";
204
+ const useIntegrations = process.env.USE_INTEGRATIONS !== "false";
197
205
  const registriesToUse = new Map();
198
206
  registriesToUse.set("core", registry_1.coreToolRegistry);
199
207
  if (useLabels)
@@ -216,6 +224,8 @@ class RegistryManager {
216
224
  registriesToUse.set("snippets", registry_11.snippetsToolRegistry);
217
225
  if (useWebhooks)
218
226
  registriesToUse.set("webhooks", registry_10.webhooksToolRegistry);
227
+ if (useIntegrations)
228
+ registriesToUse.set("integrations", registry_12.integrationsToolRegistry);
219
229
  const descOverrides = (0, config_1.getToolDescriptionOverrides)();
220
230
  for (const registry of registriesToUse.values()) {
221
231
  for (const [toolName, tool] of registry) {