gitlab-docs-mcp 1.0.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/LICENSE +21 -0
- package/README.md +130 -0
- package/data/gitlab-docs/documents.json +38252 -0
- package/data/gitlab-docs/index_meta.json +6 -0
- package/dist/bin.js +2 -0
- package/dist/config.d.ts +24 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +54 -0
- package/dist/config.js.map +1 -0
- package/dist/content/cache.d.ts +51 -0
- package/dist/content/cache.d.ts.map +1 -0
- package/dist/content/cache.js +60 -0
- package/dist/content/cache.js.map +1 -0
- package/dist/content/cache.test.d.ts +2 -0
- package/dist/content/cache.test.d.ts.map +1 -0
- package/dist/content/cache.test.js +58 -0
- package/dist/content/cache.test.js.map +1 -0
- package/dist/content/index.d.ts +3 -0
- package/dist/content/index.d.ts.map +1 -0
- package/dist/content/index.js +3 -0
- package/dist/content/index.js.map +1 -0
- package/dist/content/parser.d.ts +32 -0
- package/dist/content/parser.d.ts.map +1 -0
- package/dist/content/parser.js +72 -0
- package/dist/content/parser.js.map +1 -0
- package/dist/content/parser.test.d.ts +2 -0
- package/dist/content/parser.test.d.ts.map +1 -0
- package/dist/content/parser.test.js +71 -0
- package/dist/content/parser.test.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +92 -0
- package/dist/index.js.map +1 -0
- package/dist/search/document.d.ts +11 -0
- package/dist/search/document.d.ts.map +1 -0
- package/dist/search/document.js +47 -0
- package/dist/search/document.js.map +1 -0
- package/dist/search/engine.d.ts +41 -0
- package/dist/search/engine.d.ts.map +1 -0
- package/dist/search/engine.js +200 -0
- package/dist/search/engine.js.map +1 -0
- package/dist/search/flexsearch-wrapper.d.ts +51 -0
- package/dist/search/flexsearch-wrapper.d.ts.map +1 -0
- package/dist/search/flexsearch-wrapper.js +55 -0
- package/dist/search/flexsearch-wrapper.js.map +1 -0
- package/dist/search/index.d.ts +4 -0
- package/dist/search/index.d.ts.map +1 -0
- package/dist/search/index.js +4 -0
- package/dist/search/index.js.map +1 -0
- package/dist/tools/getDocPage.d.ts +8 -0
- package/dist/tools/getDocPage.d.ts.map +1 -0
- package/dist/tools/getDocPage.js +48 -0
- package/dist/tools/getDocPage.js.map +1 -0
- package/dist/tools/index.d.ts +5 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +5 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/listDocSections.d.ts +8 -0
- package/dist/tools/listDocSections.d.ts.map +1 -0
- package/dist/tools/listDocSections.js +17 -0
- package/dist/tools/listDocSections.js.map +1 -0
- package/dist/tools/registry.d.ts +14 -0
- package/dist/tools/registry.d.ts.map +1 -0
- package/dist/tools/registry.js +64 -0
- package/dist/tools/registry.js.map +1 -0
- package/dist/tools/registry.test.d.ts +2 -0
- package/dist/tools/registry.test.d.ts.map +1 -0
- package/dist/tools/registry.test.js +45 -0
- package/dist/tools/registry.test.js.map +1 -0
- package/dist/tools/searchGitLabDocs.d.ts +19 -0
- package/dist/tools/searchGitLabDocs.d.ts.map +1 -0
- package/dist/tools/searchGitLabDocs.js +25 -0
- package/dist/tools/searchGitLabDocs.js.map +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/models.d.ts +57 -0
- package/dist/types/models.d.ts.map +1 -0
- package/dist/types/models.js +41 -0
- package/dist/types/models.js.map +1 -0
- package/dist/utils/constants.d.ts +31 -0
- package/dist/utils/constants.d.ts.map +1 -0
- package/dist/utils/constants.js +38 -0
- package/dist/utils/constants.js.map +1 -0
- package/dist/utils/constants.test.d.ts +2 -0
- package/dist/utils/constants.test.d.ts.map +1 -0
- package/dist/utils/constants.test.js +16 -0
- package/dist/utils/constants.test.js.map +1 -0
- package/dist/utils/errors.d.ts +22 -0
- package/dist/utils/errors.d.ts.map +1 -0
- package/dist/utils/errors.js +43 -0
- package/dist/utils/errors.js.map +1 -0
- package/dist/utils/errors.test.d.ts +2 -0
- package/dist/utils/errors.test.d.ts.map +1 -0
- package/dist/utils/errors.test.js +55 -0
- package/dist/utils/errors.test.js.map +1 -0
- package/dist/utils/index.d.ts +5 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +5 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/logger.d.ts +23 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +44 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/logger.test.d.ts +2 -0
- package/dist/utils/logger.test.d.ts.map +1 -0
- package/dist/utils/logger.test.js +71 -0
- package/dist/utils/logger.test.js.map +1 -0
- package/dist/utils/performance.d.ts +53 -0
- package/dist/utils/performance.d.ts.map +1 -0
- package/dist/utils/performance.js +130 -0
- package/dist/utils/performance.js.map +1 -0
- package/dist/utils/performance.test.d.ts +2 -0
- package/dist/utils/performance.test.d.ts.map +1 -0
- package/dist/utils/performance.test.js +75 -0
- package/dist/utils/performance.test.js.map +1 -0
- package/package.json +75 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { DEFAULT_MAX_RESULTS } from '../utils/constants.js';
|
|
2
|
+
/**
|
|
3
|
+
* MCP Tool registry - single source of truth for tool definitions
|
|
4
|
+
*/
|
|
5
|
+
export const TOOL_DEFINITIONS = [
|
|
6
|
+
{
|
|
7
|
+
name: 'searchGitLabDocs',
|
|
8
|
+
description: 'Search GitLab documentation for CI/CD pipelines, runners, API, administration, deployment, security, container registry, Kubernetes integration, and all GitLab features. Covers 2,494 pages including tutorials, configuration guides, troubleshooting, and best practices.',
|
|
9
|
+
inputSchema: {
|
|
10
|
+
type: 'object',
|
|
11
|
+
properties: {
|
|
12
|
+
query: {
|
|
13
|
+
type: 'string',
|
|
14
|
+
description: 'Search query',
|
|
15
|
+
},
|
|
16
|
+
maxResults: {
|
|
17
|
+
type: 'number',
|
|
18
|
+
description: 'Maximum results to return (default: 10)',
|
|
19
|
+
default: DEFAULT_MAX_RESULTS,
|
|
20
|
+
},
|
|
21
|
+
section: {
|
|
22
|
+
type: 'string',
|
|
23
|
+
description: 'Filter by documentation section (optional)',
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
required: ['query'],
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
name: 'getDocPage',
|
|
31
|
+
description: 'Get the complete content of any GitLab documentation page including detailed configuration examples, code snippets, and step-by-step guides for GitLab features',
|
|
32
|
+
inputSchema: {
|
|
33
|
+
type: 'object',
|
|
34
|
+
properties: {
|
|
35
|
+
path: {
|
|
36
|
+
type: 'string',
|
|
37
|
+
description: 'Document path (e.g., "ci/README.md")',
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
required: ['path'],
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
name: 'listDocSections',
|
|
45
|
+
description: 'Browse GitLab documentation structure including sections for CI/CD, API, administration, user guides, development, security, operations, and integrations',
|
|
46
|
+
inputSchema: {
|
|
47
|
+
type: 'object',
|
|
48
|
+
properties: {},
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
];
|
|
52
|
+
/**
|
|
53
|
+
* Get tool definition by name
|
|
54
|
+
*/
|
|
55
|
+
export function getToolDefinition(name) {
|
|
56
|
+
return TOOL_DEFINITIONS.find((tool) => tool.name === name);
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Validate tool name exists
|
|
60
|
+
*/
|
|
61
|
+
export function isValidToolName(name) {
|
|
62
|
+
return TOOL_DEFINITIONS.some((tool) => tool.name === name);
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/tools/registry.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MA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C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.test.d.ts","sourceRoot":"","sources":["../../src/tools/registry.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest';
|
|
2
|
+
import { TOOL_DEFINITIONS, getToolDefinition, isValidToolName } from './registry.js';
|
|
3
|
+
describe('Tool Registry', () => {
|
|
4
|
+
it('should have all tool definitions', () => {
|
|
5
|
+
expect(TOOL_DEFINITIONS).toHaveLength(3);
|
|
6
|
+
const toolNames = TOOL_DEFINITIONS.map((t) => t.name);
|
|
7
|
+
expect(toolNames).toContain('searchGitLabDocs');
|
|
8
|
+
expect(toolNames).toContain('getDocPage');
|
|
9
|
+
expect(toolNames).toContain('listDocSections');
|
|
10
|
+
});
|
|
11
|
+
it('should get tool definition by name', () => {
|
|
12
|
+
const searchTool = getToolDefinition('searchGitLabDocs');
|
|
13
|
+
expect(searchTool).toBeDefined();
|
|
14
|
+
expect(searchTool?.name).toBe('searchGitLabDocs');
|
|
15
|
+
expect(searchTool?.description).toContain('Search GitLab documentation');
|
|
16
|
+
const getPageTool = getToolDefinition('getDocPage');
|
|
17
|
+
expect(getPageTool).toBeDefined();
|
|
18
|
+
expect(getPageTool?.name).toBe('getDocPage');
|
|
19
|
+
const listSectionsTool = getToolDefinition('listDocSections');
|
|
20
|
+
expect(listSectionsTool).toBeDefined();
|
|
21
|
+
expect(listSectionsTool?.name).toBe('listDocSections');
|
|
22
|
+
});
|
|
23
|
+
it('should return undefined for unknown tool', () => {
|
|
24
|
+
const unknownTool = getToolDefinition('unknownTool');
|
|
25
|
+
expect(unknownTool).toBeUndefined();
|
|
26
|
+
});
|
|
27
|
+
it('should validate tool names', () => {
|
|
28
|
+
expect(isValidToolName('searchGitLabDocs')).toBe(true);
|
|
29
|
+
expect(isValidToolName('getDocPage')).toBe(true);
|
|
30
|
+
expect(isValidToolName('listDocSections')).toBe(true);
|
|
31
|
+
expect(isValidToolName('unknownTool')).toBe(false);
|
|
32
|
+
});
|
|
33
|
+
it('should have valid input schemas', () => {
|
|
34
|
+
const searchTool = getToolDefinition('searchGitLabDocs');
|
|
35
|
+
expect(searchTool?.inputSchema).toBeDefined();
|
|
36
|
+
expect(searchTool?.inputSchema.type).toBe('object');
|
|
37
|
+
expect(searchTool?.inputSchema.properties).toBeDefined();
|
|
38
|
+
expect(searchTool?.inputSchema.required).toContain('query');
|
|
39
|
+
const getPageTool = getToolDefinition('getDocPage');
|
|
40
|
+
expect(getPageTool?.inputSchema.required).toContain('path');
|
|
41
|
+
const listSectionsTool = getToolDefinition('listDocSections');
|
|
42
|
+
expect(listSectionsTool?.inputSchema.properties).toBeDefined();
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
//# sourceMappingURL=registry.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.test.js","sourceRoot":"","sources":["../../src/tools/registry.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAErF,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;IAC7B,EAAE,CAAC,kCAAkC,EAAE,GAAG,EAAE;QAC1C,MAAM,CAAC,gBAAgB,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;QAEzC,MAAM,SAAS,GAAG,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;QACtD,MAAM,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC;QAChD,MAAM,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;QAC1C,MAAM,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,iBAAiB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CAAC,IAAI,CAAC,CAAC;QACtD,MAAM,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACrD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,iCAAiC,EAAE,GAAG,EAAE;QACzC,MAAM,UAAU,GAAG,iBAAiB,CAAC,kBAAkB,CAAC,CAAC;QACzD,MAAM,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC,WAAW,EAAE,CAAC;QAC9C,MAAM,CAAC,UAAU,EAAE,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACpD,MAAM,CAAC,UAAU,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC,WAAW,EAAE,CAAC;QACzD,MAAM,CAAC,UAAU,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QAE5D,MAAM,WAAW,GAAG,iBAAiB,CAAC,YAAY,CAAC,CAAC;QACpD,MAAM,CAAC,WAAW,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QAE5D,MAAM,gBAAgB,GAAG,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;QAC9D,MAAM,CAAC,gBAAgB,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC,WAAW,EAAE,CAAC;IACjE,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { SearchEngine } from '../search/engine.js';
|
|
2
|
+
import type { DocumentTree } from '../search/document.js';
|
|
3
|
+
import type { MarkdownParser } from '../content/parser.js';
|
|
4
|
+
import type { ContentCache } from '../content/cache.js';
|
|
5
|
+
import type { Config } from '../config.js';
|
|
6
|
+
export interface ToolContext {
|
|
7
|
+
searchEngine: SearchEngine;
|
|
8
|
+
docTree: DocumentTree;
|
|
9
|
+
parser: MarkdownParser;
|
|
10
|
+
cache: ContentCache;
|
|
11
|
+
config: Config;
|
|
12
|
+
}
|
|
13
|
+
export declare function searchGitLabDocsTool(args: unknown, context: ToolContext): {
|
|
14
|
+
content: {
|
|
15
|
+
type: "text";
|
|
16
|
+
text: string;
|
|
17
|
+
}[];
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=searchGitLabDocs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"searchGitLabDocs.d.ts","sourceRoot":"","sources":["../../src/tools/searchGitLabDocs.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAI3C,MAAM,WAAW,WAAW;IAC1B,YAAY,EAAE,YAAY,CAAC;IAC3B,OAAO,EAAE,YAAY,CAAC;IACtB,MAAM,EAAE,cAAc,CAAC;IACvB,KAAK,EAAE,YAAY,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;CAChB;AAQD,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW;;;;;EAuBvE"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { SearchResponseSchema } from '../types/models.js';
|
|
3
|
+
import { DEFAULT_MAX_RESULTS, MAX_ALLOWED_RESULTS } from '../utils/constants.js';
|
|
4
|
+
const SearchArgsSchema = z.object({
|
|
5
|
+
query: z.string().min(1),
|
|
6
|
+
maxResults: z.number().int().min(1).max(MAX_ALLOWED_RESULTS).default(DEFAULT_MAX_RESULTS),
|
|
7
|
+
section: z.string().optional(),
|
|
8
|
+
});
|
|
9
|
+
export function searchGitLabDocsTool(args, context) {
|
|
10
|
+
// Validate arguments
|
|
11
|
+
const { query, maxResults, section } = SearchArgsSchema.parse(args);
|
|
12
|
+
// Perform search
|
|
13
|
+
const { results, total } = context.searchEngine.search(query, maxResults, section, context.config.search.minScore);
|
|
14
|
+
// Validate response
|
|
15
|
+
const response = SearchResponseSchema.parse({ results, total });
|
|
16
|
+
return {
|
|
17
|
+
content: [
|
|
18
|
+
{
|
|
19
|
+
type: 'text',
|
|
20
|
+
text: JSON.stringify(response, null, 2),
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=searchGitLabDocs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"searchGitLabDocs.js","sourceRoot":"","sources":["../../src/tools/searchGitLabDocs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAUjF,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACxB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC,OAAO,CAAC,mBAAmB,CAAC;IACzF,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC/B,CAAC,CAAC;AAEH,MAAM,UAAU,oBAAoB,CAAC,IAAa,EAAE,OAAoB;IACtE,qBAAqB;IACrB,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,gBAAgB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAEpE,iBAAiB;IACjB,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC,YAAY,CAAC,MAAM,CACpD,KAAK,EACL,UAAU,EACV,OAAO,EACP,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAC/B,CAAC;IAEF,oBAAoB;IACpB,MAAM,QAAQ,GAAG,oBAAoB,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC;IAEhE,OAAO;QACL,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAe;gBACrB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;aACxC;SACF;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const DocumentSchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
path: z.ZodString;
|
|
5
|
+
title: z.ZodString;
|
|
6
|
+
section: z.ZodString;
|
|
7
|
+
content: z.ZodString;
|
|
8
|
+
version: z.ZodString;
|
|
9
|
+
lastUpdated: z.ZodDate;
|
|
10
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
export declare const SearchResultSchema: z.ZodObject<{
|
|
13
|
+
title: z.ZodString;
|
|
14
|
+
path: z.ZodString;
|
|
15
|
+
url: z.ZodString;
|
|
16
|
+
excerpt: z.ZodString;
|
|
17
|
+
score: z.ZodNumber;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
export declare const SearchResponseSchema: z.ZodObject<{
|
|
20
|
+
results: z.ZodArray<z.ZodObject<{
|
|
21
|
+
title: z.ZodString;
|
|
22
|
+
path: z.ZodString;
|
|
23
|
+
url: z.ZodString;
|
|
24
|
+
excerpt: z.ZodString;
|
|
25
|
+
score: z.ZodNumber;
|
|
26
|
+
}, z.core.$strip>>;
|
|
27
|
+
total: z.ZodNumber;
|
|
28
|
+
}, z.core.$strip>;
|
|
29
|
+
export declare const DocPageResponseSchema: z.ZodObject<{
|
|
30
|
+
title: z.ZodString;
|
|
31
|
+
path: z.ZodString;
|
|
32
|
+
url: z.ZodString;
|
|
33
|
+
content: z.ZodString;
|
|
34
|
+
metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
35
|
+
}, z.core.$strip>;
|
|
36
|
+
export declare const DocSectionSchema: z.ZodObject<{
|
|
37
|
+
name: z.ZodString;
|
|
38
|
+
path: z.ZodString;
|
|
39
|
+
pageCount: z.ZodNumber;
|
|
40
|
+
subsections: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
41
|
+
}, z.core.$strip>;
|
|
42
|
+
export declare const ListSectionsResponseSchema: z.ZodObject<{
|
|
43
|
+
sections: z.ZodArray<z.ZodObject<{
|
|
44
|
+
name: z.ZodString;
|
|
45
|
+
path: z.ZodString;
|
|
46
|
+
pageCount: z.ZodNumber;
|
|
47
|
+
subsections: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
48
|
+
}, z.core.$strip>>;
|
|
49
|
+
total: z.ZodNumber;
|
|
50
|
+
}, z.core.$strip>;
|
|
51
|
+
export type Document = z.infer<typeof DocumentSchema>;
|
|
52
|
+
export type SearchResult = z.infer<typeof SearchResultSchema>;
|
|
53
|
+
export type SearchResponse = z.infer<typeof SearchResponseSchema>;
|
|
54
|
+
export type DocPageResponse = z.infer<typeof DocPageResponseSchema>;
|
|
55
|
+
export type DocSection = z.infer<typeof DocSectionSchema>;
|
|
56
|
+
export type ListSectionsResponse = z.infer<typeof ListSectionsResponseSchema>;
|
|
57
|
+
//# sourceMappingURL=models.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/types/models.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,cAAc;;;;;;;;;iBASzB,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;iBAM7B,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;iBAG/B,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;iBAMhC,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;iBAK3B,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;;iBAGrC,CAAC;AAGH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AACtD,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC1D,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
// Zod schemas for runtime validation
|
|
3
|
+
export const DocumentSchema = z.object({
|
|
4
|
+
id: z.string(),
|
|
5
|
+
path: z.string(),
|
|
6
|
+
title: z.string(),
|
|
7
|
+
section: z.string(),
|
|
8
|
+
content: z.string(),
|
|
9
|
+
version: z.string(),
|
|
10
|
+
lastUpdated: z.date(),
|
|
11
|
+
metadata: z.record(z.string(), z.unknown()).optional(),
|
|
12
|
+
});
|
|
13
|
+
export const SearchResultSchema = z.object({
|
|
14
|
+
title: z.string(),
|
|
15
|
+
path: z.string(),
|
|
16
|
+
url: z.string(),
|
|
17
|
+
excerpt: z.string(),
|
|
18
|
+
score: z.number(),
|
|
19
|
+
});
|
|
20
|
+
export const SearchResponseSchema = z.object({
|
|
21
|
+
results: z.array(SearchResultSchema),
|
|
22
|
+
total: z.number(),
|
|
23
|
+
});
|
|
24
|
+
export const DocPageResponseSchema = z.object({
|
|
25
|
+
title: z.string(),
|
|
26
|
+
path: z.string(),
|
|
27
|
+
url: z.string(),
|
|
28
|
+
content: z.string(),
|
|
29
|
+
metadata: z.record(z.string(), z.unknown()),
|
|
30
|
+
});
|
|
31
|
+
export const DocSectionSchema = z.object({
|
|
32
|
+
name: z.string(),
|
|
33
|
+
path: z.string(),
|
|
34
|
+
pageCount: z.number(),
|
|
35
|
+
subsections: z.array(z.string()).optional(),
|
|
36
|
+
});
|
|
37
|
+
export const ListSectionsResponseSchema = z.object({
|
|
38
|
+
sections: z.array(DocSectionSchema),
|
|
39
|
+
total: z.number(),
|
|
40
|
+
});
|
|
41
|
+
//# sourceMappingURL=models.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../src/types/models.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,qCAAqC;AACrC,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,OAAO,EAAE,CAAC,CAAC,M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AAC,MAAM,EAAE;IAChB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;CAC5C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,gBAAgB,CAAC;IACnC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;CAClB,CAAC,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Application constants
|
|
3
|
+
*/
|
|
4
|
+
export declare const SERVER_VERSION = "1.0.0";
|
|
5
|
+
export declare const SERVER_NAME = "gitlab-docs-mcp";
|
|
6
|
+
export declare const DEFAULT_MAX_RESULTS = 10;
|
|
7
|
+
export declare const MAX_ALLOWED_RESULTS = 50;
|
|
8
|
+
export declare const MIN_SEARCH_SCORE = 0;
|
|
9
|
+
export declare const DEFAULT_EXCERPT_LENGTH = 200;
|
|
10
|
+
export declare const EXCERPT_CONTEXT_BEFORE = 50;
|
|
11
|
+
export declare const EXCERPT_CONTEXT_AFTER = 150;
|
|
12
|
+
export declare const SCORE_TITLE_MATCH = 3;
|
|
13
|
+
export declare const SCORE_SECTION_MATCH = 1.5;
|
|
14
|
+
export declare const SCORE_CONTENT_MATCH = 0.5;
|
|
15
|
+
export declare const SCORE_MAX_CONTENT = 5;
|
|
16
|
+
export declare const SCORE_MAX = 10;
|
|
17
|
+
export declare const DEFAULT_CACHE_SIZE_MB = 50;
|
|
18
|
+
export declare const DEFAULT_CACHE_ENTRIES = 100;
|
|
19
|
+
export declare const DEFAULT_CACHE_TTL_MINUTES = 60;
|
|
20
|
+
export declare const INDEX_VERSION = "1.0.0";
|
|
21
|
+
export declare const GITLAB_DOCS_URL = "https://docs.gitlab.com/";
|
|
22
|
+
export declare const GITLAB_DOCS_REPO = "https://gitlab.com/gitlab-org/gitlab-docs";
|
|
23
|
+
export declare const DEFAULT_INDEX_PATH = "data/gitlab-docs";
|
|
24
|
+
export declare const INDEX_META_FILE = "index_meta.json";
|
|
25
|
+
export declare const INDEX_DOCS_FILE = "documents.json";
|
|
26
|
+
export declare const DOCS_REPO_PATH = "data/gitlab-docs-repo/doc";
|
|
27
|
+
export declare const FLEXSEARCH_TOKENIZE = "forward";
|
|
28
|
+
export declare const FLEXSEARCH_RESOLUTION = 9;
|
|
29
|
+
export declare const FLEXSEARCH_MIN_LENGTH = 2;
|
|
30
|
+
export declare const FLEXSEARCH_CACHE_SIZE = 100;
|
|
31
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/utils/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,eAAO,MAAM,cAAc,UAAU,CAAC;AACtC,eAAO,MAAM,WAAW,oBAAoB,CAAC;AAG7C,eAAO,MAAM,mBAAmB,KAAK,CAAC;AACtC,eAAO,MAAM,mBAAmB,KAAK,CAAC;AACtC,eAAO,MAAM,gBAAgB,IAAM,CAAC;AACpC,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAC1C,eAAO,MAAM,sBAAsB,KAAK,CAAC;AACzC,eAAO,MAAM,qBAAqB,MAAM,CAAC;AAGzC,eAAO,MAAM,iBAAiB,IAAM,CAAC;AACrC,eAAO,MAAM,mBAAmB,MAAM,CAAC;AACvC,eAAO,MAAM,mBAAmB,MAAM,CAAC;AACvC,eAAO,MAAM,iBAAiB,IAAM,CAAC;AACrC,eAAO,MAAM,SAAS,KAAO,CAAC;AAG9B,eAAO,MAAM,qBAAqB,KAAK,CAAC;AACxC,eAAO,MAAM,qBAAqB,MAAM,CAAC;AACzC,eAAO,MAAM,yBAAyB,KAAK,CAAC;AAG5C,eAAO,MAAM,aAAa,UAAU,CAAC;AACrC,eAAO,MAAM,eAAe,6BAA6B,CAAC;AAC1D,eAAO,MAAM,gBAAgB,8CAA8C,CAAC;AAG5E,eAAO,MAAM,kBAAkB,qBAAqB,CAAC;AACrD,eAAO,MAAM,eAAe,oBAAoB,CAAC;AACjD,eAAO,MAAM,eAAe,mBAAmB,CAAC;AAChD,eAAO,MAAM,cAAc,8BAA8B,CAAC;AAG1D,eAAO,MAAM,mBAAmB,YAAY,CAAC;AAC7C,eAAO,MAAM,qBAAqB,IAAI,CAAC;AACvC,eAAO,MAAM,qBAAqB,IAAI,CAAC;AACvC,eAAO,MAAM,qBAAqB,MAAM,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Application constants
|
|
3
|
+
*/
|
|
4
|
+
// Server configuration
|
|
5
|
+
export const SERVER_VERSION = '1.0.0';
|
|
6
|
+
export const SERVER_NAME = 'gitlab-docs-mcp';
|
|
7
|
+
// Search configuration
|
|
8
|
+
export const DEFAULT_MAX_RESULTS = 10;
|
|
9
|
+
export const MAX_ALLOWED_RESULTS = 50;
|
|
10
|
+
export const MIN_SEARCH_SCORE = 0.0;
|
|
11
|
+
export const DEFAULT_EXCERPT_LENGTH = 200;
|
|
12
|
+
export const EXCERPT_CONTEXT_BEFORE = 50;
|
|
13
|
+
export const EXCERPT_CONTEXT_AFTER = 150;
|
|
14
|
+
// Scoring weights
|
|
15
|
+
export const SCORE_TITLE_MATCH = 3.0;
|
|
16
|
+
export const SCORE_SECTION_MATCH = 1.5;
|
|
17
|
+
export const SCORE_CONTENT_MATCH = 0.5;
|
|
18
|
+
export const SCORE_MAX_CONTENT = 5.0;
|
|
19
|
+
export const SCORE_MAX = 10.0;
|
|
20
|
+
// Cache configuration defaults
|
|
21
|
+
export const DEFAULT_CACHE_SIZE_MB = 50;
|
|
22
|
+
export const DEFAULT_CACHE_ENTRIES = 100;
|
|
23
|
+
export const DEFAULT_CACHE_TTL_MINUTES = 60;
|
|
24
|
+
// Index configuration
|
|
25
|
+
export const INDEX_VERSION = '1.0.0';
|
|
26
|
+
export const GITLAB_DOCS_URL = 'https://docs.gitlab.com/';
|
|
27
|
+
export const GITLAB_DOCS_REPO = 'https://gitlab.com/gitlab-org/gitlab-docs';
|
|
28
|
+
// File paths
|
|
29
|
+
export const DEFAULT_INDEX_PATH = 'data/gitlab-docs';
|
|
30
|
+
export const INDEX_META_FILE = 'index_meta.json';
|
|
31
|
+
export const INDEX_DOCS_FILE = 'documents.json';
|
|
32
|
+
export const DOCS_REPO_PATH = 'data/gitlab-docs-repo/doc';
|
|
33
|
+
// Flexsearch configuration
|
|
34
|
+
export const FLEXSEARCH_TOKENIZE = 'forward';
|
|
35
|
+
export const FLEXSEARCH_RESOLUTION = 9;
|
|
36
|
+
export const FLEXSEARCH_MIN_LENGTH = 2;
|
|
37
|
+
export const FLEXSEARCH_CACHE_SIZE = 100;
|
|
38
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/utils/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,uBAAuB;AACvB,MAAM,CAAC,MAAM,cAAc,GAAG,OAAO,CAAC;AACtC,MAAM,CAAC,MAAM,WAAW,GAAG,iBAAiB,CAAC;AAE7C,uBAAuB;AACvB,MAAM,CAAC,MAAM,mBAAmB,GAAG,EAAE,CAAC;AACtC,MAAM,CAAC,MAAM,mBAAmB,GAAG,EAAE,CAAC;AACtC,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CAAC;AACpC,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,CAAC;AAC1C,MAAM,CAAC,MAAM,sBAAsB,GAAG,EAAE,CAAC;AACzC,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,CAAC;AAEzC,kBAAkB;AAClB,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAAC;AACrC,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,CAAC;AACvC,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,CAAC;AACvC,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAAC;AACrC,MAAM,CAAC,MAAM,SAAS,GAAG,IAAI,CAAC;AAE9B,+BAA+B;AAC/B,MAAM,CAAC,MAAM,qBAAqB,GAAG,EAAE,CAAC;AACxC,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,CAAC;AACzC,MAAM,CAAC,MAAM,yBAAyB,GAAG,EAAE,CAAC;AAE5C,sBAAsB;AACtB,MAAM,CAAC,MAAM,aAAa,GAAG,OAAO,CAAC;AACrC,MAAM,CAAC,MAAM,eAAe,GAAG,0BAA0B,CAAC;AAC1D,MAAM,CAAC,MAAM,gBAAgB,GAAG,2CAA2C,CAAC;AAE5E,aAAa;AACb,MAAM,CAAC,MAAM,kBAAkB,GAAG,kBAAkB,CAAC;AACrD,MAAM,CAAC,MAAM,eAAe,GAAG,iBAAiB,CAAC;AACjD,MAAM,CAAC,MAAM,eAAe,GAAG,gBAAgB,CAAC;AAChD,MAAM,CAAC,MAAM,cAAc,GAAG,2BAA2B,CAAC;AAE1D,2BAA2B;AAC3B,MAAM,CAAC,MAAM,mBAAmB,GAAG,SAAS,CAAC;AAC7C,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC;AACvC,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC;AACvC,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.test.d.ts","sourceRoot":"","sources":["../../src/utils/constants.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest';
|
|
2
|
+
import { SERVER_VERSION, DEFAULT_MAX_RESULTS, SCORE_TITLE_MATCH, SCORE_SECTION_MATCH, SCORE_MAX, } from '../utils/constants.js';
|
|
3
|
+
describe('Constants', () => {
|
|
4
|
+
it('should have valid server configuration', () => {
|
|
5
|
+
expect(SERVER_VERSION).toMatch(/^\d+\.\d+\.\d+$/);
|
|
6
|
+
expect(typeof DEFAULT_MAX_RESULTS).toBe('number');
|
|
7
|
+
expect(DEFAULT_MAX_RESULTS).toBeGreaterThan(0);
|
|
8
|
+
});
|
|
9
|
+
it('should have valid score weights', () => {
|
|
10
|
+
expect(SCORE_TITLE_MATCH).toBeGreaterThan(0);
|
|
11
|
+
expect(SCORE_SECTION_MATCH).toBeGreaterThan(0);
|
|
12
|
+
expect(SCORE_TITLE_MATCH).toBeGreaterThan(SCORE_SECTION_MATCH);
|
|
13
|
+
expect(SCORE_MAX).toBeGreaterThan(SCORE_TITLE_MATCH);
|
|
14
|
+
});
|
|
15
|
+
});
|
|
16
|
+
//# sourceMappingURL=constants.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.test.js","sourceRoot":"","sources":["../../src/utils/constants.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACnB,SAAS,GACV,MAAM,uBAAuB,CAAC;AAE/B,QAAQ,CAAC,WAAW,EAAE,GAAG,EAAE;IACzB,EAAE,CAAC,wCAAwC,EAAE,GAAG,EAAE;QAChD,MAAM,CAAC,cAAc,CAAC,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;QAClD,MAAM,CAAC,OAAO,mBAAmB,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAClD,MAAM,CAAC,mBAAmB,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;IACjD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,iCAAiC,EAAE,GAAG,EAAE;QACzC,MAAM,CAAC,iBAAiB,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;QAC7C,MAAM,CAAC,mBAAmB,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;QAC/C,MAAM,CAAC,iBAAiB,CAAC,CAAC,eAAe,CAAC,mBAAmB,CAAC,CAAC;QAC/D,MAAM,CAAC,SAAS,CAAC,CAAC,eAAe,CAAC,iBAAiB,CAAC,CAAC;IACvD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Custom error types for better error handling
|
|
3
|
+
*/
|
|
4
|
+
export declare class GitLabDocsError extends Error {
|
|
5
|
+
constructor(message: string);
|
|
6
|
+
}
|
|
7
|
+
export declare class IndexNotFoundError extends GitLabDocsError {
|
|
8
|
+
constructor(indexPath: string);
|
|
9
|
+
}
|
|
10
|
+
export declare class DocumentNotFoundError extends GitLabDocsError {
|
|
11
|
+
constructor(path: string);
|
|
12
|
+
}
|
|
13
|
+
export declare class InvalidSearchQueryError extends GitLabDocsError {
|
|
14
|
+
constructor(reason: string);
|
|
15
|
+
}
|
|
16
|
+
export declare class IndexLoadError extends GitLabDocsError {
|
|
17
|
+
constructor(message: string, cause?: Error);
|
|
18
|
+
}
|
|
19
|
+
export declare class ToolExecutionError extends GitLabDocsError {
|
|
20
|
+
constructor(toolName: string, message: string);
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/utils/errors.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,qBAAa,eAAgB,SAAQ,KAAK;gBAC5B,OAAO,EAAE,MAAM;CAI5B;AAED,qBAAa,kBAAmB,SAAQ,eAAe;gBACzC,SAAS,EAAE,MAAM;CAI9B;AAED,qBAAa,qBAAsB,SAAQ,eAAe;gBAC5C,IAAI,EAAE,MAAM;CAIzB;AAED,qBAAa,uBAAwB,SAAQ,eAAe;gBAC9C,MAAM,EAAE,MAAM;CAI3B;AAED,qBAAa,cAAe,SAAQ,eAAe;gBACrC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK;CAO3C;AAED,qBAAa,kBAAmB,SAAQ,eAAe;gBACzC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;CAI9C"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Custom error types for better error handling
|
|
3
|
+
*/
|
|
4
|
+
export class GitLabDocsError extends Error {
|
|
5
|
+
constructor(message) {
|
|
6
|
+
super(message);
|
|
7
|
+
this.name = 'GitLabDocsError';
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export class IndexNotFoundError extends GitLabDocsError {
|
|
11
|
+
constructor(indexPath) {
|
|
12
|
+
super(`Index not found at ${indexPath}. Run 'npm run build-index' to create it.`);
|
|
13
|
+
this.name = 'IndexNotFoundError';
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
export class DocumentNotFoundError extends GitLabDocsError {
|
|
17
|
+
constructor(path) {
|
|
18
|
+
super(`Document not found: ${path}`);
|
|
19
|
+
this.name = 'DocumentNotFoundError';
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
export class InvalidSearchQueryError extends GitLabDocsError {
|
|
23
|
+
constructor(reason) {
|
|
24
|
+
super(`Invalid search query: ${reason}`);
|
|
25
|
+
this.name = 'InvalidSearchQueryError';
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
export class IndexLoadError extends GitLabDocsError {
|
|
29
|
+
constructor(message, cause) {
|
|
30
|
+
super(`Failed to load index: ${message}`);
|
|
31
|
+
this.name = 'IndexLoadError';
|
|
32
|
+
if (cause) {
|
|
33
|
+
this.stack = `${this.stack}\nCaused by: ${cause.stack}`;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
export class ToolExecutionError extends GitLabDocsError {
|
|
38
|
+
constructor(toolName, message) {
|
|
39
|
+
super(`Tool '${toolName}' execution failed: ${message}`);
|
|
40
|
+
this.name = 'ToolExecutionError';
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/utils/errors.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,OAAO,eAAgB,SAAQ,KAAK;IACxC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC;IAChC,CAAC;CACF;AAED,MAAM,OAAO,kBAAmB,SAAQ,eAAe;IACrD,YAAY,SAAiB;QAC3B,KAAK,CAAC,sBAAsB,SAAS,2CAA2C,CAAC,CAAC;QAClF,IAAI,CAAC,IAAI,GAAG,oBAAoB,CAAC;IACnC,CAAC;CACF;AAED,MAAM,OAAO,qBAAsB,SAAQ,eAAe;IACxD,YAAY,IAAY;QACtB,KAAK,CAAC,uBAAuB,IAAI,EAAE,CAAC,CAAC;QACrC,IAAI,CAAC,IAAI,GAAG,uBAAuB,CAAC;IACtC,CAAC;CACF;AAED,MAAM,OAAO,uBAAwB,SAAQ,eAAe;IAC1D,YAAY,MAAc;QACxB,KAAK,CAAC,yBAAyB,MAAM,EAAE,CAAC,CAAC;QACzC,IAAI,CAAC,IAAI,GAAG,yBAAyB,CAAC;IACxC,CAAC;CACF;AAED,MAAM,OAAO,cAAe,SAAQ,eAAe;IACjD,YAAY,OAAe,EAAE,KAAa;QACxC,KAAK,CAAC,yBAAyB,OAAO,EAAE,CAAC,CAAC;QAC1C,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC;QAC7B,IAAI,KAAK,EAAE,CAAC;YACV,IAAI,CAAC,KAAK,GAAG,GAAG,IAAI,CAAC,KAAK,gBAAgB,KAAK,CAAC,KAAK,EAAE,CAAC;QAC1D,CAAC;IACH,CAAC;CACF;AAED,MAAM,OAAO,kBAAmB,SAAQ,eAAe;IACrD,YAAY,QAAgB,EAAE,OAAe;QAC3C,KAAK,CAAC,SAAS,QAAQ,uBAAuB,OAAO,EAAE,CAAC,CAAC;QACzD,IAAI,CAAC,IAAI,GAAG,oBAAoB,CAAC;IACnC,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.test.d.ts","sourceRoot":"","sources":["../../src/utils/errors.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest';
|
|
2
|
+
import { GitLabDocsError, IndexNotFoundError, DocumentNotFoundError, InvalidSearchQueryError, IndexLoadError, ToolExecutionError, } from '../utils/errors.js';
|
|
3
|
+
describe('Custom Errors', () => {
|
|
4
|
+
describe('GitLabDocsError', () => {
|
|
5
|
+
it('should create error with message', () => {
|
|
6
|
+
const error = new GitLabDocsError('Test error');
|
|
7
|
+
expect(error.message).toBe('Test error');
|
|
8
|
+
expect(error.name).toBe('GitLabDocsError');
|
|
9
|
+
expect(error).toBeInstanceOf(Error);
|
|
10
|
+
});
|
|
11
|
+
});
|
|
12
|
+
describe('IndexNotFoundError', () => {
|
|
13
|
+
it('should format error message with path', () => {
|
|
14
|
+
const error = new IndexNotFoundError('/test/path');
|
|
15
|
+
expect(error.message).toContain('/test/path');
|
|
16
|
+
expect(error.message).toContain('npm run build-index');
|
|
17
|
+
expect(error.name).toBe('IndexNotFoundError');
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
describe('DocumentNotFoundError', () => {
|
|
21
|
+
it('should format error message with document path', () => {
|
|
22
|
+
const error = new DocumentNotFoundError('ci/README.md');
|
|
23
|
+
expect(error.message).toBe('Document not found: ci/README.md');
|
|
24
|
+
expect(error.name).toBe('DocumentNotFoundError');
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
describe('InvalidSearchQueryError', () => {
|
|
28
|
+
it('should format error message with reason', () => {
|
|
29
|
+
const error = new InvalidSearchQueryError('query too short');
|
|
30
|
+
expect(error.message).toBe('Invalid search query: query too short');
|
|
31
|
+
expect(error.name).toBe('InvalidSearchQueryError');
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
describe('IndexLoadError', () => {
|
|
35
|
+
it('should create error with message', () => {
|
|
36
|
+
const error = new IndexLoadError('Failed to parse JSON');
|
|
37
|
+
expect(error.message).toContain('Failed to load index');
|
|
38
|
+
expect(error.message).toContain('Failed to parse JSON');
|
|
39
|
+
expect(error.name).toBe('IndexLoadError');
|
|
40
|
+
});
|
|
41
|
+
it('should include cause stack trace', () => {
|
|
42
|
+
const cause = new Error('Original error');
|
|
43
|
+
const error = new IndexLoadError('Failed', cause);
|
|
44
|
+
expect(error.stack).toContain('Caused by:');
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
describe('ToolExecutionError', () => {
|
|
48
|
+
it('should format error message with tool name', () => {
|
|
49
|
+
const error = new ToolExecutionError('searchGitLabDocs', 'Invalid arguments');
|
|
50
|
+
expect(error.message).toBe("Tool 'searchGitLabDocs' execution failed: Invalid arguments");
|
|
51
|
+
expect(error.name).toBe('ToolExecutionError');
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
//# sourceMappingURL=errors.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.test.js","sourceRoot":"","sources":["../../src/utils/errors.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EACL,eAAe,EACf,kBAAkB,EAClB,qBAAqB,EACrB,uBAAuB,EACvB,cAAc,EACd,kBAAkB,GACnB,MAAM,oBAAoB,CAAC;AAE5B,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;IAC7B,QAAQ,CAAC,iBAAiB,EAAE,GAAG,EAAE;QAC/B,EAAE,CAAC,kCAAkC,EAAE,GAAG,EAAE;Y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6DAA6D,CAAC,CAAC;YAC1F,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;QAChD,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Logging utility for MCP server
|
|
3
|
+
* Provides structured logging with levels
|
|
4
|
+
*/
|
|
5
|
+
export declare enum LogLevel {
|
|
6
|
+
DEBUG = 0,
|
|
7
|
+
INFO = 1,
|
|
8
|
+
WARN = 2,
|
|
9
|
+
ERROR = 3,
|
|
10
|
+
SILENT = 4
|
|
11
|
+
}
|
|
12
|
+
declare class Logger {
|
|
13
|
+
private level;
|
|
14
|
+
constructor(level?: LogLevel);
|
|
15
|
+
setLevel(level: LogLevel): void;
|
|
16
|
+
debug(message: string, ...args: unknown[]): void;
|
|
17
|
+
info(message: string, ...args: unknown[]): void;
|
|
18
|
+
warn(message: string, ...args: unknown[]): void;
|
|
19
|
+
error(message: string, ...args: unknown[]): void;
|
|
20
|
+
}
|
|
21
|
+
export declare const logger: Logger;
|
|
22
|
+
export {};
|
|
23
|
+
//# sourceMappingURL=logger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,oBAAY,QAAQ;IAClB,KAAK,IAAI;IACT,IAAI,IAAI;IACR,IAAI,IAAI;IACR,KAAK,IAAI;IACT,MAAM,IAAI;CACX;AAED,cAAM,MAAM;IACV,OAAO,CAAC,KAAK,CAAW;gBAEZ,KAAK,GAAE,QAAwB;IAI3C,QAAQ,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI;IAI/B,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAMhD,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAM/C,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAM/C,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;CAKjD;AAGD,eAAO,MAAM,MAAM,QAElB,CAAC"}
|