@venizia/ignis-docs 0.0.6-3 → 0.0.7-1
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 +125 -388
- package/dist/mcp-server/common/config.d.ts +0 -21
- package/dist/mcp-server/common/config.d.ts.map +1 -1
- package/dist/mcp-server/common/config.js +1 -36
- package/dist/mcp-server/common/config.js.map +1 -1
- package/dist/mcp-server/helpers/docs.helper.d.ts +0 -24
- package/dist/mcp-server/helpers/docs.helper.d.ts.map +1 -1
- package/dist/mcp-server/helpers/docs.helper.js +0 -25
- package/dist/mcp-server/helpers/docs.helper.js.map +1 -1
- package/dist/mcp-server/helpers/github.helper.d.ts +0 -13
- package/dist/mcp-server/helpers/github.helper.d.ts.map +1 -1
- package/dist/mcp-server/helpers/github.helper.js +3 -20
- package/dist/mcp-server/helpers/github.helper.js.map +1 -1
- package/dist/mcp-server/index.js +0 -20
- package/dist/mcp-server/index.js.map +1 -1
- package/dist/mcp-server/tools/base.tool.d.ts +2 -79
- package/dist/mcp-server/tools/base.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/base.tool.js +1 -38
- package/dist/mcp-server/tools/base.tool.js.map +1 -1
- package/dist/mcp-server/tools/docs/get-document-content.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/docs/get-document-content.tool.js +0 -9
- package/dist/mcp-server/tools/docs/get-document-content.tool.js.map +1 -1
- package/dist/mcp-server/tools/docs/get-document-metadata.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/docs/get-document-metadata.tool.js +0 -9
- package/dist/mcp-server/tools/docs/get-document-metadata.tool.js.map +1 -1
- package/dist/mcp-server/tools/docs/get-package-overview.tool.d.ts +0 -6
- package/dist/mcp-server/tools/docs/get-package-overview.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/docs/get-package-overview.tool.js +1 -24
- package/dist/mcp-server/tools/docs/get-package-overview.tool.js.map +1 -1
- package/dist/mcp-server/tools/docs/list-categories.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/docs/list-categories.tool.js +0 -9
- package/dist/mcp-server/tools/docs/list-categories.tool.js.map +1 -1
- package/dist/mcp-server/tools/docs/list-documents.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/docs/list-documents.tool.js +0 -9
- package/dist/mcp-server/tools/docs/list-documents.tool.js.map +1 -1
- package/dist/mcp-server/tools/docs/search-documents.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/docs/search-documents.tool.js +0 -9
- package/dist/mcp-server/tools/docs/search-documents.tool.js.map +1 -1
- package/dist/mcp-server/tools/github/list-project-files.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/github/list-project-files.tool.js +0 -9
- package/dist/mcp-server/tools/github/list-project-files.tool.js.map +1 -1
- package/dist/mcp-server/tools/github/search-code.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/github/search-code.tool.js +1 -13
- package/dist/mcp-server/tools/github/search-code.tool.js.map +1 -1
- package/dist/mcp-server/tools/github/verify-dependencies.tool.d.ts +0 -4
- package/dist/mcp-server/tools/github/verify-dependencies.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/github/verify-dependencies.tool.js +1 -18
- package/dist/mcp-server/tools/github/verify-dependencies.tool.js.map +1 -1
- package/dist/mcp-server/tools/github/view-source-file.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/github/view-source-file.tool.js +0 -9
- package/dist/mcp-server/tools/github/view-source-file.tool.js.map +1 -1
- package/dist/mcp-server/tools/index.d.ts.map +1 -1
- package/dist/mcp-server/tools/index.js +0 -2
- package/dist/mcp-server/tools/index.js.map +1 -1
- package/package.json +1 -1
- package/wiki/best-practices/api-usage-examples.md +7 -5
- package/wiki/best-practices/code-style-standards/advanced-patterns.md +1 -1
- package/wiki/best-practices/code-style-standards/constants-configuration.md +1 -1
- package/wiki/best-practices/code-style-standards/control-flow.md +1 -1
- package/wiki/best-practices/code-style-standards/function-patterns.md +1 -1
- package/wiki/best-practices/common-pitfalls.md +1 -1
- package/wiki/best-practices/data-modeling.md +33 -1
- package/wiki/best-practices/error-handling.md +7 -4
- package/wiki/best-practices/performance-optimization.md +1 -1
- package/wiki/best-practices/security-guidelines.md +5 -4
- package/wiki/guides/core-concepts/components-guide.md +1 -1
- package/wiki/guides/core-concepts/controllers.md +14 -8
- package/wiki/guides/core-concepts/persistent/models.md +32 -0
- package/wiki/guides/core-concepts/services.md +2 -1
- package/wiki/guides/get-started/5-minute-quickstart.md +1 -1
- package/wiki/guides/tutorials/building-a-crud-api.md +2 -1
- package/wiki/guides/tutorials/complete-installation.md +2 -2
- package/wiki/guides/tutorials/ecommerce-api.md +3 -3
- package/wiki/guides/tutorials/realtime-chat.md +7 -6
- package/wiki/index.md +2 -1
- package/wiki/references/base/application.md +28 -0
- package/wiki/references/base/components.md +2 -1
- package/wiki/references/base/controllers.md +31 -4
- package/wiki/references/base/datasources.md +6 -2
- package/wiki/references/base/dependency-injection.md +31 -0
- package/wiki/references/base/filter-system/fields-order-pagination.md +8 -1
- package/wiki/references/base/middlewares.md +2 -1
- package/wiki/references/base/models.md +144 -2
- package/wiki/references/base/repositories/advanced.md +2 -2
- package/wiki/references/base/repositories/index.md +24 -1
- package/wiki/references/base/repositories/soft-deletable.md +213 -0
- package/wiki/references/base/services.md +2 -1
- package/wiki/references/components/authentication/api.md +525 -205
- package/wiki/references/components/authentication/errors.md +502 -105
- package/wiki/references/components/authentication/index.md +388 -75
- package/wiki/references/components/authentication/usage.md +575 -247
- package/wiki/references/components/authorization/usage.md +62 -0
- package/wiki/references/components/health-check.md +2 -1
- package/wiki/references/components/socket-io/index.md +9 -4
- package/wiki/references/components/socket-io/usage.md +1 -1
- package/wiki/references/components/static-asset/index.md +3 -5
- package/wiki/references/components/swagger.md +2 -1
- package/wiki/references/configuration/environment-variables.md +2 -1
- package/wiki/references/configuration/index.md +40 -1
- package/wiki/references/helpers/error/index.md +1 -1
- package/wiki/references/helpers/inversion/index.md +1 -1
- package/wiki/references/helpers/redis/index.md +2 -9
- package/wiki/references/quick-reference.md +3 -5
- package/wiki/references/utilities/crypto.md +2 -2
- package/wiki/references/utilities/date.md +5 -5
- package/wiki/references/utilities/index.md +3 -11
- package/wiki/references/utilities/jsx.md +4 -2
- package/wiki/references/utilities/module.md +1 -1
- package/wiki/references/utilities/parse.md +24 -4
- package/wiki/references/utilities/performance.md +2 -2
- package/wiki/references/utilities/promise.md +4 -4
- package/wiki/references/utilities/request.md +2 -2
- package/wiki/references/utilities/schema.md +17 -8
|
@@ -1,19 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.MCPConfigs = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Centralized configuration for the Ignis MCP Documentation Server.
|
|
6
|
-
* All tool constants and settings are defined here for easy maintenance.
|
|
7
|
-
*/
|
|
8
4
|
class MCPConfigs {
|
|
9
|
-
// ----------------------------------------------------------------------------
|
|
10
|
-
// SERVER CONFIGURATION
|
|
11
|
-
// ----------------------------------------------------------------------------
|
|
12
5
|
static { this.server = { name: 'ignis-docs', version: '0.0.1' }; }
|
|
13
|
-
// ----------------------------------------------------------------------------
|
|
14
|
-
// GITHUB CONFIGURATION
|
|
15
|
-
// ----------------------------------------------------------------------------
|
|
16
|
-
/** Runtime-configurable branch (set via CLI argument) */
|
|
17
6
|
static { this._branch = 'main'; }
|
|
18
7
|
static { this.github = {
|
|
19
8
|
apiBase: 'https://api.github.com',
|
|
@@ -22,56 +11,32 @@ class MCPConfigs {
|
|
|
22
11
|
repoPath: 'repos',
|
|
23
12
|
repoName: 'ignis',
|
|
24
13
|
userAgent: 'Ignis-MCP-Server',
|
|
25
|
-
/** Get current branch (configurable at runtime) */
|
|
26
14
|
get branch() {
|
|
27
15
|
return MCPConfigs._branch;
|
|
28
16
|
},
|
|
29
17
|
}; }
|
|
30
|
-
/**
|
|
31
|
-
* Set the GitHub branch to use for fetching source code.
|
|
32
|
-
* Call this before starting the server.
|
|
33
|
-
* @param branch - Branch name (e.g., 'main', 'develop', 'feature/xyz')
|
|
34
|
-
*/
|
|
35
18
|
static setBranch(opts) {
|
|
36
19
|
MCPConfigs._branch = opts.branch;
|
|
37
20
|
}
|
|
38
|
-
// ----------------------------------------------------------------------------
|
|
39
|
-
// DOCUMENTATION SEARCH CONFIGURATION
|
|
40
|
-
// ----------------------------------------------------------------------------
|
|
41
21
|
static { this.search = {
|
|
42
|
-
/** Maximum characters for content snippet in search results */
|
|
43
22
|
snippetLength: 320,
|
|
44
|
-
/** Default number of results to return */
|
|
45
23
|
defaultLimit: 10,
|
|
46
|
-
/** Maximum allowed results per search */
|
|
47
24
|
maxLimit: 50,
|
|
48
|
-
/** Minimum query length required */
|
|
49
25
|
minQueryLength: 2,
|
|
50
26
|
}; }
|
|
51
|
-
// ----------------------------------------------------------------------------
|
|
52
|
-
// CODE SEARCH CONFIGURATION
|
|
53
|
-
// ----------------------------------------------------------------------------
|
|
54
27
|
static { this.codeSearch = {
|
|
55
|
-
/** Default number of results to return */
|
|
56
28
|
defaultLimit: 10,
|
|
57
|
-
/** Maximum allowed results per search (GitHub API limit) */
|
|
58
29
|
maxLimit: 30,
|
|
59
|
-
/** Minimum query length required */
|
|
60
30
|
minQueryLength: 2,
|
|
61
|
-
/** Rate limit warning threshold */
|
|
62
31
|
rateLimitWarningThreshold: 5,
|
|
63
32
|
}; }
|
|
64
|
-
// ----------------------------------------------------------------------------
|
|
65
|
-
// FUSE.JS SEARCH ENGINE CONFIGURATION
|
|
66
|
-
// ----------------------------------------------------------------------------
|
|
67
33
|
static { this.fuse = {
|
|
68
34
|
includeScore: true,
|
|
69
|
-
|
|
35
|
+
// 0.0 = exact match, 1.0 = match anything
|
|
70
36
|
threshold: 0.4,
|
|
71
37
|
minMatchCharLength: 2,
|
|
72
38
|
findAllMatches: true,
|
|
73
39
|
ignoreLocation: true,
|
|
74
|
-
/** Search field weights: title matches are prioritized over content */
|
|
75
40
|
keys: [
|
|
76
41
|
{ name: 'title', weight: 0.7 },
|
|
77
42
|
{ name: 'content', weight: 0.3 },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../mcp-server/common/config.ts"],"names":[],"mappings":";;;AAAA
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../mcp-server/common/config.ts"],"names":[],"mappings":";;;AAAA,MAAa,UAAU;aACL,WAAM,GAAG,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,EAAW,CAAC;aAE5D,YAAO,GAAW,MAAM,CAAC;aAExB,WAAM,GAAG;QACvB,OAAO,EAAE,wBAAwB;QACjC,cAAc,EAAE,mCAAmC;QACnD,SAAS,EAAE,YAAY;QACvB,QAAQ,EAAE,OAAO;QACjB,QAAQ,EAAE,OAAO;QACjB,SAAS,EAAE,kBAAkB;QAE7B,IAAI,MAAM;YACR,OAAO,UAAU,CAAC,OAAO,CAAC;QAC5B,CAAC;KACF,CAAC;IAEF,MAAM,CAAC,SAAS,CAAC,IAAwB;QACvC,UAAU,CAAC,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC;IACnC,CAAC;aAEe,WAAM,GAAG;QACvB,aAAa,EAAE,GAAG;QAClB,YAAY,EAAE,EAAE;QAChB,QAAQ,EAAE,EAAE;QACZ,cAAc,EAAE,CAAC;KAClB,CAAC;aAEc,eAAU,GAAG;QAC3B,YAAY,EAAE,EAAE;QAChB,QAAQ,EAAE,EAAE;QACZ,cAAc,EAAE,CAAC;QACjB,yBAAyB,EAAE,CAAC;KAC7B,CAAC;aAEc,SAAI,GAAG;QACrB,YAAY,EAAE,IAAI;QAClB,0CAA0C;QAC1C,SAAS,EAAE,GAAG;QACd,kBAAkB,EAAE,CAAC;QACrB,cAAc,EAAE,IAAI;QACpB,cAAc,EAAE,IAAI;QACpB,IAAI,EAAE;YACJ,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE;YAC9B,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE;SACjC;KACF,CAAC;;AA/CJ,gCAgDC"}
|
|
@@ -12,21 +12,9 @@ interface ISearchOptions {
|
|
|
12
12
|
export declare class DocsHelper {
|
|
13
13
|
private static _docs;
|
|
14
14
|
private static _fuse;
|
|
15
|
-
/**
|
|
16
|
-
* Loads and caches documentation from the wiki.
|
|
17
|
-
*/
|
|
18
15
|
static load(): Promise<IDoc[]>;
|
|
19
|
-
/**
|
|
20
|
-
* Clears the documentation cache.
|
|
21
|
-
*/
|
|
22
16
|
static clearCache(): void;
|
|
23
|
-
/**
|
|
24
|
-
* Generates a smart snippet from content.
|
|
25
|
-
*/
|
|
26
17
|
private static generateSnippet;
|
|
27
|
-
/**
|
|
28
|
-
* Searches the loaded documentation.
|
|
29
|
-
*/
|
|
30
18
|
static searchDocuments(opts: ISearchOptions): Promise<{
|
|
31
19
|
id: string;
|
|
32
20
|
title: string;
|
|
@@ -34,15 +22,9 @@ export declare class DocsHelper {
|
|
|
34
22
|
snippet: string;
|
|
35
23
|
score: number | undefined;
|
|
36
24
|
}[]>;
|
|
37
|
-
/**
|
|
38
|
-
* Gets the full content of a specific document.
|
|
39
|
-
*/
|
|
40
25
|
static getDocumentContent(opts: {
|
|
41
26
|
id: string;
|
|
42
27
|
}): Promise<string | null>;
|
|
43
|
-
/**
|
|
44
|
-
* Lists all available documentation files.
|
|
45
|
-
*/
|
|
46
28
|
static listDocumentFiles(opts: {
|
|
47
29
|
category?: string;
|
|
48
30
|
}): Promise<{
|
|
@@ -50,13 +32,7 @@ export declare class DocsHelper {
|
|
|
50
32
|
title: string;
|
|
51
33
|
category: string;
|
|
52
34
|
}[]>;
|
|
53
|
-
/**
|
|
54
|
-
* Lists all unique categories in the documentation.
|
|
55
|
-
*/
|
|
56
35
|
static listCategories(): Promise<string[]>;
|
|
57
|
-
/**
|
|
58
|
-
* Gets metadata about a specific document.
|
|
59
|
-
*/
|
|
60
36
|
static getDocumentMetadata(opts: {
|
|
61
37
|
id: string;
|
|
62
38
|
}): Promise<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docs.helper.d.ts","sourceRoot":"","sources":["../../../mcp-server/helpers/docs.helper.ts"],"names":[],"mappings":"AAQA,UAAU,IAAI;IACZ,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,UAAU,cAAc;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;
|
|
1
|
+
{"version":3,"file":"docs.helper.d.ts","sourceRoot":"","sources":["../../../mcp-server/helpers/docs.helper.ts"],"names":[],"mappings":"AAQA,UAAU,IAAI;IACZ,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,UAAU,cAAc;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,qBAAa,UAAU;IACrB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAc;IAClC,OAAO,CAAC,MAAM,CAAC,KAAK,CAA2B;WAElC,IAAI,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;IAiDpC,MAAM,CAAC,UAAU,IAAI,IAAI;IAMzB,OAAO,CAAC,MAAM,CAAC,eAAe;WAYjB,eAAe,CAAC,IAAI,EAAE,cAAc;;;;;;;WAqBpC,kBAAkB,CAAC,IAAI,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;WAYhE,iBAAiB,CAAC,IAAI,EAAE;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE;;;;;WAgB7C,cAAc,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;WASnC,mBAAmB,CAAC,IAAI,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE;;;;;;;;;;;;;;;;;CAiCtD"}
|
|
@@ -11,13 +11,9 @@ const promises_1 = __importDefault(require("node:fs/promises"));
|
|
|
11
11
|
const node_path_1 = __importDefault(require("node:path"));
|
|
12
12
|
const common_1 = require("../common");
|
|
13
13
|
const logger_helper_1 = require("./logger.helper");
|
|
14
|
-
// --------------------------------------------------------------------------------------------------
|
|
15
14
|
class DocsHelper {
|
|
16
15
|
static { this._docs = []; }
|
|
17
16
|
static { this._fuse = null; }
|
|
18
|
-
/**
|
|
19
|
-
* Loads and caches documentation from the wiki.
|
|
20
|
-
*/
|
|
21
17
|
static async load() {
|
|
22
18
|
if (this._docs.length > 0) {
|
|
23
19
|
return this._docs;
|
|
@@ -57,17 +53,11 @@ class DocsHelper {
|
|
|
57
53
|
throw new Error(`Documentation loading failed: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
58
54
|
}
|
|
59
55
|
}
|
|
60
|
-
/**
|
|
61
|
-
* Clears the documentation cache.
|
|
62
|
-
*/
|
|
63
56
|
static clearCache() {
|
|
64
57
|
this._docs = [];
|
|
65
58
|
this._fuse = null;
|
|
66
59
|
logger_helper_1.Logger.debug('Documentation cache cleared');
|
|
67
60
|
}
|
|
68
|
-
/**
|
|
69
|
-
* Generates a smart snippet from content.
|
|
70
|
-
*/
|
|
71
61
|
static generateSnippet(opts) {
|
|
72
62
|
const { content, maxLength = common_1.MCPConfigs.search.snippetLength } = opts;
|
|
73
63
|
if (content.length <= maxLength) {
|
|
@@ -77,9 +67,6 @@ class DocsHelper {
|
|
|
77
67
|
const lastSpace = trimmed.lastIndexOf(' ');
|
|
78
68
|
return (lastSpace > 0 ? trimmed.substring(0, lastSpace) : trimmed) + '...';
|
|
79
69
|
}
|
|
80
|
-
/**
|
|
81
|
-
* Searches the loaded documentation.
|
|
82
|
-
*/
|
|
83
70
|
static async searchDocuments(opts) {
|
|
84
71
|
if (!this._fuse) {
|
|
85
72
|
await this.load();
|
|
@@ -97,9 +84,6 @@ class DocsHelper {
|
|
|
97
84
|
score: result.score,
|
|
98
85
|
}));
|
|
99
86
|
}
|
|
100
|
-
/**
|
|
101
|
-
* Gets the full content of a specific document.
|
|
102
|
-
*/
|
|
103
87
|
static async getDocumentContent(opts) {
|
|
104
88
|
if (this._docs.length === 0) {
|
|
105
89
|
await this.load();
|
|
@@ -110,9 +94,6 @@ class DocsHelper {
|
|
|
110
94
|
}
|
|
111
95
|
return null;
|
|
112
96
|
}
|
|
113
|
-
/**
|
|
114
|
-
* Lists all available documentation files.
|
|
115
|
-
*/
|
|
116
97
|
static async listDocumentFiles(opts) {
|
|
117
98
|
if (this._docs.length === 0) {
|
|
118
99
|
await this.load();
|
|
@@ -126,9 +107,6 @@ class DocsHelper {
|
|
|
126
107
|
category: doc.category,
|
|
127
108
|
}));
|
|
128
109
|
}
|
|
129
|
-
/**
|
|
130
|
-
* Lists all unique categories in the documentation.
|
|
131
|
-
*/
|
|
132
110
|
static async listCategories() {
|
|
133
111
|
if (this._docs.length === 0) {
|
|
134
112
|
await this.load();
|
|
@@ -136,9 +114,6 @@ class DocsHelper {
|
|
|
136
114
|
const categories = new Set(this._docs.map(d => d.category));
|
|
137
115
|
return Array.from(categories).sort();
|
|
138
116
|
}
|
|
139
|
-
/**
|
|
140
|
-
* Gets metadata about a specific document.
|
|
141
|
-
*/
|
|
142
117
|
static async getDocumentMetadata(opts) {
|
|
143
118
|
if (this._docs.length === 0) {
|
|
144
119
|
await this.load();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docs.helper.js","sourceRoot":"","sources":["../../../mcp-server/helpers/docs.helper.ts"],"names":[],"mappings":";;;;;;AAAA,0DAA2B;AAC3B,sDAA2B;AAC3B,8DAAiC;AACjC,gEAAkC;AAClC,0DAA6B;AAC7B,sCAA8C;AA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,KAAK;gBAChB,QAAQ,EAAE,GAAG,CAAC,QAAQ;gBACtB,SAAS,EAAE,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM;gBAC1D,SAAS,EAAE,GAAG,CAAC,OAAO,CAAC,MAAM;aAC9B,CAAC;QACJ,CAAC;IACH,CAAC;;AAjKH,gCAkKC"}
|
|
@@ -12,24 +12,11 @@ export interface IGithubFile {
|
|
|
12
12
|
export interface IGithubContent {
|
|
13
13
|
content: string;
|
|
14
14
|
}
|
|
15
|
-
/**
|
|
16
|
-
* A helper class for interacting with the VENIZIA-AI/ignis GitHub repository.
|
|
17
|
-
*/
|
|
18
15
|
export declare class GithubHelper {
|
|
19
16
|
private static getApiUrl;
|
|
20
|
-
/**
|
|
21
|
-
* Fetches the contents of a directory from the GitHub repository.
|
|
22
|
-
* @param opts.path - The path to the directory from the repository root.
|
|
23
|
-
* @returns A promise that resolves to the directory content or an error object.
|
|
24
|
-
*/
|
|
25
17
|
static getDirectoryContents(opts?: {
|
|
26
18
|
path?: string;
|
|
27
19
|
}): Promise<IGithubFile[] | IGithubError>;
|
|
28
|
-
/**
|
|
29
|
-
* Fetches the content of a specific file from the GitHub repository.
|
|
30
|
-
* @param opts.filePath - The path to the file from the repository root.
|
|
31
|
-
* @returns A promise that resolves to the file content or an error object.
|
|
32
|
-
*/
|
|
33
20
|
static getFileContent(opts: {
|
|
34
21
|
filePath: string;
|
|
35
22
|
}): Promise<IGithubContent | IGithubError>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"github.helper.d.ts","sourceRoot":"","sources":["../../../mcp-server/helpers/github.helper.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,GAAG,KAAK,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;CACjB;
|
|
1
|
+
{"version":3,"file":"github.helper.d.ts","sourceRoot":"","sources":["../../../mcp-server/helpers/github.helper.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,GAAG,KAAK,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;CACjB;AAYD,qBAAa,YAAY;IACvB,OAAO,CAAC,MAAM,CAAC,SAAS;WAKX,oBAAoB,CAC/B,IAAI,GAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAO,GAC3B,OAAO,CAAC,WAAW,EAAE,GAAG,YAAY,CAAC;WA8C3B,cAAc,CAAC,IAAI,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,cAAc,GAAG,YAAY,CAAC;CA6BhG"}
|
|
@@ -3,26 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.GithubHelper = void 0;
|
|
4
4
|
const common_1 = require("../common");
|
|
5
5
|
const logger_helper_1 = require("./logger.helper");
|
|
6
|
-
// --------------------------------------------------------------------------------------------------
|
|
7
|
-
// Helper function to create a standardized error response
|
|
8
6
|
const getError = (opts) => ({
|
|
9
7
|
error: opts.message,
|
|
10
8
|
status: opts.status || 500,
|
|
11
9
|
});
|
|
12
|
-
// --------------------------------------------------------------------------------------------------
|
|
13
|
-
/**
|
|
14
|
-
* A helper class for interacting with the VENIZIA-AI/ignis GitHub repository.
|
|
15
|
-
*/
|
|
16
10
|
class GithubHelper {
|
|
17
11
|
static getApiUrl(opts) {
|
|
18
12
|
const { apiBase, repoOwner, repoName } = common_1.MCPConfigs.github;
|
|
19
13
|
return [apiBase, common_1.MCPConfigs.github.repoPath, repoOwner, repoName, opts.path].join('/');
|
|
20
14
|
}
|
|
21
|
-
/**
|
|
22
|
-
* Fetches the contents of a directory from the GitHub repository.
|
|
23
|
-
* @param opts.path - The path to the directory from the repository root.
|
|
24
|
-
* @returns A promise that resolves to the directory content or an error object.
|
|
25
|
-
*/
|
|
26
15
|
static async getDirectoryContents(opts = {}) {
|
|
27
16
|
const dirPath = opts.path ?? '';
|
|
28
17
|
const { branch, userAgent } = common_1.MCPConfigs.github;
|
|
@@ -50,7 +39,7 @@ class GithubHelper {
|
|
|
50
39
|
return data.map(item => ({
|
|
51
40
|
name: item.name,
|
|
52
41
|
path: item.path,
|
|
53
|
-
type: item.type,
|
|
42
|
+
type: item.type,
|
|
54
43
|
size: item.size,
|
|
55
44
|
url: item.html_url,
|
|
56
45
|
}));
|
|
@@ -63,21 +52,15 @@ class GithubHelper {
|
|
|
63
52
|
});
|
|
64
53
|
}
|
|
65
54
|
}
|
|
66
|
-
/**
|
|
67
|
-
* Fetches the content of a specific file from the GitHub repository.
|
|
68
|
-
* @param opts.filePath - The path to the file from the repository root.
|
|
69
|
-
* @returns A promise that resolves to the file content or an error object.
|
|
70
|
-
*/
|
|
71
55
|
static async getFileContent(opts) {
|
|
72
56
|
const { rawContentBase, repoOwner, repoName, branch } = common_1.MCPConfigs.github;
|
|
73
|
-
//
|
|
57
|
+
// Raw content URL avoids API rate limits and base64 decoding
|
|
74
58
|
const url = [rawContentBase, repoOwner, repoName, branch, opts.filePath].join('/');
|
|
75
59
|
logger_helper_1.Logger.debug(`Fetching file content from GitHub: ${url}`);
|
|
76
60
|
try {
|
|
77
61
|
const response = await fetch(url);
|
|
78
62
|
const content = await response.text();
|
|
79
|
-
//
|
|
80
|
-
// when using raw.githubusercontent.com, OR returns 404 status.
|
|
63
|
+
// raw.githubusercontent.com returns "404: Not Found" as text body for missing files
|
|
81
64
|
if (response.status === 404 || (typeof content === 'string' && content.startsWith('404'))) {
|
|
82
65
|
logger_helper_1.Logger.warn(`File not found on GitHub: ${opts.filePath}`);
|
|
83
66
|
return getError({ message: 'File not found', status: 404 });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"github.helper.js","sourceRoot":"","sources":["../../../mcp-server/helpers/github.helper.ts"],"names":[],"mappings":";;;AAAA,sCAAuC;AACvC,mDAAyC;AAwBzC,
|
|
1
|
+
{"version":3,"file":"github.helper.js","sourceRoot":"","sources":["../../../mcp-server/helpers/github.helper.ts"],"names":[],"mappings":";;;AAAA,sCAAuC;AACvC,mDAAyC;AAwBzC,MAAM,QAAQ,GAAG,CAAC,IAA0C,EAAgB,EAAE,CAAC,CAAC;IAC9E,KAAK,EAAE,IAAI,CAAC,OAAO;IACnB,MAAM,EAAE,IAAI,CAAC,MAAM,IAAI,GAAG;CAC3B,CAAC,CAAC;AAEH,MAAa,YAAY;IACf,MAAM,CAAC,SAAS,CAAC,IAAsB;QAC7C,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,mBAAU,CAAC,MAAM,CAAC;QAC3D,OAAO,CAAC,OAAO,EAAE,mBAAU,CAAC,MAAM,CAAC,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACzF,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,oBAAoB,CAC/B,OAA0B,EAAE;QAE5B,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC;QAChC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,mBAAU,CAAC,MAAM,CA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C1D,OAAO,QAAQ,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;YAC9D,CAAC;YAED,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;gBACjB,OAAO,QAAQ,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;YAC7E,CAAC;YAED,OAAO,EAAE,OAAO,EAAE,CAAC;QACrB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,sBAAM,CAAC,KAAK,CAAC,yBAAyB,IAAI,CAAC,QAAQ,gBAAgB,EAAE,KAAK,CAAC,CAAC;YAC5E,OAAO,QAAQ,CAAC;gBACd,OAAO,EAAE,iCAAiC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;gBACvF,MAAM,EAAE,GAAG;aACZ,CAAC,CAAC;QACL,CAAC;IACH,CAAC;CACF;AAnFD,oCAmFC"}
|
package/dist/mcp-server/index.js
CHANGED
|
@@ -5,18 +5,13 @@ const mcp_1 = require("@mastra/mcp");
|
|
|
5
5
|
const common_1 = require("./common");
|
|
6
6
|
const helpers_1 = require("./helpers");
|
|
7
7
|
const tools_1 = require("./tools");
|
|
8
|
-
// ----------------------------------------------------------------------------
|
|
9
|
-
// MCP SERVER CONFIGURATION
|
|
10
|
-
// ----------------------------------------------------------------------------
|
|
11
8
|
const mcpTools = {
|
|
12
|
-
// Documentation Tools
|
|
13
9
|
searchDocs: new tools_1.SearchDocsTool().getTool(),
|
|
14
10
|
getDocContent: new tools_1.GetDocContentTool().getTool(),
|
|
15
11
|
listDocs: new tools_1.ListDocsTool().getTool(),
|
|
16
12
|
listCategories: new tools_1.ListCategoriesTool().getTool(),
|
|
17
13
|
getDocMetadata: new tools_1.GetDocMetadataTool().getTool(),
|
|
18
14
|
getPackageOverview: new tools_1.GetPackageOverviewTool().getTool(),
|
|
19
|
-
// Code & Project Tools
|
|
20
15
|
searchCode: new tools_1.SearchCodeTool().getTool(),
|
|
21
16
|
listProjectFiles: new tools_1.ListProjectFilesTool().getTool(),
|
|
22
17
|
viewSourceFile: new tools_1.ViewSourceFileTool().getTool(),
|
|
@@ -48,30 +43,15 @@ const mcpServer = new mcp_1.MCPServer({
|
|
|
48
43
|
id: common_1.MCPConfigs.server.name,
|
|
49
44
|
name: common_1.MCPConfigs.server.name,
|
|
50
45
|
version: common_1.MCPConfigs.server.version,
|
|
51
|
-
// Register tools using singleton instances
|
|
52
46
|
tools: mcpTools,
|
|
53
|
-
// Resource handlers for direct document access
|
|
54
47
|
resources: mcpReosources,
|
|
55
48
|
});
|
|
56
|
-
// ----------------------------------------------------------------------------
|
|
57
|
-
// CLI ARGUMENT PARSING
|
|
58
|
-
// ----------------------------------------------------------------------------
|
|
59
|
-
/**
|
|
60
|
-
* Parse CLI arguments for branch configuration.
|
|
61
|
-
* Usage: node index.js [branch]
|
|
62
|
-
* Example: node index.js develop
|
|
63
|
-
* Default: main
|
|
64
|
-
*/
|
|
65
49
|
const parseArgs = () => {
|
|
66
50
|
const args = process.argv.slice(2);
|
|
67
51
|
const branch = args[0] || 'main';
|
|
68
52
|
return { branch };
|
|
69
53
|
};
|
|
70
|
-
// ----------------------------------------------------------------------------
|
|
71
|
-
// SERVER INITIALIZATION
|
|
72
|
-
// ----------------------------------------------------------------------------
|
|
73
54
|
const main = async () => {
|
|
74
|
-
// Parse CLI arguments and configure branch
|
|
75
55
|
const { branch } = parseArgs();
|
|
76
56
|
common_1.MCPConfigs.setBranch({ branch });
|
|
77
57
|
helpers_1.Logger.info('[main] Initializing Ignis MCP Documentation Server...');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../mcp-server/index.ts"],"names":[],"mappings":";;;AACA,qCAAwC;AACxC,qCAAsC;AACtC,uCAA+C;AAC/C,mCAW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,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC;IAEjE,IAAI,CAAC;QACH,MAAM,oBAAU,CAAC,IAAI,EAAE,CAAC;QACxB,gBAAM,CAAC,IAAI,CAAC,2CAA2C,CAAC,CAAC;QAEzD,MAAM,SAAS,CAAC,UAAU,EAAE,CAAC;QAC7B,gBAAM,CAAC,IAAI,CAAC,sCAAsC,CAAC,CAAC;IACtD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,gBAAM,CAAC,KAAK,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;QACpC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC;AAEF,IAAI,EAAE,CAAC"}
|
|
@@ -1,90 +1,13 @@
|
|
|
1
1
|
import type { Tool } from '@mastra/core/tools';
|
|
2
2
|
import type { z } from 'zod';
|
|
3
|
-
/**
|
|
4
|
-
* Abstract base class for all MCP documentation tools.
|
|
5
|
-
*
|
|
6
|
-
* Provides a consistent structure for tool implementation with:
|
|
7
|
-
* - Singleton pattern via getInstance()
|
|
8
|
-
* - Required abstract members for tool definition
|
|
9
|
-
* - Abstract toMastraTool() for type-safe conversion
|
|
10
|
-
*
|
|
11
|
-
* @template TInputSchema - The Zod input schema type
|
|
12
|
-
* @template TOutputSchema - The Zod output schema type
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* ```typescript
|
|
16
|
-
* class MyTool extends BaseTool<typeof InputSchema, typeof OutputSchema> {
|
|
17
|
-
* readonly id = 'myTool';
|
|
18
|
-
* readonly description = 'Does something useful';
|
|
19
|
-
* readonly inputSchema = InputSchema;
|
|
20
|
-
* readonly outputSchema = OutputSchema;
|
|
21
|
-
*
|
|
22
|
-
* async execute(opts: z.infer<typeof InputSchema>) {
|
|
23
|
-
* return { result: 'done' };
|
|
24
|
-
* }
|
|
25
|
-
*
|
|
26
|
-
* getTool() {
|
|
27
|
-
* return createTool({
|
|
28
|
-
* id: this.id,
|
|
29
|
-
* description: this.description,
|
|
30
|
-
* inputSchema: this.inputSchema,
|
|
31
|
-
* outputSchema: this.outputSchema,
|
|
32
|
-
* execute: async input => this.execute(input),
|
|
33
|
-
* });
|
|
34
|
-
* }
|
|
35
|
-
* }
|
|
36
|
-
* ```
|
|
37
|
-
*/
|
|
3
|
+
/** Abstract base class for all MCP documentation tools. */
|
|
38
4
|
export declare abstract class BaseTool<TInputSchema extends z.ZodType, TOutputSchema extends z.ZodType> {
|
|
39
|
-
/**
|
|
40
|
-
* Unique identifier for the tool.
|
|
41
|
-
* Used by MCP clients to invoke the tool.
|
|
42
|
-
*
|
|
43
|
-
* @example 'searchDocs', 'getDocContent', 'listCategories'
|
|
44
|
-
*/
|
|
45
5
|
abstract readonly id: string;
|
|
46
|
-
/**
|
|
47
|
-
* Detailed description of the tool's purpose and usage.
|
|
48
|
-
* Should include: PURPOSE, WHEN TO USE, WHEN NOT TO USE, OUTPUT description.
|
|
49
|
-
* This helps AI agents understand when and how to use the tool.
|
|
50
|
-
*/
|
|
51
6
|
abstract readonly description: string;
|
|
52
|
-
/**
|
|
53
|
-
* Zod schema defining the input parameters.
|
|
54
|
-
* Each field should have a .describe() for AI agent guidance.
|
|
55
|
-
*/
|
|
56
7
|
abstract readonly inputSchema: TInputSchema;
|
|
57
|
-
/**
|
|
58
|
-
* Zod schema defining the output structure.
|
|
59
|
-
* Helps AI agents understand and parse the response.
|
|
60
|
-
*/
|
|
61
8
|
abstract readonly outputSchema: TOutputSchema;
|
|
62
|
-
/**
|
|
63
|
-
* Executes the tool's main logic.
|
|
64
|
-
*
|
|
65
|
-
* @param opts - Validated options object matching inputSchema
|
|
66
|
-
* @returns Promise resolving to output matching outputSchema
|
|
67
|
-
*/
|
|
68
9
|
abstract execute(opts: z.infer<TInputSchema>): Promise<z.infer<TOutputSchema>>;
|
|
69
|
-
/**
|
|
70
|
-
* Converts this tool instance to a Mastra-compatible tool object.
|
|
71
|
-
* Must be implemented by each subclass to ensure proper type inference.
|
|
72
|
-
*
|
|
73
|
-
* @returns A tool object compatible with @mastra/core createTool format
|
|
74
|
-
*
|
|
75
|
-
* @example
|
|
76
|
-
* ```typescript
|
|
77
|
-
* getTool() {
|
|
78
|
-
* return createTool({
|
|
79
|
-
* id: this.id,
|
|
80
|
-
* description: this.description,
|
|
81
|
-
* inputSchema: this.inputSchema,
|
|
82
|
-
* outputSchema: this.outputSchema,
|
|
83
|
-
* execute: async input => this.execute(input),
|
|
84
|
-
* });
|
|
85
|
-
* }
|
|
86
|
-
* ```
|
|
87
|
-
*/
|
|
10
|
+
/** Converts this tool instance to a Mastra-compatible tool object. */
|
|
88
11
|
abstract getTool(): Tool<z.infer<TInputSchema>, z.infer<TOutputSchema>>;
|
|
89
12
|
}
|
|
90
13
|
//# sourceMappingURL=base.tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.tool.d.ts","sourceRoot":"","sources":["../../../mcp-server/tools/base.tool.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"base.tool.d.ts","sourceRoot":"","sources":["../../../mcp-server/tools/base.tool.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B,2DAA2D;AAC3D,8BAAsB,QAAQ,CAAC,YAAY,SAAS,CAAC,CAAC,OAAO,EAAE,aAAa,SAAS,CAAC,CAAC,OAAO;IAC5F,QAAQ,CAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IACtC,QAAQ,CAAC,QAAQ,CAAC,WAAW,EAAE,YAAY,CAAC;IAC5C,QAAQ,CAAC,QAAQ,CAAC,YAAY,EAAE,aAAa,CAAC;IAE9C,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;IAE9E,sEAAsE;IACtE,QAAQ,CAAC,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;CACxE"}
|
|
@@ -1,44 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.BaseTool = void 0;
|
|
4
|
-
|
|
5
|
-
// BASE TOOL CLASS
|
|
6
|
-
// ============================================================================
|
|
7
|
-
/**
|
|
8
|
-
* Abstract base class for all MCP documentation tools.
|
|
9
|
-
*
|
|
10
|
-
* Provides a consistent structure for tool implementation with:
|
|
11
|
-
* - Singleton pattern via getInstance()
|
|
12
|
-
* - Required abstract members for tool definition
|
|
13
|
-
* - Abstract toMastraTool() for type-safe conversion
|
|
14
|
-
*
|
|
15
|
-
* @template TInputSchema - The Zod input schema type
|
|
16
|
-
* @template TOutputSchema - The Zod output schema type
|
|
17
|
-
*
|
|
18
|
-
* @example
|
|
19
|
-
* ```typescript
|
|
20
|
-
* class MyTool extends BaseTool<typeof InputSchema, typeof OutputSchema> {
|
|
21
|
-
* readonly id = 'myTool';
|
|
22
|
-
* readonly description = 'Does something useful';
|
|
23
|
-
* readonly inputSchema = InputSchema;
|
|
24
|
-
* readonly outputSchema = OutputSchema;
|
|
25
|
-
*
|
|
26
|
-
* async execute(opts: z.infer<typeof InputSchema>) {
|
|
27
|
-
* return { result: 'done' };
|
|
28
|
-
* }
|
|
29
|
-
*
|
|
30
|
-
* getTool() {
|
|
31
|
-
* return createTool({
|
|
32
|
-
* id: this.id,
|
|
33
|
-
* description: this.description,
|
|
34
|
-
* inputSchema: this.inputSchema,
|
|
35
|
-
* outputSchema: this.outputSchema,
|
|
36
|
-
* execute: async input => this.execute(input),
|
|
37
|
-
* });
|
|
38
|
-
* }
|
|
39
|
-
* }
|
|
40
|
-
* ```
|
|
41
|
-
*/
|
|
4
|
+
/** Abstract base class for all MCP documentation tools. */
|
|
42
5
|
class BaseTool {
|
|
43
6
|
}
|
|
44
7
|
exports.BaseTool = BaseTool;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.tool.js","sourceRoot":"","sources":["../../../mcp-server/tools/base.tool.ts"],"names":[],"mappings":";;;AAGA
|
|
1
|
+
{"version":3,"file":"base.tool.js","sourceRoot":"","sources":["../../../mcp-server/tools/base.tool.ts"],"names":[],"mappings":";;;AAGA,2DAA2D;AAC3D,MAAsB,QAAQ;CAU7B;AAVD,4BAUC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-document-content.tool.d.ts","sourceRoot":"","sources":["../../../../mcp-server/tools/docs/get-document-content.tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"get-document-content.tool.d.ts","sourceRoot":"","sources":["../../../../mcp-server/tools/docs/get-document-content.tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AA6ExC,QAAA,MAAM,WAAW;;iBAEf,CAAC;AAEH,QAAA,MAAM,YAAY;;;;iBAOhB,CAAC;AAEH,qBAAa,iBAAkB,SAAQ,QAAQ,CAAC,OAAO,WAAW,EAAE,OAAO,YAAY,CAAC;IACtF,QAAQ,CAAC,EAAE,wBAAwB;IACnC,QAAQ,CAAC,WAAW,o6CAAoB;IACxC,QAAQ,CAAC,WAAW;;sBAAe;IACnC,QAAQ,CAAC,YAAY;;;;sBAAgB;IAE/B,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;IAUvF,OAAO;;;;;;;CASR"}
|
|
@@ -5,9 +5,6 @@ const tools_1 = require("@mastra/core/tools");
|
|
|
5
5
|
const zod_1 = require("zod");
|
|
6
6
|
const base_tool_1 = require("../base.tool");
|
|
7
7
|
const helpers_1 = require("../../../mcp-server/helpers");
|
|
8
|
-
// ----------------------------------------------------------------------------
|
|
9
|
-
// DESCRIPTIONS
|
|
10
|
-
// ----------------------------------------------------------------------------
|
|
11
8
|
const TOOL_DESCRIPTION = `
|
|
12
9
|
Retrieves the complete markdown content of a specific Ignis Framework documentation file.
|
|
13
10
|
|
|
@@ -79,9 +76,6 @@ TYPICAL STRUCTURE:
|
|
|
79
76
|
- Code examples in fenced blocks with language hints
|
|
80
77
|
- Cross-references to related documentation
|
|
81
78
|
`;
|
|
82
|
-
// ----------------------------------------------------------------------------
|
|
83
|
-
// SCHEMAS
|
|
84
|
-
// ----------------------------------------------------------------------------
|
|
85
79
|
const InputSchema = zod_1.z.object({
|
|
86
80
|
id: zod_1.z.string().min(1).describe(ID_DESCRIPTION),
|
|
87
81
|
});
|
|
@@ -93,9 +87,6 @@ const OutputSchema = zod_1.z.object({
|
|
|
93
87
|
.optional()
|
|
94
88
|
.describe('Error message if document not found. Verify the ID using listDocs or searchDocs.'),
|
|
95
89
|
});
|
|
96
|
-
// ----------------------------------------------------------------------------
|
|
97
|
-
// TOOL CLASS
|
|
98
|
-
// ----------------------------------------------------------------------------
|
|
99
90
|
class GetDocContentTool extends base_tool_1.BaseTool {
|
|
100
91
|
constructor() {
|
|
101
92
|
super(...arguments);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-document-content.tool.js","sourceRoot":"","sources":["../../../../mcp-server/tools/docs/get-document-content.tool.ts"],"names":[],"mappings":";;;AAAA,8CAAgD;AAChD,6BAAwB;AACxB,4CAAwC;AACxC,kDAAkD;AAElD
|
|
1
|
+
{"version":3,"file":"get-document-content.tool.js","sourceRoot":"","sources":["../../../../mcp-server/tools/docs/get-document-content.tool.ts"],"names":[],"mappings":";;;AAAA,8CAAgD;AAChD,6BAAwB;AACxB,4CAAwC;AACxC,kDAAkD;AAElD,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkCxB,CAAC;AAEF,MAAM,cAAc,GAAG;;;;;;;;;;;;;;;;;;;CAmBtB,CAAC;AAEF,MAAM,mBAAmB,GAAG;;;;;;;;;;;;;;;CAe3B,CAAC;AAEF,MAAM,WAAW,GAAG,OAAC,CAAC,MAAM,CAAC;IAC3B,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,cAAc,CAAC;CAC/C,CAAC,CAAC;AAEH,MAAM,YAAY,GAAG,OAAC,CAAC,MAAM,CAAC;IAC5B,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,qCAAqC,CAAC;IAC9D,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC;IAC5D,KAAK,EAAE,OAAC;SACL,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,kFAAkF,CAAC;CAChG,CAAC,CAAC;AAEH,MAAa,iBAAkB,SAAQ,oBAAiD;IAAxF;;QACW,OAAE,GAAG,oBAAoB,CAAC;QAC1B,gBAAW,GAAG,gBAAgB,CAAC;QAC/B,gBAAW,GAAG,WAAW,CAAC;QAC1B,iBAAY,GAAG,YAAY,CAAC;IAqBvC,CAAC;IAnBC,KAAK,CAAC,OAAO,CAAC,IAAiC;QAC7C,MAAM,OAAO,GAAG,MAAM,oBAAU,CAAC,kBAAkB,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;QAErE,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,EAAE,KAAK,EAAE,oBAAoB,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC;QACtD,CAAC;QAED,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC;IAClC,CAAC;IAED,OAAO;QACL,OAAO,IAAA,kBAAU,EAAC;YAChB,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,OAAO,EAAE,KAAK,EAAC,KAAK,EAAC,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC;SAC5C,CAAC,CAAC;IACL,CAAC;CACF;AAzBD,8CAyBC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-document-metadata.tool.d.ts","sourceRoot":"","sources":["../../../../mcp-server/tools/docs/get-document-metadata.tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"get-document-metadata.tool.d.ts","sourceRoot":"","sources":["../../../../mcp-server/tools/docs/get-document-metadata.tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAiExC,QAAA,MAAM,WAAW;;iBAEf,CAAC;AAEH,QAAA,MAAM,YAAY;;;;;;;;;iBAmBhB,CAAC;AAEH,qBAAa,kBAAmB,SAAQ,QAAQ,CAAC,OAAO,WAAW,EAAE,OAAO,YAAY,CAAC;IACvF,QAAQ,CAAC,EAAE,yBAAyB;IACpC,QAAQ,CAAC,WAAW,6iDAAoB;IACxC,QAAQ,CAAC,WAAW;;sBAAe;IACnC,QAAQ,CAAC,YAAY;;;;;;;;;sBAAgB;IAE/B,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;IAavF,OAAO;;;;;;;;;;;;CASR"}
|