@structured-world/gitlab-mcp 6.22.0 → 6.23.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/dist/src/config.d.ts +1 -0
- package/dist/src/config.js +2 -1
- package/dist/src/config.js.map +1 -1
- package/dist/src/entities/index.d.ts +1 -0
- package/dist/src/entities/index.js +1 -0
- package/dist/src/entities/index.js.map +1 -1
- package/dist/src/entities/search/index.d.ts +2 -0
- package/dist/src/entities/search/index.js +24 -0
- package/dist/src/entities/search/index.js.map +1 -0
- package/dist/src/entities/search/registry.d.ts +5 -0
- package/dist/src/entities/search/registry.js +113 -0
- package/dist/src/entities/search/registry.js.map +1 -0
- package/dist/src/entities/search/schema-readonly.d.ts +228 -0
- package/dist/src/entities/search/schema-readonly.js +64 -0
- package/dist/src/entities/search/schema-readonly.js.map +1 -0
- package/dist/src/registry-manager.js +11 -0
- package/dist/src/registry-manager.js.map +1 -1
- package/dist/src/services/ToolAvailability.js +8 -0
- package/dist/src/services/ToolAvailability.js.map +1 -1
- package/dist/structured-world-gitlab-mcp-6.23.0.tgz +0 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/structured-world-gitlab-mcp-6.22.0.tgz +0 -0
package/dist/src/config.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ export declare const USE_INTEGRATIONS: boolean;
|
|
|
21
21
|
export declare const USE_RELEASES: boolean;
|
|
22
22
|
export declare const USE_REFS: boolean;
|
|
23
23
|
export declare const USE_MEMBERS: boolean;
|
|
24
|
+
export declare const USE_SEARCH: boolean;
|
|
24
25
|
export declare const HOST: string;
|
|
25
26
|
export declare const PORT: string | number;
|
|
26
27
|
export declare const SSL_CERT_PATH: string | undefined;
|
package/dist/src/config.js
CHANGED
|
@@ -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_MEMBERS = exports.USE_REFS = exports.USE_RELEASES = 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_SCHEMA_MODE = exports.GITLAB_DENIED_ACTIONS = 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_SEARCH = exports.USE_MEMBERS = exports.USE_REFS = exports.USE_RELEASES = 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_SCHEMA_MODE = exports.GITLAB_DENIED_ACTIONS = 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.detectSchemaMode = detectSchemaMode;
|
|
38
38
|
exports.getEffectiveProjectId = getEffectiveProjectId;
|
|
39
39
|
exports.getToolDescriptionOverrides = getToolDescriptionOverrides;
|
|
@@ -121,6 +121,7 @@ exports.USE_INTEGRATIONS = process.env.USE_INTEGRATIONS !== "false";
|
|
|
121
121
|
exports.USE_RELEASES = process.env.USE_RELEASES !== "false";
|
|
122
122
|
exports.USE_REFS = process.env.USE_REFS !== "false";
|
|
123
123
|
exports.USE_MEMBERS = process.env.USE_MEMBERS !== "false";
|
|
124
|
+
exports.USE_SEARCH = process.env.USE_SEARCH !== "false";
|
|
124
125
|
exports.HOST = process.env.HOST ?? "0.0.0.0";
|
|
125
126
|
exports.PORT = process.env.PORT ?? 3002;
|
|
126
127
|
exports.SSL_CERT_PATH = process.env.SSL_CERT_PATH;
|
package/dist/src/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/config.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0FA,4CA2BC;
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/config.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0FA,4CA2BC;AA0FD,sDAcC;AAwBD,kEAgBC;AAQD,sEA6BC;AAQD,oEA4BC;AAQD,wCAMC;AAQD,8CAMC;AA1WD,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,GAAG,CAAC,qBAAqB,KAAK,MAAM,CAAC;AACrE,QAAA,yBAAyB,GAAG,OAAO,CAAC,GAAG,CAAC,yBAAyB;IAC5E,CAAC,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC;IACnD,CAAC,CAAC,SAAS,CAAC;AAQd,SAAS,kBAAkB,CAAC,QAAiB;IAC3C,MAAM,aAAa,GAAG,IAAI,GAAG,EAAuB,CAAC;IAErD,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,OAAO,aAAa,CAAC;IACvB,CAAC;IAED,MAAM,KAAK,GAAG,QAAQ;SACnB,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;SAClB,MAAM,CAAC,OAAO,CAAC,CAAC;IAEnB,KAAK,MAA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AAG,6BAAqB,CAAC,GAAG,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,CAAC;IACxE,IAAI,CAAC,aAAa,IAAI,aAAa,CAAC,IAAI,KAAK,CAAC,EAAE,CAAC;QAC/C,OAAO,UAAU,CAAC;IACpB,CAAC;IACD,OAAO,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,aAAa,CAAC,GAAG,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;AAC/E,CAAC"}
|
|
@@ -28,4 +28,5 @@ __exportStar(require("./webhooks"), exports);
|
|
|
28
28
|
__exportStar(require("./releases"), exports);
|
|
29
29
|
__exportStar(require("./refs"), exports);
|
|
30
30
|
__exportStar(require("./members"), exports);
|
|
31
|
+
__exportStar(require("./search"), exports);
|
|
31
32
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entities/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,yCAAuB;AACvB,yCAAuB;AACvB,+CAA6B;AAC7B,8CAA4B;AAC5B,8CAA4B;AAC5B,2CAAyB;AACzB,wCAAsB;AACtB,0CAAwB;AACxB,8CAA4B;AAC5B,6CAA2B;AAC3B,6CAA2B;AAC3B,yCAAuB;AACvB,4CAA0B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entities/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,yCAAuB;AACvB,yCAAuB;AACvB,+CAA6B;AAC7B,8CAA4B;AAC5B,8CAA4B;AAC5B,2CAAyB;AACzB,wCAAsB;AACtB,0CAAwB;AACxB,8CAA4B;AAC5B,6CAA2B;AAC3B,6CAA2B;AAC3B,yCAAuB;AACvB,4CAA0B;AAC1B,2CAAyB"}
|
|
@@ -0,0 +1,24 @@
|
|
|
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.getFilteredSearchTools = exports.getSearchToolDefinitions = exports.getSearchReadOnlyToolNames = exports.searchToolRegistry = void 0;
|
|
18
|
+
__exportStar(require("./schema-readonly"), exports);
|
|
19
|
+
var registry_1 = require("./registry");
|
|
20
|
+
Object.defineProperty(exports, "searchToolRegistry", { enumerable: true, get: function () { return registry_1.searchToolRegistry; } });
|
|
21
|
+
Object.defineProperty(exports, "getSearchReadOnlyToolNames", { enumerable: true, get: function () { return registry_1.getSearchReadOnlyToolNames; } });
|
|
22
|
+
Object.defineProperty(exports, "getSearchToolDefinitions", { enumerable: true, get: function () { return registry_1.getSearchToolDefinitions; } });
|
|
23
|
+
Object.defineProperty(exports, "getFilteredSearchTools", { enumerable: true, get: function () { return registry_1.getFilteredSearchTools; } });
|
|
24
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/entities/search/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACA,oDAAkC;AAClC,uCAKoB;AAJlB,8GAAA,kBAAkB,OAAA;AAClB,sHAAA,0BAA0B,OAAA;AAC1B,oHAAA,wBAAwB,OAAA;AACxB,kHAAA,sBAAsB,OAAA"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ToolRegistry, EnhancedToolDefinition } from "../../types";
|
|
2
|
+
export declare const searchToolRegistry: ToolRegistry;
|
|
3
|
+
export declare function getSearchReadOnlyToolNames(): string[];
|
|
4
|
+
export declare function getSearchToolDefinitions(): EnhancedToolDefinition[];
|
|
5
|
+
export declare function getFilteredSearchTools(readOnlyMode?: boolean): EnhancedToolDefinition[];
|
|
@@ -0,0 +1,113 @@
|
|
|
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.searchToolRegistry = void 0;
|
|
37
|
+
exports.getSearchReadOnlyToolNames = getSearchReadOnlyToolNames;
|
|
38
|
+
exports.getSearchToolDefinitions = getSearchToolDefinitions;
|
|
39
|
+
exports.getFilteredSearchTools = getFilteredSearchTools;
|
|
40
|
+
const z = __importStar(require("zod"));
|
|
41
|
+
const schema_readonly_1 = require("./schema-readonly");
|
|
42
|
+
const config_1 = require("../../config");
|
|
43
|
+
const gitlab_api_1 = require("../../utils/gitlab-api");
|
|
44
|
+
exports.searchToolRegistry = new Map([
|
|
45
|
+
[
|
|
46
|
+
"browse_search",
|
|
47
|
+
{
|
|
48
|
+
name: "browse_search",
|
|
49
|
+
description: 'SEARCH GitLab resources. Actions: "global" searches entire instance, "project" searches within a project, "group" searches within a group. Scopes: projects, issues, merge_requests, milestones, users, groups, blobs (code), commits, wiki_blobs, notes.',
|
|
50
|
+
inputSchema: z.toJSONSchema(schema_readonly_1.BrowseSearchSchema),
|
|
51
|
+
gate: { envVar: "USE_SEARCH", defaultValue: true },
|
|
52
|
+
handler: async (args) => {
|
|
53
|
+
const input = schema_readonly_1.BrowseSearchSchema.parse(args);
|
|
54
|
+
if ((0, config_1.isActionDenied)("browse_search", input.action)) {
|
|
55
|
+
throw new Error(`Action '${input.action}' is not allowed for browse_search tool`);
|
|
56
|
+
}
|
|
57
|
+
switch (input.action) {
|
|
58
|
+
case "global": {
|
|
59
|
+
const { scope, ...params } = input;
|
|
60
|
+
const query = (0, gitlab_api_1.toQuery)(params, ["action"]);
|
|
61
|
+
const results = await gitlab_api_1.gitlab.get("search", {
|
|
62
|
+
query: { ...query, scope },
|
|
63
|
+
});
|
|
64
|
+
return {
|
|
65
|
+
scope,
|
|
66
|
+
count: results.length,
|
|
67
|
+
results,
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
case "project": {
|
|
71
|
+
const { project_id, scope, ref, ...params } = input;
|
|
72
|
+
const query = (0, gitlab_api_1.toQuery)(params, ["action"]);
|
|
73
|
+
const results = await gitlab_api_1.gitlab.get(`${gitlab_api_1.paths.project(project_id)}/search`, {
|
|
74
|
+
query: { ...query, scope, ...(ref && { ref }) },
|
|
75
|
+
});
|
|
76
|
+
return {
|
|
77
|
+
project_id,
|
|
78
|
+
scope,
|
|
79
|
+
count: results.length,
|
|
80
|
+
results,
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
case "group": {
|
|
84
|
+
const { group_id, scope, ...params } = input;
|
|
85
|
+
const query = (0, gitlab_api_1.toQuery)(params, ["action"]);
|
|
86
|
+
const results = await gitlab_api_1.gitlab.get(`${gitlab_api_1.paths.group(group_id)}/search`, {
|
|
87
|
+
query: { ...query, scope },
|
|
88
|
+
});
|
|
89
|
+
return {
|
|
90
|
+
group_id,
|
|
91
|
+
scope,
|
|
92
|
+
count: results.length,
|
|
93
|
+
results,
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
default:
|
|
97
|
+
throw new Error(`Unknown action: ${input.action}`);
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
],
|
|
102
|
+
]);
|
|
103
|
+
function getSearchReadOnlyToolNames() {
|
|
104
|
+
return ["browse_search"];
|
|
105
|
+
}
|
|
106
|
+
function getSearchToolDefinitions() {
|
|
107
|
+
return Array.from(exports.searchToolRegistry.values());
|
|
108
|
+
}
|
|
109
|
+
function getFilteredSearchTools(readOnlyMode = false) {
|
|
110
|
+
void readOnlyMode;
|
|
111
|
+
return getSearchToolDefinitions();
|
|
112
|
+
}
|
|
113
|
+
//# sourceMappingURL=registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../../src/entities/search/registry.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2GA,gEAEC;AAKD,4DAEC;AAMD,wDAIC;AA9HD,uCAAyB;AACzB,uDAAuD;AAEvD,yCAA8C;AAC9C,uDAAgE;AASnD,QAAA,kBAAkB,GAAiB,IAAI,GAAG,CAAiC;IAKtF;QACE,eAAe;QACf;YACE,IAAI,EAAE,eAAe;YACrB,WAAW,EACT,2PAA2P;YAC7P,WAAW,EAAE,CAAC,CAAC,YAAY,CAAC,oCAAkB,CAAC;YAC/C,IAAI,EAAE,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,IAAI,EAAE;YAClD,OAAO,EAAE,KAAK,EAAE,IAAa,EAAoB,EAAE;gBACjD,MAAM,KAAK,GAAG,oCAAkB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;gBAG7C,IAAI,IAAA,uBAAc,EAAC,eAAe,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC;oBAClD,MAAM,IAAI,KAAK,CAAC,WAAW,KAAK,CAAC,MAAM,yCAAyC,CAAC,CAAC;gBACpF,CAAC;gBAED,QAAQ,KAAK,CAAC,MAAM,EAAE,CAAC;oBACrB,KAAK,QAAQ,CAAC,CAAC,CAAC;wBAEd,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,EAAE,GAAG,KAAK,CAAC;wBAGnC,MAAM,KAAK,GAAG,IAAA,oBAAO,EAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;wBAG1C,MAAM,OAAO,GAAG,MAAM,mBAAM,CAAC,GAAG,CAAY,QAAQ,EAAE;4BACpD,KAAK,EAAE,EAAE,GAAG,KAAK,EAAE,KAAK,EAAE;yBAC3B,CAAC,CAAC;wBAEH,OAA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M,EAAE,CAAC,CAAC;gBAC/E,CAAC;YACH,CAAC;SACF;KACF;CACF,CAAC,CAAC;AAMH,SAAgB,0BAA0B;IACxC,OAAO,CAAC,eAAe,CAAC,CAAC;AAC3B,CAAC;AAKD,SAAgB,wBAAwB;IACtC,OAAO,KAAK,CAAC,IAAI,CAAC,0BAAkB,CAAC,MAAM,EAAE,CAAC,CAAC;AACjD,CAAC;AAMD,SAAgB,sBAAsB,CAAC,eAAwB,KAAK;IAElE,KAAK,YAAY,CAAC;IAClB,OAAO,wBAAwB,EAAE,CAAC;AACpC,CAAC"}
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const SearchScopeSchema: z.ZodEnum<{
|
|
3
|
+
milestones: "milestones";
|
|
4
|
+
projects: "projects";
|
|
5
|
+
issues: "issues";
|
|
6
|
+
merge_requests: "merge_requests";
|
|
7
|
+
commits: "commits";
|
|
8
|
+
users: "users";
|
|
9
|
+
groups: "groups";
|
|
10
|
+
snippet_titles: "snippet_titles";
|
|
11
|
+
blobs: "blobs";
|
|
12
|
+
wiki_blobs: "wiki_blobs";
|
|
13
|
+
notes: "notes";
|
|
14
|
+
}>;
|
|
15
|
+
declare const GlobalSearchSchema: z.ZodObject<{
|
|
16
|
+
action: z.ZodLiteral<"global">;
|
|
17
|
+
scope: z.ZodEnum<{
|
|
18
|
+
milestones: "milestones";
|
|
19
|
+
projects: "projects";
|
|
20
|
+
issues: "issues";
|
|
21
|
+
merge_requests: "merge_requests";
|
|
22
|
+
commits: "commits";
|
|
23
|
+
users: "users";
|
|
24
|
+
groups: "groups";
|
|
25
|
+
snippet_titles: "snippet_titles";
|
|
26
|
+
blobs: "blobs";
|
|
27
|
+
wiki_blobs: "wiki_blobs";
|
|
28
|
+
notes: "notes";
|
|
29
|
+
}>;
|
|
30
|
+
search: z.ZodString;
|
|
31
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
32
|
+
all: "all";
|
|
33
|
+
closed: "closed";
|
|
34
|
+
merged: "merged";
|
|
35
|
+
opened: "opened";
|
|
36
|
+
}>>;
|
|
37
|
+
confidential: z.ZodOptional<z.ZodBoolean>;
|
|
38
|
+
order_by: z.ZodOptional<z.ZodEnum<{
|
|
39
|
+
created_at: "created_at";
|
|
40
|
+
updated_at: "updated_at";
|
|
41
|
+
}>>;
|
|
42
|
+
sort: z.ZodOptional<z.ZodEnum<{
|
|
43
|
+
asc: "asc";
|
|
44
|
+
desc: "desc";
|
|
45
|
+
}>>;
|
|
46
|
+
page: z.ZodOptional<z.ZodNumber>;
|
|
47
|
+
per_page: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
48
|
+
}, z.core.$strip>;
|
|
49
|
+
declare const ProjectSearchSchema: z.ZodObject<{
|
|
50
|
+
action: z.ZodLiteral<"project">;
|
|
51
|
+
project_id: z.ZodPipe<z.ZodTransform<{}, unknown>, z.ZodCoercedString<unknown>>;
|
|
52
|
+
scope: z.ZodEnum<{
|
|
53
|
+
milestones: "milestones";
|
|
54
|
+
projects: "projects";
|
|
55
|
+
issues: "issues";
|
|
56
|
+
merge_requests: "merge_requests";
|
|
57
|
+
commits: "commits";
|
|
58
|
+
users: "users";
|
|
59
|
+
groups: "groups";
|
|
60
|
+
snippet_titles: "snippet_titles";
|
|
61
|
+
blobs: "blobs";
|
|
62
|
+
wiki_blobs: "wiki_blobs";
|
|
63
|
+
notes: "notes";
|
|
64
|
+
}>;
|
|
65
|
+
ref: z.ZodOptional<z.ZodString>;
|
|
66
|
+
search: z.ZodString;
|
|
67
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
68
|
+
all: "all";
|
|
69
|
+
closed: "closed";
|
|
70
|
+
merged: "merged";
|
|
71
|
+
opened: "opened";
|
|
72
|
+
}>>;
|
|
73
|
+
confidential: z.ZodOptional<z.ZodBoolean>;
|
|
74
|
+
order_by: z.ZodOptional<z.ZodEnum<{
|
|
75
|
+
created_at: "created_at";
|
|
76
|
+
updated_at: "updated_at";
|
|
77
|
+
}>>;
|
|
78
|
+
sort: z.ZodOptional<z.ZodEnum<{
|
|
79
|
+
asc: "asc";
|
|
80
|
+
desc: "desc";
|
|
81
|
+
}>>;
|
|
82
|
+
page: z.ZodOptional<z.ZodNumber>;
|
|
83
|
+
per_page: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
84
|
+
}, z.core.$strip>;
|
|
85
|
+
declare const GroupSearchSchema: z.ZodObject<{
|
|
86
|
+
action: z.ZodLiteral<"group">;
|
|
87
|
+
group_id: z.ZodPipe<z.ZodTransform<{}, unknown>, z.ZodCoercedString<unknown>>;
|
|
88
|
+
scope: z.ZodEnum<{
|
|
89
|
+
milestones: "milestones";
|
|
90
|
+
projects: "projects";
|
|
91
|
+
issues: "issues";
|
|
92
|
+
merge_requests: "merge_requests";
|
|
93
|
+
commits: "commits";
|
|
94
|
+
users: "users";
|
|
95
|
+
groups: "groups";
|
|
96
|
+
snippet_titles: "snippet_titles";
|
|
97
|
+
blobs: "blobs";
|
|
98
|
+
wiki_blobs: "wiki_blobs";
|
|
99
|
+
notes: "notes";
|
|
100
|
+
}>;
|
|
101
|
+
search: z.ZodString;
|
|
102
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
103
|
+
all: "all";
|
|
104
|
+
closed: "closed";
|
|
105
|
+
merged: "merged";
|
|
106
|
+
opened: "opened";
|
|
107
|
+
}>>;
|
|
108
|
+
confidential: z.ZodOptional<z.ZodBoolean>;
|
|
109
|
+
order_by: z.ZodOptional<z.ZodEnum<{
|
|
110
|
+
created_at: "created_at";
|
|
111
|
+
updated_at: "updated_at";
|
|
112
|
+
}>>;
|
|
113
|
+
sort: z.ZodOptional<z.ZodEnum<{
|
|
114
|
+
asc: "asc";
|
|
115
|
+
desc: "desc";
|
|
116
|
+
}>>;
|
|
117
|
+
page: z.ZodOptional<z.ZodNumber>;
|
|
118
|
+
per_page: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
119
|
+
}, z.core.$strip>;
|
|
120
|
+
export declare const BrowseSearchSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
121
|
+
action: z.ZodLiteral<"global">;
|
|
122
|
+
scope: z.ZodEnum<{
|
|
123
|
+
milestones: "milestones";
|
|
124
|
+
projects: "projects";
|
|
125
|
+
issues: "issues";
|
|
126
|
+
merge_requests: "merge_requests";
|
|
127
|
+
commits: "commits";
|
|
128
|
+
users: "users";
|
|
129
|
+
groups: "groups";
|
|
130
|
+
snippet_titles: "snippet_titles";
|
|
131
|
+
blobs: "blobs";
|
|
132
|
+
wiki_blobs: "wiki_blobs";
|
|
133
|
+
notes: "notes";
|
|
134
|
+
}>;
|
|
135
|
+
search: z.ZodString;
|
|
136
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
137
|
+
all: "all";
|
|
138
|
+
closed: "closed";
|
|
139
|
+
merged: "merged";
|
|
140
|
+
opened: "opened";
|
|
141
|
+
}>>;
|
|
142
|
+
confidential: z.ZodOptional<z.ZodBoolean>;
|
|
143
|
+
order_by: z.ZodOptional<z.ZodEnum<{
|
|
144
|
+
created_at: "created_at";
|
|
145
|
+
updated_at: "updated_at";
|
|
146
|
+
}>>;
|
|
147
|
+
sort: z.ZodOptional<z.ZodEnum<{
|
|
148
|
+
asc: "asc";
|
|
149
|
+
desc: "desc";
|
|
150
|
+
}>>;
|
|
151
|
+
page: z.ZodOptional<z.ZodNumber>;
|
|
152
|
+
per_page: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
153
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
154
|
+
action: z.ZodLiteral<"project">;
|
|
155
|
+
project_id: z.ZodPipe<z.ZodTransform<{}, unknown>, z.ZodCoercedString<unknown>>;
|
|
156
|
+
scope: z.ZodEnum<{
|
|
157
|
+
milestones: "milestones";
|
|
158
|
+
projects: "projects";
|
|
159
|
+
issues: "issues";
|
|
160
|
+
merge_requests: "merge_requests";
|
|
161
|
+
commits: "commits";
|
|
162
|
+
users: "users";
|
|
163
|
+
groups: "groups";
|
|
164
|
+
snippet_titles: "snippet_titles";
|
|
165
|
+
blobs: "blobs";
|
|
166
|
+
wiki_blobs: "wiki_blobs";
|
|
167
|
+
notes: "notes";
|
|
168
|
+
}>;
|
|
169
|
+
ref: z.ZodOptional<z.ZodString>;
|
|
170
|
+
search: z.ZodString;
|
|
171
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
172
|
+
all: "all";
|
|
173
|
+
closed: "closed";
|
|
174
|
+
merged: "merged";
|
|
175
|
+
opened: "opened";
|
|
176
|
+
}>>;
|
|
177
|
+
confidential: z.ZodOptional<z.ZodBoolean>;
|
|
178
|
+
order_by: z.ZodOptional<z.ZodEnum<{
|
|
179
|
+
created_at: "created_at";
|
|
180
|
+
updated_at: "updated_at";
|
|
181
|
+
}>>;
|
|
182
|
+
sort: z.ZodOptional<z.ZodEnum<{
|
|
183
|
+
asc: "asc";
|
|
184
|
+
desc: "desc";
|
|
185
|
+
}>>;
|
|
186
|
+
page: z.ZodOptional<z.ZodNumber>;
|
|
187
|
+
per_page: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
188
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
189
|
+
action: z.ZodLiteral<"group">;
|
|
190
|
+
group_id: z.ZodPipe<z.ZodTransform<{}, unknown>, z.ZodCoercedString<unknown>>;
|
|
191
|
+
scope: z.ZodEnum<{
|
|
192
|
+
milestones: "milestones";
|
|
193
|
+
projects: "projects";
|
|
194
|
+
issues: "issues";
|
|
195
|
+
merge_requests: "merge_requests";
|
|
196
|
+
commits: "commits";
|
|
197
|
+
users: "users";
|
|
198
|
+
groups: "groups";
|
|
199
|
+
snippet_titles: "snippet_titles";
|
|
200
|
+
blobs: "blobs";
|
|
201
|
+
wiki_blobs: "wiki_blobs";
|
|
202
|
+
notes: "notes";
|
|
203
|
+
}>;
|
|
204
|
+
search: z.ZodString;
|
|
205
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
206
|
+
all: "all";
|
|
207
|
+
closed: "closed";
|
|
208
|
+
merged: "merged";
|
|
209
|
+
opened: "opened";
|
|
210
|
+
}>>;
|
|
211
|
+
confidential: z.ZodOptional<z.ZodBoolean>;
|
|
212
|
+
order_by: z.ZodOptional<z.ZodEnum<{
|
|
213
|
+
created_at: "created_at";
|
|
214
|
+
updated_at: "updated_at";
|
|
215
|
+
}>>;
|
|
216
|
+
sort: z.ZodOptional<z.ZodEnum<{
|
|
217
|
+
asc: "asc";
|
|
218
|
+
desc: "desc";
|
|
219
|
+
}>>;
|
|
220
|
+
page: z.ZodOptional<z.ZodNumber>;
|
|
221
|
+
per_page: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
222
|
+
}, z.core.$strip>], "action">;
|
|
223
|
+
export type SearchScope = z.infer<typeof SearchScopeSchema>;
|
|
224
|
+
export type BrowseSearchInput = z.infer<typeof BrowseSearchSchema>;
|
|
225
|
+
export type GlobalSearchInput = z.infer<typeof GlobalSearchSchema>;
|
|
226
|
+
export type ProjectSearchInput = z.infer<typeof ProjectSearchSchema>;
|
|
227
|
+
export type GroupSearchInput = z.infer<typeof GroupSearchSchema>;
|
|
228
|
+
export {};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BrowseSearchSchema = exports.SearchScopeSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const shared_1 = require("../shared");
|
|
6
|
+
const utils_1 = require("../utils");
|
|
7
|
+
exports.SearchScopeSchema = zod_1.z
|
|
8
|
+
.enum([
|
|
9
|
+
"projects",
|
|
10
|
+
"issues",
|
|
11
|
+
"merge_requests",
|
|
12
|
+
"milestones",
|
|
13
|
+
"snippet_titles",
|
|
14
|
+
"users",
|
|
15
|
+
"groups",
|
|
16
|
+
"blobs",
|
|
17
|
+
"commits",
|
|
18
|
+
"wiki_blobs",
|
|
19
|
+
"notes",
|
|
20
|
+
])
|
|
21
|
+
.describe("Search scope determining what type of resources to search");
|
|
22
|
+
const BaseSearchParams = zod_1.z.object({
|
|
23
|
+
search: zod_1.z.string().min(1).describe("Search query string (minimum 1 character)"),
|
|
24
|
+
state: zod_1.z
|
|
25
|
+
.enum(["opened", "closed", "merged", "all"])
|
|
26
|
+
.optional()
|
|
27
|
+
.describe("Filter by state (for issues and merge_requests scopes)"),
|
|
28
|
+
confidential: zod_1.z
|
|
29
|
+
.boolean()
|
|
30
|
+
.optional()
|
|
31
|
+
.describe("Filter by confidentiality (for issues scope, Premium only)"),
|
|
32
|
+
order_by: zod_1.z.enum(["created_at", "updated_at"]).optional().describe("Sort results by field"),
|
|
33
|
+
sort: zod_1.z.enum(["asc", "desc"]).optional().describe("Sort direction"),
|
|
34
|
+
});
|
|
35
|
+
const GlobalSearchSchema = zod_1.z
|
|
36
|
+
.object({
|
|
37
|
+
action: zod_1.z.literal("global").describe("Search across entire GitLab instance"),
|
|
38
|
+
scope: exports.SearchScopeSchema,
|
|
39
|
+
})
|
|
40
|
+
.merge(BaseSearchParams)
|
|
41
|
+
.merge(shared_1.PaginationOptionsSchema);
|
|
42
|
+
const ProjectSearchSchema = zod_1.z
|
|
43
|
+
.object({
|
|
44
|
+
action: zod_1.z.literal("project").describe("Search within a specific project"),
|
|
45
|
+
project_id: utils_1.requiredId.describe("Project ID or URL-encoded path (e.g., 'group/project' or '123')"),
|
|
46
|
+
scope: exports.SearchScopeSchema,
|
|
47
|
+
ref: zod_1.z.string().optional().describe("Branch/tag reference for code search (blobs, commits)"),
|
|
48
|
+
})
|
|
49
|
+
.merge(BaseSearchParams)
|
|
50
|
+
.merge(shared_1.PaginationOptionsSchema);
|
|
51
|
+
const GroupSearchSchema = zod_1.z
|
|
52
|
+
.object({
|
|
53
|
+
action: zod_1.z.literal("group").describe("Search within a specific group and its subgroups"),
|
|
54
|
+
group_id: utils_1.requiredId.describe("Group ID or URL-encoded path (e.g., 'my-group' or '123')"),
|
|
55
|
+
scope: exports.SearchScopeSchema,
|
|
56
|
+
})
|
|
57
|
+
.merge(BaseSearchParams)
|
|
58
|
+
.merge(shared_1.PaginationOptionsSchema);
|
|
59
|
+
exports.BrowseSearchSchema = zod_1.z.discriminatedUnion("action", [
|
|
60
|
+
GlobalSearchSchema,
|
|
61
|
+
ProjectSearchSchema,
|
|
62
|
+
GroupSearchSchema,
|
|
63
|
+
]);
|
|
64
|
+
//# sourceMappingURL=schema-readonly.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema-readonly.js","sourceRoot":"","sources":["../../../../src/entities/search/schema-readonly.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,sCAAoD;AACpD,oCAAsC;AAMzB,QAAA,iBAAiB,GAAG,OAAC;KAC/B,IAAI,CAAC;IACJ,UAAU;IACV,QAAQ;IACR,gBAAgB;IAChB,YAAY;IACZ,gBAAgB;IAChB,OAAO;IACP,QAAQ;IACR,OAAO;IACP,SAAS;IACT,YAAY;IACZ,OAAO;CACR,CAAC;KACD,QAAQ,CAAC,2DAA2D,CAAC,CAAC;AAMzE,MAAM,gBAAgB,GAAG,OAAC,CAAC,MAAM,CAAC;IAChC,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,2CAA2C,CAAC;IAC/E,KAAK,EAAE,OAAC;SACL,IAAI,CAAC,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;SAC3C,QAAQ,EAAE;SACV,QAAQ,CAAC,wDAAwD,CAAC;IACrE,YAAY,EAAE,OAAC;SACZ,OAAO,EAAE;SACT,QAAQ,EAAE;SACV,QAAQ,CAAC,4DAA4D,CAAC;IACzE,QAAQ,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,uBAAuB,CAAC;IAC3F,IAAI,EAAE,OAAC,CAAC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 const registry_12 = require("./entities/integrations/registry");
|
|
|
16
16
|
const registry_13 = require("./entities/releases/registry");
|
|
17
17
|
const registry_14 = require("./entities/refs/registry");
|
|
18
18
|
const registry_15 = require("./entities/members/registry");
|
|
19
|
+
const registry_16 = require("./entities/search/registry");
|
|
19
20
|
const config_1 = require("./config");
|
|
20
21
|
const ToolAvailability_1 = require("./services/ToolAvailability");
|
|
21
22
|
const logger_1 = require("./logger");
|
|
@@ -83,6 +84,9 @@ class RegistryManager {
|
|
|
83
84
|
if (config_1.USE_MEMBERS) {
|
|
84
85
|
this.registries.set("members", registry_15.membersToolRegistry);
|
|
85
86
|
}
|
|
87
|
+
if (config_1.USE_SEARCH) {
|
|
88
|
+
this.registries.set("search", registry_16.searchToolRegistry);
|
|
89
|
+
}
|
|
86
90
|
}
|
|
87
91
|
loadDescriptionOverrides() {
|
|
88
92
|
this.descriptionOverrides = (0, config_1.getToolDescriptionOverrides)();
|
|
@@ -138,6 +142,9 @@ class RegistryManager {
|
|
|
138
142
|
if (config_1.USE_MEMBERS) {
|
|
139
143
|
readOnlyTools.push(...(0, registry_15.getMembersReadOnlyToolNames)());
|
|
140
144
|
}
|
|
145
|
+
if (config_1.USE_SEARCH) {
|
|
146
|
+
readOnlyTools.push(...(0, registry_16.getSearchReadOnlyToolNames)());
|
|
147
|
+
}
|
|
141
148
|
return readOnlyTools;
|
|
142
149
|
}
|
|
143
150
|
getReadOnlyTools() {
|
|
@@ -234,6 +241,7 @@ class RegistryManager {
|
|
|
234
241
|
const useReleases = process.env.USE_RELEASES !== "false";
|
|
235
242
|
const useRefs = process.env.USE_REFS !== "false";
|
|
236
243
|
const useMembers = process.env.USE_MEMBERS !== "false";
|
|
244
|
+
const useSearch = process.env.USE_SEARCH !== "false";
|
|
237
245
|
const registriesToUse = new Map();
|
|
238
246
|
registriesToUse.set("core", registry_1.coreToolRegistry);
|
|
239
247
|
if (useLabels)
|
|
@@ -264,6 +272,8 @@ class RegistryManager {
|
|
|
264
272
|
registriesToUse.set("refs", registry_14.refsToolRegistry);
|
|
265
273
|
if (useMembers)
|
|
266
274
|
registriesToUse.set("members", registry_15.membersToolRegistry);
|
|
275
|
+
if (useSearch)
|
|
276
|
+
registriesToUse.set("search", registry_16.searchToolRegistry);
|
|
267
277
|
const descOverrides = (0, config_1.getToolDescriptionOverrides)();
|
|
268
278
|
for (const registry of registriesToUse.values()) {
|
|
269
279
|
for (const [toolName, tool] of registry) {
|
|
@@ -307,6 +317,7 @@ class RegistryManager {
|
|
|
307
317
|
registry_13.releasesToolRegistry,
|
|
308
318
|
registry_14.refsToolRegistry,
|
|
309
319
|
registry_15.membersToolRegistry,
|
|
320
|
+
registry_16.searchToolRegistry,
|
|
310
321
|
];
|
|
311
322
|
for (const registry of allRegistries) {
|
|
312
323
|
for (const [, tool] of registry) {
|